Moved all old Editors Drafts while preserving historical link via 301 redirect.
authorManu Sporny <msporny@digitalbazaar.com>
Sun, 16 Oct 2011 01:57:59 -0400
changeset 219 c6ccfcc73698
parent 218 e63eecf5a946
child 220 33f6524f4f2d
Moved all old Editors Drafts while preserving historical link via 301 redirect.
spec/ED/.htaccess
spec/ED/20100529/index.html
spec/ED/20100823/index.html
spec/ED/20101014/diff-20100823.html
spec/ED/20101014/index.html
spec/ED/20101014/spec.css
spec/ED/20101024/diff-20101014.html
spec/ED/20101024/index.html
spec/ED/20101024/spec.css
spec/ED/20101128/diff-20101024.html
spec/ED/20101128/index.html
spec/ED/20101128/spec.css
spec/ED/20110201/diff-20101128.html
spec/ED/20110201/index.html
spec/ED/20110201/spec.css
spec/ED/20110507/diff-20110201.html
spec/ED/20110507/index.html
spec/ED/20110507/spec.css
spec/ED/20110615/diff-20110507.html
spec/ED/20110615/index.html
spec/ED/20110615/spec.css
spec/ED/20110803/diff-20110615.html
spec/ED/20110803/index.html
spec/ED/20110803/spec.css
spec/ED/20110808/diff-20110615.html
spec/ED/20110808/index.html
spec/ED/20110808/spec.css
spec/ED/20110817/diff-20110808.html
spec/ED/20110817/index.html
spec/ED/20110817/spec.css
spec/ED/20110911/diff-20110817.html
spec/ED/20110911/index.html
spec/ED/20110911/spec.css
spec/ED/json-ld-syntax/20100529/index.html
spec/ED/json-ld-syntax/20100823/index.html
spec/ED/json-ld-syntax/20101014/diff-20100823.html
spec/ED/json-ld-syntax/20101014/index.html
spec/ED/json-ld-syntax/20101014/spec.css
spec/ED/json-ld-syntax/20101024/diff-20101014.html
spec/ED/json-ld-syntax/20101024/index.html
spec/ED/json-ld-syntax/20101024/spec.css
spec/ED/json-ld-syntax/20101128/diff-20101024.html
spec/ED/json-ld-syntax/20101128/index.html
spec/ED/json-ld-syntax/20101128/spec.css
spec/ED/json-ld-syntax/20110201/diff-20101128.html
spec/ED/json-ld-syntax/20110201/index.html
spec/ED/json-ld-syntax/20110201/spec.css
spec/ED/json-ld-syntax/20110507/diff-20110201.html
spec/ED/json-ld-syntax/20110507/index.html
spec/ED/json-ld-syntax/20110507/spec.css
spec/ED/json-ld-syntax/20110615/diff-20110507.html
spec/ED/json-ld-syntax/20110615/index.html
spec/ED/json-ld-syntax/20110615/spec.css
spec/ED/json-ld-syntax/20110803/diff-20110615.html
spec/ED/json-ld-syntax/20110803/index.html
spec/ED/json-ld-syntax/20110803/spec.css
spec/ED/json-ld-syntax/20110808/diff-20110615.html
spec/ED/json-ld-syntax/20110808/index.html
spec/ED/json-ld-syntax/20110808/spec.css
spec/ED/json-ld-syntax/20110817/diff-20110808.html
spec/ED/json-ld-syntax/20110817/index.html
spec/ED/json-ld-syntax/20110817/spec.css
spec/ED/json-ld-syntax/20110911/diff-20110817.html
spec/ED/json-ld-syntax/20110911/index.html
spec/ED/json-ld-syntax/20110911/spec.css
spec/index.php
spec/latest/json-ld-syntax/index.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/.htaccess	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,3 @@
+RewriteEngine on
+RewriteBase /json-ld.org/spec/ED
+RewriteRule ^(20.*) json-ld-syntax/$1 [R=301,L]
--- a/spec/ED/20100529/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,532 +0,0 @@
-<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
-<html lang="en" dir="ltr">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<!-- 
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-  -->
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<link href="http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css" rel="stylesheet" type="text/css" charset="utf-8"><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8"></head><body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-30-may-2010">Unofficial Draft 30 May 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd><dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd></dl><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-Developers that embed structured data in their Web pages can choose among
-a number of languages such as RDFa [<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a>], Microformats [<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a>] 
-and Microdata [<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a>]. Each of these structured data languages, while
-incompatible at the syntax level, can be easily mapped to RDF. JSON has 
-proven to be a highly useful object serialization and messaging replacement 
-for SOAP. In an attempt to harmonize the representation of Link Data in JSON, 
-this specification outlines a common JSON representation format for 
-Linked Data that can be used to represent objects specified via RDFa, 
-Microformats and Microdata.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p></div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1. </span>How to Read this Document</a></li><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">2. </span>Introduction</a></li><li class="tocline"><a href="#design-goals" class="tocxref"><span class="secno">3. </span>Design Goals</a></li><li class="tocline"><a href="#design-rationale" class="tocxref"><span class="secno">4. </span>Design Rationale</a><ul class="toc"><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">4.1 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">4.2 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">4.3 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">4.4 </span>An Example of a Default Context</a></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">4.5 </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">4.5.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">4.5.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">4.5.3 </span>Microdata</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">5.10 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">5.11 </span>Automatic Typing</a></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
-
-<div id="how-to-read-this-document" class="section">
-<!--OddPage--><h2><span class="secno">1. </span>How to Read this Document</h2>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Developers that want to encode Microformats, RDFa, or Microdata in a
-  way that is cross-language compatible via JSON.</li>
-  <li>Developers that want to understand the encoding possibilities.</li>
-</ul>
-
-<p>
-To understand this specification you must first be familiar with JSON, 
-which is detailed in [<a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a>].</p>
-
-</div>
-
-<div id="sotd" class="section">
-<p>This document is an experimental work in progress.</p>
-<!-- <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p> -->
-</div>
-
-<div id="introduction" class="section">
-<!--OddPage--><h2><span class="secno">2. </span>Introduction</h2>
-
-<p class="issue">Need to write introduction...</p>
-
-</div>
-
-<div id="design-goals" class="section">
-<!--OddPage--><h2><span class="secno">3. </span>Design Goals</h2>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers don't need to know RDF in order to use the basic functionality
- provided by JSON-LD.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
- <dt>Expressiveness</dt>
- <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable.</dd>
-</dl>
-</div>
-
-<div id="design-rationale" class="section">
-<!--OddPage--><h2><span class="secno">4. </span>Design Rationale</h2>
-
-<p>The following section outlines the rationale behind the JSON-LD markup
-language.
-</p>
-
-<div id="map-terms-to-iris" class="section">
-<h3><span class="secno">4.1 </span>Map Terms to IRIs</h3>
-
-<p>Establishing a mechanism to map JSON values to IRIs will
-help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
-be restrictive in declaring a set of terms, rather, experimentation and 
-innovation should be supported as part of the core design of JSON-LD. There are, 
-however, a number of very small design criterial that can ensure that developers 
-will generate good RDF data that will create value for the greater 
-semantic web community and JSON/REST-based Web Services community.
-</p>
-
-<p>We will be using the following JSON object as the example for this section:
-</p>
-
-<pre class="example">{"a" : "Person",
- "name" : "Manu Sporny",
- "homepage" : "http://manu.sporny.org/"}</pre>
-</div><div id="the-default-context" class="section">
-<h3><span class="secno">4.2 </span>The Default Context</h3>
-
-<p>A default context is used in RDFa to allow developers to use keywords
-as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
-above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
-The semantic web, just like the document-based web, uses IRIs for
-unambiguous identification. The idea is that these terms mean something, 
-which you will eventually want to query. The semantic web specifies this via 
-<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
-a Vocabulary Document, and <strong>name</strong> is a term in that 
-vocabulary. Paste the two items together and you have an unambiguous identifier
-for a term.
-</p>
-
-<p>Developers, and machines, would be able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much
-like we can use WordNet today to see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Machines need the same sort of 
-dictionary of terms, and URIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>Non-prefixed terms should have term mappings declared in the default
-context so that they may be expanded later.</p>
-            
-<p>If a set of terms, like <strong>Person</strong>, 
-<strong>name</strong>, and <strong>homepage</strong>,
-are pre-defined in the default context, and that context is used to resolve the
-names in JSON objects, machines could automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">{"<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>" : "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
- "<span class="diff">http://xmlns.com/foaf/0.1/name</span>" : "Manu Sporny",
- "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>" : "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"}</pre>
-
-<p class="note">In order to differentiate between plain text and IRIs, the
-<strong>&lt;</strong> and <strong>&gt;</strong> are used around IRIs.</p>
-
-<p>Doing this would mean that JSON would start to become unambiguously
-machine-readable, play well with the semantic web, and basic markup wouldn't 
-be that much more complex than basic JSON markup. A win, all around.</p>
-</div>
-
-<div id="mashing-up-vocabularies" class="section">
-<h3><span class="secno">4.3 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
-default context beside the <em>terms</em> that are already defined. Using
-this feature, developers could also do markup like this:</p>
-
-<pre class="example">{"<span class="diff">rdf:type</span>" : "<span class="diff">foaf:Person</span>",
- "<span class="diff">foaf:name</span>" : "Manu Sporny",
- "<span class="diff">foaf:homepage</span>" : "http://manu.sporny.org/"<span class="diff">,
- "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>}</pre>
-
-<p>Developers could also be allowed to specify their own Vocabulary documents 
-by modifying the default context, like so:</p>
-
-<pre class="example">[<span class="diff">{"a" : "Context",
-   "myvocab" : "http://example.org/myvocab#"}
- },</span>
- {"a" : "foaf:Person",
- "foaf:name" : "Manu Sporny",
- "foaf:homepage" : "&lt;http://manu.sporny.org/&gt;",
- "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
- "myvocab:credits" : 500</span>}
-]</pre>
-
-<p>This mechanism is a short-hand for RDF, and if defined, will give
-developers an unambiguous way to map any JSON value to RDF. </p><p>
-</p></div>
-
-<div id="an-example-of-a-default-context" class="section">
-<h3><span class="secno">4.4 </span>An Example of a Default Context</h3>
-
-<p>To be clear, the JSON-LD aware Web Service could define a default
-context like the following:</p>
-
-<pre class="example">{"a" : "Context",
- "__vocab__" : "http://example.org/default-vocab#",
- "xsd" : "http://www.w3.org/2001/XMLSchema#",
- "dc" : "http://purl.org/dc/terms/",
- "foaf" : "http://xmlns.com/foaf/0.1/",
- "sioc" : "http://rdfs.org/sioc/ns#",
- "cc" : "http://creativecommons.org/ns#",
- "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
- "vcard" : "http://www.w3.org/2006/vcard/ns#",
- "cal" : "http://www.w3.org/2002/12/cal/ical#",
- "doap" : "http://usefulinc.com/ns/doap#",
- "Person" : "http://xmlns.com/foaf/0.1/Person",
- "name" : "http://xmlns.com/foaf/0.1/name",
- "homepage" : "http://xmlns.com/foaf/0.1/homepage"
-}</pre>
-
-<p>The <strong>__vocab__</strong> prefix is a special prefix that states 
-that any term that doesn't resolve to a term or a prefix should be 
-appended to the <strong>__vocab__</strong> IRI. This is done to ensure that 
-terms can be transformed to an IRI at all times.
-</p>
-</div>
-
-<div id="markup-examples" class="section">
-<h3><span class="secno">4.5 </span>Markup Examples</h3>
-
-<p class="issue">Write some introductory stuff about the Markup Examples.</p>
-
-<div id="rdfa" class="section">
-<h4><span class="secno">4.5.1 </span>RDFa</h4>
-
-<pre class="example">&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>Representation:</p>
-
-<pre class="example">{{ 
-   "a" : "Context",
-   "foaf" : "http://xmlns.com/foaf/0.1/"
- },
- {
-    "@" : "_:bnode1",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/bob/&gt;",
-    "foaf:name" : "Bob"
- },
- {
-    "@" : "_:bnode2",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/eve/&gt;",
-    "foaf:name" : "Eve"
- },
- {
-    "@" : "_:bnode2",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/manu/&gt;",
-    "foaf:name" : "Manu"
- }
-}</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h4><span class="secno">4.5.2 </span>Microformats</h4>
-
-<pre class="example">&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>Representation:</p>
-
-<pre class="example">{{ 
-   "a" : "Context",
-   "vcard" : "http://microformats.org/profile/hcard#vcard"
-   "url" : "http://microformats.org/profile/hcard#url"
-   "fn" : "http://microformats.org/profile/hcard#fn"
- },
- {
-    "@" : "_:bnode1",
-    "a" : "vcard",
-    "url" : "&lt;http://tantek.com/&gt;",
-    "fn" : "Tantek Çelik"
- }
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h4><span class="secno">4.5.3 </span>Microdata</h4>
-
-<pre class="example">&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Representation:</p>
-
-<pre class="example">{{ 
-   "a" : "Context",
-   "__vocab__" : "http://www.w3.org/1999/xhtml/microdata#",
-   "frbr" : "http://purl.org/vocab/frbr/core#",
-   "dc" : "http://purl.org/dc/terms/"
- },
- {
-    "a" : "frbr:Work",
-    "@" : "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "dc:title" : "Just a Geek",
-    "dc:creator" : "Whil Wheaton",
-    "frbr:realization" : ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
- },
- {
-    "a" : "frbr:Expression",
-    "@" : "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "dc:type" : "http://purl.oreilly.com/product-types/BOOK"
- },
- {
-    "a" : "frbr:Expression",
-    "@" : "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "dc:type" : "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
- }
-}</pre>
-
-</div>
-
-</div>
-
-</div>
-
-
-
-
-<div id="markup-of-rdf-concepts" class="section">
-<!--OddPage--><h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
-
-<p class="issue">Need to write introduction to RDF Concepts section</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">5.1 </span>IRIs</h3>
-
-<pre class="example">{
-...
- "foaf:homepage" : "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}</pre>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
-
-<pre class="example">{
-...
- "<span class="diff">@</span>" : "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}</pre>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">5.3 </span>Specifying the Type</h3>
-
-<pre class="example">{
-...
- "<span class="diff">a</span>" : "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}</pre>
-
-</div>
-
-<div id="plain-literals" class="section">
-<h3><span class="secno">5.4 </span>Plain Literals</h3>
-
-<pre class="example">{
-...
- "foaf:name" : "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="language-specification-in-plain-literals" class="section">
-<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
-
-<pre class="example">{
-...
- "foaf:name" : "<span class="diff">花澄@ja</span>",
-...
-}</pre>
-
-</div>
-
-<div id="typed-literals" class="section">
-<h3><span class="secno">5.6 </span>Typed Literals</h3>
-
-<pre class="example">{
-...
- "dc:modified" : "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}</pre>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
-
-<pre class="example">{
-...
- "foaf:nick" : <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<pre class="example">{
-...
- "dc:modified" : <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}</pre>
-
-</div>
-
-<div id="blank-nodes" class="section">
-<h3><span class="secno">5.9 </span>Blank Nodes</h3>
-
-<pre class="example">{
-...
- "@" : "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-</div>
-
-<div id="escape-character" class="section">
-<h3><span class="secno">5.10 </span>Escape Character</h3>
-
-<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
-interpreted as IRIs, language tags, or TypedLiterals.</p>
-
-<p>The special characters in JSON-LD are: <code>&lt;</code>, <code>&gt;</code>,
-<code>@</code> and <code>^</code>.</p>
-
-<pre class="example">{
-...
- "example:code" : <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}</pre>
-
-</div>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">5.11 </span>Automatic Typing</h3>
-
-<pre class="example">{
-...
- // This value is automatically converted to having a type of xsd:decimal
- "measure:cups" : <span class="diff">5.3</span>,
- // This value is automatically converted to having a type of xsd:integer
- "chem:protons" : <span class="diff">12</span>,
- // This value is automatically converted to having a type of xsd:boolean
- "sensor:active" : <span class="diff">true</span>,
-...
-}</pre>
-
-</div>
-
-
-</div>
-
-<div class="appendix section" id="acknowledgements">
-<!--OddPage--><h2><span class="secno">A. </span>Acknowledgements</h2>
-
-<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
-rationale and reasoning behind the JSON-LD work via his work on RDFj, and
-Ian Davis, who created RDF/JSON.</p>
-</div>
-
-
-
-
-<div id="references" class="appendix section"><!--OddPage--><h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100422"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>22 April 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100422">http://www.w3.org/TR/2010/WD-rdfa-core-20100422</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20100823/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1042 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-23-september-2010">Unofficial Draft 23 September 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-</dl><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-Developers that embed structured data in their Web pages can choose among
-a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
-and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
-incompatible at the syntax level, can be easily mapped to RDF. JSON has 
-proven to be a highly useful object serialization and messaging replacement 
-for SOAP. In an attempt to harmonize the representation of Linked Data in JSON, 
-this specification outlines a common JSON representation format for 
-Linked Data that can be used to represent objects specified via RDFa, 
-Microformats and Microdata.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1. </span>How to Read this Document</a></li><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">2. </span>Introduction</a></li><li class="tocline"><a href="#design-goals" class="tocxref"><span class="secno">3. </span>Design Goals</a></li><li class="tocline"><a href="#design-rationale" class="tocxref"><span class="secno">4. </span>Design Rationale</a><ul class="toc"><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">4.1 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">4.2 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">4.3 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">4.4 </span>An Example of a Default Context</a></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">4.5 </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">4.5.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">4.5.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">4.5.3 </span>Microdata</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">5.10 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">5.11 </span>Automatic Typing</a></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
-
-<div id="how-to-read-this-document" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>How to Read this Document</h2>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Developers that want to encode Microformats, RDFa, or Microdata in a
-  way that is cross-language compatible via JSON.</li>
-  <li>Developers that want to understand the encoding possibilities.</li>
-</ul>
-
-<p>
-To understand this specification you must first be familiar with JSON, 
-which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>].</p>
-
-</div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Introduction</h2>
-
-<p class="issue">Need to write introduction...</p>
-
-</div>
-
-<div id="design-goals" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Design Goals</h2>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers don't need to know RDF in order to use the basic functionality
- provided by JSON-LD.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
- <dt>Expressiveness</dt>
- <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable.</dd>
-</dl>
-</div>
-
-<div id="design-rationale" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>Design Rationale</h2>
-
-<p>The following section outlines the rationale behind the JSON-LD markup
-language.
-</p>
-
-<div id="map-terms-to-iris" class="section">
-<h3><span class="secno">4.1 </span>Map Terms to IRIs</h3>
-
-<p>Establishing a mechanism to map JSON values to IRIs will
-help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
-be restrictive in declaring a set of terms, rather, experimentation and 
-innovation should be supported as part of the core design of JSON-LD. There are, 
-however, a number of very small design criterial that can ensure that developers 
-will generate good RDF data that will create value for the greater 
-semantic web community and JSON/REST-based Web Services community.
-</p>
-
-<p>We will be using the following JSON object as the example for this section:
-</p>
-
-<pre class="example">
-{"a" : "Person",
- "name" : "Manu Sporny",
- "homepage" : "http://manu.sporny.org/"}</pre>
-</div><div id="the-default-context" class="section">
-<h3><span class="secno">4.2 </span>The Default Context</h3>
-
-<p>A default context is used in RDFa to allow developers to use keywords
-as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
-above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
-The semantic web, just like the document-based web, uses IRIs for
-unambiguous identification. The idea is that these terms mean something, 
-which you will eventually want to query. The semantic web specifies this via 
-<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
-a Vocabulary Document, and <strong>name</strong> is a term in that 
-vocabulary. Paste the two items together and you have an unambiguous identifier
-for a term.
-</p>
-
-<p>Developers, and machines, would be able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much
-like we can use WordNet today to see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Machines need the same sort of 
-dictionary of terms, and URIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>Non-prefixed terms should have term mappings declared in the default
-context so that they may be expanded later.</p>
-            
-<p>If a set of terms, like <strong>Person</strong>, 
-<strong>name</strong>, and <strong>homepage</strong>,
-are pre-defined in the default context, and that context is used to resolve the
-names in JSON objects, machines could automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{"<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>" : "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
- "<span class="diff">http://xmlns.com/foaf/0.1/name</span>" : "Manu Sporny",
- "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>" : "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"}</pre>
-
-<p class="note">In order to differentiate between plain text and IRIs, the
-<strong><</strong> and <strong>></strong> are used around IRIs.</p>
-
-<p>Doing this would mean that JSON would start to become unambiguously
-machine-readable, play well with the semantic web, and basic markup wouldn't 
-be that much more complex than basic JSON markup. A win, all around.</p>
-</div>
-
-<div id="mashing-up-vocabularies" class="section">
-<h3><span class="secno">4.3 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
-default context beside the <em>terms</em> that are already defined. Using
-this feature, developers could also do markup like this:</p>
-
-<pre class="example">
-{"<span class="diff">rdf:type</span>" : "<span class="diff">foaf:Person</span>",
- "<span class="diff">foaf:name</span>" : "Manu Sporny",
- "<span class="diff">foaf:homepage</span>" : "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
- "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>}</pre>
-
-<p>Developers could also be allowed to specify their own Vocabulary documents 
-by modifying the default context, like so:</p>
-
-<pre class="example">
-[<span class="diff">{"a" : "Context",
-   "myvocab" : "http://example.org/myvocab#"}
- },</span>
- {"a" : "foaf:Person",
- "foaf:name" : "Manu Sporny",
- "foaf:homepage" : "&lt;http://manu.sporny.org/&gt;",
- "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
- "myvocab:credits" : 500</span>}
-]</pre>
-
-<p>This mechanism is a short-hand for RDF, and if defined, will give
-developers an unambiguous way to map any JSON value to RDF. </p><p>
-</p></div>
-
-<div id="an-example-of-a-default-context" class="section">
-<h3><span class="secno">4.4 </span>An Example of a Default Context</h3>
-
-<p>To be clear, the JSON-LD aware Web Service could define a default
-context like the following:</p>
-
-<pre class="example">
-{"a" : "Context",
- "__vocab__" : "http://example.org/default-vocab#",
- "xsd" : "http://www.w3.org/2001/XMLSchema#",
- "dc" : "http://purl.org/dc/terms/",
- "foaf" : "http://xmlns.com/foaf/0.1/",
- "sioc" : "http://rdfs.org/sioc/ns#",
- "cc" : "http://creativecommons.org/ns#",
- "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
- "vcard" : "http://www.w3.org/2006/vcard/ns#",
- "cal" : "http://www.w3.org/2002/12/cal/ical#",
- "doap" : "http://usefulinc.com/ns/doap#",
- "Person" : "http://xmlns.com/foaf/0.1/Person",
- "name" : "http://xmlns.com/foaf/0.1/name",
- "homepage" : "http://xmlns.com/foaf/0.1/homepage"
-}</pre>
-
-<p>The <strong>__vocab__</strong> prefix is a special prefix that states 
-that any term that doesn't resolve to a term or a prefix should be 
-appended to the <strong>__vocab__</strong> IRI. This is done to ensure that 
-terms can be transformed to an IRI at all times.
-</p>
-</div>
-
-<div id="markup-examples" class="section">
-<h3><span class="secno">4.5 </span>Markup Examples</h3>
-
-<p class="issue">Write some introductory stuff about the Markup Examples.</p>
-
-<div id="rdfa" class="section">
-<h4><span class="secno">4.5.1 </span>RDFa</h4>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>Representation:</p>
-
-<pre class="example">
-[{ 
-   "a" : "Context",
-   "foaf" : "http://xmlns.com/foaf/0.1/"
- },
- {
-    "@" : "_:bnode1",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/bob/&gt;",
-    "foaf:name" : "Bob"
- },
- {
-    "@" : "_:bnode2",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/eve/&gt;",
-    "foaf:name" : "Eve"
- },
- {
-    "@" : "_:bnode2",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/manu/&gt;",
-    "foaf:name" : "Manu"
- }
-]</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h4><span class="secno">4.5.2 </span>Microformats</h4>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>Representation:</p>
-
-<pre class="example">
-[{ 
-   "a" : "Context",
-   "vcard" : "http://microformats.org/profile/hcard#vcard"
-   "url" : "http://microformats.org/profile/hcard#url"
-   "fn" : "http://microformats.org/profile/hcard#fn"
- },
- {
-    "@" : "_:bnode1",
-    "a" : "vcard",
-    "url" : "&lt;http://tantek.com/&gt;",
-    "fn" : "Tantek Çelik"
- }
-]</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h4><span class="secno">4.5.3 </span>Microdata</h4>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Representation:</p>
-
-<pre class="example">
-[{ 
-   "a" : "Context",
-   "__vocab__" : "http://www.w3.org/1999/xhtml/microdata#",
-   "frbr" : "http://purl.org/vocab/frbr/core#",
-   "dc" : "http://purl.org/dc/terms/"
- },
- {
-    "a" : "frbr:Work",
-    "@" : "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "dc:title" : "Just a Geek",
-    "dc:creator" : "Whil Wheaton",
-    "frbr:realization" : ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
- },
- {
-    "a" : "frbr:Expression",
-    "@" : "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "dc:type" : "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
- },
- {
-    "a" : "frbr:Expression",
-    "@" : "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "dc:type" : "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
- }
-]</pre>
-
-</div>
-
-</div>
-
-</div>
-
-
-
-
-<div id="markup-of-rdf-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
-
-<p class="issue">Need to write introduction to RDF Concepts section</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">5.1 </span>IRIs</h3>
-
-<pre class="example">
-{
-...
- "foaf:homepage" : "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}</pre>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
-
-<pre class="example">
-{
-...
- "<span class="diff">@</span>" : "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}</pre>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">5.3 </span>Specifying the Type</h3>
-
-<pre class="example">
-{
-...
- "<span class="diff">a</span>" : "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}</pre>
-
-</div>
-
-<div id="plain-literals" class="section">
-<h3><span class="secno">5.4 </span>Plain Literals</h3>
-
-<pre class="example">
-{
-...
- "foaf:name" : "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="language-specification-in-plain-literals" class="section">
-<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
-
-<pre class="example">
-{
-...
- "foaf:name" : "<span class="diff">花澄@ja</span>",
-...
-}</pre>
-
-</div>
-
-<div id="typed-literals" class="section">
-<h3><span class="secno">5.6 </span>Typed Literals</h3>
-
-<pre class="example">
-{
-...
- "dc:modified" : "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}</pre>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
-
-<pre class="example">
-{
-...
- "foaf:nick" : <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<pre class="example">
-{
-...
- "dc:modified" : <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}</pre>
-
-</div>
-
-<div id="blank-nodes" class="section">
-<h3><span class="secno">5.9 </span>Blank Nodes</h3>
-
-<pre class="example">
-{
-...
- "@" : "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-</div>
-
-<div id="escape-character" class="section">
-<h3><span class="secno">5.10 </span>Escape Character</h3>
-
-<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
-interpreted as IRIs, language tags, or TypedLiterals.</p>
-
-<p>The special characters in JSON-LD are: <code><</code>, <code>></code>,
-<code>@</code> and <code>^</code>.</p>
-
-<pre class="example">
-{
-...
- "example:code" : <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}</pre>
-
-</div>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">5.11 </span>Automatic Typing</h3>
-
-<pre class="example">
-{
-...
- // This value is automatically converted to having a type of xsd:decimal
- "measure:cups" : <span class="diff">5.3</span>,
- // This value is automatically converted to having a type of xsd:integer
- "chem:protons" : <span class="diff">12</span>,
- // This value is automatically converted to having a type of xsd:boolean
- "sensor:active" : <span class="diff">true</span>,
-...
-}</pre>
-
-</div>
-
-
-</div>
-
-<div class="appendix section" id="acknowledgements">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>Acknowledgements</h2>
-
-<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
-rationale and reasoning behind the JSON-LD work via his work on RDFj, and
-Ian Davis, who created RDF/JSON.</p>
-</div>
-
-
-
-
-<div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>3 August 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">http://www.w3.org/TR/2010/WD-rdfa-core-20100803</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20101014/diff-20100823.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5650 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
--
-Linked
-Data
-Expression
-in
-JSON
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-Linked
-Data
-</h2>
-<h2 id="unofficial-draft-14-october-2010">
-Unofficial
-Draft
-<del class="diff-old">23
-September
-</del>
-<ins class="diff-chg">14
-October
-</ins>
-2010
-</h2>
-<dl>
-<dt>
-Editor:
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-</dl>
-<p>
-<ins class="diff-new">This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-</ins><a href="diff-20100823.html"><ins class="diff-new">
-diff
-to
-previous
-version
-</ins></a>.</p>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-Developers
-that
-embed
-structured
-data
-in
-their
-Web
-pages
-can
-choose
-among
-a
-number
-of
-languages
-such
-as
-RDFa
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-],
-Microformats
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
-MICROFORMATS
-</a>
-</cite>
-]
-and
-Microdata
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
-MICRODATA
-</a>
-</cite>
-].
-Each
-of
-these
-structured
-data
-languages,
-while
-incompatible
-at
-the
-syntax
-level,
-can
-be
-easily
-mapped
-to
-RDF.
-JSON
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-replacement
-for
-SOAP.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-Linked
-Data
-that
-can
-be
-used
-to
-represent
-objects
-specified
-via
-RDFa,
-Microformats
-and
-Microdata.
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-2.
-</span>
-Introduction
-</a>
-</li>
-<li class="tocline">
-<a href="#design-goals" class="tocxref">
-<span class="secno">
-3.
-</span>
-Design
-Goals
-</a>
-</li>
-<li class="tocline">
-<a href="#design-rationale" class="tocxref">
-<span class="secno">
-4.
-</span>
-Design
-Rationale
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#map-terms-to-iris" class="tocxref">
-<span class="secno">
-4.1
-</span>
-Map
-Terms
-to
-IRIs
-</a>
-</li>
-<del class="diff-old">4.2
-The
-Default
-Context
-</del>
-</ul>
-</li>
-<li class="tocline">
-<a href="#mashing-up-vocabularies" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.3
-</del>
-<ins class="diff-chg">5.
-</ins>
-</span>
-Mashing
-Up
-Vocabularies
-</a>
-</li>
-<li class="tocline">
-<a href="#an-example-of-a-default-context" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.4
-</del>
-<ins class="diff-chg">6.
-</ins>
-</span>
-An
-Example
-of
-a
-Default
-Context
-</a>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-processing-algorithm" class="tocxref">
-<span class="secno">
-<ins class="diff-new">7.
-</ins></span><ins class="diff-new">
-The
-JSON-LD
-Processing
-Algorithm
-</ins></a></li><li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.5
-</del>
-<ins class="diff-chg">8.
-</ins>
-</span>
-Markup
-Examples
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#rdfa" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.5.1
-</del>
-<ins class="diff-chg">8.1
-</ins>
-</span>
-RDFa
-</a>
-</li>
-<li class="tocline">
-<a href="#microformats" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.5.2
-</del>
-<ins class="diff-chg">8.2
-</ins>
-</span>
-Microformats
-</a>
-</li>
-<li class="tocline">
-<a href="#microdata" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.5.3
-</del>
-<ins class="diff-chg">8.3
-</ins>
-</span>
-Microdata
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-of-rdf-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">9.
-</ins>
-</span>
-Markup
-of
-RDF
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">9.1
-</ins>
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">9.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.3
-</del>
-<ins class="diff-chg">9.3
-</ins>
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#plain-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.4
-</del>
-<ins class="diff-chg">9.4
-</ins>
-</span>
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#language-specification-in-plain-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.5
-</del>
-<ins class="diff-chg">9.5
-</ins>
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#typed-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.6
-</del>
-<ins class="diff-chg">9.6
-</ins>
-</span>
-Typed
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.7
-</del>
-<ins class="diff-chg">9.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.8
-</del>
-<ins class="diff-chg">9.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#blank-nodes" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.9
-</del>
-<ins class="diff-chg">9.9
-</ins>
-</span>
-Blank
-Nodes
-</a>
-</li>
-<li class="tocline">
-<a href="#escape-character" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.10
-</del>
-<ins class="diff-chg">9.10
-</ins>
-</span>
-Escape
-Character
-</a>
-</li>
-<li class="tocline">
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11
-</del>
-<ins class="diff-chg">9.11
-</ins>
-</span>
-Automatic
-Typing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-<ins class="diff-new">10.
-</ins></span><ins class="diff-new">
-Advanced
-Concepts
-</ins></a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno"><ins class="diff-new">
-10.1
-</ins></span><ins class="diff-new">
-Disjoint
-Graphs
-</ins></a></li><li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.
-</del>
-<ins class="diff-chg">10.2
-</ins>
-</span>
-Acknowledgements
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">A.
-</ins>
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.1
-</del>
-<ins class="diff-chg">A.1
-</ins>
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.2
-</del>
-<ins class="diff-chg">A.2
-</ins>
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="how-to-read-this-document" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-How
-to
-Read
-this
-Document
-</h2>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Developers
-that
-want
-to
-understand
-the
-encoding
-possibilities.
-</li>
-</ul>
-<p>
-To
-understand
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-].
-</p>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Introduction
-</h2>
-<p class="issue">
-<del class="diff-old">Need
-</del>
-<ins class="diff-chg">Write
-the
-introduction
-once
-all
-of
-the
-technical
-details
-are
-hammered
-out.
-Explain
-why
-JSON-LD
-is
-designed
-as
-a
-light-weight
-mechanism
-</ins>
-to
-<del class="diff-old">write
-introduction...
-</del>
-<ins class="diff-chg">express
-RDFa,
-Microformats
-and
-Microdata.
-It
-is
-primarily
-intended
-as
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-environments
-as
-well
-as
-a
-way
-to
-pass
-Linked
-Data
-to
-and
-from
-Web
-services.
-It
-is
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-(and
-understanding)
-that
-is
-out
-there
-already.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-Microformats
-data,
-and
-Microdata
-(that
-is,
-every
-data
-model
-currently
-in
-use)
-using
-one
-unified
-format.
-It
-does
-not
-require
-anyone
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-out-of-band
--
-it
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-tiny
-memory
-footprint
-in
-order
-to
-operate.
-</ins>
-</p>
-</div>
-<div id="design-goals" class="section">
-<h2>
-<span class="secno">
-3.
-</span>
-Design
-Goals
-</h2>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-don't
-need
-to
-know
-RDF
-in
-order
-to
-use
-the
-basic
-functionality
-provided
-by
-JSON-LD.
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-should
-be
-100%
-compatible
-with
-JSON.
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-All
-major
-RDF
-concepts
-must
-be
-expressible
-via
-the
-JSON-LD
-syntax.
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-readable.
-</dd>
-<dt>
-<ins class="diff-new">Zero
-Edits
-</ins></dt><dd><ins class="diff-new">
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-</ins></dd><dt><ins class="diff-new">
-Streaming
-</ins></dt><dd><ins class="diff-new">
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</ins></dd>
-</dl>
-</div>
-<div id="design-rationale" class="section">
-<h2>
-<span class="secno">
-4.
-</span>
-Design
-Rationale
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="map-terms-to-iris" class="section">
-<h3>
-<span class="secno">
-4.1
-</span>
-Map
-Terms
-to
-IRIs
-</h3>
-<p>
-Establishing
-a
-mechanism
-to
-map
-JSON
-values
-to
-IRIs
-will
-help
-in
-the
-mapping
-of
-JSON
-objects
-to
-RDF.
-This
-does
-not
-mean
-that
-JSON-LD
-must
-be
-restrictive
-in
-declaring
-a
-set
-of
-terms,
-rather,
-experimentation
-and
-innovation
-should
-be
-supported
-as
-part
-of
-the
-core
-design
-of
-JSON-LD.
-There
-are,
-however,
-a
-number
-of
-very
-small
-design
-criterial
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-RDF
-data
-that
-will
-create
-value
-for
-the
-greater
-semantic
-web
-community
-and
-JSON/REST-based
-Web
-Services
-community.
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-object
-as
-the
-example
-for
-this
-section:
-</p>
-<pre class="example">
-<del class="diff-old">{"a" : "Person",
- "name" : "Manu Sporny",
-"homepage"
-:
-"http://manu.sporny.org/"}
-</del>
-<ins class="diff-chg">{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-}
-</ins>
-</pre>
-</div>
-<del class="diff-old">4.2
-</del>
-<h3 id="the-default-context">
-The
-Default
-Context
-</h3>
-<p>
-A
-default
-context
-is
-used
-in
-RDFa
-to
-allow
-developers
-to
-use
-keywords
-as
-aliases
-for
-IRIs.
-So,
-for
-instance,
-the
-keyword
-<strong>
-name
-</strong>
-above
-could
-refer
-to
-the
-IRI
-<em>
-http://xmlns.com/foaf/0.1/name
-</em>.
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-terms
-mean
-something,
-which
-you
-will
-eventually
-want
-to
-query.
-The
-semantic
-web
-specifies
-this
-via
-<em>
-Vocabulary
-Documents
-</em>.
-The
-IRI
-<em>
-http://xmlns.com/foaf/0.1/
-</em>
-specifies
-a
-Vocabulary
-Document,
-and
-<strong>
-name
-</strong>
-is
-a
-term
-in
-that
-vocabulary.
-Paste
-the
-two
-items
-together
-and
-you
-have
-an
-unambiguous
-identifier
-for
-a
-term.
-</p>
-<p>
-Developers,
-and
-machines,
-would
-be
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-Machines
-need
-the
-same
-sort
-of
-dictionary
-of
-terms,
-and
-URIs
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-Non-prefixed
-terms
-should
-have
-term
-mappings
-declared
-in
-the
-default
-context
-so
-that
-they
-may
-be
-expanded
-later.
-</p>
-<p>
-If
-a
-set
-of
-terms,
-like
-<strong>
-Person
-</strong>,
-<strong>
-name
-</strong>,
-and
-<strong>
-homepage
-</strong>,
-are
-pre-defined
-in
-the
-default
-context,
-and
-that
-context
-is
-used
-to
-resolve
-the
-names
-in
-JSON
-objects,
-machines
-could
-automatically
-expand
-the
-terms
-to
-something
-meaningful
-and
-unambiguous,
-like
-this:
-</p>
-<pre class="example">
-<del class="diff-old">{"",
- "" : "Manu Sporny",
-"
-http://xmlns.com/foaf/0.1/homepage
-"
-:
-"
-&lt;
-http://manu.sporny.org
-&gt;
-"}
-</del>
-<ins class="diff-chg">{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
-}
-</ins>
-</pre>
-<p class="note">
-In
-order
-to
-differentiate
-between
-plain
-text
-and
-IRIs,
-the
-<strong>
-<
-</strong> and <strong>
->
-</strong>
-are
-used
-around
-IRIs.
-</p>
-<p>
-Doing
-this
-would
-mean
-that
-JSON
-would
-start
-to
-become
-unambiguously
-machine-readable,
-play
-well
-with
-the
-semantic
-web,
-and
-basic
-markup
-wouldn't
-be
-that
-much
-more
-complex
-than
-basic
-JSON
-markup.
-A
-win,
-all
-around.
-</p>
-</div>
-<div id="mashing-up-vocabularies" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">4.3
-</del>
-<ins class="diff-chg">5.
-</ins>
-</span>
-Mashing
-Up
-Vocabularies
-</h2>
-<p>
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</p>
-<ul>
-<li>
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</li>
-<li>
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</li>
-<li>
-FOAF
--
-for
-describing
-social
-networks.
-</li>
-<li>
-Calendar
--
-for
-specifying
-events.
-</li>
-<li>
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</li>
-<li>
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</li>
-<li>
-GEO
--
-for
-describing
-geographic
-location.
-</li>
-<li>
-VCard
--
-for
-describing
-organizations
-and
-people.
-</li>
-<li>
-DOAP
--
-for
-describing
-projects.
-</li>
-</ul>
-<p>
-A
-JSON-LD
-Web
-Service
-could
-define
-these
-as
-<em>
-prefix
-</em>
-es
-in
-their
-default
-context
-beside
-the
-<em>
-terms
-</em>
-that
-are
-already
-defined.
-Using
-this
-feature,
-developers
-could
-also
-<del class="diff-old">do
-</del>
-<ins class="diff-chg">express
-</ins>
-markup
-like
-this:
-</p>
-<pre class="example">
-<del class="diff-old">{"",
- "" : "Manu Sporny",
- ",
-"sioc:avatar"
-:
-"&lt;http://twitter.com/account/profile_image/manusporny&gt;"
-</del>
-<ins class="diff-chg">{
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
-</ins>
-}
-</pre>
-<p>
-Developers
-<del class="diff-old">could
-</del>
-<ins class="diff-chg">can
-</ins>
-also
-<del class="diff-old">be
-allowed
-to
-</del>
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-default
-<del class="diff-old">context,
-</del>
-<ins class="diff-chg">context
-in-line
-using
-the
-</ins><code><ins class="diff-chg">
-#
-</ins></code><ins class="diff-chg">
-character,
-</ins>
-like
-so:
-</p>
-<pre class="example">
-<del class="diff-old">[{"a" : "Context",
-   "myvocab" : "http://example.org/myvocab#"}
- },
- {"a" : "foaf:Person",
- "foaf:name" : "Manu Sporny",
- "foaf:homepage" : "&lt;http://manu.sporny.org/&gt;",
- "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;",
- "myvocab:credits" : 500}
-]
-</del>
-<ins class="diff-chg">{
-</ins>  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,<ins class="diff-chg">
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
-  "myvocab:credits": 500</span>
-}
-</ins>
-</pre>
-<p>
-<ins class="diff-new">Think
-of
-the
-</ins><code><ins class="diff-new">
-#
-</ins></code><ins class="diff-new">
-character
-as
-a
-"hashtable",
-which
-maps
-one
-string
-to
-another
-string.
-In
-the
-example
-above,
-the
-</ins><code><ins class="diff-new">
-myvocab
-</ins></code><ins class="diff-new">
-string
-is
-replaced
-with
-"
-</ins><code><ins class="diff-new">
-http://example.org/myvocab#
-</ins></code><ins class="diff-new">
-"
-when
-it
-is
-detected
-above.
-In
-the
-example
-above,
-"
-</ins><code><ins class="diff-new">
-myvocab:credits
-</ins></code><ins class="diff-new">
-"
-would
-expand
-to
-"
-</ins><code><ins class="diff-new">
-http://example.org/myvocab#credits
-</ins></code><ins class="diff-new">
-".
-</ins></p><p>
-This
-mechanism
-is
-a
-short-hand
-for
-RDF,
-and
-if
-defined,
-will
-give
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</p>
-<p>
-</p>
-</div>
-<div id="an-example-of-a-default-context" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">4.4
-</del>
-<ins class="diff-chg">6.
-</ins>
-</span>
-An
-Example
-of
-a
-Default
-Context
-</h2>
-<p>
-<del class="diff-old">To
-be
-clear,
-</del>
-<ins class="diff-chg">JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-</ins>
-the
-<ins class="diff-new">JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-A
-</ins>
-JSON-LD
-aware
-Web
-Service
-<del class="diff-old">could
-</del>
-<em class="rfc2119" title="may">
-<ins class="diff-chg">may
-</ins></em>
-define
-a
-default
-<del class="diff-old">context
-like
-</del>
-<ins class="diff-chg">context.
-For
-example,
-</ins>
-the
-<del class="diff-old">following:
-</del>
-<ins class="diff-chg">following
-default
-context
-could
-apply
-to
-all
-incoming
-Web
-Service
-calls
-previously
-accepting
-only
-JSON
-data:
-</ins>
-</p>
-<pre class="example">
-<del class="diff-old">{"a" : "Context",
- "__vocab__" : "http://example.org/default-vocab#",
- "xsd" : "http://www.w3.org/2001/XMLSchema#",
- "dc" : "http://purl.org/dc/terms/",
- "foaf" : "http://xmlns.com/foaf/0.1/",
- "sioc" : "http://rdfs.org/sioc/ns#",
- "cc" : "http://creativecommons.org/ns#",
- "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
- "vcard" : "http://www.w3.org/2006/vcard/ns#",
- "cal" : "http://www.w3.org/2002/12/cal/ical#",
- "doap" : "http://usefulinc.com/ns/doap#",
- "Person" : "http://xmlns.com/foaf/0.1/Person",
- "name" : "http://xmlns.com/foaf/0.1/name",
- "homepage" : "http://xmlns.com/foaf/0.1/homepage"
-</del>
-<ins class="diff-chg">{
-  "#": 
-  {
-    "__vocab__": "http://example.org/default-vocab#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-  }
-</ins>
-}
-</pre>
-<p>
-The
-<code>
-__vocab__
-</code>
-prefix
-is
-a
-special
-prefix
-that
-states
-that
-any
-term
-that
-doesn't
-resolve
-to
-a
-term
-or
-a
-prefix
-should
-be
-appended
-to
-the
-<code>
-__vocab__
-</code>
-IRI.
-This
-is
-done
-to
-ensure
-that
-terms
-can
-be
-transformed
-to
-an
-IRI
-at
-all
-times.
-</p>
-</div>
-<div id="the-json-ld-processing-algorithm" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">4.5
-</del>
-<ins class="diff-chg">7.
-</ins>
-</span>
-<del class="diff-old">Markup
-Examples
-</del>
-<ins class="diff-chg">The
-JSON-LD
-Processing
-Algorithm
-</ins></h2><p><ins class="diff-chg">
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</ins></p>
-<p class="issue">
-<del class="diff-old">Write
-</del>
-<ins class="diff-chg">The
-Processing
-Algorithm
-is
-a
-work
-in
-progress,
-there
-are
-still
-major
-bugs
-in
-the
-algorithm
-and
-it's
-difficult
-to
-follow.
-It's
-provided
-only
-to
-very
-early
-implementers
-to
-give
-them
-an
-idea
-of
-how
-to
-implement
-a
-processor.
-</ins></p><h4 id="processing-algorithm-terms"><ins class="diff-chg">
-Processing
-Algorithm
-Terms
-</ins></h4><ul><li><dfn title="default_context" id="dfn-default_context"><ins class="diff-chg">
-default
-context
-</ins></dfn><ins class="diff-chg">
--
-a
-context
-that
-is
-specified
-to
-the
-JSON-LD
-processing
-algorithm
-before
-processing
-begins.
-</ins></li><li><dfn title="default_graph" id="dfn-default_graph"><ins class="diff-chg">
-default
-graph
-</ins></dfn><ins class="diff-chg">
--
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</ins></li><li><dfn title="active_subject" id="dfn-active_subject"><ins class="diff-chg">
-active
-subject
-</ins></dfn><ins class="diff-chg">
--
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</ins></li><li><dfn title="inherited_subject" id="dfn-inherited_subject"><ins class="diff-chg">
-inherited
-subject
-</ins></dfn><ins class="diff-chg">
--
-a
-subject
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-</ins><a class="tref" title="current_subject"><ins class="diff-chg">
-current
-subject
-</ins></a><ins class="diff-chg">
-is
-discovered
-or
-generated.
-</ins></li><li><dfn title="active_property" id="dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins></dfn><ins class="diff-chg">
--
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</ins></li><li><dfn title="inherited_property" id="dfn-inherited_property"><ins class="diff-chg">
-inherited
-property
-</ins></dfn><ins class="diff-chg">
--
-a
-property
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-</ins><a class="tref" title="current_subject"><ins class="diff-chg">
-current
-subject
-</ins></a><ins class="diff-chg">
-is
-discovered
-or
-generated.
-</ins></li><li><dfn title="active_object" id="dfn-active_object"><ins class="diff-chg">
-active
-object
-</ins></dfn><ins class="diff-chg">
--
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</ins></li><li><dfn title="active_context" id="dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></dfn><ins class="diff-chg">
--
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-is
-the
-top-most
-item
-on
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-stack.
-</ins></li><li><dfn title="local_context" id="dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></dfn><ins class="diff-chg">
--
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-</ins><code><ins class="diff-chg">
-#
-</ins></code><ins class="diff-chg">
-key.
-</ins></li><li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples"><ins class="diff-chg">
-list
-of
-incomplete
-triples
-</ins></dfn><ins class="diff-chg">
--
-A
-list
-of
-triples
-that
-have
-yet
-to
-have
-their
-subject
-set.
-</ins></li><li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items"><ins class="diff-chg">
-list
-of
-unprocessed
-items
-</ins></dfn><ins class="diff-chg">
--
-A
-list
-of
-objects
-that
-cannot
-be
-processed
-until
-a
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-is
-detected
-or
-the
-end
-of
-the
-current
-associative-array
-is
-detected.
-</ins></li><li><dfn title="processor_state" id="dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></dfn><ins class="diff-chg">
--
-the
-processor
-state,
-which
-includes
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-stack,
-</ins><a class="tref" title="current_subject"><ins class="diff-chg">
-current
-subject
-</ins></a>,<a class="tref" title="current_property"><ins class="diff-chg">
-current
-property
-</ins></a>,<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples"><ins class="diff-chg">
-list
-of
-incomplete
-triples
-</ins></a>,<ins class="diff-chg">
-and
-the
-</ins><a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items"><ins class="diff-chg">
-list
-of
-unprocessed
-items
-</ins></a>.</li></ul><p><ins class="diff-chg">
-The
-algorithm
-below
-is
-designed
-for
-streaming
-(SAX-based)
-implementations.
-Implementers
-will
-find
-that
-non-streaming
-(document-based)
-implementations
-will
-be
-much
-easier
-to
-implement
-as
-full
-access
-to
-the
-JSON
-object
-model
-eliminates
-</ins>
-some
-<del class="diff-old">introductory
-stuff
-about
-</del>
-<ins class="diff-chg">of
-the
-steps
-that
-are
-necessary
-for
-streaming
-implementations.
-A
-conforming
-JSON-LD
-processor
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-chg">
-default
-graph
-</ins></a><ins class="diff-chg">
-that
-the
-following
-algorithm
-generates:
-</ins></p><ol class="algorithm"><li id="processing-step-default-context"><ins class="diff-chg">
-If
-a
-</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context"><ins class="diff-chg">
-default
-context
-</ins></a><ins class="diff-chg">
-is
-supplied
-to
-the
-processing
-algorithm,
-push
-it
-onto
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-stack.
-</ins></li><li id="processing-step-associative"><ins class="diff-chg">
-If
-an
-associative
-array
-is
-detected,
-create
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a>.<ins class="diff-chg">
-Copy
-the
-</ins><a class="tref" title="current_context"><ins class="diff-chg">
-current
-context
-</ins></a><ins class="diff-chg">
-stack
-to
-the
-newly
-created
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a>.<ins class="diff-chg">
-Push
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-onto
-the
-newly
-created
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-'s
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-stack.
-For
-each
-key-value
-pair
-in
-</ins>
-the
-<ins class="diff-new">associative
-array,
-using
-the
-newly
-created
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a><ins class="diff-new">
-do
-the
-following:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-a
-</ins><code><ins class="diff-new">
-#
-</ins></code><ins class="diff-new">
-key
-is
-found,
-the
-processor
-merges
-each
-key-value
-pair
-in
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
-local
-context
-</ins></a><ins class="diff-new">
-into
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a>,<ins class="diff-new">
-overwriting
-any
-duplicate
-values
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a>.<ins class="diff-new">
-Process
-each
-object
-in
-the
-</ins><a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items"><ins class="diff-new">
-list
-of
-unprocessed
-items
-</ins></a>,<ins class="diff-new">
-starting
-at
-</ins><a href="#processing-subject"><ins class="diff-new">
-Step
-2.2
-</ins></a>.</li><li id="processing-associative"><ins class="diff-new">
-If
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
-local
-context
-</ins></a><ins class="diff-new">
-has
-not
-been
-detected,
-the
-current
-key-value
-pair
-is
-placed
-into
-the
-</ins><a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items"><ins class="diff-new">
-list
-of
-unprocessed
-items
-</ins></a><ins class="diff-new">
-and
-processing
-proceeds
-to
-the
-next
-key-value
-pair.
-Otherwise,
-if
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
-local
-context
-</ins></a><ins class="diff-new">
-is
-known
-perform
-the
-following
-steps:
-</ins></li><ol class="algorithm"><li id="processing-subject"><ins class="diff-new">
-If
-a
-</ins><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
-key
-is
-found,
-the
-processor
-sets
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-to
-the
-value
-after
-</ins><a href="#markup-of-rdf-concepts"><ins class="diff-new">
-Object
-Processing
-</ins></a><ins class="diff-new">
-has
-been
-performed.
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-</ins><a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject"><ins class="diff-new">
-inherited
-subject
-</ins></a><ins class="diff-new">
-and
-</ins><a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property"><ins class="diff-new">
-inherited
-property
-</ins></a><ins class="diff-new">
-values
-are
-specified,
-generate
-a
-triple
-using
-the
-</ins><a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject"><ins class="diff-new">
-inherited
-subject
-</ins></a><ins class="diff-new">
-for
-the
-subject,
-the
-</ins><a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property"><ins class="diff-new">
-inherited
-property
-</ins></a><ins class="diff-new">
-for
-the
-property,
-and
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-for
-the
-object.
-</ins></li><li><ins class="diff-new">
-If
-there
-are
-any
-triples
-in
-the
-</ins><a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples"><ins class="diff-new">
-list
-of
-incomplete
-triples
-</ins></a>,<ins class="diff-new">
-complete
-each
-triple
-using
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-as
-the
-subject
-for
-each
-triple.
-</ins></li></ol></li><li><ins class="diff-new">
-If
-an
-</ins><code><ins class="diff-new">
-a
-</ins></code><ins class="diff-new">
-key
-is
-found,
-set
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-to
-</ins><code><ins class="diff-new">
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type
-</ins></code>.</li><li><ins class="diff-new">
-If
-a
-key
-that
-is
-not
-</ins><code><ins class="diff-new">
-#
-</ins></code>,<code><ins class="diff-new">
-@
-</ins></code>,<ins class="diff-new">
-or
-</ins><code><ins class="diff-new">
-a
-</ins></code><ins class="diff-new">
-is
-found,
-set
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-by
-performing
-</ins><a href="#markup-of-rdf-concepts"><ins class="diff-new">
-Property
-Processing
-</ins></a><ins class="diff-new">
-on
-the
-key.
-</ins></li><li><ins class="diff-new">
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-by
-performing
-</ins><a href="#markup-of-rdf-concepts"><ins class="diff-new">
-Object
-Processing
-</ins></a><ins class="diff-new">
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<ins class="diff-new">
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-value
-is
-an
-associative
-array,
-then
-process
-the
-value
-starting
-at
-</ins><a href="#processing-step-associative"><ins class="diff-new">
-Step
-2
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-value
-is
-a
-regular
-array,
-then
-process
-the
-value
-starting
-at
-</ins><a href="#processing-step-array"><ins class="diff-new">
-Step
-3
-</ins></a><ins class="diff-new">
-ensuring
-that
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-are
-copied
-to
-a
-newly
-created
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-was
-not
-discovered,
-then:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-Generate
-a
-</ins><a class="tref" title="blank_node_identifier"><ins class="diff-new">
-blank
-node
-identifier
-</ins></a><ins class="diff-new">
-and
-set
-it
-as
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>.</li><li><ins class="diff-new">
-Complete
-any
-previously
-incomplete
-triples
-by
-running
-all
-substeps
-of
-</ins><a href="#processing-subject"><ins class="diff-new">
-Step
-2.2.1
-</ins></a>.</li></ol></li><li><ins class="diff-new">
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
-local
-context
-</ins></a><ins class="diff-new">
-was
-not
-discovered,
-then
-assume
-that
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-is
-unmodified
-and
-run
-all
-substeps
-of
-</ins><a href="#processing-associative"><ins class="diff-new">
-Step
-2.2
-</ins></a><ins class="diff-new">
-on
-the
-</ins><a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items"><ins class="diff-new">
-list
-of
-unprocessed
-items
-</ins></a>.</li></ol></ol></li><li id="processing-step-array"><ins class="diff-new">
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-value
-is
-an
-associative
-array,
-processes
-per
-</ins><a href="#processing-step-associative"><ins class="diff-new">
-Step
-2
-</ins></a>,<ins class="diff-new">
-ensuring
-to
-set
-the
-</ins><a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject"><ins class="diff-new">
-inherited
-subject
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property"><ins class="diff-new">
-inherited
-property
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-in
-the
-newly
-created
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-by
-performing
-</ins><a href="#markup-of-rdf-concepts"><ins class="diff-new">
-Object
-Processing
-</ins></a><ins class="diff-new">
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<ins class="diff-new">
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-and
-place
-it
-into
-the
-</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-new">
-default
-graph
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-Processing?
-</ins><div class="issue"><ins class="diff-new">
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-generation
-of
-triples?
-For
-example,
-would
-implementing
-this
-be
-worth
-the
-more
-complex
-processing
-rules:
-"ex:orderedItems"
-:
-[["one",
-"two",
-"three"]]
-</ins></div></li></ol></li></ol></div><div id="markup-examples" class="section"><h2><span class="secno"><ins class="diff-new">
-8.
-</ins></span>
-Markup
-<del class="diff-old">Examples.
-</del>
-<ins class="diff-chg">Examples
-</ins></h2><p><ins class="diff-chg">
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</ins>
-</p>
-<div id="rdfa" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.5.1
-</del>
-<ins class="diff-chg">8.1
-</ins>
-</span>
-RDFa
-</h3>
-<p>
-<ins class="diff-chg">The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</ins></p>
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</pre>
-<p>
-<del class="diff-old">Representation:
-</del>
-<ins class="diff-chg">An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</ins>
-</p>
-<pre class="example">
-<del class="diff-old">[{ 
-   "a" : "Context",
-   "foaf" : "http://xmlns.com/foaf/0.1/"
- },
-</del>
-<ins class="diff-chg">[
-</ins>
- {
-<del class="diff-old">    "@" : "_:bnode1",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/bob/&gt;",
-    "foaf:name" : "Bob"
-</del>
-<ins class="diff-chg">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
-</ins>
- },
- {
-<del class="diff-old">    "@" : "_:bnode2",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/eve/&gt;",
-    "foaf:name" : "Eve"
-</del>
-<ins class="diff-chg">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
-</ins>
- },
- {
-<del class="diff-old">    "@" : "_:bnode2",
-    "a" : "foaf:Person",
-    "foaf:homepage" : "&lt;http://example.com/manu/&gt;",
-    "foaf:name" : "Manu"
-</del>
-<ins class="diff-chg">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
-</ins>
- }
-]
-</pre>
-</div>
-<div id="microformats" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.5.2
-</del>
-<ins class="diff-chg">8.2
-</ins>
-</span>
-Microformats
-</h3>
-<p>
-<ins class="diff-chg">The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</ins></p>
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-</pre>
-<p>
-<del class="diff-old">Representation:
-</del>
-<ins class="diff-chg">The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-</ins><code><ins class="diff-chg">
-url
-</ins></code><ins class="diff-chg">
-and
-</ins><code><ins class="diff-chg">
-fn
-</ins></code><ins class="diff-chg">
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-</ins><code><ins class="diff-chg">
-http://tantek.com
-</ins></code>.
-</p>
-<pre class="example">
-<del class="diff-old">[{ 
-   "a" : "Context",
-   "vcard" : "http://microformats.org/profile/hcard#vcard"
-   "url" : "http://microformats.org/profile/hcard#url"
-   "fn" : "http://microformats.org/profile/hcard#fn"
- },
- {
-    "@" : "_:bnode1",
-    "a" : "vcard",
-    "url" : "&lt;http://tantek.com/&gt;",
-    "fn" : "Tantek Çelik"
- }
-]
-</del>
-<ins class="diff-chg">{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-}
-</ins>
-</pre>
-</div>
-<div id="microdata" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.5.3
-</del>
-<ins class="diff-chg">8.3
-</ins>
-</span>
-Microdata
-</h3>
-<p>
-<ins class="diff-chg">The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</ins></p>
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</pre>
-<p>
-<del class="diff-old">Representation:
-</del>
-<ins class="diff-chg">Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</ins>
-</p>
-<pre class="example">
-<del class="diff-old">[{ 
-   "a" : "Context",
-   "__vocab__" : "http://www.w3.org/1999/xhtml/microdata#",
-   "frbr" : "http://purl.org/vocab/frbr/core#",
-   "dc" : "http://purl.org/dc/terms/"
- },
- {
-    "a" : "frbr:Work",
-    "@" : "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "dc:title" : "Just a Geek",
-    "dc:creator" : "Whil Wheaton",
-    "frbr:realization" : ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
- },
- {
-    "a" : "frbr:Expression",
-    "@" : "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "dc:type" : "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
- },
- {
-    "a" : "frbr:Expression",
-    "@" : "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "dc:type" : "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
- }
-</del>
-<ins class="diff-chg">[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-</ins>
-]
-</pre>
-</div>
-</div>
-<div id="markup-of-rdf-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">9.
-</ins>
-</span>
-Markup
-of
-RDF
-Concepts
-</h2>
-<del class="diff-old">Need
-</del>
-<p>
-<ins class="diff-chg">JSON-LD
-is
-designed
-</ins>
-to
-<del class="diff-old">write
-introduction
-</del>
-<ins class="diff-chg">ensure
-that
-most
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-</ins>
-to
-<ins class="diff-new">understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-Javascript
-objects
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-Since
-</ins>
-RDF
-<del class="diff-old">Concepts
-</del>
-<ins class="diff-chg">is
-also
-an
-important
-sub-community
-of
-the
-Linked
-Data
-movement,
-it
-is
-important
-that
-all
-RDF
-concepts
-are
-well-represented
-in
-this
-specification.
-This
-</ins>
-section
-<ins class="diff-new">details
-how
-each
-RDF
-concept
-can
-be
-expressed
-in
-JSON-LD.
-</ins>
-</p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">9.1
-</ins>
-</span>
-IRIs
-</h3>
-<p>
-<ins class="diff-new">Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-subjects
-and
-many
-objects
-are
-identified.
-IRIs
-can
-be
-expressed
-by
-wrapping
-a
-text
-string
-with
-the
-</ins><code><</code> and <code><ins class="diff-new">
->
-</ins></code><ins class="diff-new">
-characters.
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "foaf:homepage" : "",
-</del>
-<ins class="diff-chg">  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">The
-example
-above
-would
-set
-the
-object
-to
-an
-IRI
-with
-the
-value
-of
-</ins><code><ins class="diff-new">
-http://manu.sporny.org
-</ins></code>.</p><p><ins class="diff-new">
-Wrapping
-IRIs
-with
-the
-</ins><code><</code> and <code><ins class="diff-new">
->
-</ins></code><ins class="diff-new">
-characters
-are
-only
-necessary
-when
-IRIs
-are
-specified
-as
-objects.
-At
-no
-other
-point
-do
-you
-need
-to
-wrap
-an
-IRI.
-You
-do
-not
-need
-to
-wrap
-IRIs
-when
-declaring
-a
-property,
-declaring
-a
-CURIE,
-or
-describing
-key-value
-pairs
-in
-a
-context.
-</ins></p>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">9.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-<ins class="diff-new">A
-subject
-is
-declared
-using
-the
-</ins><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-predicate,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "",
-</del>
-<ins class="diff-chg">  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">The
-example
-above
-would
-set
-the
-subject
-to
-</ins><code><http://example.org/people#joebob></code>.</p>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.3
-</del>
-<ins class="diff-chg">9.3
-</ins>
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-<ins class="diff-new">The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-</ins><code><ins class="diff-new">
-a
-</ins></code><ins class="diff-new">
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-type-url).
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "",
-</del>
-<ins class="diff-chg">  "@": "&lt;http://example.org/people#joebob&gt;",
-  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">The
-example
-above
-would
-generate
-the
-following
-triple
-(in
-N-Triples
-notation):
-</ins></p><pre class="example"><ins class="diff-new">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</ins></pre>
-</div>
-<div id="plain-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.4
-</del>
-<ins class="diff-chg">9.4
-</ins>
-</span>
-Plain
-Literals
-</h3>
-<p>
-<ins class="diff-new">Regular
-text
-strings
-are
-called
-"plain
-literals"
-in
-RDF
-and
-are
-easily
-expressed
-using
-regular
-JSON
-strings.
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "foaf:name" : "",
-</del>
-<ins class="diff-chg">  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-</ins>
-...
-}
-</pre>
-</div>
-<div id="language-specification-in-plain-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.5
-</del>
-<ins class="diff-chg">9.5
-</ins>
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</h3>
-<p>
-<ins class="diff-new">JSON-LD
-attempts
-to
-make
-sure
-that
-it
-is
-easy
-to
-express
-triples
-in
-other
-languages
-while
-simultaneously
-ensuring
-that
-hefty
-data
-structures
-aren't
-required
-to
-accomplish
-simple
-language
-markup.
-When
-the
-</ins><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
-symbol
-is
-used
-in
-a
-literal,
-the
-JSON-LD
-processor
-tags
-the
-literal
-text
-with
-the
-language
-tag
-that
-follows
-the
-</ins><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
-symbol.
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "foaf:name" : "",
-</del>
-<ins class="diff-chg">  "foaf:name": "<span class="diff">花澄@ja</span>",
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">The
-example
-above
-would
-generate
-a
-plain
-literal
-for
-</ins><em><ins class="diff-new">
-花澄
-</ins></em><ins class="diff-new">
-and
-associate
-the
-</ins><code><ins class="diff-new">
-ja
-</ins></code><ins class="diff-new">
-language
-tag
-with
-the
-triple
-that
-is
-generated.
-Languages
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-expressed
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-BCP47"><ins class="diff-new">
-BCP47
-</ins></a></cite><ins class="diff-new">
-]
-format.
-</ins></p>
-</div>
-<div id="typed-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.6
-</del>
-<ins class="diff-chg">9.6
-</ins>
-</span>
-Typed
-Literals
-</h3>
-<p>
-<ins class="diff-new">Literals
-may
-also
-be
-typed
-in
-JSON-LD
-by
-using
-the
-</ins><code><ins class="diff-new">
-^^
-</ins></code><ins class="diff-new">
-sequence
-at
-the
-end
-of
-the
-text
-string.
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "dc:modified" : "",
-</del>
-<ins class="diff-chg">  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">The
-example
-above
-would
-generate
-an
-object
-with
-the
-value
-of
-</ins><code><ins class="diff-new">
-2010-05-29T14:17:39+02:00
-</ins></code><ins class="diff-new">
-and
-the
-datatype
-of
-</ins><code><ins class="diff-new">
-http://www.w3.org/2001/XMLSchema#dateTime
-</ins></code>.</p>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.7
-</del>
-<ins class="diff-chg">9.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-<ins class="diff-new">A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-arrays.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-express
-each
-property
-as
-an
-array.
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "foaf:nick" : ,
-</del>
-<ins class="diff-chg">  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</ins></p><pre class="example"><ins class="diff-new">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/&gt;
-      "stu" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/&gt;
-      "groknar" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/&gt;
-"radface"
-.
-</ins></pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.8
-</del>
-<ins class="diff-chg">9.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-<ins class="diff-new">Multiple
-typed
-literals
-are
-expressed
-very
-much
-in
-the
-same
-way
-as
-multiple
-properties:
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "dc:modified" : ],
-</del>
-<ins class="diff-chg">  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</ins></p><pre class="example"><ins class="diff-new">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</ins></pre>
-</div>
-<div id="blank-nodes" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.9
-</del>
-<ins class="diff-chg">9.9
-</ins>
-</span>
-Blank
-Nodes
-</h3>
-<p>
-<ins class="diff-new">At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-is
-where
-blank
-nodes
-come
-into
-play.
-In
-JSON-LD,
-blank
-node
-identifiers
-are
-automatically
-created
-if
-a
-subject
-is
-not
-specified
-using
-the
-</ins><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
-key.
-However,
-authors
-may
-name
-blank
-nodes
-by
-using
-the
-special
-</ins><code><ins class="diff-new">
-_
-</ins></code><ins class="diff-new">
-CURIE
-prefix.
-</ins></p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "@" : "",
-</del>
-<ins class="diff-chg">  "@": "<span class="diff">_:foo</span>",
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">The
-example
-above
-would
-set
-the
-subject
-to
-</ins><code><ins class="diff-new">
-_:foo
-</ins></code>,<ins class="diff-new">
-which
-can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-named
-blank
-node.
-</ins></p>
-</div>
-<div id="escape-character" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.10
-</del>
-<ins class="diff-chg">9.10
-</ins>
-</span>
-Escape
-Character
-</h3>
-<p>
-Special
-characters
-in
-property
-values
-<em class="rfc2119" title="must">
-must
-</em>
-be
-escaped
-in
-order
-to
-not
-be
-interpreted
-as
-<ins class="diff-new">CURIEs,
-</ins>
-IRIs,
-language
-tags,
-or
-TypedLiterals.
-</p>
-<p>
-The
-special
-characters
-in
-JSON-LD
-are:
-<code>
-<
-</code>, <code>
->
-</code>,
-<code>
-@
-</code>,
-<code>
-<ins class="diff-new">#
-</ins></code>,<code>:
-</code>
-and
-<code>
-^
-</code>.
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old"> "example:code" : ,
-</del>
-<ins class="diff-chg">  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-</ins>
-...
-}
-</pre>
-</div>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.11
-</del>
-<ins class="diff-chg">9.11
-</ins>
-</span>
-Automatic
-Typing
-</h3>
-<p>
-<ins class="diff-new">Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-decimals,
-integers
-and
-boolean
-values,
-JSON-LD
-utilizes
-that
-information
-to
-create
-</ins><a href="#typed-literals"><ins class="diff-new">
-Typed
-Literals
-</ins></a>.</p>
-<pre class="example">
-{
-...
-<del class="diff-old"> // This value is automatically converted to having a type of xsd:decimal
- "measure:cups" : ,
- // This value is automatically converted to having a type of xsd:integer
- "chem:protons" : ,
- // This value is automatically converted to having a type of xsd:boolean
- "sensor:active" : ,
-</del>
-<ins class="diff-chg">  // This value is automatically converted to having a type of xsd:decimal
-  "measure:cups": <span class="diff">5.3</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-</ins>
-...
-}
-</pre>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">A.
-</del>
-<ins class="diff-chg">10.
-</ins>
-</span>
-<del class="diff-old">Acknowledgements
-</del>
-<ins class="diff-chg">Advanced
-Concepts
-</ins>
-</h2>
-<p class="issue">
-<ins class="diff-new">There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-taken
-with
-a
-grain
-of
-salt;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</ins></p><div id="disjoint-graphs" class="section"><h3><span class="secno"><ins class="diff-new">
-10.1
-</ins></span><ins class="diff-new">
-Disjoint
-Graphs
-</ins></h3><p><ins class="diff-new">
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-array
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</ins></p><p><ins class="diff-new">
-Assume
-the
-following
-RDF
-graph:
-</ins></p><pre class="example"><ins class="diff-new">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;/section&gt;
-</ins></pre><p><ins class="diff-new">
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-JSON-LD
-associative
-array.
-</ins></p><p><ins class="diff-new">
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</ins></p><pre class="example"><ins class="diff-new">
-{
-  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-  "@": 
-  [
-    {
-      "@": "&lt;http://example.org/people#john&gt;",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "&lt;http://example.org/people#jane&gt;",
-      "a": "foaf:Person"
-    }
-  ]
-}
-</ins></pre></div><div class="appendix section" id="acknowledgements"><h3><span class="secno"><ins class="diff-new">
-10.2
-</ins></span><ins class="diff-new">
-Acknowledgements
-</ins></h3>
-<p>
-The
-editor
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-rationale
-and
-reasoning
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-<ins class="diff-new">Dave
-Longley
-who
-reviewed
-and
-provided
-feedback
-on
-the
-overall
-specification
-and
-contexts,
-</ins>
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-</p>
-</div>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">A.
-</ins>
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">B.1
-</del>
-<ins class="diff-chg">A.1
-</ins>
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-<ins class="diff-new">[BCP47]
-</ins></dt><dd><ins class="diff-new">
-A.
-Phillips,
-M.
-Davis.
-</ins><a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite><ins class="diff-new">
-Tags
-for
-Identifying
-Languages
-</ins></cite></a><ins class="diff-new">
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-</ins><a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><ins class="diff-new">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</ins></a></dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">B.2
-</del>
-<ins class="diff-chg">A.2
-</ins>
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-3
-August
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">
-http://www.w3.org/TR/2010/WD-rdfa-core-20100803
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20101014/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1459 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head><body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-14-october-2010">Unofficial Draft 14 October 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-</dl><p>This document is also available in this non-normative format: <a href="diff-20100823.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-Developers that embed structured data in their Web pages can choose among
-a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
-and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
-incompatible at the syntax level, can be easily mapped to RDF. JSON has 
-proven to be a highly useful object serialization and messaging replacement 
-for SOAP. In an attempt to harmonize the representation of Linked Data in JSON, 
-this specification outlines a common JSON representation format for 
-Linked Data that can be used to represent objects specified via RDFa, 
-Microformats and Microdata.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1. </span>How to Read this Document</a></li><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">2. </span>Introduction</a></li><li class="tocline"><a href="#design-goals" class="tocxref"><span class="secno">3. </span>Design Goals</a></li><li class="tocline"><a href="#design-rationale" class="tocxref"><span class="secno">4. </span>Design Rationale</a><ul class="toc"><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">4.1 </span>Map Terms to IRIs</a></li></ul></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">5. </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">6. </span>An Example of a Default Context</a></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">7. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">8. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">8.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">8.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">8.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">9. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">9.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">9.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">9.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">9.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">9.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">9.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">9.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">9.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">9.9 </span>Blank Nodes</a></li><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">9.10 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">9.11 </span>Automatic Typing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">10. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">10.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">10.2 </span>Acknowledgements</a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">A.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.2 </span>Informative references</a></li></ul></li></ul></div>
-
-<div id="how-to-read-this-document" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>How to Read this Document</h2>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Developers that want to encode Microformats, RDFa, or Microdata in a
-  way that is cross-language compatible via JSON.</li>
-  <li>Developers that want to understand the encoding possibilities.</li>
-</ul>
-
-<p>
-To understand this specification you must first be familiar with JSON, 
-which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>].</p>
-
-</div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Introduction</h2>
-
-<p class="issue">Write the introduction once all of the technical details
-are hammered out. Explain why JSON-LD is designed as a light-weight mechanism
-to express RDFa, Microformats and Microdata. It is primarily intended as
-a way to express Linked Data in Javascript environments as well as a way to pass
-Linked Data to and from Web services. It is designed to be as simple as 
-possible, utilizing the large number of JSON parsers (and understanding) that
-is out there already. It is designed to be able to express key-value pairs,
-RDF data, Microformats data, and Microdata (that is, every data model
-currently in use) using one unified format. It does not require anyone to change
-their JSON, but easily add meaning by adding context in a way that is 
-out-of-band - it is designed to not disturb already deployed systems running
-on JSON, but provide a smooth migration path from JSON to JSON with added
-semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a tiny memory footprint in order to operate.
-</p>
-</div>
-
-<div id="design-goals" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Design Goals</h2>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers don't need to know RDF in order to use the basic functionality
- provided by JSON-LD.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
- <dt>Expressiveness</dt>
- <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable.</dd>
- <dt>Zero Edits</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers.</dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="design-rationale" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>Design Rationale</h2>
-
-<p>The following section outlines the rationale behind the JSON-LD markup
-language.
-</p>
-
-<div id="map-terms-to-iris" class="section">
-<h3><span class="secno">4.1 </span>Map Terms to IRIs</h3>
-
-<p>Establishing a mechanism to map JSON values to IRIs will
-help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
-be restrictive in declaring a set of terms, rather, experimentation and 
-innovation should be supported as part of the core design of JSON-LD. There are, 
-however, a number of very small design criterial that can ensure that developers 
-will generate good RDF data that will create value for the greater 
-semantic web community and JSON/REST-based Web Services community.
-</p>
-
-<p>We will be using the following JSON object as the example for this section:
-</p>
-
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-}</pre>
-</div>
-<h3 id="the-default-context">The Default Context</h3>
-
-<p>A default context is used in RDFa to allow developers to use keywords
-as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
-above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
-The semantic web, just like the document-based web, uses IRIs for
-unambiguous identification. The idea is that these terms mean something, 
-which you will eventually want to query. The semantic web specifies this via 
-<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
-a Vocabulary Document, and <strong>name</strong> is a term in that 
-vocabulary. Paste the two items together and you have an unambiguous identifier
-for a term.
-</p>
-
-<p>Developers, and machines, would be able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much
-like we can use WordNet today to see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Machines need the same sort of 
-dictionary of terms, and URIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>Non-prefixed terms should have term mappings declared in the default
-context so that they may be expanded later.</p>
-            
-<p>If a set of terms, like <strong>Person</strong>, 
-<strong>name</strong>, and <strong>homepage</strong>,
-are pre-defined in the default context, and that context is used to resolve the
-names in JSON objects, machines could automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
-}</pre>
-
-<p class="note">In order to differentiate between plain text and IRIs, the
-<strong><</strong> and <strong>></strong> are used around IRIs.</p>
-
-<p>Doing this would mean that JSON would start to become unambiguously
-machine-readable, play well with the semantic web, and basic markup wouldn't 
-be that much more complex than basic JSON markup. A win, all around.</p>
-</div>
-
-<div id="mashing-up-vocabularies" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Mashing Up Vocabularies</h2>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
-default context beside the <em>terms</em> that are already defined. Using
-this feature, developers could also express markup like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-default context in-line using the <code>#</code> character, like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
-  "myvocab:credits": 500</span>
-}</pre>
-
-<p>Think of the <code>#</code> character as a "hashtable", which maps one
-string to another string. In the example above, the <code>myvocab</code>
-string is replaced with "<code>http://example.org/myvocab#</code>" when it
-is detected above. In the example above, "<code>myvocab:credits</code>" would
-expand to "<code>http://example.org/myvocab#credits</code>".</p>
-
-<p>This mechanism is a short-hand for RDF, and if defined, will give
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div id="an-example-of-a-default-context" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>An Example of a Default Context</h2>
-
-<p>JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> define a default context. For example, the
-following default context could apply to all incoming Web Service calls
-previously accepting only JSON data:</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-    "__vocab__": "http://example.org/default-vocab#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-  }
-}</pre>
-
-<p>The <code>__vocab__</code> prefix is a special prefix that states 
-that any term that doesn't resolve to a term or a prefix should be 
-appended to the <code>__vocab__</code> IRI. This is done to ensure that 
-terms can be transformed to an IRI at all times.
-</p>
-</div>
-
-<div id="the-json-ld-processing-algorithm" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">7. </span>The JSON-LD Processing Algorithm</h2>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The Processing Algorithm is a work in progress, there are
-still major bugs in the algorithm and it's difficult to follow. It's provided
-only to very early implementers to give them an idea of how to implement a
-processor.</p>
-
-<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
-<ul>
-<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
-JSON-LD processing algorithm before processing begins.</li>
-<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
-generated by JSON-LD markup.</li>
-<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
-processor should use when generating triples.</li>
-<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
-CURIEs while the processing algorithm is running. The 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
-associative-array level, specified via the <code>#</code> key.</li>
-<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
-yet to have their subject set.</li>
-<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
-processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
-current associative-array is detected.</li>
-<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
-the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
-<a class="tref" title="current_property">current property</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-</li></ul>
-
-<p>The algorithm below is designed for streaming (SAX-based) implementations.
-Implementers will find that non-streaming (document-based) implementations will
-be much easier to implement as full access to the JSON object model eliminates 
-some of the steps that are necessary for streaming implementations. A conforming
-JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
-same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
-
-<ol class="algorithm">
-<li id="processing-step-default-context">If a <a class="tref internalDFN" title="default_context" href="#dfn-default_context">default context</a> is 
-supplied to the
-processing algorithm, push it onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-
-<li id="processing-step-associative">If an associative array is 
-detected, create a new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
-the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
-key-value pair in the associative array, using the newly created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
-
-  <ol class="algorithm">
-
-    <li>If a <code>#</code> key is found, the processor
-    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
-    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
-    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. 
-    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
-    starting at <a href="#processing-subject">Step 2.2</a>.</li>
-
-    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not been detected, the current
-    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
-    and processing proceeds to the next key-value pair. Otherwise, if the
-    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
-
-    <ol class="algorithm">
-
-      <li id="processing-subject">If a <code>@</code> key is found, the 
-      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> has been performed.
-
-      <ol class="algorithm">
-        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
-        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
-        </li>
- 
-        <li>If there are any triples in the 
-        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
-        </li>
-      </ol>
-
-      </li>
-
-      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
-      </li>
-
-      <li>If a key that is not <code>#</code>, 
-      <code>@</code>, or <code>a</code> is found, set the 
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
-      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
-      </li>
-
-      <li>If the value is not an array, set the 
-      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
-      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
-
-      <li>If the value is an associative array, then
-      process the value starting at 
-      <a href="#processing-step-associative">Step 2</a>.</li>
-
-      <li>If the value is a regular array, then process the value 
-      starting at 
-      <a href="#processing-step-array">Step 3</a> ensuring that
-      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
-      
-      <ol class="algorithm">
-        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
-
-        <li>Complete any previously incomplete triples by running all substeps 
-        of <a href="#processing-subject">Step 2.2.1</a>.
-        </li>
-      </ol>
-
-      </li><li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
-      <a href="#processing-associative">Step 2.2</a>
-      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-     </li></ol>
-    </ol>
-  </li>
-
-  <li id="processing-step-array">If a regular array is detected, 
-  process each value in the array by doing the following:
-
-    <ol class="algorithm">
-      <li>If the value is an associative array, processes per 
-      <a href="#processing-step-associative">Step 2</a>, ensuring to set
-      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
-      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
-      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
-      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
-      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
-      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
-
-      <li>If the value is a regular array, should we support RDF 
-      List/Sequence Processing? 
-      <div class="issue">If the value is a regular array, should we support 
-      RDF List/Sequence generation of triples? For example, would implementing
-      this be worth the more complex processing rules: "ex:orderedItems" : 
-      [["one", "two", "three"]]</div></li>
-    </ol>
-  </li>
-</ol>
-
-</div>
-
-<div id="markup-examples" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">8. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">8.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-[
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
- }
-]</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">8.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">8.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-]</pre>
-
-</div>
-
-</div>
-
-
-
-
-
-
-<div id="markup-of-rdf-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">9. </span>Markup of RDF Concepts</h2>
-
-<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked up
-in a way that is simple to understand and author by Web developers. In many
-cases, Javascript objects can become Linked Data with the simple addition
-of a context. Since RDF is also an important sub-community of the Linked
-Data movement, it is important that all RDF concepts are well-represented
-in this specification. This section details how each RDF concept can be
-expressed in JSON-LD.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">9.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
-and many objects are identified. IRIs can be expressed by wrapping a
-text string with the <code><</code> and <code>></code> characters.
-</p>
-
-<pre class="example">
-{
-...
-  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}</pre>
-
-<p>The example above would set the object to an IRI with the value of
-<code>http://manu.sporny.org</code>.
-</p>
-
-<p>Wrapping IRIs with the  <code><</code> and <code>></code> 
-characters are only necessary when IRIs are specified as objects. At no other
-point do you need to wrap an IRI. You do not need to wrap IRIs when declaring 
-a property, declaring a CURIE, or describing key-value pairs in a context.</p>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">9.2 </span>Identifying the Subject</h3>
-
-<p>A subject is declared using the <code>@</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, predicate, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to 
-<code><http://example.org/people#joebob></code>.
-</p>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">9.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the <code>a</code>
-key. Specifying the type in this way will generate a triple of the form 
-(subject, type, type-url).</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple 
-(in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-</div>
-
-<div id="plain-literals" class="section">
-<h3><span class="secno">9.4 </span>Plain Literals</h3>
-
-<p>Regular text strings are called "plain literals" in RDF and are easily
-expressed using regular JSON strings.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="language-specification-in-plain-literals" class="section">
-<h3><span class="secno">9.5 </span>Language Specification in Plain Literals</h3>
-
-<p>JSON-LD attempts to make sure that it is easy to express triples in other
-languages while simultaneously ensuring that hefty data structures 
-aren't required to accomplish simple language markup. When the 
-<code>@</code> symbol is used in a literal, the JSON-LD processor tags
-the literal text with the language tag that follows the <code>@</code>
-symbol.
-</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">花澄@ja</span>",
-...
-}</pre>
-
-<p>The example above would generate a plain literal for <em>花澄</em> and
-associate the <code>ja</code> language tag with the triple that is
-generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="typed-literals" class="section">
-<h3><span class="secno">9.6 </span>Typed Literals</h3>
-
-<p>Literals may also be typed in JSON-LD by using the <code>^^</code>
-sequence at the end of the text string.</p>
-
-<pre class="example">
-{
-...
-  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}</pre>
-
-<p>The example above would generate an object with the value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">9.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-arrays. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an array.</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/&gt;
-      "stu" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/&gt;
-      "groknar" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/&gt;
-      "radface" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">9.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple typed literals are expressed very much in the same way as 
-multiple properties:</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="blank-nodes" class="section">
-<h3><span class="secno">9.9 </span>Blank Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this is where blank nodes come
-into play. In JSON-LD, blank node identifiers are automatically created if a 
-subject is not specified using the <code>@</code> key. However, authors may
-name blank nodes by using the special <code>_</code> CURIE prefix.</p>
-
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-named blank node.
-</p>
-
-</div>
-
-<div id="escape-character" class="section">
-<h3><span class="secno">9.10 </span>Escape Character</h3>
-
-<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
-interpreted as CURIEs, IRIs, language tags, or TypedLiterals.</p>
-
-<p>The special characters in JSON-LD are: <code><</code>, <code>></code>,
-<code>@</code>, <code>#</code>, <code>:</code> and <code>^</code>.</p>
-
-<pre class="example">
-{
-...
-  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}</pre>
-
-</div>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">9.11 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as decimals, 
-integers and boolean values, JSON-LD utilizes that information to create 
-<a href="#typed-literals">Typed Literals</a>.</p>
-
-<pre class="example">
-{
-...
-  // This value is automatically converted to having a type of xsd:decimal
-  "measure:cups": <span class="diff">5.3</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">10. </span>Advanced Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear whether
-or not the JSON-LD specification is going to support the complexity necessary
-to support each concept. The entire section on Advanced Concepts should be
-taken with a grain of salt; it is merely a list of possibilities where all
-of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">10.1 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an array to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;/section&gt;</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single JSON-LD associative
-array.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-  "@": 
-  [
-    {
-      "@": "&lt;http://example.org/people#john&gt;",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "&lt;http://example.org/people#jane&gt;",
-      "a": "foaf:Person"
-    }
-  ]
-}</pre>
-
-</div>
-
-<div class="appendix section" id="acknowledgements">
-<h3><span class="secno">10.2 </span>Acknowledgements</h3>
-
-<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
-rationale and reasoning behind the JSON-LD work via his work on RDFj, 
-Dave Longley who reviewed and provided feedback on the overall 
-specification and contexts, and Ian Davis, who created RDF/JSON.</p>
-</div>
-
-
-
-
-</div><div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">A. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">A.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">A.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>3 August 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">http://www.w3.org/TR/2010/WD-rdfa-core-20100803</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20101014/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20101024/diff-20101014.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6923 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
--
-Linked
-Data
-Expression
-in
-JSON
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-Linked
-Data
-</h2>
-<h2 id="unofficial-draft-24-october-2010">
-Unofficial
-Draft
-<del class="diff-old">14
-</del>
-<ins class="diff-chg">24
-</ins>
-October
-2010
-</h2>
-<dl>
-<dt>
-Editor:
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-</dl>
-<p>
-This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-<a href="diff-20101014.html">
-diff
-to
-previous
-version
-</a>.
-</p>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-Developers
-that
-embed
-structured
-data
-in
-their
-Web
-pages
-can
-choose
-among
-a
-number
-of
-languages
-such
-as
-RDFa
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-],
-Microformats
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
-MICROFORMATS
-</a>
-</cite>
-]
-and
-Microdata
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
-MICRODATA
-</a>
-</cite>
-].
-Each
-of
-these
-structured
-data
-languages,
-while
-incompatible
-at
-the
-syntax
-level,
-can
-be
-easily
-mapped
-to
-RDF.
-JSON
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-<del class="diff-old">replacement
-for
-SOAP.
-</del>
-<ins class="diff-chg">format.
-</ins>
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-Linked
-Data
-that
-can
-be
-used
-to
-represent
-objects
-specified
-via
-RDFa,
-Microformats
-and
-Microdata.
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-<ins class="diff-new">Introduction
-</ins></a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno"><ins class="diff-new">
-1.1
-</ins></span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-<del class="diff-old">2.
-</del>
-<ins class="diff-chg">1.2
-</ins>
-</span>
-<del class="diff-old">Introduction
-</del>
-<ins class="diff-chg">Contributing
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design-goals-and-rationale" class="tocxref">
-<span class="secno">
-<del class="diff-old">3.
-</del>
-<ins class="diff-chg">2.
-</ins>
-</span>
-Design
-Goals
-<ins class="diff-new">and
-Rationale
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.
-</del>
-<ins class="diff-chg">2.1
-</ins>
-</span>
-<del class="diff-old">Design
-Rationale
-</del>
-<ins class="diff-chg">Goals
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#map-terms-to-iris" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.1
-</del>
-<ins class="diff-chg">2.2
-</ins>
-</span>
-Map
-Terms
-to
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-default-context" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">2.3
-</ins></span><ins class="diff-chg">
-The
-Default
-Context
-</ins></a>
-</li>
-<li class="tocline">
-<a href="#mashing-up-vocabularies" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">2.4
-</ins>
-</span>
-Mashing
-Up
-Vocabularies
-</a>
-</li>
-<li class="tocline">
-<a href="#an-example-of-a-default-context" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">2.5
-</ins>
-</span>
-An
-Example
-of
-a
-Default
-Context
-</a>
-</li>
-<del class="diff-old">7.
-The
-JSON-LD
-Processing
-Algorithm
-</del>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.
-</del>
-<ins class="diff-chg">3.
-</ins>
-</span>
-Markup
-Examples
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#rdfa" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.1
-</del>
-<ins class="diff-chg">3.1
-</ins>
-</span>
-RDFa
-</a>
-</li>
-<li class="tocline">
-<a href="#microformats" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.2
-</del>
-<ins class="diff-chg">3.2
-</ins>
-</span>
-Microformats
-</a>
-</li>
-<li class="tocline">
-<a href="#microdata" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.3
-</del>
-<ins class="diff-chg">3.3
-</ins>
-</span>
-Microdata
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-processing-algorithm" class="tocxref">
-<span class="secno">
-<ins class="diff-new">4.
-</ins></span><ins class="diff-new">
-The
-JSON-LD
-Processing
-Algorithm
-</ins></a></li><li class="tocline">
-<a href="#markup-of-rdf-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.
-</del>
-<ins class="diff-chg">5.
-</ins>
-</span>
-Markup
-of
-RDF
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.1
-</del>
-<ins class="diff-chg">5.1
-</ins>
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.2
-</del>
-<ins class="diff-chg">5.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3
-</del>
-<ins class="diff-chg">5.3
-</ins>
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#plain-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.4
-</del>
-<ins class="diff-chg">5.4
-</ins>
-</span>
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#language-specification-in-plain-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.5
-</del>
-<ins class="diff-chg">5.5
-</ins>
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#typed-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.6
-</del>
-<ins class="diff-chg">5.6
-</ins>
-</span>
-Typed
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.7
-</del>
-<ins class="diff-chg">5.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.8
-</del>
-<ins class="diff-chg">5.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#blank-nodes" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.9
-</del>
-<ins class="diff-chg">5.9
-</ins>
-</span>
-Blank
-Nodes
-</a>
-</li>
-<li class="tocline">
-<a href="#escape-character" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.10
-</del>
-<ins class="diff-chg">5.10
-</ins>
-</span>
-Escape
-Character
-</a>
-</li>
-<li class="tocline">
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.11
-</del>
-<ins class="diff-chg">5.11
-</ins>
-</span>
-Automatic
-Typing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#best-practices" class="tocxref">
-<span class="secno">
-<ins class="diff-new">6.
-</ins></span><ins class="diff-new">
-Best
-Practices
-</ins></a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno"><ins class="diff-new">
-6.1
-</ins></span><ins class="diff-new">
-JavaScript
-</ins></a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno"><ins class="diff-new">
-6.2
-</ins></span><ins class="diff-new">
-Schema-less
-Databases
-</ins></a></li></ul></li><li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">10.
-</del>
-<ins class="diff-chg">7.
-</ins>
-</span>
-Advanced
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-<ins class="diff-new">7.1
-</ins></span><ins class="diff-new">
-Type
-Coercion
-</ins></a></li><li class="tocline"><a href="#json-ld-profiles" class="tocxref"><span class="secno"><ins class="diff-new">
-7.2
-</ins></span><ins class="diff-new">
-JSON-LD
-Profiles
-</ins></a></li><li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-<del class="diff-old">10.1
-</del>
-<ins class="diff-chg">7.3
-</ins>
-</span>
-Disjoint
-Graphs
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-<del class="diff-old">10.2
-</del>
-<ins class="diff-chg">A.
-</ins>
-</span>
-Acknowledgements
-</a>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.
-</del>
-<ins class="diff-chg">B.
-</ins>
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.1
-</del>
-<ins class="diff-chg">B.1
-</ins>
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.2
-</del>
-<ins class="diff-chg">B.2
-</ins>
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<del class="diff-old">1.
-How
-to
-Read
-this
-Document
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-Developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-Developers
-that
-want
-to
-understand
-the
-encoding
-possibilities.
-To
-understand
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-RFC4627
-].
-</del>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">2.
-</del>
-<ins class="diff-chg">1.
-</ins>
-</span>
-Introduction
-</h2>
-<p class="issue">
-Write
-the
-introduction
-once
-all
-of
-the
-technical
-details
-are
-hammered
-out.
-Explain
-why
-JSON-LD
-is
-designed
-as
-a
-light-weight
-mechanism
-to
-express
-RDFa,
-Microformats
-and
-Microdata.
-It
-is
-primarily
-intended
-as
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-environments
-as
-well
-as
-a
-way
-to
-pass
-Linked
-Data
-to
-and
-from
-Web
-services.
-It
-is
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-(and
-understanding)
-that
-is
-out
-there
-already.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-Microformats
-data,
-and
-Microdata
-(that
-is,
-every
-data
-model
-currently
-in
-use)
-using
-one
-unified
-format.
-It
-does
-not
-require
-anyone
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-out-of-band
--
-it
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-tiny
-memory
-footprint
-in
-order
-to
-operate.
-</p>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">1.1
-</ins></span><ins class="diff-new">
-How
-to
-Read
-this
-Document
-</ins></h3><p><ins class="diff-new">
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</ins></p><ul><li><ins class="diff-new">
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</ins></li><li><ins class="diff-new">
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</ins></li><li><ins class="diff-new">
-Software
-developers
-that
-want
-to
-write
-processors
-for
-JSON-LD.
-</ins></li></ul><p><ins class="diff-new">
-To
-understand
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
-RFC4627
-</ins></a></cite><ins class="diff-new">
-]
-and
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS"><ins class="diff-new">
-RDF-CONCEPTS
-</ins></a></cite><ins class="diff-new">
-].
-</ins></p>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-chg">1.2
-</ins></span><ins class="diff-chg">
-Contributing
-</ins></h3><p><ins class="diff-chg">
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</ins></p><ul><li><ins class="diff-chg">
-All
-comments
-and
-discussion
-takes
-place
-on
-the
-public
-mailing
-list:
-</ins><a href="http://groups.google.com/group/json-ld"><ins class="diff-chg">
-json-ld@googlegroups.com
-</ins></a></li><li><ins class="diff-chg">
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-</ins><a href="http://github.com/digitalbazaar/json-ld/issues"><ins class="diff-chg">
-issue
-tracker
-</ins></a>.</li><li><a href="http://github.com/digitalbazaar/json-ld"><ins class="diff-chg">
-Source
-code
-</ins></a><ins class="diff-chg">
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</ins></li><li><ins class="diff-chg">
-The
-</ins><a href="http://webchat.freenode.net/?channels=#json-ld"><ins class="diff-chg">
-#json-ld
-</ins></a><ins class="diff-chg">
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</ins></li></ul></div></div><div id="design-goals-and-rationale" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">3.
-</del>
-<ins class="diff-chg">2.
-</ins>
-</span>
-Design
-Goals
-<ins class="diff-new">and
-Rationale
-</ins>
-</h2>
-<p>
-<ins class="diff-new">The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</ins></p><div id="goals" class="section"><h3><span class="secno"><ins class="diff-new">
-2.1
-</ins></span><ins class="diff-new">
-Goals
-</ins></h3><p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-don't
-need
-to
-know
-RDF
-in
-order
-to
-use
-the
-basic
-functionality
-provided
-by
-JSON-LD.
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-should
-be
-100%
-compatible
-with
-JSON.
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-All
-major
-RDF
-concepts
-must
-be
-expressible
-via
-the
-JSON-LD
-syntax.
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-readable.
-</dd>
-<dt>
-Zero
-Edits
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<del class="diff-old">4.
-Design
-Rationale
-The
-following
-section
-outlines
-the
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</del>
-<div id="map-terms-to-iris" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.1
-</del>
-<ins class="diff-chg">2.2
-</ins>
-</span>
-Map
-Terms
-to
-IRIs
-</h3>
-<p>
-Establishing
-a
-mechanism
-to
-map
-JSON
-values
-to
-IRIs
-will
-help
-in
-the
-mapping
-of
-JSON
-objects
-to
-RDF.
-This
-does
-not
-mean
-that
-JSON-LD
-must
-be
-restrictive
-in
-declaring
-a
-set
-of
-terms,
-rather,
-experimentation
-and
-innovation
-should
-be
-supported
-as
-part
-of
-the
-core
-design
-of
-JSON-LD.
-There
-are,
-however,
-a
-number
-of
-very
-small
-design
-criterial
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-RDF
-data
-that
-will
-create
-value
-for
-the
-greater
-semantic
-web
-community
-and
-JSON/REST-based
-Web
-Services
-community.
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-object
-as
-the
-example
-for
-this
-section:
-</p>
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-}
-</pre>
-</div>
-<div id="the-default-context" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-chg">2.3
-</ins></span>
-The
-Default
-Context
-</h3>
-<p>
-A
-default
-context
-is
-used
-in
-RDFa
-to
-allow
-developers
-to
-use
-keywords
-as
-aliases
-for
-IRIs.
-So,
-for
-instance,
-the
-keyword
-<strong>
-name
-</strong>
-above
-could
-refer
-to
-the
-IRI
-<em>
-http://xmlns.com/foaf/0.1/name
-</em>.
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-terms
-mean
-something,
-which
-you
-will
-eventually
-want
-to
-query.
-The
-semantic
-web
-specifies
-this
-via
-<em>
-Vocabulary
-Documents
-</em>.
-The
-IRI
-<em>
-http://xmlns.com/foaf/0.1/
-</em>
-specifies
-a
-Vocabulary
-Document,
-and
-<strong>
-name
-</strong>
-is
-a
-term
-in
-that
-vocabulary.
-Paste
-the
-two
-items
-together
-and
-you
-have
-an
-unambiguous
-identifier
-for
-a
-term.
-</p>
-<p>
-Developers,
-and
-machines,
-would
-be
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-Machines
-need
-the
-same
-sort
-of
-dictionary
-of
-terms,
-and
-URIs
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-Non-prefixed
-terms
-should
-have
-term
-mappings
-declared
-in
-the
-default
-context
-so
-that
-they
-may
-be
-expanded
-later.
-</p>
-<p>
-If
-a
-set
-of
-terms,
-like
-<strong>
-Person
-</strong>,
-<strong>
-name
-</strong>,
-and
-<strong>
-homepage
-</strong>,
-are
-pre-defined
-in
-the
-default
-context,
-and
-that
-context
-is
-used
-to
-resolve
-the
-names
-in
-JSON
-objects,
-machines
-could
-automatically
-expand
-the
-terms
-to
-something
-meaningful
-and
-unambiguous,
-like
-this:
-</p>
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
-}
-</pre>
-<p class="note">
-In
-order
-to
-differentiate
-between
-plain
-text
-and
-IRIs,
-the
-<strong>
-<
-</strong> and <strong>
->
-</strong>
-are
-used
-around
-IRIs.
-</p>
-<p>
-Doing
-this
-would
-mean
-that
-JSON
-would
-start
-to
-become
-unambiguously
-machine-readable,
-play
-well
-with
-the
-semantic
-web,
-and
-basic
-markup
-wouldn't
-be
-that
-much
-more
-complex
-than
-basic
-JSON
-markup.
-A
-win,
-all
-around.
-</p>
-</div>
-<div id="mashing-up-vocabularies" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">2.4
-</ins>
-</span>
-Mashing
-Up
-Vocabularies
-</h3>
-<p>
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</p>
-<ul>
-<li>
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</li>
-<li>
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</li>
-<li>
-FOAF
--
-for
-describing
-social
-networks.
-</li>
-<li>
-Calendar
--
-for
-specifying
-events.
-</li>
-<li>
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</li>
-<li>
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</li>
-<li>
-GEO
--
-for
-describing
-geographic
-location.
-</li>
-<li>
-VCard
--
-for
-describing
-organizations
-and
-people.
-</li>
-<li>
-DOAP
--
-for
-describing
-projects.
-</li>
-</ul>
-<p>
-A
-JSON-LD
-Web
-Service
-could
-define
-these
-as
-<em>
-prefix
-</em>
-es
-in
-their
-default
-context
-beside
-the
-<em>
-terms
-</em>
-that
-are
-already
-defined.
-Using
-this
-feature,
-developers
-could
-also
-express
-markup
-like
-this:
-</p>
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
-}
-</pre>
-<p>
-Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-default
-context
-in-line
-using
-the
-<code>
-#
-</code>
-character,
-like
-so:
-</p>
-<pre class="example">
-{
-  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
-  "myvocab:credits": 500</span>
-}
-</pre>
-<p>
-Think
-of
-the
-<code>
-#
-</code>
-character
-as
-a
-"hashtable",
-which
-maps
-one
-string
-to
-another
-string.
-In
-the
-example
-above,
-the
-<code>
-myvocab
-</code>
-string
-is
-replaced
-with
-"
-<code>
-http://example.org/myvocab#
-</code>
-"
-when
-it
-is
-detected
-above.
-In
-the
-example
-above,
-"
-<code>
-myvocab:credits
-</code>
-"
-would
-expand
-to
-"
-<code>
-http://example.org/myvocab#credits
-</code>
-".
-</p>
-<p>
-This
-mechanism
-is
-a
-short-hand
-for
-RDF,
-and
-if
-defined,
-will
-give
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</p>
-<p>
-</p>
-</div>
-<div id="an-example-of-a-default-context" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">2.5
-</ins>
-</span>
-An
-Example
-of
-a
-Default
-Context
-</h3>
-<p>
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-A
-JSON-LD
-aware
-Web
-Service
-<em class="rfc2119" title="may">
-may
-</em>
-define
-a
-default
-context.
-For
-example,
-the
-following
-default
-context
-could
-apply
-to
-all
-incoming
-Web
-Service
-calls
-previously
-accepting
-only
-JSON
-data:
-</p>
-<pre class="example">
-{
-  "#": 
-  {
-<del class="diff-old">    "__vocab__": "http://example.org/default-vocab#",
-</del>
-<ins class="diff-chg">    "#vocab": "http://example.org/default-vocab#",
-    "#base": "http://example.org/baseurl/",
-</ins>
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-  }
-}
-</pre>
-<p>
-The
-<code>
-<del class="diff-old">__vocab__
-</del>
-<ins class="diff-chg">#vocab
-</ins>
-</code>
-<del class="diff-old">prefix
-</del>
-<ins class="diff-chg">string
-</ins>
-is
-a
-special
-<del class="diff-old">prefix
-</del>
-<ins class="diff-chg">keyword
-</ins>
-that
-states
-that
-any
-term
-that
-doesn't
-resolve
-to
-a
-term
-or
-a
-prefix
-should
-be
-appended
-to
-the
-<code>
-<del class="diff-old">__vocab__
-</del>
-<ins class="diff-chg">#vocab
-</ins>
-</code>
-IRI.
-This
-is
-done
-to
-ensure
-that
-terms
-can
-be
-transformed
-to
-an
-IRI
-at
-all
-times.
-</p>
-<p>
-<ins class="diff-new">The
-</ins><code><ins class="diff-new">
-#base
-</ins></code><ins class="diff-new">
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-relative
-IRI
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-appended
-to
-the
-string
-specified
-by
-</ins><code><ins class="diff-new">
-#base
-</ins></code>.</p></div></div><div id="markup-examples" class="section"><h2><span class="secno"><ins class="diff-new">
-3.
-</ins></span><ins class="diff-new">
-Markup
-Examples
-</ins></h2><p><ins class="diff-new">
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</ins></p><div id="rdfa" class="section"><h3><span class="secno"><ins class="diff-new">
-3.1
-</ins></span><ins class="diff-new">
-RDFa
-</ins></h3><p><ins class="diff-new">
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</ins></p><pre class="example"><ins class="diff-new">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</ins></pre><p><ins class="diff-new">
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</ins></p><pre class="example"><ins class="diff-new">
-[
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
- }
-]
-</ins></pre></div><div id="microformats" class="section"><h3><span class="secno"><ins class="diff-new">
-3.2
-</ins></span><ins class="diff-new">
-Microformats
-</ins></h3><p><ins class="diff-new">
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</ins></p><pre class="example"><ins class="diff-new">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-</ins></pre><p><ins class="diff-new">
-The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-</ins><code><ins class="diff-new">
-url
-</ins></code><ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-fn
-</ins></code><ins class="diff-new">
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-</ins><code><ins class="diff-new">
-http://tantek.com
-</ins></code>.</p><pre class="example"><ins class="diff-new">
-{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-}
-</ins></pre></div><div id="microdata" class="section"><h3><span class="secno"><ins class="diff-new">
-3.3
-</ins></span><ins class="diff-new">
-Microdata
-</ins></h3><p><ins class="diff-new">
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</ins></p><pre class="example"><ins class="diff-new">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</ins></pre><p><ins class="diff-new">
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</ins></p><pre class="example"><ins class="diff-new">
-[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-]
-</ins></pre></div>
-</div>
-<div id="the-json-ld-processing-algorithm" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">4.
-</ins>
-</span>
-The
-JSON-LD
-Processing
-Algorithm
-</h2>
-<p>
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</p>
-<p class="issue">
-The
-Processing
-Algorithm
-is
-a
-work
-in
-progress,
-there
-are
-still
-major
-bugs
-in
-the
-algorithm
-and
-it's
-difficult
-to
-follow.
-It's
-provided
-only
-to
-very
-early
-implementers
-to
-give
-them
-an
-idea
-of
-how
-to
-implement
-a
-processor.
-</p>
-<h4 id="processing-algorithm-terms">
-Processing
-Algorithm
-Terms
-</h4>
-<ul>
-<li>
-<dfn title="default_context" id="dfn-default_context">
-default
-context
-</dfn>
--
-a
-context
-that
-is
-specified
-to
-the
-JSON-LD
-processing
-algorithm
-before
-processing
-begins.
-</li>
-<li>
-<dfn title="default_graph" id="dfn-default_graph">
-default
-graph
-</dfn>
--
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</li>
-<li>
-<dfn title="active_subject" id="dfn-active_subject">
-active
-subject
-</dfn>
--
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="inherited_subject" id="dfn-inherited_subject">
-inherited
-subject
-</dfn>
--
-a
-subject
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-<a class="tref" title="current_subject">
-current
-subject
-</a>
-is
-discovered
-or
-generated.
-</li>
-<li>
-<dfn title="active_property" id="dfn-active_property">
-active
-property
-</dfn>
--
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="inherited_property" id="dfn-inherited_property">
-inherited
-property
-</dfn>
--
-a
-property
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-<a class="tref" title="current_subject">
-current
-subject
-</a>
-is
-discovered
-or
-generated.
-</li>
-<li>
-<dfn title="active_object" id="dfn-active_object">
-active
-object
-</dfn>
--
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="active_context" id="dfn-active_context">
-active
-context
-</dfn>
--
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-the
-top-most
-item
-on
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-</li>
-<li>
-<dfn title="local_context" id="dfn-local_context">
-local
-context
-</dfn>
--
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-<code>
-#
-</code>
-key.
-</li>
-<li>
-<dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</dfn>
--
-A
-list
-of
-triples
-that
-have
-yet
-to
-have
-their
-subject
-set.
-</li>
-<li>
-<dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</dfn>
--
-A
-list
-of
-objects
-that
-cannot
-be
-processed
-until
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-detected
-or
-the
-end
-of
-the
-current
-associative-array
-is
-detected.
-</li>
-<li>
-<dfn title="processor_state" id="dfn-processor_state">
-processor
-state
-</dfn>
--
-the
-processor
-state,
-which
-includes
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack,
-<a class="tref" title="current_subject">
-current
-subject
-</a>,
-<a class="tref" title="current_property">
-current
-property
-</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</a>,
-and
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>.
-</li>
-</ul>
-<h4 id="processing-tokens-and-keywords">
-<ins class="diff-new">Processing
-Tokens
-and
-Keywords
-</ins></h4><ul><li><code><ins class="diff-new">
-#
-</ins></code><ins class="diff-new">
--
-Used
-to
-set
-the
-active
-context.
-</ins></li><li><code><ins class="diff-new">
-#base
-</ins></code><ins class="diff-new">
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-active
-context.
-</ins></li><li><code><ins class="diff-new">
-#vocab
-</ins></code><ins class="diff-new">
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-active
-context.
-</ins></li><li><code><ins class="diff-new">
-#types
-</ins></code><ins class="diff-new">
--
-Used
-to
-specify
-type
-coercion.
-</ins><div class="issue"><ins class="diff-new">
-The
-#types
-keyword
-assumes
-</ins><a href="#type-coercion"><ins class="diff-new">
-Type
-Coercion
-</ins></a>,<ins class="diff-new">
-which
-is
-an
-experimental
-feature.
-</ins></div></li><li><code><</code> and <code><ins class="diff-new">
->
-</ins></code><ins class="diff-new">
--
-Used
-to
-express
-IRIs
-in
-JSON
-values.
-</ins></li><li><code>:</code><ins class="diff-new">
--
-The
-separator
-for
-CURIEs
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-</ins></li><li><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
--
-Sets
-the
-active
-subjects.
-</ins></li><li><code><ins class="diff-new">
-a
-</ins></code><ins class="diff-new">
--
-Used
-to
-set
-the
-rdf:type
-of
-the
-active
-subjects.
-</ins></li><li><code><ins class="diff-new">
-\
-</ins></code><ins class="diff-new">
--
-Used
-as
-an
-escape
-character
-to
-escape
-all
-the
-special
-tokens
-and
-keywords.
-</ins></li><li><code><ins class="diff-new">
-^^
-</ins></code><ins class="diff-new">
--
-Used
-to
-express
-the
-data
-type
-for
-Typed
-Literals.
-</ins></li></ul>
-<p>
-The
-algorithm
-below
-is
-designed
-for
-streaming
-(SAX-based)
-implementations.
-Implementers
-will
-find
-that
-non-streaming
-(document-based)
-implementations
-will
-be
-much
-easier
-to
-implement
-as
-full
-access
-to
-the
-JSON
-object
-model
-eliminates
-some
-of
-the
-steps
-that
-are
-necessary
-for
-streaming
-implementations.
-A
-conforming
-JSON-LD
-processor
-<em class="rfc2119" title="must">
-must
-</em>
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>
-that
-the
-following
-algorithm
-generates:
-</p>
-<ol class="algorithm">
-<li id="processing-step-default-context">
-If
-a
-<a class="tref internalDFN" title="default_context" href="#dfn-default_context">
-default
-context
-</a>
-is
-supplied
-to
-the
-processing
-algorithm,
-push
-it
-onto
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-</li>
-<li id="processing-step-associative">
-If
-an
-associative
-array
-is
-detected,
-create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-Copy
-the
-<a class="tref" title="current_context">
-current
-context
-</a>
-stack
-to
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-Push
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-onto
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-'s
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-For
-each
-key-value
-pair
-in
-the
-associative
-array,
-using
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-do
-the
-following:
-<ol class="algorithm">
-<li>
-If
-a
-<code>
-#
-</code>
-key
-is
-found,
-the
-processor
-merges
-each
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-overwriting
-any
-duplicate
-values
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-Process
-each
-object
-in
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>,
-starting
-at
-<a href="#processing-subject">
-Step
-2.2
-</a>.
-</li>
-<li id="processing-associative">
-If
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-has
-not
-been
-detected,
-the
-current
-key-value
-pair
-is
-placed
-into
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>
-and
-processing
-proceeds
-to
-the
-next
-key-value
-pair.
-Otherwise,
-if
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-known
-perform
-the
-following
-steps:
-</li>
-<ol class="algorithm">
-<li id="processing-subject">
-If
-a
-<code>
-@
-</code>
-key
-is
-found,
-the
-processor
-sets
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-value
-after
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-has
-been
-performed.
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-and
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-values
-are
-specified,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-for
-the
-subject,
-the
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-for
-the
-property,
-and
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-for
-the
-object.
-</li>
-<li>
-If
-there
-are
-any
-triples
-in
-the
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</a>,
-complete
-each
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-as
-the
-subject
-for
-each
-triple.
-</li>
-</ol>
-</li>
-<li>
-If
-an
-<code>
-a
-</code>
-key
-is
-found,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-<code>
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type
-</code>.
-</li>
-<li>
-If
-a
-key
-that
-is
-not
-<code>
-#
-</code>,
-<code>
-@
-</code>,
-or
-<code>
-a
-</code>
-is
-found,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Property
-Processing
-</a>
-on
-the
-key.
-</li>
-<li>
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-an
-associative
-array,
-then
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-then
-process
-the
-value
-starting
-at
-<a href="#processing-step-array">
-Step
-3
-</a>
-ensuring
-that
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-are
-copied
-to
-a
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-<li>
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-was
-not
-discovered,
-then:
-<ol class="algorithm">
-<li>
-Generate
-a
-<a class="tref" title="blank_node_identifier">
-blank
-node
-identifier
-</a>
-and
-set
-it
-as
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>.
-</li>
-<li>
-Complete
-any
-previously
-incomplete
-triples
-by
-running
-all
-substeps
-of
-<a href="#processing-subject">
-Step
-2.2.1
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-was
-not
-discovered,
-then
-assume
-that
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-unmodified
-and
-run
-all
-substeps
-of
-<a href="#processing-associative">
-Step
-2.2
-</a>
-on
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>.
-</li>
-</ol>
-</ol>
-</li>
-<li id="processing-step-array">
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-an
-associative
-array,
-processes
-per
-<a href="#processing-step-associative">
-Step
-2
-</a>,
-ensuring
-to
-set
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-to
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-the
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-to
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-in
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-and
-place
-it
-into
-the
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-Processing?
-<div class="issue">
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-generation
-of
-triples?
-For
-example,
-would
-implementing
-this
-be
-worth
-the
-more
-complex
-processing
-rules:
-"ex:orderedItems"
-:
-[["one",
-"two",
-"three"]]
-</div>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<del class="diff-old">8.
-Markup
-Examples
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-8.1
-RDFa
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-&lt;div &gt;
-   &lt;ul&gt;
-      &lt;li &gt;
-        &lt;a &gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li &gt;
-        &lt;a &gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li &gt;
-        &lt;a &gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-[
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
- }
-]
-8.2
-Microformats
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-url
-and
-fn
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-http://tantek.com
-.
-{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-}
-8.3
-Microdata
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-]
-</del>
-<div id="markup-of-rdf-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">9.
-</del>
-<ins class="diff-chg">5.
-</ins>
-</span>
-Markup
-of
-RDF
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-most
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-Javascript
-objects
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-Since
-RDF
-is
-also
-an
-important
-sub-community
-of
-the
-Linked
-Data
-movement,
-it
-is
-important
-that
-all
-RDF
-concepts
-are
-well-represented
-in
-this
-specification.
-This
-section
-details
-how
-each
-RDF
-concept
-can
-be
-expressed
-in
-JSON-LD.
-</p>
-<p class="issue">
-<ins class="diff-new">The
-current
-specification
-relies
-on
-microsyntaxes
-to
-express
-things
-like
-IRIs,
-typed
-literals
-and
-CURIEs.
-There
-is
-a
-small
-amount
-of
-debate
-on
-whether
-or
-not
-to
-use
-full-blown
-JSON
-objects
-containing
-things
-like
-"value"
-and
-"datatype".
-The
-original
-authors
-of
-the
-JSON-LD
-specification
-feel
-that
-microsyntaxes
-allow
-a
-much
-simpler,
-less
-error-prone
-structure
-in
-the
-JSON-LD
-objects.
-Proponents
-of
-the
-verbose
-mechanism
-assert
-that
-there
-would
-be
-less
-chance
-of
-data
-markup
-issues
-concerning
-proper
-escaping
-and
-that
-the
-objects,
-while
-more
-verbose,
-would
-be
-easier
-to
-work
-with
-within
-JavaScript
-environments.
-Feedback
-on
-this
-issue
-would
-be
-appreciated.
-</ins></p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.1
-</del>
-<ins class="diff-chg">5.1
-</ins>
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-subjects
-and
-many
-objects
-are
-identified.
-IRIs
-can
-be
-expressed
-by
-wrapping
-a
-text
-string
-with
-the
-<code>
-<
-</code> and <code>
->
-</code>
-characters.
-</p>
-<pre class="example">
-{
-...
-  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-object
-to
-an
-IRI
-with
-the
-value
-of
-<code>
-http://manu.sporny.org
-</code>.
-</p>
-<p>
-Wrapping
-IRIs
-with
-the
-<code>
-<
-</code> and <code>
->
-</code>
-characters
-are
-only
-necessary
-when
-IRIs
-are
-specified
-as
-objects.
-At
-no
-other
-point
-do
-you
-need
-to
-wrap
-an
-IRI.
-You
-do
-not
-need
-to
-wrap
-IRIs
-when
-declaring
-a
-property,
-declaring
-a
-CURIE,
-or
-describing
-key-value
-pairs
-in
-a
-context.
-</p>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.2
-</del>
-<ins class="diff-chg">5.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-A
-subject
-is
-declared
-using
-the
-<code>
-@
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-predicate,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<code>
-<http://example.org/people#joebob>
-</code>.
-</p>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.3
-</del>
-<ins class="diff-chg">5.3
-</ins>
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-a
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-type-url).
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-(in
-N-Triples
-notation):
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-</div>
-<div id="plain-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.4
-</del>
-<ins class="diff-chg">5.4
-</ins>
-</span>
-Plain
-Literals
-</h3>
-<p>
-Regular
-text
-strings
-are
-called
-"plain
-literals"
-in
-RDF
-and
-are
-easily
-expressed
-using
-regular
-JSON
-strings.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}
-</pre>
-</div>
-<div id="language-specification-in-plain-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.5
-</del>
-<ins class="diff-chg">5.5
-</ins>
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</h3>
-<p>
-JSON-LD
-attempts
-to
-make
-sure
-that
-it
-is
-easy
-to
-express
-triples
-in
-other
-languages
-while
-simultaneously
-ensuring
-that
-hefty
-data
-structures
-aren't
-required
-to
-accomplish
-simple
-language
-markup.
-When
-the
-<code>
-@
-</code>
-symbol
-is
-used
-in
-a
-literal,
-the
-JSON-LD
-processor
-tags
-the
-literal
-text
-with
-the
-language
-tag
-that
-follows
-the
-<code>
-@
-</code>
-symbol.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">花澄@ja</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-plain
-literal
-for
-<em>
-花澄
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-tag
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="typed-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.6
-</del>
-<ins class="diff-chg">5.6
-</ins>
-</span>
-Typed
-Literals
-</h3>
-<p>
-Literals
-may
-also
-be
-typed
-in
-JSON-LD
-by
-using
-the
-<code>
-^^
-</code>
-sequence
-at
-the
-end
-of
-the
-text
-string.
-</p>
-<pre class="example">
-{
-...
-  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-an
-object
-with
-the
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.7
-</del>
-<ins class="diff-chg">5.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-arrays.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-array.
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-<del class="diff-old">   &lt;http://xmlns.com/foaf/0.1/&gt;
-</del>
-<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-</ins>
-      "stu" .
-&lt;http://example.org/people#joebob&gt; 
-<del class="diff-old">   &lt;http://xmlns.com/foaf/0.1/&gt;
-</del>
-<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-</ins>
-      "groknar" .
-&lt;http://example.org/people#joebob&gt; 
-<del class="diff-old">   &lt;http://xmlns.com/foaf/0.1/&gt;
-</del>
-<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-</ins>
-"radface"
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.8
-</del>
-<ins class="diff-chg">5.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-typed
-literals
-are
-expressed
-very
-much
-in
-the
-same
-way
-as
-multiple
-properties:
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="blank-nodes" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.9
-</del>
-<ins class="diff-chg">5.9
-</ins>
-</span>
-Blank
-Nodes
-</h3>
-<p>
-At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-is
-where
-blank
-nodes
-come
-into
-play.
-In
-JSON-LD,
-blank
-node
-identifiers
-are
-automatically
-created
-if
-a
-subject
-is
-not
-specified
-using
-the
-<code>
-@
-</code>
-key.
-However,
-authors
-may
-name
-blank
-nodes
-by
-using
-the
-special
-<code>
-_
-</code>
-CURIE
-prefix.
-</p>
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<code>
-_:foo
-</code>,
-which
-can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-named
-blank
-node.
-</p>
-</div>
-<div id="escape-character" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.10
-</del>
-<ins class="diff-chg">5.10
-</ins>
-</span>
-Escape
-Character
-</h3>
-<p>
-Special
-characters
-in
-property
-values
-<em class="rfc2119" title="must">
-must
-</em>
-be
-escaped
-in
-order
-to
-not
-be
-interpreted
-as
-CURIEs,
-IRIs,
-language
-tags,
-or
-TypedLiterals.
-</p>
-<p>
-The
-special
-characters
-in
-JSON-LD
-are:
-<code>
-<
-</code>, <code>
->
-</code>,
-<code>
-@
-</code>,
-<code>
-#
-</code>,
-<code>:
-</code>
-and
-<code>
-^
-</code>.
-</p>
-<pre class="example">
-{
-...
-  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}
-</pre>
-</div>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.11
-</del>
-<ins class="diff-chg">5.11
-</ins>
-</span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-decimals,
-integers
-and
-boolean
-values,
-JSON-LD
-utilizes
-that
-information
-to
-create
-<a href="#typed-literals">
-Typed
-Literals
-</a>.
-</p>
-<pre class="example">
-{
-...
-  // This value is automatically converted to having a type of xsd:decimal
-  "measure:cups": <span class="diff">5.3</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}
-</pre>
-</div>
-</div>
-<div id="best-practices" class="section">
-<h2>
-<span class="secno">
-<ins class="diff-new">6.
-</ins></span><ins class="diff-new">
-Best
-Practices
-</ins></h2><p><ins class="diff-new">
-The
-nature
-of
-Web
-programming
-allows
-one
-to
-use
-basic
-technologies,
-such
-as
-JSON-LD,
-across
-a
-variety
-of
-systems
-and
-environments.
-This
-section
-attempts
-to
-describe
-some
-of
-those
-environments
-and
-the
-way
-in
-which
-JSON-LD
-can
-be
-integrated
-in
-order
-to
-help
-alleviate
-certain
-development
-headaches.
-</ins></p><div id="javascript" class="section"><h3><span class="secno"><ins class="diff-new">
-6.1
-</ins></span><ins class="diff-new">
-JavaScript
-</ins></h3><p class="issue"><ins class="diff-new">
-It
-is
-expected
-that
-JSON-LD
-will
-be
-used
-quite
-a
-bit
-in
-JavaScript
-environments,
-however,
-features
-like
-IRIs
-requiring
-angled
-brackets
-in
-JSON-LD
-means
-that
-using
-JSON-LD
-directly
-in
-JavaScript
-is
-going
-to
-be
-annoying
-without
-a
-middleware
-layer
-such
-as
-a
-simple
-library
-that
-strips
-JSON-LD
-markup
-before
-JavaScript
-uses
-it.
-One
-could
-say
-that
-JSON-LD
-is
-a
-good
-fit
-for
-the
-RDFa
-API,
-which
-would
-enable
-a
-triple-store
-in
-the
-browser,
-but
-some
-don't
-want
-to
-require
-that
-level
-of
-functionality
-just
-to
-use
-JSON-LD.
-The
-group
-is
-still
-discussing
-the
-best
-way
-to
-proceed,
-so
-input
-on
-how
-JSON-LD
-could
-more
-easily
-be
-utilized
-in
-JavaScript
-environments
-would
-be
-very
-much
-appreciated.
-</ins></p></div><div id="schema-less-databases" class="section"><h3><span class="secno"><ins class="diff-new">
-6.2
-</ins></span><ins class="diff-new">
-Schema-less
-Databases
-</ins></h3><p class="issue"><ins class="diff-new">
-Databases
-such
-as
-CouchDB
-and
-MongoDB
-allow
-the
-creation
-of
-schema-less
-data
-stores.
-RDF
-is
-a
-type
-of
-schema-less
-data
-model
-and
-thus
-lends
-itself
-to
-databases
-such
-as
-CouchDB
-and
-MongoDB.
-Both
-of
-these
-databases
-can
-use
-JSON-LD
-as
-their
-storage
-format.
-The
-group
-needs
-feedback
-from
-CouchDB
-and
-MongoDB
-experts
-regarding
-the
-usefulness
-of
-JSON-LD
-in
-those
-environments.
-</ins></p></div></div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">10.
-</del>
-<ins class="diff-chg">7.
-</ins>
-</span>
-Advanced
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-taken
-with
-a
-grain
-of
-salt;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">7.1
-</ins></span><ins class="diff-new">
-Type
-Coercion
-</ins></h3><p><ins class="diff-new">
-JSON-LD
-supports
-the
-coercion
-of
-types
-to
-ensure
-that
-the
-zero-edit
-goal
-of
-JSON-LD
-can
-be
-accomplished.
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-and
-incoming
-or
-outgoing
-types
-to
-the
-proper
-RDF
-type
-based
-on
-a
-mapping
-of
-type
-IRIs
-to
-RDF
-types.
-Using
-type
-conversion,
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</ins></p><p><ins class="diff-new">
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-plain
-literals,
-typed
-literals
-and
-IRIs.
-</ins></p><pre class="example"><ins class="diff-new">
-{
-  "#": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-</ins><span class="diff">     "#types":<ins class="diff-new">
-     {
-        "name": "rdf:PlainLiteral",
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }</span>
-  },
-  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}
-</ins></pre><p><ins class="diff-new">
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</ins></p><pre class="example"><ins class="diff-new">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "&lt;John Smith&gt;" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</ins></pre></div><div id="json-ld-profiles" class="section"><h3><span class="secno"><ins class="diff-new">
-7.2
-</ins></span><ins class="diff-new">
-JSON-LD
-Profiles
-</ins></h3><p><ins class="diff-new">
-One
-of
-the
-more
-powerful
-features
-of
-RDFa
-1.1
-Core
-is
-the
-ability
-to
-specify
-a
-collection
-of
-prefixes
-and
-terms
-that
-can
-be
-re-used
-by
-a
-processor
-to
-simplfy
-markup.
-JSON-LD
-provides
-a
-similar
-mechanism
-called
-JSON-LD
-Profiles,
-which
-is
-the
-inclusion
-of
-a
-context
-external
-to
-the
-JSON-LD
-document.
-</ins></p><p><ins class="diff-new">
-The
-example
-below
-demonstrates
-how
-one
-may
-specify
-an
-external
-JSON-LD
-Profile.
-Assume
-the
-following
-profile
-exists
-at
-this
-imaginary
-URL:
-</ins><code><ins class="diff-new">
-http://example.org/profiles/contacts
-</ins></code>.</p><pre class="example"><ins class="diff-new">
-{
-  "#": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}
-</ins></pre><p><ins class="diff-new">
-The
-profile
-listed
-above
-can
-be
-used
-in
-the
-following
-way:
-</ins></p><pre class="example"><ins class="diff-new">
-{
-  "#": { "#profile": "http://example.org/profiles/contacts" },
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}
-</ins></pre><p><ins class="diff-new">
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</ins></p><pre class="example"><ins class="diff-new">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</ins></pre></div>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">10.1
-</del>
-<ins class="diff-chg">7.3
-</ins>
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-array
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-<del class="diff-old">      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;/section&gt;
-</del>
-<ins class="diff-chg">&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</ins>
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-JSON-LD
-associative
-array.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<pre class="example">
-{
-  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-  "@": 
-  [
-    {
-      "@": "&lt;http://example.org/people#john&gt;",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "&lt;http://example.org/people#jane&gt;",
-      "a": "foaf:Person"
-    }
-  ]
-}
-</pre>
-</div>
-</div>
-<div class="appendix section" id="acknowledgements">
-<h2>
-<span class="secno">
-<del class="diff-old">10.2
-</del>
-<ins class="diff-chg">A.
-</ins>
-</span>
-Acknowledgements
-</h2>
-<p>
-The
-editor
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-rationale
-and
-reasoning
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-Longley
-who
-reviewed
-and
-provided
-feedback
-on
-the
-overall
-specification
-and
-contexts,
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-<ins class="diff-new">Thanks
-also
-to
-Bradley
-P.
-Allen
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-</ins>
-</p>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-<del class="diff-old">A.
-</del>
-<ins class="diff-chg">B.
-</ins>
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">A.1
-</del>
-<ins class="diff-chg">B.1
-</ins>
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<dt id="bib-RDF-CONCEPTS">
-<ins class="diff-new">[RDF-CONCEPTS]
-</ins></dt><dd><ins class="diff-new">
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-</ins><a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite><ins class="diff-new">
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</ins></cite></a><ins class="diff-new">
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-</ins><a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><ins class="diff-new">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</ins></a></dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">A.2
-</del>
-<ins class="diff-chg">B.2
-</ins>
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-3
-August
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">
-http://www.w3.org/TR/2010/WD-rdfa-core-20100803
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20101024/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1656 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head><body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-24-october-2010">Unofficial Draft 24 October 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-</dl><p>This document is also available in this non-normative format: <a href="diff-20101014.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-Developers that embed structured data in their Web pages can choose among
-a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
-and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
-incompatible at the syntax level, can be easily mapped to RDF. JSON has 
-proven to be a highly useful object serialization and messaging format. 
-In an attempt to harmonize the representation of Linked Data in JSON, 
-this specification outlines a common JSON representation format for 
-Linked Data that can be used to represent objects specified via RDFa, 
-Microformats and Microdata.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">2.3 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">2.5 </span>An Example of a Default Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">4. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">5.10 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">5.11 </span>Automatic Typing</a></li></ul></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">6. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">6.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">6.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">7. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">7.1 </span>Type Coercion</a></li><li class="tocline"><a href="#json-ld-profiles" class="tocxref"><span class="secno">7.2 </span>JSON-LD Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">7.3 </span>Disjoint Graphs</a></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-<p class="issue">Write the introduction once all of the technical details
-are hammered out. Explain why JSON-LD is designed as a light-weight mechanism
-to express RDFa, Microformats and Microdata. It is primarily intended as
-a way to express Linked Data in Javascript environments as well as a way to pass
-Linked Data to and from Web services. It is designed to be as simple as 
-possible, utilizing the large number of JSON parsers (and understanding) that
-is out there already. It is designed to be able to express key-value pairs,
-RDF data, Microformats data, and Microdata (that is, every data model
-currently in use) using one unified format. It does not require anyone to change
-their JSON, but easily add meaning by adding context in a way that is 
-out-of-band - it is designed to not disturb already deployed systems running
-on JSON, but provide a smooth migration path from JSON to JSON with added
-semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a tiny memory footprint in order to operate.
-</p>
-
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and 
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to write processors for JSON-LD.</li>
-</ul>
-
-<p>
-To understand this specification you must first be familiar with JSON, 
-which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>All comments and discussion takes place on the public mailing list:
-<a href="http://groups.google.com/group/json-ld">json-ld@googlegroups.com
-</a></li>
-
-<li>Specification bugs and issues should be reported in the 
-<a href="http://github.com/digitalbazaar/json-ld/issues">issue tracker</a>.</li>
-
-<li><a href="http://github.com/digitalbazaar/json-ld">Source code</a> for the 
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design-goals-and-rationale" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
-
-<p>The following section outlines the design goals and rationale behind the 
-JSON-LD markup language.
-</p>
-
-<div id="goals" class="section">
-<h3><span class="secno">2.1 </span>Goals</h3>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers don't need to know RDF in order to use the basic functionality
- provided by JSON-LD.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
- <dt>Expressiveness</dt>
- <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable.</dd>
- <dt>Zero Edits</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers.</dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="map-terms-to-iris" class="section">
-<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
-
-<p>Establishing a mechanism to map JSON values to IRIs will
-help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
-be restrictive in declaring a set of terms, rather, experimentation and 
-innovation should be supported as part of the core design of JSON-LD. There are, 
-however, a number of very small design criterial that can ensure that developers 
-will generate good RDF data that will create value for the greater 
-semantic web community and JSON/REST-based Web Services community.
-</p>
-
-<p>We will be using the following JSON object as the example for this section:
-</p>
-
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-}</pre>
-</div>
-
-<div id="the-default-context" class="section">
-<h3><span class="secno">2.3 </span>The Default Context</h3>
-
-<p>A default context is used in RDFa to allow developers to use keywords
-as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
-above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
-The semantic web, just like the document-based web, uses IRIs for
-unambiguous identification. The idea is that these terms mean something, 
-which you will eventually want to query. The semantic web specifies this via 
-<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
-a Vocabulary Document, and <strong>name</strong> is a term in that 
-vocabulary. Paste the two items together and you have an unambiguous identifier
-for a term.
-</p>
-
-<p>Developers, and machines, would be able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much
-like we can use WordNet today to see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Machines need the same sort of 
-dictionary of terms, and URIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>Non-prefixed terms should have term mappings declared in the default
-context so that they may be expanded later.</p>
-            
-<p>If a set of terms, like <strong>Person</strong>, 
-<strong>name</strong>, and <strong>homepage</strong>,
-are pre-defined in the default context, and that context is used to resolve the
-names in JSON objects, machines could automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
-}</pre>
-
-<p class="note">In order to differentiate between plain text and IRIs, the
-<strong><</strong> and <strong>></strong> are used around IRIs.</p>
-
-<p>Doing this would mean that JSON would start to become unambiguously
-machine-readable, play well with the semantic web, and basic markup wouldn't 
-be that much more complex than basic JSON markup. A win, all around.</p>
-</div>
-
-<div id="mashing-up-vocabularies" class="section">
-<h3><span class="secno">2.4 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
-default context beside the <em>terms</em> that are already defined. Using
-this feature, developers could also express markup like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-default context in-line using the <code>#</code> character, like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
-  "myvocab:credits": 500</span>
-}</pre>
-
-<p>Think of the <code>#</code> character as a "hashtable", which maps one
-string to another string. In the example above, the <code>myvocab</code>
-string is replaced with "<code>http://example.org/myvocab#</code>" when it
-is detected above. In the example above, "<code>myvocab:credits</code>" would
-expand to "<code>http://example.org/myvocab#credits</code>".</p>
-
-<p>This mechanism is a short-hand for RDF, and if defined, will give
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div id="an-example-of-a-default-context" class="section">
-<h3><span class="secno">2.5 </span>An Example of a Default Context</h3>
-
-<p>JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> define a default context. For example, the
-following default context could apply to all incoming Web Service calls
-previously accepting only JSON data:</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-    "#vocab": "http://example.org/default-vocab#",
-    "#base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-  }
-}</pre>
-
-<p>The <code>#vocab</code> string is a special keyword that states 
-that any term that doesn't resolve to a term or a prefix should be 
-appended to the <code>#vocab</code> IRI. This is done to ensure that 
-terms can be transformed to an IRI at all times.
-</p>
-
-<p>The <code>#base</code> string is a special keyword that states 
-that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
-<code>#base</code>.
-</p>
-</div>
-</div>
-
-<div id="markup-examples" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">3.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-[
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
- }
-]</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">3.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">3.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-]</pre>
-</div>
-</div>
-
-<div id="the-json-ld-processing-algorithm" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>The JSON-LD Processing Algorithm</h2>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The Processing Algorithm is a work in progress, there are
-still major bugs in the algorithm and it's difficult to follow. It's provided
-only to very early implementers to give them an idea of how to implement a
-processor.</p>
-
-<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
-<ul>
-<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
-JSON-LD processing algorithm before processing begins.</li>
-<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
-generated by JSON-LD markup.</li>
-<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
-processor should use when generating triples.</li>
-<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
-CURIEs while the processing algorithm is running. The 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
-associative-array level, specified via the <code>#</code> key.</li>
-<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
-yet to have their subject set.</li>
-<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
-processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
-current associative-array is detected.</li>
-<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
-the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
-<a class="tref" title="current_property">current property</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-</li></ul>
-
-<h4 id="processing-tokens-and-keywords">Processing Tokens and Keywords</h4>
-<ul>
-<li><code>#</code> - Used to set the active context.</li>
-<li><code>#base</code> - Used to set the base IRI for all object IRIs affected 
-by the active context.</li>
-<li><code>#vocab</code> - Used to set the base IRI for all property IRIs
-affected by the active context.</li>
-<li><code>#types</code> - Used to specify type coercion.
-<div class="issue">The #types keyword assumes 
-<a href="#type-coercion">Type Coercion</a>, which is an 
-experimental feature.</div></li>
-<li><code><</code> and <code>></code> - Used to express IRIs in
-JSON values.</li>
-<li><code>:</code> - The separator for CURIEs when used in JSON keys or
-JSON values.</li>
-<li><code>@</code> - Sets the active subjects.</li>
-<li><code>a</code> - Used to set the rdf:type of the active subjects.</li>
-<li><code>\</code> - Used as an escape character to escape all the special
-tokens and keywords.</li>
-<li><code>^^</code> - Used to express the data type for Typed Literals.</li>
-</ul>
-
-<p>The algorithm below is designed for streaming (SAX-based) implementations.
-Implementers will find that non-streaming (document-based) implementations will
-be much easier to implement as full access to the JSON object model eliminates 
-some of the steps that are necessary for streaming implementations. A conforming
-JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
-same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
-
-<ol class="algorithm">
-<li id="processing-step-default-context">If a <a class="tref internalDFN" title="default_context" href="#dfn-default_context">default context</a> is 
-supplied to the
-processing algorithm, push it onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-
-<li id="processing-step-associative">If an associative array is 
-detected, create a new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
-the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
-key-value pair in the associative array, using the newly created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
-
-  <ol class="algorithm">
-
-    <li>If a <code>#</code> key is found, the processor
-    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
-    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
-    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. 
-    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
-    starting at <a href="#processing-subject">Step 2.2</a>.</li>
-
-    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not been detected, the current
-    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
-    and processing proceeds to the next key-value pair. Otherwise, if the
-    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
-
-    <ol class="algorithm">
-
-      <li id="processing-subject">If a <code>@</code> key is found, the 
-      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> has been performed.
-
-      <ol class="algorithm">
-        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
-        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
-        </li>
- 
-        <li>If there are any triples in the 
-        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
-        </li>
-      </ol>
-
-      </li>
-
-      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
-      </li>
-
-      <li>If a key that is not <code>#</code>, 
-      <code>@</code>, or <code>a</code> is found, set the 
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
-      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
-      </li>
-
-      <li>If the value is not an array, set the 
-      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
-      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
-
-      <li>If the value is an associative array, then
-      process the value starting at 
-      <a href="#processing-step-associative">Step 2</a>.</li>
-
-      <li>If the value is a regular array, then process the value 
-      starting at 
-      <a href="#processing-step-array">Step 3</a> ensuring that
-      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
-      
-      <ol class="algorithm">
-        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
-
-        <li>Complete any previously incomplete triples by running all substeps 
-        of <a href="#processing-subject">Step 2.2.1</a>.
-        </li>
-      </ol>
-
-      </li><li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
-      <a href="#processing-associative">Step 2.2</a>
-      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-     </li></ol>
-    </ol>
-  </li>
-
-  <li id="processing-step-array">If a regular array is detected, 
-  process each value in the array by doing the following:
-
-    <ol class="algorithm">
-      <li>If the value is an associative array, processes per 
-      <a href="#processing-step-associative">Step 2</a>, ensuring to set
-      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
-      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
-      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
-      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
-      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
-      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
-
-      <li>If the value is a regular array, should we support RDF 
-      List/Sequence Processing? 
-      <div class="issue">If the value is a regular array, should we support 
-      RDF List/Sequence generation of triples? For example, would implementing
-      this be worth the more complex processing rules: "ex:orderedItems" : 
-      [["one", "two", "three"]]</div></li>
-    </ol>
-  </li>
-</ol>
-
-</div>
-
-<div id="markup-of-rdf-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
-
-<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked up
-in a way that is simple to understand and author by Web developers. In many
-cases, Javascript objects can become Linked Data with the simple addition
-of a context. Since RDF is also an important sub-community of the Linked
-Data movement, it is important that all RDF concepts are well-represented
-in this specification. This section details how each RDF concept can be
-expressed in JSON-LD.</p>
-
-<p class="issue">The current specification relies on microsyntaxes to 
-express things like IRIs, typed literals and CURIEs. There is a small amount
-of debate on whether or not to use full-blown JSON objects containing things
-like "value" and "datatype". The original authors of the JSON-LD specification
-feel that microsyntaxes allow a much simpler, less error-prone structure in 
-the JSON-LD objects. Proponents of the verbose mechanism assert that there
-would be less chance of data markup issues concerning proper escaping and 
-that the objects, while more verbose, would be easier to work with within
-JavaScript environments. Feedback on this issue would be appreciated.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">5.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
-and many objects are identified. IRIs can be expressed by wrapping a
-text string with the <code><</code> and <code>></code> characters.
-</p>
-
-<pre class="example">
-{
-...
-  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}</pre>
-
-<p>The example above would set the object to an IRI with the value of
-<code>http://manu.sporny.org</code>.
-</p>
-
-<p>Wrapping IRIs with the  <code><</code> and <code>></code> 
-characters are only necessary when IRIs are specified as objects. At no other
-point do you need to wrap an IRI. You do not need to wrap IRIs when declaring 
-a property, declaring a CURIE, or describing key-value pairs in a context.</p>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
-
-<p>A subject is declared using the <code>@</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, predicate, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to 
-<code><http://example.org/people#joebob></code>.
-</p>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">5.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the <code>a</code>
-key. Specifying the type in this way will generate a triple of the form 
-(subject, type, type-url).</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple 
-(in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-</div>
-
-<div id="plain-literals" class="section">
-<h3><span class="secno">5.4 </span>Plain Literals</h3>
-
-<p>Regular text strings are called "plain literals" in RDF and are easily
-expressed using regular JSON strings.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="language-specification-in-plain-literals" class="section">
-<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
-
-<p>JSON-LD attempts to make sure that it is easy to express triples in other
-languages while simultaneously ensuring that hefty data structures 
-aren't required to accomplish simple language markup. When the 
-<code>@</code> symbol is used in a literal, the JSON-LD processor tags
-the literal text with the language tag that follows the <code>@</code>
-symbol.
-</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">花澄@ja</span>",
-...
-}</pre>
-
-<p>The example above would generate a plain literal for <em>花澄</em> and
-associate the <code>ja</code> language tag with the triple that is
-generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="typed-literals" class="section">
-<h3><span class="secno">5.6 </span>Typed Literals</h3>
-
-<p>Literals may also be typed in JSON-LD by using the <code>^^</code>
-sequence at the end of the text string.</p>
-
-<pre class="example">
-{
-...
-  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}</pre>
-
-<p>The example above would generate an object with the value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-arrays. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an array.</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "stu" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "groknar" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "radface" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple typed literals are expressed very much in the same way as 
-multiple properties:</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="blank-nodes" class="section">
-<h3><span class="secno">5.9 </span>Blank Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this is where blank nodes come
-into play. In JSON-LD, blank node identifiers are automatically created if a 
-subject is not specified using the <code>@</code> key. However, authors may
-name blank nodes by using the special <code>_</code> CURIE prefix.</p>
-
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-named blank node.
-</p>
-
-</div>
-
-<div id="escape-character" class="section">
-<h3><span class="secno">5.10 </span>Escape Character</h3>
-
-<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
-interpreted as CURIEs, IRIs, language tags, or TypedLiterals.</p>
-
-<p>The special characters in JSON-LD are: <code><</code>, <code>></code>,
-<code>@</code>, <code>#</code>, <code>:</code> and <code>^</code>.</p>
-
-<pre class="example">
-{
-...
-  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}</pre>
-
-</div>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">5.11 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as decimals, 
-integers and boolean values, JSON-LD utilizes that information to create 
-<a href="#typed-literals">Typed Literals</a>.</p>
-
-<pre class="example">
-{
-...
-  // This value is automatically converted to having a type of xsd:decimal
-  "measure:cups": <span class="diff">5.3</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-</div>
-
-</div>
-
-<div id="best-practices" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>Best Practices</h2>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be 
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<div id="javascript" class="section">
-<h3><span class="secno">6.1 </span>JavaScript</h3>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in 
-JavaScript environments, however, features like IRIs requiring angled
-brackets in JSON-LD means that using JSON-LD directly in JavaScript is going
-to be annoying without a middleware layer such as a simple library that 
-strips JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDFa API, which would enable a triple-store in the 
-browser, but some don't want to require that level of functionality just to use 
-JSON-LD. The group is still discussing the best way to proceed, so input
-on how JSON-LD could more easily be utilized in JavaScript environments
-would be very much appreciated.
-</p>
-</div>
-
-<div id="schema-less-databases" class="section">
-<h3><span class="secno">6.2 </span>Schema-less Databases</h3>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from 
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">7. </span>Advanced Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear whether
-or not the JSON-LD specification is going to support the complexity necessary
-to support each concept. The entire section on Advanced Concepts should be
-taken with a grain of salt; it is merely a list of possibilities where all
-of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">7.1 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
-JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
-coerce and incoming or outgoing types to the proper RDF type based on a
-mapping of type IRIs to RDF types. Using type conversion, one may convert
-simple JSON data to properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to 
-plain literals, typed literals and IRIs.</p>
-
-<pre class="example">
-{
-  "#": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "#types":
-     {
-        "name": "rdf:PlainLiteral",
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }</span>
-  },
-  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "&lt;John Smith&gt;" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="json-ld-profiles" class="section">
-<h3><span class="secno">7.2 </span>JSON-LD Profiles</h3>
-
-<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
-a collection of prefixes and terms that can be re-used by a processor to simplfy
-markup. JSON-LD provides a similar mechanism called JSON-LD Profiles, which is 
-the inclusion of a context external to the JSON-LD document.</p>
-
-<p>The example below demonstrates how one may specify an external JSON-LD
-Profile. Assume the following profile exists at this imaginary URL:
-<code>http://example.org/profiles/contacts</code>.</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}</pre>
-
-<p>The profile listed above can be used in the following way:</p>
-
-<pre class="example">
-{
-  "#": { "#profile": "http://example.org/profiles/contacts" },
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">7.3 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an array to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single JSON-LD associative
-array.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-  "@": 
-  [
-    {
-      "@": "&lt;http://example.org/people#john&gt;",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "&lt;http://example.org/people#jane&gt;",
-      "a": "foaf:Person"
-    }
-  ]
-}</pre>
-
-</div>
-</div>
-
-<div class="appendix section" id="acknowledgements">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>Acknowledgements</h2>
-
-<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
-rationale and reasoning behind the JSON-LD work via his work on RDFj, 
-Dave Longley who reviewed and provided feedback on the overall 
-specification and contexts, and Ian Davis, who created RDF/JSON. Thanks also
-to Bradley P. Allen and Richard Cyganiak for their input on the 
-specification.</p>
-</div>
-
-
-
-
-<div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>3 August 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">http://www.w3.org/TR/2010/WD-rdfa-core-20100803</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20101024/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20101128/diff-20101024.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7859 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-
-
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
--
-Linked
-Data
-Expression
-in
-JSON
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-Linked
-Data
-</h2>
-<h2 id="unofficial-draft-28-november-2010">
-Unofficial
-Draft
-<del class="diff-old">24
-October
-</del>
-<ins class="diff-chg">28
-November
-</ins>
-2010
-</h2>
-<dl>
-<dt>
-Editor:
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-</dl>
-<p>
-This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-<a href="diff-20101024.html">
-diff
-to
-previous
-version
-</a>.
-</p>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-Developers
-that
-embed
-structured
-data
-in
-their
-Web
-pages
-can
-choose
-among
-a
-number
-of
-languages
-such
-as
-RDFa
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-],
-Microformats
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
-MICROFORMATS
-</a>
-</cite>
-]
-and
-Microdata
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
-MICRODATA
-</a>
-</cite>
-].
-Each
-of
-these
-structured
-data
-languages,
-while
-incompatible
-at
-the
-syntax
-level,
-can
-be
-easily
-mapped
-to
-RDF.
-JSON
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-format.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-Linked
-Data
-that
-can
-be
-used
-to
-represent
-objects
-specified
-via
-RDFa,
-Microformats
-and
-Microdata.
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-Introduction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-1.2
-</span>
-Contributing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design-goals-and-rationale" class="tocxref">
-<span class="secno">
-2.
-</span>
-Design
-Goals
-and
-Rationale
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals" class="tocxref">
-<span class="secno">
-2.1
-</span>
-Goals
-</a>
-</li>
-<li class="tocline">
-<a href="#map-terms-to-iris" class="tocxref">
-<span class="secno">
-2.2
-</span>
-Map
-Terms
-to
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-default-context" class="tocxref">
-<span class="secno">
-2.3
-</span>
-The
-Default
-Context
-</a>
-</li>
-<li class="tocline">
-<a href="#mashing-up-vocabularies" class="tocxref">
-<span class="secno">
-2.4
-</span>
-Mashing
-Up
-Vocabularies
-</a>
-</li>
-<li class="tocline">
-<a href="#an-example-of-a-default-context" class="tocxref">
-<span class="secno">
-2.5
-</span>
-An
-Example
-of
-a
-Default
-Context
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-3.
-</span>
-Markup
-Examples
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#rdfa" class="tocxref">
-<span class="secno">
-3.1
-</span>
-RDFa
-</a>
-</li>
-<li class="tocline">
-<a href="#microformats" class="tocxref">
-<span class="secno">
-3.2
-</span>
-Microformats
-</a>
-</li>
-<li class="tocline">
-<a href="#microdata" class="tocxref">
-<span class="secno">
-3.3
-</span>
-Microdata
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-processing-algorithm" class="tocxref">
-<span class="secno">
-4.
-</span>
-The
-JSON-LD
-Processing
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#markup-of-rdf-concepts" class="tocxref">
-<span class="secno">
-5.
-</span>
-Markup
-of
-RDF
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-5.1
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-5.2
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-5.3
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#plain-literals" class="tocxref">
-<span class="secno">
-5.4
-</span>
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#language-specification-in-plain-literals" class="tocxref">
-<span class="secno">
-5.5
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#typed-literals" class="tocxref">
-<span class="secno">
-5.6
-</span>
-Typed
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-5.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-5.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#blank-nodes" class="tocxref">
-<span class="secno">
-5.9
-</span>
-Blank
-Nodes
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-features" class="tocxref">
-<span class="secno">
-<ins class="diff-new">6.
-</ins></span><ins class="diff-new">
-Advanced
-Features
-</ins></a><ul class="toc">
-<li class="tocline">
-<a href="#escape-character" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.10
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Escape
-Character
-</a>
-</li>
-<li class="tocline">
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-Automatic
-Typing
-</a>
-</li>
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-<ins class="diff-new">6.3
-</ins></span><ins class="diff-new">
-Type
-Coercion
-</ins></a></li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#best-practices" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">7.
-</ins>
-</span>
-Best
-Practices
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#javascript" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">7.1
-</ins>
-</span>
-JavaScript
-</a>
-</li>
-<li class="tocline">
-<a href="#schema-less-databases" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">7.2
-</ins>
-</span>
-Schema-less
-Databases
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">8.
-</ins>
-</span>
-Advanced
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#vocabulary-profiles" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.1
-</del>
-<ins class="diff-chg">8.1
-</ins>
-</span>
-<del class="diff-old">Type
-Coercion
-</del>
-<ins class="diff-chg">Vocabulary
-Profiles
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.2
-</del>
-<ins class="diff-chg">8.2
-</ins>
-</span>
-<ins class="diff-new">Disjoint
-Graphs
-</ins></a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno"><ins class="diff-new">
-8.3
-</ins></span><ins class="diff-new">
-The
-</ins>
-JSON-LD
-<del class="diff-old">Profiles
-</del>
-<ins class="diff-chg">API
-</ins></a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno"><ins class="diff-chg">
-8.3.1
-</ins></span><ins class="diff-chg">
-Methods
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.3
-</del>
-<ins class="diff-chg">8.3.2
-</ins>
-</span>
-<del class="diff-old">Disjoint
-Graphs
-</del>
-<ins class="diff-chg">Methods
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-2" class="tocxref">
-<span class="secno">
-<ins class="diff-new">8.3.3
-</ins></span><ins class="diff-new">
-Methods
-</ins></a></li></ul></li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-A.
-</span>
-Acknowledgements
-</a>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-B.
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-B.1
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-B.2
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<p class="issue">
-Write
-the
-introduction
-once
-all
-of
-the
-technical
-details
-are
-hammered
-out.
-Explain
-why
-JSON-LD
-is
-designed
-as
-a
-light-weight
-mechanism
-to
-express
-RDFa,
-Microformats
-and
-Microdata.
-It
-is
-primarily
-intended
-as
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-environments
-as
-well
-as
-a
-way
-to
-pass
-Linked
-Data
-to
-and
-from
-Web
-services.
-It
-is
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-(and
-understanding)
-that
-is
-out
-there
-already.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-Microformats
-data,
-and
-Microdata
-(that
-is,
-every
-data
-model
-currently
-in
-use)
-using
-one
-unified
-format.
-It
-does
-not
-require
-anyone
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-out-of-band
--
-it
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-tiny
-memory
-footprint
-in
-order
-to
-operate.
-</p>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</h3>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-write
-processors
-for
-JSON-LD.
-</li>
-</ul>
-<p>
-To
-understand
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-]
-and
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
-RDF-CONCEPTS
-</a>
-</cite>
-].
-</p>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-1.2
-</span>
-Contributing
-</h3>
-<p>
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</p>
-<ul>
-<li>
-All
-comments
-and
-discussion
-takes
-place
-on
-the
-public
-mailing
-list:
-<a href="http://groups.google.com/group/json-ld">
-json-ld@googlegroups.com
-</a>
-</li>
-<li>
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-<a href="http://github.com/digitalbazaar/json-ld/issues">
-issue
-tracker
-</a>.
-</li>
-<li>
-<a href="http://github.com/digitalbazaar/json-ld">
-Source
-code
-</a>
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</li>
-<li>
-The
-<a href="http://webchat.freenode.net/?channels=#json-ld">
-#json-ld
-</a>
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</li>
-</ul>
-</div>
-</div>
-<div id="design-goals-and-rationale" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Design
-Goals
-and
-Rationale
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="goals" class="section">
-<h3>
-<span class="secno">
-2.1
-</span>
-Goals
-</h3>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-don't
-need
-to
-know
-RDF
-in
-order
-to
-use
-the
-basic
-functionality
-provided
-by
-JSON-LD.
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-should
-be
-100%
-compatible
-with
-JSON.
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-All
-major
-RDF
-concepts
-must
-be
-expressible
-via
-the
-JSON-LD
-syntax.
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-readable.
-</dd>
-<dt>
-Zero
-Edits
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<div id="map-terms-to-iris" class="section">
-<h3>
-<span class="secno">
-2.2
-</span>
-Map
-Terms
-to
-IRIs
-</h3>
-<p>
-Establishing
-a
-mechanism
-to
-map
-JSON
-values
-to
-IRIs
-will
-help
-in
-the
-mapping
-of
-JSON
-objects
-to
-RDF.
-This
-does
-not
-mean
-that
-JSON-LD
-must
-be
-restrictive
-in
-declaring
-a
-set
-of
-terms,
-rather,
-experimentation
-and
-innovation
-should
-be
-supported
-as
-part
-of
-the
-core
-design
-of
-JSON-LD.
-There
-are,
-however,
-a
-number
-of
-very
-small
-design
-criterial
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-RDF
-data
-that
-will
-create
-value
-for
-the
-greater
-semantic
-web
-community
-and
-JSON/REST-based
-Web
-Services
-community.
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-object
-as
-the
-example
-for
-this
-section:
-</p>
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-}
-</pre>
-</div>
-<div id="the-default-context" class="section">
-<h3>
-<span class="secno">
-2.3
-</span>
-The
-Default
-Context
-</h3>
-<p>
-A
-default
-context
-is
-used
-in
-RDFa
-to
-allow
-developers
-to
-use
-keywords
-as
-aliases
-for
-IRIs.
-So,
-for
-instance,
-the
-keyword
-<strong>
-name
-</strong>
-above
-could
-refer
-to
-the
-IRI
-<em>
-http://xmlns.com/foaf/0.1/name
-</em>.
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-terms
-mean
-something,
-which
-you
-will
-eventually
-want
-to
-query.
-The
-semantic
-web
-specifies
-this
-via
-<em>
-Vocabulary
-Documents
-</em>.
-The
-IRI
-<em>
-http://xmlns.com/foaf/0.1/
-</em>
-specifies
-a
-Vocabulary
-Document,
-and
-<strong>
-name
-</strong>
-is
-a
-term
-in
-that
-vocabulary.
-Paste
-the
-two
-items
-together
-and
-you
-have
-an
-unambiguous
-identifier
-for
-a
-term.
-</p>
-<p>
-Developers,
-and
-machines,
-would
-be
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-Machines
-need
-the
-same
-sort
-of
-dictionary
-of
-terms,
-and
-URIs
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-Non-prefixed
-terms
-should
-have
-term
-mappings
-declared
-in
-the
-default
-context
-so
-that
-they
-may
-be
-expanded
-later.
-</p>
-<p>
-If
-a
-set
-of
-terms,
-like
-<strong>
-Person
-</strong>,
-<strong>
-name
-</strong>,
-and
-<strong>
-homepage
-</strong>,
-are
-pre-defined
-in
-the
-default
-context,
-and
-that
-context
-is
-used
-to
-resolve
-the
-names
-in
-JSON
-objects,
-machines
-could
-automatically
-expand
-the
-terms
-to
-something
-meaningful
-and
-unambiguous,
-like
-this:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "",
-</del>
-<ins class="diff-chg">  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-</ins>
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
-}
-</pre>
-<p class="note">
-In
-order
-to
-differentiate
-between
-plain
-text
-and
-IRIs,
-the
-<strong>
-<
-</strong> and <strong>
->
-</strong>
-are
-used
-around
-IRIs.
-</p>
-<p>
-Doing
-this
-would
-mean
-that
-JSON
-would
-start
-to
-become
-unambiguously
-machine-readable,
-play
-well
-with
-the
-semantic
-web,
-and
-basic
-markup
-wouldn't
-be
-that
-much
-more
-complex
-than
-basic
-JSON
-markup.
-A
-win,
-all
-around.
-</p>
-</div>
-<div id="mashing-up-vocabularies" class="section">
-<h3>
-<span class="secno">
-2.4
-</span>
-Mashing
-Up
-Vocabularies
-</h3>
-<p>
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</p>
-<ul>
-<li>
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</li>
-<li>
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</li>
-<li>
-FOAF
--
-for
-describing
-social
-networks.
-</li>
-<li>
-Calendar
--
-for
-specifying
-events.
-</li>
-<li>
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</li>
-<li>
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</li>
-<li>
-GEO
--
-for
-describing
-geographic
-location.
-</li>
-<li>
-VCard
--
-for
-describing
-organizations
-and
-people.
-</li>
-<li>
-DOAP
--
-for
-describing
-projects.
-</li>
-</ul>
-<p>
-A
-JSON-LD
-Web
-Service
-could
-define
-these
-as
-<em>
-prefix
-</em>
-es
-in
-their
-default
-context
-beside
-the
-<em>
-terms
-</em>
-that
-are
-already
-defined.
-Using
-this
-feature,
-developers
-could
-also
-express
-markup
-like
-this:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "",
-</del>
-<ins class="diff-chg">  "<span class="diff">rdf:type</span>": "<span class="diff">&lt;foaf:Person&gt;</span>",
-</ins>
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
-}
-</pre>
-<p>
-Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-default
-context
-in-line
-using
-the
-<code>
-#
-</code>
-character,
-like
-so:
-</p>
-<pre class="example">
-{
-  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
-<del class="diff-old">  "a": "foaf:Person",
-</del>
-<ins class="diff-chg">  "a": "&lt;foaf:Person&gt;",
-</ins>
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
-  "myvocab:credits": 500</span>
-}
-</pre>
-<p>
-Think
-of
-the
-<code>
-#
-</code>
-character
-as
-a
-<del class="diff-old">"hashtable",
-</del>
-<ins class="diff-chg">"
-</ins><strong><ins class="diff-chg">
-hash
-</ins></strong><ins class="diff-chg">
-table",
-</ins>
-which
-maps
-one
-string
-to
-another
-string.
-In
-the
-example
-above,
-the
-<code>
-myvocab
-</code>
-string
-is
-replaced
-with
-"
-<code>
-http://example.org/myvocab#
-</code>
-"
-when
-it
-is
-detected
-above.
-In
-the
-example
-above,
-"
-<code>
-myvocab:credits
-</code>
-"
-would
-expand
-to
-"
-<code>
-http://example.org/myvocab#credits
-</code>
-".
-</p>
-<p>
-This
-mechanism
-is
-a
-short-hand
-for
-RDF,
-and
-if
-defined,
-will
-give
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</p>
-<p>
-</p>
-</div>
-<div id="an-example-of-a-default-context" class="section">
-<h3>
-<span class="secno">
-2.5
-</span>
-An
-Example
-of
-a
-Default
-Context
-</h3>
-<p>
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-A
-JSON-LD
-aware
-Web
-Service
-<em class="rfc2119" title="may">
-may
-</em>
-define
-a
-default
-context.
-For
-example,
-the
-following
-default
-context
-could
-apply
-to
-all
-incoming
-Web
-Service
-calls
-previously
-accepting
-only
-JSON
-data:
-</p>
-<pre class="example">
-{
-  "#": 
-  {
-    "#vocab": "http://example.org/default-vocab#",
-    "#base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-  }
-}
-</pre>
-<p>
-The
-<code>
-#vocab
-</code>
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-term
-that
-doesn't
-resolve
-to
-a
-term
-or
-a
-prefix
-should
-be
-appended
-to
-the
-<code>
-#vocab
-</code>
-IRI.
-This
-is
-done
-to
-ensure
-that
-terms
-can
-be
-transformed
-to
-an
-IRI
-at
-all
-times.
-</p>
-<p>
-The
-<code>
-#base
-</code>
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-relative
-IRI
-<em class="rfc2119" title="must">
-must
-</em>
-be
-appended
-to
-the
-string
-specified
-by
-<code>
-#base
-</code>.
-</p>
-</div>
-</div>
-<div id="markup-examples" class="section">
-<h2>
-<span class="secno">
-3.
-</span>
-Markup
-Examples
-</h2>
-<p>
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</p>
-<div id="rdfa" class="section">
-<h3>
-<span class="secno">
-3.1
-</span>
-RDFa
-</h3>
-<p>
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</p>
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</pre>
-<p>
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</p>
-<pre class="example">
-[
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
- }
-]
-</pre>
-</div>
-<div id="microformats" class="section">
-<h3>
-<span class="secno">
-3.2
-</span>
-Microformats
-</h3>
-<p>
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</p>
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-</pre>
-<p>
-The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-<code>
-url
-</code>
-and
-<code>
-fn
-</code>
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-<code>
-http://tantek.com
-</code>.
-</p>
-<pre class="example">
-{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-}
-</pre>
-</div>
-<div id="microdata" class="section">
-<h3>
-<span class="secno">
-3.3
-</span>
-Microdata
-</h3>
-<p>
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</p>
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</pre>
-<p>
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</p>
-<pre class="example">
-[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-]
-</pre>
-</div>
-</div>
-<div id="the-json-ld-processing-algorithm" class="section">
-<h2>
-<span class="secno">
-4.
-</span>
-The
-JSON-LD
-Processing
-Algorithm
-</h2>
-<p>
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</p>
-<p class="issue">
-The
-Processing
-Algorithm
-is
-a
-work
-in
-progress,
-there
-are
-still
-major
-bugs
-in
-the
-algorithm
-and
-it's
-difficult
-to
-follow.
-It's
-provided
-only
-to
-very
-early
-implementers
-to
-give
-them
-an
-idea
-of
-how
-to
-implement
-a
-processor.
-</p>
-<h4 id="processing-algorithm-terms">
-Processing
-Algorithm
-Terms
-</h4>
-<ul>
-<li>
-<dfn title="default_context" id="dfn-default_context">
-default
-context
-</dfn>
--
-a
-context
-that
-is
-specified
-to
-the
-JSON-LD
-processing
-algorithm
-before
-processing
-begins.
-</li>
-<li>
-<dfn title="default_graph" id="dfn-default_graph">
-default
-graph
-</dfn>
--
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</li>
-<li>
-<dfn title="active_subject" id="dfn-active_subject">
-active
-subject
-</dfn>
--
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="inherited_subject" id="dfn-inherited_subject">
-inherited
-subject
-</dfn>
--
-a
-subject
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-<a class="tref" title="current_subject">
-current
-subject
-</a>
-is
-discovered
-or
-generated.
-</li>
-<li>
-<dfn title="active_property" id="dfn-active_property">
-active
-property
-</dfn>
--
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="inherited_property" id="dfn-inherited_property">
-inherited
-property
-</dfn>
--
-a
-property
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-<a class="tref" title="current_subject">
-current
-subject
-</a>
-is
-discovered
-or
-generated.
-</li>
-<li>
-<dfn title="active_object" id="dfn-active_object">
-active
-object
-</dfn>
--
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="active_context" id="dfn-active_context">
-active
-context
-</dfn>
--
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-the
-top-most
-item
-on
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-</li>
-<li>
-<dfn title="local_context" id="dfn-local_context">
-local
-context
-</dfn>
--
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-<code>
-#
-</code>
-key.
-</li>
-<li>
-<dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</dfn>
--
-A
-list
-of
-triples
-that
-have
-yet
-to
-have
-their
-subject
-set.
-</li>
-<li>
-<dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</dfn>
--
-A
-list
-of
-objects
-that
-cannot
-be
-processed
-until
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-detected
-or
-the
-end
-of
-the
-current
-associative-array
-is
-detected.
-</li>
-<li>
-<dfn title="processor_state" id="dfn-processor_state">
-processor
-state
-</dfn>
--
-the
-processor
-state,
-which
-includes
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack,
-<a class="tref" title="current_subject">
-current
-subject
-</a>,
-<a class="tref" title="current_property">
-current
-property
-</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</a>,
-and
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>.
-</li>
-</ul>
-<h4 id="processing-tokens-and-keywords">
-Processing
-Tokens
-and
-Keywords
-</h4>
-<ul>
-<li>
-<code>
-#
-</code>
--
-Used
-to
-set
-the
-active
-context.
-</li>
-<li>
-<code>
-#base
-</code>
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-active
-context.
-</li>
-<li>
-<code>
-#vocab
-</code>
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-active
-context.
-</li>
-<li>
-<code>
-#types
-</code>
--
-Used
-to
-specify
-type
-coercion.
-<del class="diff-old">The
-#types
-keyword
-assumes
-Type
-Coercion
-,
-which
-is
-an
-experimental
-feature.
-</del>
-</li>
-<li>
-<code>
-<
-</code> and <code>
->
-</code>
--
-Used
-to
-express
-IRIs
-in
-JSON
-values.
-</li>
-<li>
-<code>:
-</code>
--
-The
-separator
-for
-CURIEs
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-</li>
-<li>
-<code>
-@
-</code>
--
-Sets
-the
-active
-subjects.
-</li>
-<li>
-<code>
-a
-</code>
--
-Used
-to
-set
-the
-rdf:type
-of
-the
-active
-subjects.
-</li>
-<li>
-<code>
-\
-</code>
--
-Used
-as
-an
-escape
-character
-to
-escape
-all
-the
-special
-tokens
-and
-keywords.
-</li>
-<li>
-<code>
-^^
-</code>
--
-Used
-to
-express
-the
-data
-type
-for
-Typed
-Literals.
-</li>
-</ul>
-<p>
-The
-algorithm
-below
-is
-designed
-for
-streaming
-(SAX-based)
-implementations.
-Implementers
-will
-find
-that
-non-streaming
-(document-based)
-implementations
-will
-be
-much
-easier
-to
-implement
-as
-full
-access
-to
-the
-JSON
-object
-model
-eliminates
-some
-of
-the
-steps
-that
-are
-necessary
-for
-streaming
-implementations.
-A
-conforming
-JSON-LD
-processor
-<em class="rfc2119" title="must">
-must
-</em>
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>
-that
-the
-following
-algorithm
-generates:
-</p>
-<ol class="algorithm">
-<li id="processing-step-default-context">
-If
-a
-<a class="tref internalDFN" title="default_context" href="#dfn-default_context">
-default
-context
-</a>
-is
-supplied
-to
-the
-processing
-algorithm,
-push
-it
-onto
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-</li>
-<li id="processing-step-associative">
-If
-an
-associative
-array
-is
-detected,
-create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-Copy
-the
-<a class="tref" title="current_context">
-current
-context
-</a>
-stack
-to
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-Push
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-onto
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-'s
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-For
-each
-key-value
-pair
-in
-the
-associative
-array,
-using
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-do
-the
-following:
-<ol class="algorithm">
-<li>
-If
-a
-<code>
-#
-</code>
-key
-is
-found,
-the
-processor
-merges
-each
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-overwriting
-any
-duplicate
-values
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-Process
-each
-object
-in
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>,
-starting
-at
-<a href="#processing-subject">
-Step
-2.2
-</a>.
-</li>
-<li id="processing-associative">
-If
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-has
-not
-been
-detected,
-the
-current
-key-value
-pair
-is
-placed
-into
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>
-and
-processing
-proceeds
-to
-the
-next
-key-value
-pair.
-Otherwise,
-if
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-known
-perform
-the
-following
-steps:
-</li>
-<ol class="algorithm">
-<li id="processing-subject">
-If
-a
-<code>
-@
-</code>
-key
-is
-found,
-the
-processor
-sets
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-value
-after
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-has
-been
-performed.
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-and
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-values
-are
-specified,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-for
-the
-subject,
-the
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-for
-the
-property,
-and
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-for
-the
-object.
-</li>
-<li>
-If
-there
-are
-any
-triples
-in
-the
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</a>,
-complete
-each
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-as
-the
-subject
-for
-each
-triple.
-</li>
-</ol>
-</li>
-<li>
-If
-an
-<code>
-a
-</code>
-key
-is
-found,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-<code>
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type
-</code>.
-</li>
-<li>
-If
-a
-key
-that
-is
-not
-<code>
-#
-</code>,
-<code>
-@
-</code>,
-or
-<code>
-a
-</code>
-is
-found,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Property
-Processing
-</a>
-on
-the
-key.
-</li>
-<li>
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-an
-associative
-array,
-then
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-then
-process
-the
-value
-starting
-at
-<a href="#processing-step-array">
-Step
-3
-</a>
-ensuring
-that
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-are
-copied
-to
-a
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-<li>
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-was
-not
-discovered,
-then:
-<ol class="algorithm">
-<li>
-Generate
-a
-<a class="tref" title="blank_node_identifier">
-blank
-node
-identifier
-</a>
-and
-set
-it
-as
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>.
-</li>
-<li>
-Complete
-any
-previously
-incomplete
-triples
-by
-running
-all
-substeps
-of
-<a href="#processing-subject">
-Step
-2.2.1
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-was
-not
-discovered,
-then
-assume
-that
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-unmodified
-and
-run
-all
-substeps
-of
-<a href="#processing-associative">
-Step
-2.2
-</a>
-on
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>.
-</li>
-</ol>
-</ol>
-</li>
-<li id="processing-step-array">
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-an
-associative
-array,
-processes
-per
-<a href="#processing-step-associative">
-Step
-2
-</a>,
-ensuring
-to
-set
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-to
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-the
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-to
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-in
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-and
-place
-it
-into
-the
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-Processing?
-<div class="issue">
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-generation
-of
-triples?
-For
-example,
-would
-implementing
-this
-be
-worth
-the
-more
-complex
-processing
-rules:
-"ex:orderedItems"
-:
-[["one",
-"two",
-"three"]]
-</div>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<div id="markup-of-rdf-concepts" class="section">
-<h2>
-<span class="secno">
-5.
-</span>
-Markup
-of
-RDF
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-most
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-Javascript
-objects
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-Since
-RDF
-is
-also
-an
-important
-sub-community
-of
-the
-Linked
-Data
-movement,
-it
-is
-important
-that
-all
-RDF
-concepts
-are
-well-represented
-in
-this
-specification.
-This
-section
-details
-how
-each
-RDF
-concept
-can
-be
-expressed
-in
-JSON-LD.
-</p>
-<p class="issue">
-The
-current
-specification
-relies
-on
-microsyntaxes
-to
-express
-things
-like
-IRIs,
-typed
-literals
-and
-CURIEs.
-There
-is
-a
-small
-amount
-of
-debate
-on
-whether
-or
-not
-to
-use
-full-blown
-JSON
-objects
-containing
-things
-like
-"value"
-and
-"datatype".
-The
-original
-authors
-of
-the
-JSON-LD
-specification
-feel
-that
-microsyntaxes
-allow
-a
-much
-simpler,
-less
-error-prone
-structure
-in
-the
-JSON-LD
-objects.
-Proponents
-of
-the
-verbose
-mechanism
-assert
-that
-there
-would
-be
-less
-chance
-of
-data
-markup
-issues
-concerning
-proper
-escaping
-and
-that
-the
-objects,
-while
-more
-verbose,
-would
-be
-easier
-to
-work
-with
-within
-JavaScript
-environments.
-Feedback
-on
-this
-issue
-would
-be
-appreciated.
-</p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-5.1
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-subjects
-and
-many
-objects
-are
-identified.
-IRIs
-can
-be
-expressed
-by
-wrapping
-a
-text
-string
-with
-the
-<code>
-<
-</code> and <code>
->
-</code>
-characters.
-</p>
-<pre class="example">
-{
-...
-  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-object
-to
-an
-IRI
-with
-the
-value
-of
-<code>
-http://manu.sporny.org
-</code>.
-</p>
-<p>
-<ins class="diff-new">As
-a
-general
-rule,
-all
-CURIEs
-and
-IRIs
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-be
-wrapped
-in
-</ins><code><</code> and <code><ins class="diff-new">
->
-</ins></code><ins class="diff-new">
-characters.
-This
-is
-to
-ensure
-that
-there
-is
-a
-simple,
-consistent
-rule
-that
-can
-be
-followed
-when
-authoring
-JSON-LD
-data.
-There
-are,
-however,
-several
-instances
-where
-angle
-brackets
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-be
-omitted,
-without
-introducing
-ambiguity,
-to
-ease
-authoring
-burden.
-These
-instances
-are:
-</ins></p><ul><li><ins class="diff-new">
-When
-specifying
-the
-subject
-IRI
-using
-</ins><code><ins class="diff-new">
-@
-</ins></code>.</li><li><ins class="diff-new">
-When
-specifying
-the
-RDF
-type
-IRI
-using
-</ins><code><ins class="diff-new">
-a
-</ins></code>.</li><li><ins class="diff-new">
-Any
-CURIE
-in
-the
-key
-portion
-of
-a
-JSON
-associative
-array.
-</ins></li></ul>
-Wrapping
-IRIs
-with
-the
-<code>
-<
-</code> and <code>
->
-</code>
-characters
-are
-only
-<del class="diff-old">necessary
-</del>
-<ins class="diff-chg">mandatory
-</ins>
-when
-IRIs
-are
-specified
-as
-<del class="diff-old">objects.
-</del>
-<ins class="diff-chg">values
-in
-the
-JSON
-key-value
-pairs.
-</ins><p></p><p><ins class="diff-chg">
-To
-further
-illustrate,
-the
-following
-example
-omissions
-of
-the
-</ins><code><</code> and <code><ins class="diff-chg">
->
-</ins></code><ins class="diff-chg">
-characters
-are
-allowed:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-...
-  "@": "<span class="diff">&lt;</span>http://manu.sporny.org/about#manu<span class="diff">&gt;</span>",
-  // CURIE/IRI when specifying the subject can be minimized.
-  "@": "http://manu.sporny.org/about#manu",
-...
-  "a": "<span class="diff">&lt;</span>foaf:Person<span class="diff">&gt;</span>",
-  // CURIE/IRI when specifying the type of an object can be minimized.
-  "a": "foaf:Person",
-...
-  "<span class="diff">&lt;</span>foaf:homepage<span class="diff">&gt;</span>": "&lt;http://manu.sporny.org&gt;",
-  // CURIE/IRI when specifying a property can be minimized.
-  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
-...
-}
-</ins></pre><p>
-At
-<del class="diff-old">no
-</del>
-<ins class="diff-chg">all
-</ins>
-other
-<del class="diff-old">point
-do
-you
-need
-to
-wrap
-an
-IRI.
-You
-do
-not
-need
-to
-wrap
-</del>
-<ins class="diff-chg">times,
-CURIEs
-and
-</ins>
-IRIs
-<del class="diff-old">when
-declaring
-a
-property,
-declaring
-a
-CURIE,
-or
-describing
-key-value
-pairs
-in
-a
-context.
-</del>
-<em class="rfc2119" title="must">
-<ins class="diff-chg">must
-</ins></em><ins class="diff-chg">
-be
-wrapped
-with
-the
-</ins><code><</code> and <code><ins class="diff-chg">
->
-</ins></code><ins class="diff-chg">
-characters.
-</ins>
-</p>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-5.2
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-A
-subject
-is
-declared
-using
-the
-<code>
-@
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-predicate,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<ins class="diff-new">the
-IRI
-</ins>
-<code>
-<ins class="diff-chg">http://example.org/people#joebob
-</ins>
-</code>.
-</p>
-<p>
-<ins class="diff-new">Note
-that
-subject
-do
-not
-need
-to
-be
-wrapped
-in
-angle
-brackets.
-The
-following
-example
-is
-valid
-JSON-LD
-markup:
-</ins></p><pre class="example"><ins class="diff-new">
-{
-...
-  "@": "http://example.org/people#joebob",
-...
-}
-</ins></pre>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-5.3
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-a
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-type-url).
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-(in
-N-Triples
-notation):
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-<ins class="diff-new">Note
-that
-the
-type
-IRI
-does
-not
-need
-to
-be
-wrapped
-in
-angle
-brackets.
-The
-following
-example
-is
-valid
-JSON-LD
-markup:
-</ins></p><pre class="example"><ins class="diff-new">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "a": "http://xmlns.com/foaf/0.1/Person",
-...
-}
-</ins></pre>
-</div>
-<div id="plain-literals" class="section">
-<h3>
-<span class="secno">
-5.4
-</span>
-Plain
-Literals
-</h3>
-<p>
-Regular
-text
-strings
-are
-called
-"plain
-literals"
-in
-RDF
-and
-are
-easily
-expressed
-using
-regular
-JSON
-strings.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}
-</pre>
-</div>
-<div id="language-specification-in-plain-literals" class="section">
-<h3>
-<span class="secno">
-5.5
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</h3>
-<p>
-JSON-LD
-attempts
-to
-make
-sure
-that
-it
-is
-easy
-to
-express
-triples
-in
-other
-languages
-while
-simultaneously
-ensuring
-that
-hefty
-data
-structures
-aren't
-required
-to
-accomplish
-simple
-language
-markup.
-When
-the
-<code>
-@
-</code>
-symbol
-is
-used
-in
-a
-literal,
-the
-JSON-LD
-processor
-tags
-the
-literal
-text
-with
-the
-language
-tag
-that
-follows
-the
-<code>
-@
-</code>
-symbol.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">花澄@ja</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-plain
-literal
-for
-<em>
-花澄
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-tag
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="typed-literals" class="section">
-<h3>
-<span class="secno">
-5.6
-</span>
-Typed
-Literals
-</h3>
-<p>
-Literals
-may
-also
-be
-typed
-in
-JSON-LD
-by
-using
-the
-<code>
-^^
-</code>
-sequence
-at
-the
-end
-of
-the
-text
-string.
-</p>
-<pre class="example">
-{
-...
-  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-an
-object
-with
-the
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-5.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-arrays.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-array.
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "stu" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "groknar" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-"radface"
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-5.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-typed
-literals
-are
-expressed
-very
-much
-in
-the
-same
-way
-as
-multiple
-properties:
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="blank-nodes" class="section">
-<h3>
-<span class="secno">
-5.9
-</span>
-Blank
-Nodes
-</h3>
-<p>
-At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-is
-where
-blank
-nodes
-come
-into
-play.
-In
-JSON-LD,
-blank
-node
-identifiers
-are
-automatically
-created
-if
-a
-subject
-is
-not
-specified
-using
-the
-<code>
-@
-</code>
-key.
-However,
-authors
-may
-name
-blank
-nodes
-by
-using
-the
-special
-<code>
-_
-</code>
-CURIE
-prefix.
-</p>
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<code>
-_:foo
-</code>,
-which
-can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-named
-blank
-node.
-</p>
-</div>
-</div>
-<div id="advanced-features" class="section">
-<h2>
-<span class="secno">
-<ins class="diff-new">6.
-</ins></span><ins class="diff-new">
-Advanced
-Features
-</ins></h2><p><ins class="diff-new">
-JSON-LD
-has
-a
-number
-of
-features
-that
-provide
-functionality
-above
-and
-beyond
-the
-core
-functionality
-provided
-by
-RDF.
-The
-following
-sections
-outline
-the
-features
-that
-are
-specific
-to
-JSON-LD.
-</ins></p>
-<div id="escape-character" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.10
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Escape
-Character
-</h3>
-<p>
-Special
-characters
-in
-property
-values
-<em class="rfc2119" title="must">
-must
-</em>
-be
-escaped
-in
-order
-to
-not
-be
-interpreted
-as
-CURIEs,
-IRIs,
-language
-tags,
-or
-TypedLiterals.
-</p>
-<p>
-The
-special
-characters
-<ins class="diff-new">that
-need
-to
-be
-escaped
-</ins>
-in
-<del class="diff-old">JSON-LD
-</del>
-<ins class="diff-chg">property
-values
-</ins>
-are:
-<code>
-<
-</code> (at the beginning of a string), <code>
->
-<del class="diff-old">,
-</del>
-</code>
-<ins class="diff-chg">(at
-the
-end
-of
-a
-string),
-</ins>
-<code>
-@
-</code>,
-<del class="diff-old">#
-,
-:
-</del>
-and
-<code>
-^
-</code>.
-</p>
-<pre class="example">
-{
-...
-  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}
-</pre>
-</div>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.11
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-decimals,
-integers
-and
-boolean
-values,
-JSON-LD
-utilizes
-that
-information
-to
-create
-<a href="#typed-literals">
-Typed
-Literals
-</a>.
-</p>
-<pre class="example">
-{
-...
-  // This value is automatically converted to having a type of xsd:decimal
-  "measure:cups": <span class="diff">5.3</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}
-</pre>
-</div>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">6.3
-</ins></span><ins class="diff-new">
-Type
-Coercion
-</ins></h3><p><ins class="diff-new">
-JSON-LD
-supports
-the
-coercion
-of
-types
-to
-ensure
-that
-the
-zero-edit
-goal
-of
-JSON-LD
-can
-be
-accomplished.
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-and
-incoming
-or
-outgoing
-types
-to
-the
-proper
-RDF
-type
-based
-on
-a
-mapping
-of
-type
-IRIs
-to
-RDF
-types.
-Using
-type
-conversion,
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</ins></p><p><ins class="diff-new">
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-plain
-literals,
-typed
-literals
-and
-IRIs.
-</ins></p><pre class="example"><ins class="diff-new">
-{
-  "#": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-</ins><span class="diff">     "#types":<ins class="diff-new">
-     {
-        "name": "rdf:PlainLiteral",
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }</span>
-  },
-  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}
-</ins></pre><p><ins class="diff-new">
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</ins></p><pre class="example"><ins class="diff-new">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "&lt;John Smith&gt;" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</ins></pre></div>
-</div>
-<div id="best-practices" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">7.
-</ins>
-</span>
-Best
-Practices
-</h2>
-<p>
-The
-nature
-of
-Web
-programming
-allows
-one
-to
-use
-basic
-technologies,
-such
-as
-JSON-LD,
-across
-a
-variety
-of
-systems
-and
-environments.
-This
-section
-attempts
-to
-describe
-some
-of
-those
-environments
-and
-the
-way
-in
-which
-JSON-LD
-can
-be
-integrated
-in
-order
-to
-help
-alleviate
-certain
-development
-headaches.
-</p>
-<div id="javascript" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">7.1
-</ins>
-</span>
-JavaScript
-</h3>
-<p class="issue">
-It
-is
-expected
-that
-JSON-LD
-will
-be
-used
-quite
-a
-bit
-in
-JavaScript
-environments,
-however,
-features
-like
-IRIs
-requiring
-angled
-brackets
-in
-JSON-LD
-means
-that
-using
-JSON-LD
-directly
-in
-JavaScript
-is
-going
-to
-be
-annoying
-without
-a
-middleware
-layer
-such
-as
-a
-simple
-library
-that
-strips
-JSON-LD
-markup
-before
-JavaScript
-uses
-it.
-One
-could
-say
-that
-JSON-LD
-is
-a
-good
-fit
-for
-the
-RDFa
-API,
-which
-would
-enable
-a
-triple-store
-in
-the
-browser,
-but
-some
-don't
-want
-to
-require
-that
-level
-of
-functionality
-just
-to
-use
-JSON-LD.
-The
-group
-is
-still
-discussing
-the
-best
-way
-to
-proceed,
-so
-input
-on
-how
-JSON-LD
-could
-more
-easily
-be
-utilized
-in
-JavaScript
-environments
-would
-be
-very
-much
-appreciated.
-</p>
-</div>
-<div id="schema-less-databases" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">7.2
-</ins>
-</span>
-Schema-less
-Databases
-</h3>
-<p class="issue">
-Databases
-such
-as
-CouchDB
-and
-MongoDB
-allow
-the
-creation
-of
-schema-less
-data
-stores.
-RDF
-is
-a
-type
-of
-schema-less
-data
-model
-and
-thus
-lends
-itself
-to
-databases
-such
-as
-CouchDB
-and
-MongoDB.
-Both
-of
-these
-databases
-can
-use
-JSON-LD
-as
-their
-storage
-format.
-The
-group
-needs
-feedback
-from
-CouchDB
-and
-MongoDB
-experts
-regarding
-the
-usefulness
-of
-JSON-LD
-in
-those
-environments.
-</p>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">8.
-</ins>
-</span>
-Advanced
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-taken
-with
-a
-grain
-of
-salt;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<del class="diff-old">7.1
-Type
-Coercion
-JSON-LD
-supports
-the
-coercion
-of
-types
-to
-ensure
-that
-the
-zero-edit
-goal
-of
-JSON-LD
-can
-be
-accomplished.
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-and
-incoming
-or
-outgoing
-types
-to
-the
-proper
-RDF
-type
-based
-on
-a
-mapping
-of
-type
-IRIs
-to
-RDF
-types.
-Using
-type
-conversion,
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-plain
-literals,
-typed
-literals
-and
-IRIs.
-{
-  "#": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "name": "rdf:PlainLiteral",
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  },
-  "name": ,
-  "age": ,
-  "homepage": 
-}
-The
-example
-above
-would
-generate
-the
-following
-triples:
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "&lt;John Smith&gt;" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</del>
-<div id="vocabulary-profiles" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">7.2
-</del>
-<ins class="diff-chg">8.1
-</ins>
-</span>
-<del class="diff-old">JSON-LD
-</del>
-<ins class="diff-chg">Vocabulary
-</ins>
-Profiles
-</h3>
-<p>
-One
-of
-the
-more
-powerful
-features
-of
-RDFa
-1.1
-Core
-is
-the
-ability
-to
-specify
-a
-collection
-of
-prefixes
-and
-terms
-that
-can
-be
-re-used
-by
-a
-processor
-to
-simplfy
-markup.
-JSON-LD
-provides
-a
-similar
-mechanism
-called
-<del class="diff-old">JSON-LD
-</del>
-<ins class="diff-chg">Vocabulary
-</ins>
-Profiles,
-which
-is
-the
-inclusion
-of
-a
-context
-external
-to
-the
-JSON-LD
-document.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-one
-may
-specify
-an
-external
-<del class="diff-old">JSON-LD
-</del>
-<ins class="diff-chg">Vocabulary
-</ins>
-Profile.
-Assume
-the
-following
-profile
-exists
-at
-this
-imaginary
-URL:
-<code>
-http://example.org/profiles/contacts
-</code>.
-</p>
-<pre class="example">
-{
-  "#": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}
-</pre>
-<p>
-The
-profile
-listed
-above
-can
-be
-used
-in
-the
-following
-way:
-</p>
-<pre class="example">
-{
-  "#": { "#profile": "http://example.org/profiles/contacts" },
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">7.3
-</del>
-<ins class="diff-chg">8.2
-</ins>
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-array
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-JSON-LD
-associative
-array.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<pre class="example">
-{
-  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-  "@": 
-  [
-    {
-      "@": "&lt;http://example.org/people#john&gt;",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "&lt;http://example.org/people#jane&gt;",
-      "a": "foaf:Person"
-    }
-  ]
-}
-</pre>
-</div>
-<div id="the-json-ld-api" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">8.3
-</ins></span><ins class="diff-new">
-The
-JSON-LD
-API
-</ins></h3><p><ins class="diff-new">
-This
-API
-provides
-a
-clean
-mechanism
-that
-enables
-developers
-to
-convert
-JSON-LD
-data
-into
-a
-format
-that
-is
-easier
-to
-work
-with
-in
-various
-programming
-languages.
-</ins></p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDParser">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-new">
-interface <span class="idlInterfaceID">JSONLDParser</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span>   <span class="idlMethName"><a href="#widl-JSONLDParser-toObject">toObject</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">map</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>RDFGraph</a></span> <span class="idlMethName"><a href="#widl-JSONLDParser-toRDFGraph">toRDFGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><ins class="diff-new">
-};</span>
-</ins></pre><div id="methods" class="section"><h4><span class="secno"><ins class="diff-new">
-8.3.1
-</ins></span><ins class="diff-new">
-Methods
-</ins></h4><dl class="methods"><dt id="widl-JSONLDParser-toObject"><code><ins class="diff-new">
-toObject
-</ins></code></dt><dd><ins class="diff-new">
-Parses
-JSON-LD
-text
-into
-an
-object
-that
-allows
-at
-least
-attribute-based
-or
-key-based
-access
-to
-the
-data.
-If
-the
-contents
-are
-a
-disjoint
-graph,
-an
-array
-of
-objects
-are
-returned.
-If
-there
-are
-any
-errors,
-</ins><code><ins class="diff-new">
-null
-</ins></code><ins class="diff-new">
-is
-returned.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-jsonld
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-return
-object.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-map
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-map
-from
-IRIs
-to
-attribute
-names
-for
-the
-resulting
-object.
-Any
-term
-mapping
-that
-is
-not
-mentioned
-in
-the
-map
-will
-not
-be
-available
-in
-the
-resulting
-object.
-You
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-map
-</ins><code><ins class="diff-new">
-rdf:type
-</ins></code><ins class="diff-new">
-using
-the
-</ins><code><ins class="diff-new">
-a
-</ins></code><ins class="diff-new">
-key
-or
-the
-</ins><code><ins class="diff-new">
-rdf:type
-</ins></code><ins class="diff-new">
-IRI.
-You
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-map
-the
-subject
-by
-using
-the
-</ins><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
-key.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-options
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmDesc"><ins class="diff-new">
-An
-associative-array
-of
-processing
-options
-to
-enable
-or
-disable
-when
-processing
-the
-JSON-LD
-string.
-A
-conforming
-JSON-LD
-processor
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-support
-the
-following
-options:
-</ins><dl><dt><ins class="diff-new">
-indexBySubject
-</ins></dt><dd><ins class="diff-new">
-If
-set
-to
-true,
-the
-returned
-object
-will
-be
-indexed
-by
-subject.
-</ins></dd><dt><ins class="diff-new">
-preserveDatatypes
-</ins></dt><dd><ins class="diff-new">
-If
-set
-to
-true,
-preserves
-the
-datatype
-for
-object
-literals.
-</ins></dd><dt><ins class="diff-new">
-preserveLanguage
-</ins></dt><dd><ins class="diff-new">
-If
-set
-to
-true,
-preserves
-the
-languages
-for
-object
-literals.
-</ins></dd></dl></td></tr><tr><td class="prmName"><ins class="diff-new">
-callback
-</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code><ins class="diff-new">
-JSONLDParserCallback
-</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</ins></td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-object
-</ins></a></code></div></dd><dt id="widl-JSONLDParser-toRDFGraph"><code><ins class="diff-new">
-toRDFGraph
-</ins></code></dt><dd><ins class="diff-new">
-Parses
-JSON-LD
-and
-transforms
-the
-data
-into
-an
-RDFGraph,
-which
-is
-compatible
-with
-the
-RDFa
-API
-specification.
-This
-method
-will
-return
-</ins><code><ins class="diff-new">
-null
-</ins></code><ins class="diff-new">
-if
-there
-are
-any
-errors,
-or
-if
-the
-RDFa
-API
-is
-not
-available
-for
-use.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-jsonld
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-RDFGraph.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-callback
-</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code><ins class="diff-new">
-JSONLDParserCallback
-</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</ins></td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-RDFGraph
-</ins></a></code></div></dd></dl></div><p><ins class="diff-new">
-The
-JSONLDParserCallback
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-input
-data.
-</ins></p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDParserCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]<ins class="diff-new">
-interface <span class="idlInterfaceID">JSONLDParserCallback</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDParserCallback-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span><ins class="diff-new">
-};</span>
-</ins></pre><div id="methods-1" class="section"><h4><span class="secno"><ins class="diff-new">
-8.3.2
-</ins></span><ins class="diff-new">
-Methods
-</ins></h4><dl class="methods"><dt id="widl-JSONLDParserCallback-error"><code><ins class="diff-new">
-error
-</ins></code></dt><dd><ins class="diff-new">
-This
-callback
-is
-invoked
-whenever
-an
-error
-occurs
-during
-processing.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-error
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-descriptive
-error
-string
-returned
-by
-the
-processor.
-</ins></td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-void
-</ins></a></code></div></dd></dl></div><p><ins class="diff-new">
-The
-following
-example
-demonstrates
-how
-to
-convert
-JSON-LD
-to
-a
-JSON
-object
-that
-is
-directly
-usable
-in
-a
-programming
-environment:
-</ins></p><pre class="example"><ins class="diff-new">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
-              "http://xmlns.com/foaf/0.1/age" : "age",
-              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-// Map the JSON-LD to a language-native object
-var person = jsonld.toObject(jsonldString, myMap);
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-"Their
-homepage
-is:
-"
-+
-person.homepage);
-</ins></pre><p><ins class="diff-new">
-A
-JSON-LD
-Serializer
-is
-also
-available
-to
-map
-a
-language-native
-object
-to
-JSON-LD.
-</ins></p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-new">
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span><ins class="diff-new">
-};</span>
-</ins></pre><div id="methods-2" class="section"><h4><span class="secno"><ins class="diff-new">
-8.3.3
-</ins></span><ins class="diff-new">
-Methods
-</ins></h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize"><code><ins class="diff-new">
-normalize
-</ins></code></dt><dd><ins class="diff-new">
-Serializes
-a
-language-native
-object
-into
-a
-normalized
-JSON-LD
-string.
-Normalization
-is
-important
-when
-performing
-things
-like
-equality
-comparison
-and
-digital
-signature
-creation
-and
-verification.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-obj
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-An
-associative
-array
-of
-key-value
-pairs
-that
-should
-be
-converted
-to
-a
-JSON-LD
-string.
-It
-is
-assumed
-that
-a
-map
-already
-exists
-for
-the
-data.
-</ins></td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></div></dd></dl></div><h3 id="the-normalization-algorithm"><ins class="diff-new">
-The
-Normalization
-Algorithm
-</ins></h3><p class="issue"><ins class="diff-new">
-This
-algorithm
-is
-very
-rough,
-untested,
-and
-probably
-contains
-many
-bugs.
-Use
-at
-your
-own
-risk.
-It
-will
-change
-in
-the
-coming
-months.
-</ins></p><p><ins class="diff-new">
-The
-JSON-LD
-normalization
-algorithm
-is
-as
-follows:
-</ins></p><ol class="algorithm"><li><ins class="diff-new">
-Remove
-the
-</ins><code><ins class="diff-new">
-#
-</ins></code><ins class="diff-new">
-key
-and
-preserve
-it
-as
-the
-</ins><dfn title="transformation_map" id="dfn-transformation_map"><ins class="diff-new">
-transformation
-map
-</ins></dfn><ins class="diff-new">
-while
-running
-this
-algorithm.
-</ins></li><li><ins class="diff-new">
-For
-each
-key
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-key
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-</ins><a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map"><ins class="diff-new">
-transformation
-map
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-transformed
-key
-is
-an
-IRI,
-ensure
-that
-it
-is
-surrounded
-by
-angle
-brackets.
-</ins></li></ol></li><li><ins class="diff-new">
-For
-each
-value
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-value
-should
-be
-type
-coerced
-per
-the
-</ins><a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map"><ins class="diff-new">
-transformation
-map
-</ins></a>,<ins class="diff-new">
-ensure
-that
-it
-is
-transformed
-to
-the
-new
-value.
-</ins></li><li><ins class="diff-new">
-If
-the
-value
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-</ins><a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map"><ins class="diff-new">
-transformation
-map
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-value
-is
-a
-Typed
-Literal
-and
-the
-type
-is
-a
-CURIE,
-expand
-it
-to
-an
-IRI
-using
-the
-</ins><a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map"><ins class="diff-new">
-transformation
-map
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-final
-value
-is
-an
-IRI,
-ensure
-that
-it
-is
-surrounded
-by
-angle
-brackets.
-</ins></li></ol></li><li><ins class="diff-new">
-Output
-each
-sorted
-key-value
-pair
-without
-any
-extraneous
-whitespace.
-If
-the
-value
-is
-an
-associative
-array,
-perform
-this
-algorithm,
-starting
-at
-step
-#1,
-recursively
-on
-the
-sub-tree.
-</ins></li></ol><p></p><pre class="example"><ins class="diff-new">
-var myObj = { "#" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "#types": {
-                   "age" : "xsd:nonNegativeInteger",
-                   "homepage" : "xsd:anyURI" 
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : 42,
-              "homepage" : "http://example.org/people/joe" };
-// Map the language-native object to JSON-LD
-var
-jsonldText
-=
-jsonld.normalize(myObj);
-</ins></pre><p><ins class="diff-new">
-After
-the
-code
-in
-the
-example
-above
-has
-executed,
-the
-</ins><strong><ins class="diff-new">
-jsonldText
-</ins></strong><ins class="diff-new">
-value
-will
-be
-(line-breaks
-added
-for
-readability):
-</ins></p><pre class="example"><ins class="diff-new">
-{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
-"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
-"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe
-Jackson"}
-</ins></pre></div>
-</div>
-<div class="appendix section" id="acknowledgements">
-<h2>
-<span class="secno">
-A.
-</span>
-Acknowledgements
-</h2>
-<p>
-The
-editor
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-rationale
-and
-reasoning
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-Longley
-who
-reviewed
-and
-provided
-feedback
-on
-the
-overall
-specification
-and
-contexts,
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-Thanks
-also
-to
-Bradley
-P.
-Allen
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-</p>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-B.
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-B.1
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<dt id="bib-RDF-CONCEPTS">
-[RDF-CONCEPTS]
-</dt>
-<dd>
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-<cite>
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</a>
-</dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-B.2
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-<del class="diff-old">3
-August
-</del>
-<ins class="diff-chg">26
-October
-</ins>
-2010.
-W3C
-Working
-Draft.
-URL:
-<del class="diff-old">http://www.w3.org/TR/2010/WD-rdfa-core-20100803
-</del>
-<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">
-<ins class="diff-chg">http://www.w3.org/TR/2010/WD-rdfa-core-20101026
-</ins>
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20101128/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1890 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-28-november-2010">Unofficial Draft 28 November 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-</dl><p>This document is also available in this non-normative format: <a href="diff-20101024.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-Developers that embed structured data in their Web pages can choose among
-a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
-and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
-incompatible at the syntax level, can be easily mapped to RDF. JSON has 
-proven to be a highly useful object serialization and messaging format. 
-In an attempt to harmonize the representation of Linked Data in JSON, 
-this specification outlines a common JSON representation format for 
-Linked Data that can be used to represent objects specified via RDFa, 
-Microformats and Microdata.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">2.3 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">2.5 </span>An Example of a Default Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">4. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li></ul></li><li class="tocline"><a href="#advanced-features" class="tocxref"><span class="secno">6. </span>Advanced Features</a><ul class="toc"><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">6.1 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">6.2 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">6.3 </span>Type Coercion</a></li></ul></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">7. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">7.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">7.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">8. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-profiles" class="tocxref"><span class="secno">8.1 </span>Vocabulary Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">8.2 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">8.3 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">8.3.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">8.3.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">8.3.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-<p class="issue">Write the introduction once all of the technical details
-are hammered out. Explain why JSON-LD is designed as a light-weight mechanism
-to express RDFa, Microformats and Microdata. It is primarily intended as
-a way to express Linked Data in Javascript environments as well as a way to pass
-Linked Data to and from Web services. It is designed to be as simple as 
-possible, utilizing the large number of JSON parsers (and understanding) that
-is out there already. It is designed to be able to express key-value pairs,
-RDF data, Microformats data, and Microdata (that is, every data model
-currently in use) using one unified format. It does not require anyone to change
-their JSON, but easily add meaning by adding context in a way that is 
-out-of-band - it is designed to not disturb already deployed systems running
-on JSON, but provide a smooth migration path from JSON to JSON with added
-semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a tiny memory footprint in order to operate.
-</p>
-
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and 
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to write processors for JSON-LD.</li>
-</ul>
-
-<p>
-To understand this specification you must first be familiar with JSON, 
-which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>All comments and discussion takes place on the public mailing list:
-<a href="http://groups.google.com/group/json-ld">json-ld@googlegroups.com
-</a></li>
-
-<li>Specification bugs and issues should be reported in the 
-<a href="http://github.com/digitalbazaar/json-ld/issues">issue tracker</a>.</li>
-
-<li><a href="http://github.com/digitalbazaar/json-ld">Source code</a> for the 
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design-goals-and-rationale" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
-
-<p>The following section outlines the design goals and rationale behind the 
-JSON-LD markup language.
-</p>
-
-<div id="goals" class="section">
-<h3><span class="secno">2.1 </span>Goals</h3>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers don't need to know RDF in order to use the basic functionality
- provided by JSON-LD.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
- <dt>Expressiveness</dt>
- <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable.</dd>
- <dt>Zero Edits</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers.</dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="map-terms-to-iris" class="section">
-<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
-
-<p>Establishing a mechanism to map JSON values to IRIs will
-help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
-be restrictive in declaring a set of terms, rather, experimentation and 
-innovation should be supported as part of the core design of JSON-LD. There are, 
-however, a number of very small design criterial that can ensure that developers 
-will generate good RDF data that will create value for the greater 
-semantic web community and JSON/REST-based Web Services community.
-</p>
-
-<p>We will be using the following JSON object as the example for this section:
-</p>
-
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-}</pre>
-</div>
-
-<div id="the-default-context" class="section">
-<h3><span class="secno">2.3 </span>The Default Context</h3>
-
-<p>A default context is used in RDFa to allow developers to use keywords
-as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
-above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
-The semantic web, just like the document-based web, uses IRIs for
-unambiguous identification. The idea is that these terms mean something, 
-which you will eventually want to query. The semantic web specifies this via 
-<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
-a Vocabulary Document, and <strong>name</strong> is a term in that 
-vocabulary. Paste the two items together and you have an unambiguous identifier
-for a term.
-</p>
-
-<p>Developers, and machines, would be able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much
-like we can use WordNet today to see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Machines need the same sort of 
-dictionary of terms, and URIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>Non-prefixed terms should have term mappings declared in the default
-context so that they may be expanded later.</p>
-            
-<p>If a set of terms, like <strong>Person</strong>, 
-<strong>name</strong>, and <strong>homepage</strong>,
-are pre-defined in the default context, and that context is used to resolve the
-names in JSON objects, machines could automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
-}</pre>
-
-<p class="note">In order to differentiate between plain text and IRIs, the
-<strong><</strong> and <strong>></strong> are used around IRIs.</p>
-
-<p>Doing this would mean that JSON would start to become unambiguously
-machine-readable, play well with the semantic web, and basic markup wouldn't 
-be that much more complex than basic JSON markup. A win, all around.</p>
-</div>
-
-<div id="mashing-up-vocabularies" class="section">
-<h3><span class="secno">2.4 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
-default context beside the <em>terms</em> that are already defined. Using
-this feature, developers could also express markup like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">&lt;foaf:Person&gt;</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-default context in-line using the <code>#</code> character, like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "&lt;foaf:Person&gt;",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
-  "myvocab:credits": 500</span>
-}</pre>
-
-<p>Think of the <code>#</code> character as a "<strong>hash</strong>table", 
-which maps one
-string to another string. In the example above, the <code>myvocab</code>
-string is replaced with "<code>http://example.org/myvocab#</code>" when it
-is detected above. In the example above, "<code>myvocab:credits</code>" would
-expand to "<code>http://example.org/myvocab#credits</code>".</p>
-
-<p>This mechanism is a short-hand for RDF, and if defined, will give
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div id="an-example-of-a-default-context" class="section">
-<h3><span class="secno">2.5 </span>An Example of a Default Context</h3>
-
-<p>JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> define a default context. For example, the
-following default context could apply to all incoming Web Service calls
-previously accepting only JSON data:</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-    "#vocab": "http://example.org/default-vocab#",
-    "#base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-  }
-}</pre>
-
-<p>The <code>#vocab</code> string is a special keyword that states 
-that any term that doesn't resolve to a term or a prefix should be 
-appended to the <code>#vocab</code> IRI. This is done to ensure that 
-terms can be transformed to an IRI at all times.
-</p>
-
-<p>The <code>#base</code> string is a special keyword that states 
-that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
-<code>#base</code>.
-</p>
-</div>
-</div>
-
-<div id="markup-examples" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">3.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-[
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
- }
-]</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">3.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">3.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-]</pre>
-</div>
-</div>
-
-<div id="the-json-ld-processing-algorithm" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>The JSON-LD Processing Algorithm</h2>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The Processing Algorithm is a work in progress, there are
-still major bugs in the algorithm and it's difficult to follow. It's provided
-only to very early implementers to give them an idea of how to implement a
-processor.</p>
-
-<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
-<ul>
-<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
-JSON-LD processing algorithm before processing begins.</li>
-<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
-generated by JSON-LD markup.</li>
-<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
-processor should use when generating triples.</li>
-<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
-CURIEs while the processing algorithm is running. The 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
-associative-array level, specified via the <code>#</code> key.</li>
-<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
-yet to have their subject set.</li>
-<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
-processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
-current associative-array is detected.</li>
-<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
-the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
-<a class="tref" title="current_property">current property</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-</li></ul>
-
-<h4 id="processing-tokens-and-keywords">Processing Tokens and Keywords</h4>
-<ul>
-<li><code>#</code> - Used to set the active context.</li>
-<li><code>#base</code> - Used to set the base IRI for all object IRIs affected 
-by the active context.</li>
-<li><code>#vocab</code> - Used to set the base IRI for all property IRIs
-affected by the active context.</li>
-<li><code>#types</code> - Used to specify type coercion.</li>
-<li><code><</code> and <code>></code> - Used to express IRIs in
-JSON values.</li>
-<li><code>:</code> - The separator for CURIEs when used in JSON keys or
-JSON values.</li>
-<li><code>@</code> - Sets the active subjects.</li>
-<li><code>a</code> - Used to set the rdf:type of the active subjects.</li>
-<li><code>\</code> - Used as an escape character to escape all the special
-tokens and keywords.</li>
-<li><code>^^</code> - Used to express the data type for Typed Literals.</li>
-</ul>
-
-<p>The algorithm below is designed for streaming (SAX-based) implementations.
-Implementers will find that non-streaming (document-based) implementations will
-be much easier to implement as full access to the JSON object model eliminates 
-some of the steps that are necessary for streaming implementations. A conforming
-JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
-same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
-
-<ol class="algorithm">
-<li id="processing-step-default-context">If a <a class="tref internalDFN" title="default_context" href="#dfn-default_context">default context</a> is 
-supplied to the
-processing algorithm, push it onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-
-<li id="processing-step-associative">If an associative array is 
-detected, create a new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
-the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
-key-value pair in the associative array, using the newly created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
-
-  <ol class="algorithm">
-
-    <li>If a <code>#</code> key is found, the processor
-    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
-    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
-    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. 
-    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
-    starting at <a href="#processing-subject">Step 2.2</a>.</li>
-
-    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not been detected, the current
-    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
-    and processing proceeds to the next key-value pair. Otherwise, if the
-    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
-
-    <ol class="algorithm">
-
-      <li id="processing-subject">If a <code>@</code> key is found, the 
-      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> has been performed.
-
-      <ol class="algorithm">
-        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
-        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
-        </li>
- 
-        <li>If there are any triples in the 
-        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
-        </li>
-      </ol>
-
-      </li>
-
-      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
-      </li>
-
-      <li>If a key that is not <code>#</code>, 
-      <code>@</code>, or <code>a</code> is found, set the 
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
-      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
-      </li>
-
-      <li>If the value is not an array, set the 
-      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
-      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
-
-      <li>If the value is an associative array, then
-      process the value starting at 
-      <a href="#processing-step-associative">Step 2</a>.</li>
-
-      <li>If the value is a regular array, then process the value 
-      starting at 
-      <a href="#processing-step-array">Step 3</a> ensuring that
-      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
-      
-      <ol class="algorithm">
-        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
-
-        <li>Complete any previously incomplete triples by running all substeps 
-        of <a href="#processing-subject">Step 2.2.1</a>.
-        </li>
-      </ol>
-
-      </li><li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
-      <a href="#processing-associative">Step 2.2</a>
-      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-     </li></ol>
-    </ol>
-  </li>
-
-  <li id="processing-step-array">If a regular array is detected, 
-  process each value in the array by doing the following:
-
-    <ol class="algorithm">
-      <li>If the value is an associative array, processes per 
-      <a href="#processing-step-associative">Step 2</a>, ensuring to set
-      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
-      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
-      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
-      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
-      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
-      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
-
-      <li>If the value is a regular array, should we support RDF 
-      List/Sequence Processing? 
-      <div class="issue">If the value is a regular array, should we support 
-      RDF List/Sequence generation of triples? For example, would implementing
-      this be worth the more complex processing rules: "ex:orderedItems" : 
-      [["one", "two", "three"]]</div></li>
-    </ol>
-  </li>
-</ol>
-
-</div>
-
-<div id="markup-of-rdf-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
-
-<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked up
-in a way that is simple to understand and author by Web developers. In many
-cases, Javascript objects can become Linked Data with the simple addition
-of a context. Since RDF is also an important sub-community of the Linked
-Data movement, it is important that all RDF concepts are well-represented
-in this specification. This section details how each RDF concept can be
-expressed in JSON-LD.</p>
-
-<p class="issue">The current specification relies on microsyntaxes to 
-express things like IRIs, typed literals and CURIEs. There is a small amount
-of debate on whether or not to use full-blown JSON objects containing things
-like "value" and "datatype". The original authors of the JSON-LD specification
-feel that microsyntaxes allow a much simpler, less error-prone structure in 
-the JSON-LD objects. Proponents of the verbose mechanism assert that there
-would be less chance of data markup issues concerning proper escaping and 
-that the objects, while more verbose, would be easier to work with within
-JavaScript environments. Feedback on this issue would be appreciated.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">5.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
-and many objects are identified. IRIs can be expressed by wrapping a
-text string with the <code><</code> and <code>></code> characters.
-</p>
-
-<pre class="example">
-{
-...
-  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}</pre>
-
-<p>The example above would set the object to an IRI with the value of
-<code>http://manu.sporny.org</code>.
-</p>
-
-<p>As a general rule, all CURIEs and IRIs <em class="rfc2119" title="may">may</em> be wrapped in <code><</code> 
-and <code>></code> characters. This is to ensure that there is a simple, 
-consistent rule that can be followed when authoring JSON-LD data. There 
-are, however, several instances where angle brackets <em class="rfc2119" title="may">may</em> be omitted, 
-without introducing ambiguity, to ease authoring burden. These instances 
-are:
-
-</p><ul>
-<li>When specifying the subject IRI using <code>@</code>.</li>
-<li>When specifying the RDF type IRI using <code>a</code>.</li>
-<li>Any CURIE in the key portion of a JSON associative array.</li>
-</ul>
-
-Wrapping IRIs with the <code><</code> and <code>></code> 
-characters are only mandatory when IRIs are specified as values in the
-JSON key-value pairs.<p></p>
-
-<p>To further illustrate, the following example omissions of the 
-<code><</code> and <code>></code> characters are allowed:
-</p>
-
-<pre class="example">
-{
-...
-  "@": "<span class="diff">&lt;</span>http://manu.sporny.org/about#manu<span class="diff">&gt;</span>",
-  // CURIE/IRI when specifying the subject can be minimized.
-  "@": "http://manu.sporny.org/about#manu",
-...
-  "a": "<span class="diff">&lt;</span>foaf:Person<span class="diff">&gt;</span>",
-  // CURIE/IRI when specifying the type of an object can be minimized.
-  "a": "foaf:Person",
-...
-  "<span class="diff">&lt;</span>foaf:homepage<span class="diff">&gt;</span>": "&lt;http://manu.sporny.org&gt;",
-  // CURIE/IRI when specifying a property can be minimized.
-  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
-...
-}</pre>
-
-<p>At all other times, CURIEs and IRIs <em class="rfc2119" title="must">must</em> be wrapped with the 
-<code><</code> and <code>></code> characters.</p>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
-
-<p>A subject is declared using the <code>@</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, predicate, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to the IRI 
-<code>http://example.org/people#joebob</code>.
-</p>
-
-<p>Note that subject do not need to be wrapped in angle brackets. The following
-example is valid JSON-LD markup:</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-...
-}</pre>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">5.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the <code>a</code>
-key. Specifying the type in this way will generate a triple of the form 
-(subject, type, type-url).</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple 
-(in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Note that the type IRI does not need to be wrapped in angle brackets. 
-The following example is valid JSON-LD markup:</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "a": "http://xmlns.com/foaf/0.1/Person",
-...
-}</pre>
-
-</div>
-
-<div id="plain-literals" class="section">
-<h3><span class="secno">5.4 </span>Plain Literals</h3>
-
-<p>Regular text strings are called "plain literals" in RDF and are easily
-expressed using regular JSON strings.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="language-specification-in-plain-literals" class="section">
-<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
-
-<p>JSON-LD attempts to make sure that it is easy to express triples in other
-languages while simultaneously ensuring that hefty data structures 
-aren't required to accomplish simple language markup. When the 
-<code>@</code> symbol is used in a literal, the JSON-LD processor tags
-the literal text with the language tag that follows the <code>@</code>
-symbol.
-</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">花澄@ja</span>",
-...
-}</pre>
-
-<p>The example above would generate a plain literal for <em>花澄</em> and
-associate the <code>ja</code> language tag with the triple that is
-generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="typed-literals" class="section">
-<h3><span class="secno">5.6 </span>Typed Literals</h3>
-
-<p>Literals may also be typed in JSON-LD by using the <code>^^</code>
-sequence at the end of the text string.</p>
-
-<pre class="example">
-{
-...
-  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}</pre>
-
-<p>The example above would generate an object with the value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-arrays. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an array.</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "stu" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "groknar" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "radface" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple typed literals are expressed very much in the same way as 
-multiple properties:</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="blank-nodes" class="section">
-<h3><span class="secno">5.9 </span>Blank Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this is where blank nodes come
-into play. In JSON-LD, blank node identifiers are automatically created if a 
-subject is not specified using the <code>@</code> key. However, authors may
-name blank nodes by using the special <code>_</code> CURIE prefix.</p>
-
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-named blank node.
-</p>
-
-</div>
-
-</div>
-
-<div id="advanced-features" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>Advanced Features</h2>
-
-<p>JSON-LD has a number of features that provide functionality above and beyond
-the core functionality provided by RDF. The following sections outline the
-features that are specific to JSON-LD.
-</p>
-
-<div id="escape-character" class="section">
-<h3><span class="secno">6.1 </span>Escape Character</h3>
-
-<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
-interpreted as CURIEs, IRIs, language tags, or TypedLiterals.</p>
-
-<p>The special characters that need to be escaped in property values are: 
-<code><</code> (at the beginning of a string), 
-<code>></code> (at the end of a string), <code>@</code>, 
-and <code>^</code>.</p>
-
-<pre class="example">
-{
-...
-  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}</pre>
-
-</div>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">6.2 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as decimals, 
-integers and boolean values, JSON-LD utilizes that information to create 
-<a href="#typed-literals">Typed Literals</a>.</p>
-
-<pre class="example">
-{
-...
-  // This value is automatically converted to having a type of xsd:decimal
-  "measure:cups": <span class="diff">5.3</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-</div>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">6.3 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
-JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
-coerce and incoming or outgoing types to the proper RDF type based on a
-mapping of type IRIs to RDF types. Using type conversion, one may convert
-simple JSON data to properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to 
-plain literals, typed literals and IRIs.</p>
-
-<pre class="example">
-{
-  "#": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "#types":
-     {
-        "name": "rdf:PlainLiteral",
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }</span>
-  },
-  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "&lt;John Smith&gt;" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-</div>
-
-<div id="best-practices" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">7. </span>Best Practices</h2>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be 
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<div id="javascript" class="section">
-<h3><span class="secno">7.1 </span>JavaScript</h3>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in 
-JavaScript environments, however, features like IRIs requiring angled
-brackets in JSON-LD means that using JSON-LD directly in JavaScript is going
-to be annoying without a middleware layer such as a simple library that 
-strips JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDFa API, which would enable a triple-store in the 
-browser, but some don't want to require that level of functionality just to use 
-JSON-LD. The group is still discussing the best way to proceed, so input
-on how JSON-LD could more easily be utilized in JavaScript environments
-would be very much appreciated.
-</p>
-</div>
-
-<div id="schema-less-databases" class="section">
-<h3><span class="secno">7.2 </span>Schema-less Databases</h3>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from 
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">8. </span>Advanced Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear whether
-or not the JSON-LD specification is going to support the complexity necessary
-to support each concept. The entire section on Advanced Concepts should be
-taken with a grain of salt; it is merely a list of possibilities where all
-of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="vocabulary-profiles" class="section">
-<h3><span class="secno">8.1 </span>Vocabulary Profiles</h3>
-
-<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
-a collection of prefixes and terms that can be re-used by a processor to simplfy
-markup. JSON-LD provides a similar mechanism called Vocabulary Profiles, which is 
-the inclusion of a context external to the JSON-LD document.</p>
-
-<p>The example below demonstrates how one may specify an external Vocabulary
-Profile. Assume the following profile exists at this imaginary URL:
-<code>http://example.org/profiles/contacts</code>.</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}</pre>
-
-<p>The profile listed above can be used in the following way:</p>
-
-<pre class="example">
-{
-  "#": { "#profile": "http://example.org/profiles/contacts" },
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">8.2 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an array to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single JSON-LD associative
-array.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-  "@": 
-  [
-    {
-      "@": "&lt;http://example.org/people#john&gt;",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "&lt;http://example.org/people#jane&gt;",
-      "a": "foaf:Person"
-    }
-  ]
-}</pre>
-
-</div>
-
-<div id="the-json-ld-api" class="section">
-<h3><span class="secno">8.3 </span>The JSON-LD API</h3>
-
-<p>This API provides a clean mechanism that enables developers to convert 
-JSON-LD data into a format that is easier to work with in various programming
-languages.
-</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDParser">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDParser</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span>   <span class="idlMethName"><a href="#widl-JSONLDParser-toObject">toObject</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">map</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>RDFGraph</a></span> <span class="idlMethName"><a href="#widl-JSONLDParser-toRDFGraph">toRDFGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-};</span>
-</pre><div id="methods" class="section"><h4><span class="secno">8.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDParser-toObject"><code>toObject</code></dt><dd>Parses JSON-LD text into an object that allows at least attribute-based
-  or key-based access to the data. If the contents are a disjoint graph, an
-  array of objects are returned. If there are any errors, <code>null</code> 
-  is returned.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the return object.</td></tr><tr><td class="prmName">map</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The map from IRIs to attribute names for the resulting object. Any
-     term mapping that is not mentioned in the map will not be available in the 
-     resulting object. You <em class="rfc2119" title="may">may</em> map <code>rdf:type</code> using the 
-     <code>a</code> key or the <code>rdf:type</code> IRI. You <em class="rfc2119" title="may">may</em> map the 
-     subject by using the <code>@</code> key.
-     </td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">An associative-array of processing options to enable or disable when 
-     processing the JSON-LD string. A conforming JSON-LD processor <em class="rfc2119" title="must">must</em> support 
-     the following options:
-     <dl>
-       <dt>indexBySubject</dt>
-       <dd>If set to true, the returned object will be indexed by subject.</dd>
-       <dt>preserveDatatypes</dt>
-       <dd>If set to true, preserves the datatype for object literals.</dd>
-       <dt>preserveLanguage</dt>
-       <dd>If set to true, preserves the languages for object literals.</dd>
-     </dl>
-     </td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDParser-toRDFGraph"><code>toRDFGraph</code></dt><dd>Parses JSON-LD and transforms the data into an RDFGraph, which is 
-  compatible with the RDFa API specification. This method will return
-  <code>null</code> if there are any errors, or if the RDFa API is not
-  available for use.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>RDFGraph</a></code></div></dd></dl></div>
-
-<p>The JSONLDParserCallback is called whenever a processing error occurs on
-input data.</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDParserCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDParserCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDParserCallback-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre><div id="methods-1" class="section"><h4><span class="secno">8.3.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDParserCallback-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
-
-<p>The following example demonstrates how to convert JSON-LD to a JSON object
-that is directly usable in a programming environment:
-</p>
-
-<pre class="example">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
-              "http://xmlns.com/foaf/0.1/age" : "age",
-              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-
-// Map the JSON-LD to a language-native object
-var person = jsonld.toObject(jsonldString, myMap);
-
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-      "Their homepage is: " + person.homepage);</pre>
-
-<p>A JSON-LD Serializer is also available to map a language-native object
-to JSON-LD.
-
-</p><pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
-};</span>
-</pre><div id="methods-2" class="section"><h4><span class="secno">8.3.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
-  Normalization is important when performing things like equality comparison
-  and digital signature creation and verification.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An associative array of key-value pairs that should be converted
-     to a JSON-LD string. It is assumed that a map already exists for the
-     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
-
-<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
-
-<p class="issue">This algorithm is very rough, untested, and probably contains
-many bugs. Use at your own risk. It will change in the coming months.</p>
-
-<p>The JSON-LD normalization algorithm is as follows:
-
-</p><ol class="algorithm">
-<li>Remove the <code>#</code> key and preserve it as the 
-<dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
-<li>For each key
- <ol class="algorithm">
-  <li>If the key is a CURIE, expand the CURIE to an IRI using the
-      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-  <li>If the transformed key is an IRI, ensure that it is surrounded by 
-      angle brackets.</li>
- </ol>
-</li>
-<li>For each value
- <ol class="algorithm">
-  <li>If the value should be type coerced per the 
-      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
-      new value.</li>
-  <li>If the value is a CURIE, expand the CURIE to an IRI using the
-      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-  <li>If the value is a Typed Literal and the type is a CURIE,
-      expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-  <li>If the final value is an IRI, ensure that it is surrounded by angle 
-      brackets.</li>
- </ol>
-</li><li>Output each sorted key-value pair without any extraneous whitespace. If 
-the value is an associative array, perform this algorithm, starting
-at step #1, recursively on the sub-tree.</li>
-
-</ol>
-
-<p></p>
-
-<pre class="example">
-var myObj = { "#" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "#types": {
-                   "age" : "xsd:nonNegativeInteger",
-                   "homepage" : "xsd:anyURI" 
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : 42,
-              "homepage" : "http://example.org/people/joe" };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);</pre>
-
-<p>After the code in the example above has executed, the 
-<strong>jsonldText</strong> value will be (line-breaks added for 
-readability):</p>
-
-<pre class="example">
-{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
-"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
-"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe Jackson"}</pre>
-
-</div>
-
-</div>
-
-
-
-<div class="appendix section" id="acknowledgements">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>Acknowledgements</h2>
-
-<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
-rationale and reasoning behind the JSON-LD work via his work on RDFj, 
-Dave Longley who reviewed and provided feedback on the overall 
-specification and contexts, and Ian Davis, who created RDF/JSON. Thanks also
-to Bradley P. Allen and Richard Cyganiak for their input on the 
-specification.</p>
-</div>
-
-
-
-
-<div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>26 October 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">http://www.w3.org/TR/2010/WD-rdfa-core-20101026</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20101128/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20110201/diff-20101128.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8226 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-
-
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
--
-Linked
-Data
-Expression
-in
-JSON
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-Linked
-Data
-</h2>
-<h2 id="unofficial-draft-01-february-2011">
-Unofficial
-Draft
-<del class="diff-old">28
-November
-2010
-</del>
-<ins class="diff-chg">01
-February
-2011
-</ins>
-</h2>
-<dl>
-<dt>
-Editor:
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-</dl>
-<del class="diff-old">This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-diff
-to
-previous
-version
-.
-</del>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-Developers
-that
-embed
-structured
-data
-in
-their
-Web
-pages
-can
-choose
-among
-a
-number
-of
-languages
-such
-as
-RDFa
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-],
-Microformats
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
-MICROFORMATS
-</a>
-</cite>
-]
-and
-Microdata
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
-MICRODATA
-</a>
-</cite>
-].
-Each
-of
-these
-structured
-data
-languages,
-while
-incompatible
-at
-the
-syntax
-level,
-can
-be
-easily
-mapped
-to
-RDF.
-JSON
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-format.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-Linked
-Data
-that
-can
-be
-used
-to
-represent
-objects
-specified
-via
-RDFa,
-Microformats
-and
-Microdata.
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-Introduction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-1.2
-</span>
-Contributing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design-goals-and-rationale" class="tocxref">
-<span class="secno">
-2.
-</span>
-Design
-Goals
-and
-Rationale
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals" class="tocxref">
-<span class="secno">
-2.1
-</span>
-Goals
-</a>
-</li>
-<li class="tocline">
-<a href="#map-terms-to-iris" class="tocxref">
-<span class="secno">
-2.2
-</span>
-Map
-Terms
-to
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-default-context" class="tocxref">
-<span class="secno">
-2.3
-</span>
-The
-Default
-Context
-</a>
-</li>
-<li class="tocline">
-<a href="#mashing-up-vocabularies" class="tocxref">
-<span class="secno">
-2.4
-</span>
-Mashing
-Up
-Vocabularies
-</a>
-</li>
-<li class="tocline">
-<a href="#an-example-of-a-default-context" class="tocxref">
-<span class="secno">
-2.5
-</span>
-An
-Example
-of
-a
-Default
-Context
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-3.
-</span>
-Markup
-Examples
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#rdfa" class="tocxref">
-<span class="secno">
-3.1
-</span>
-RDFa
-</a>
-</li>
-<li class="tocline">
-<a href="#microformats" class="tocxref">
-<span class="secno">
-3.2
-</span>
-Microformats
-</a>
-</li>
-<li class="tocline">
-<a href="#microdata" class="tocxref">
-<span class="secno">
-3.3
-</span>
-Microdata
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-processing-algorithm" class="tocxref">
-<span class="secno">
-4.
-</span>
-The
-JSON-LD
-Processing
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#markup-of-rdf-concepts" class="tocxref">
-<span class="secno">
-5.
-</span>
-Markup
-of
-RDF
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-5.1
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-5.2
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-5.3
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#plain-literals" class="tocxref">
-<span class="secno">
-5.4
-</span>
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#language-specification-in-plain-literals" class="tocxref">
-<span class="secno">
-5.5
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#typed-literals" class="tocxref">
-<span class="secno">
-5.6
-</span>
-Typed
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-5.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-5.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#blank-nodes" class="tocxref">
-<span class="secno">
-5.9
-</span>
-Blank
-Nodes
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-features" class="tocxref">
-<span class="secno">
-6.
-</span>
-Advanced
-Features
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#escape-character" class="tocxref">
-<span class="secno">
-6.1
-</span>
-Escape
-Character
-</a>
-</li>
-<li class="tocline">
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-6.2
-</span>
-Automatic
-Typing
-</a>
-</li>
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-6.3
-</span>
-Type
-Coercion
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#best-practices" class="tocxref">
-<span class="secno">
-7.
-</span>
-Best
-Practices
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#javascript" class="tocxref">
-<span class="secno">
-7.1
-</span>
-JavaScript
-</a>
-</li>
-<li class="tocline">
-<a href="#schema-less-databases" class="tocxref">
-<span class="secno">
-7.2
-</span>
-Schema-less
-Databases
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-8.
-</span>
-Advanced
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#vocabulary-profiles" class="tocxref">
-<span class="secno">
-8.1
-</span>
-Vocabulary
-Profiles
-</a>
-</li>
-<li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-8.2
-</span>
-Disjoint
-Graphs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-api" class="tocxref">
-<span class="secno">
-8.3
-</span>
-The
-JSON-LD
-API
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#methods" class="tocxref">
-<span class="secno">
-8.3.1
-</span>
-Methods
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-1" class="tocxref">
-<span class="secno">
-8.3.2
-</span>
-Methods
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-2" class="tocxref">
-<span class="secno">
-8.3.3
-</span>
-Methods
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-A.
-</span>
-Acknowledgements
-</a>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-B.
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-B.1
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-B.2
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<p class="issue">
-Write
-the
-introduction
-once
-all
-of
-the
-technical
-details
-are
-hammered
-out.
-Explain
-why
-JSON-LD
-is
-designed
-as
-a
-light-weight
-mechanism
-to
-express
-RDFa,
-Microformats
-and
-Microdata.
-It
-is
-primarily
-intended
-as
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-environments
-as
-well
-as
-a
-way
-to
-pass
-Linked
-Data
-to
-and
-from
-Web
-services.
-It
-is
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-(and
-understanding)
-that
-is
-out
-there
-already.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-Microformats
-data,
-and
-Microdata
-(that
-is,
-every
-data
-model
-currently
-in
-use)
-using
-one
-unified
-format.
-It
-does
-not
-require
-anyone
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-out-of-band
--
-it
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-tiny
-memory
-footprint
-in
-order
-to
-operate.
-</p>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</h3>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-write
-processors
-for
-JSON-LD.
-</li>
-</ul>
-<p>
-To
-understand
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-]
-and
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
-RDF-CONCEPTS
-</a>
-</cite>
-].
-</p>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-1.2
-</span>
-Contributing
-</h3>
-<p>
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</p>
-<ul>
-<li>
-All
-comments
-and
-discussion
-takes
-place
-on
-the
-public
-mailing
-list:
-<a href="http://groups.google.com/group/json-ld">
-json-ld@googlegroups.com
-</a>
-</li>
-<li>
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-<a href="http://github.com/digitalbazaar/json-ld/issues">
-issue
-tracker
-</a>.
-</li>
-<li>
-<a href="http://github.com/digitalbazaar/json-ld">
-Source
-code
-</a>
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</li>
-<li>
-The
-<a href="http://webchat.freenode.net/?channels=#json-ld">
-#json-ld
-</a>
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</li>
-</ul>
-</div>
-</div>
-<div id="design-goals-and-rationale" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Design
-Goals
-and
-Rationale
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="goals" class="section">
-<h3>
-<span class="secno">
-2.1
-</span>
-Goals
-</h3>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-don't
-need
-to
-know
-RDF
-in
-order
-to
-use
-the
-basic
-functionality
-provided
-by
-JSON-LD.
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-should
-be
-100%
-compatible
-with
-JSON.
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-All
-major
-RDF
-concepts
-must
-be
-expressible
-via
-the
-JSON-LD
-syntax.
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-readable.
-</dd>
-<dt>
-Zero
-Edits
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<div id="map-terms-to-iris" class="section">
-<h3>
-<span class="secno">
-2.2
-</span>
-Map
-Terms
-to
-IRIs
-</h3>
-<p>
-Establishing
-a
-mechanism
-to
-map
-JSON
-values
-to
-IRIs
-will
-help
-in
-the
-mapping
-of
-JSON
-objects
-to
-RDF.
-This
-does
-not
-mean
-that
-JSON-LD
-must
-be
-restrictive
-in
-declaring
-a
-set
-of
-terms,
-rather,
-experimentation
-and
-innovation
-should
-be
-supported
-as
-part
-of
-the
-core
-design
-of
-JSON-LD.
-There
-are,
-however,
-a
-number
-of
-very
-small
-design
-criterial
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-RDF
-data
-that
-will
-create
-value
-for
-the
-greater
-semantic
-web
-community
-and
-JSON/REST-based
-Web
-Services
-community.
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-object
-as
-the
-example
-for
-this
-section:
-</p>
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-}
-</pre>
-</div>
-<div id="the-default-context" class="section">
-<h3>
-<span class="secno">
-2.3
-</span>
-The
-Default
-Context
-</h3>
-<p>
-A
-default
-context
-is
-used
-in
-RDFa
-to
-allow
-developers
-to
-use
-keywords
-as
-aliases
-for
-IRIs.
-So,
-for
-instance,
-the
-keyword
-<strong>
-name
-</strong>
-above
-could
-refer
-to
-the
-IRI
-<em>
-http://xmlns.com/foaf/0.1/name
-</em>.
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-terms
-mean
-something,
-which
-you
-will
-eventually
-want
-to
-query.
-The
-semantic
-web
-specifies
-this
-via
-<em>
-Vocabulary
-Documents
-</em>.
-The
-IRI
-<em>
-http://xmlns.com/foaf/0.1/
-</em>
-specifies
-a
-Vocabulary
-Document,
-and
-<strong>
-name
-</strong>
-is
-a
-term
-in
-that
-vocabulary.
-Paste
-the
-two
-items
-together
-and
-you
-have
-an
-unambiguous
-identifier
-for
-a
-term.
-</p>
-<p>
-Developers,
-and
-machines,
-would
-be
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-Machines
-need
-the
-same
-sort
-of
-dictionary
-of
-terms,
-and
-URIs
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-Non-prefixed
-terms
-should
-have
-term
-mappings
-declared
-in
-the
-default
-context
-so
-that
-they
-may
-be
-expanded
-later.
-</p>
-<p>
-If
-a
-set
-of
-terms,
-like
-<strong>
-Person
-</strong>,
-<strong>
-name
-</strong>,
-and
-<strong>
-homepage
-</strong>,
-are
-pre-defined
-in
-the
-default
-context,
-and
-that
-context
-is
-used
-to
-resolve
-the
-names
-in
-JSON
-objects,
-machines
-could
-automatically
-expand
-the
-terms
-to
-something
-meaningful
-and
-unambiguous,
-like
-this:
-</p>
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
-}
-</pre>
-<p class="note">
-In
-order
-to
-differentiate
-between
-plain
-text
-and
-IRIs,
-the
-<strong>
-<
-</strong> and <strong>
->
-</strong>
-are
-used
-around
-IRIs.
-</p>
-<p>
-Doing
-this
-would
-mean
-that
-JSON
-would
-start
-to
-become
-unambiguously
-machine-readable,
-play
-well
-with
-the
-semantic
-web,
-and
-basic
-markup
-wouldn't
-be
-that
-much
-more
-complex
-than
-basic
-JSON
-markup.
-A
-win,
-all
-around.
-</p>
-</div>
-<div id="mashing-up-vocabularies" class="section">
-<h3>
-<span class="secno">
-2.4
-</span>
-Mashing
-Up
-Vocabularies
-</h3>
-<p>
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</p>
-<ul>
-<li>
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</li>
-<li>
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</li>
-<li>
-FOAF
--
-for
-describing
-social
-networks.
-</li>
-<li>
-Calendar
--
-for
-specifying
-events.
-</li>
-<li>
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</li>
-<li>
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</li>
-<li>
-GEO
--
-for
-describing
-geographic
-location.
-</li>
-<li>
-VCard
--
-for
-describing
-organizations
-and
-people.
-</li>
-<li>
-DOAP
--
-for
-describing
-projects.
-</li>
-</ul>
-<p>
-A
-JSON-LD
-Web
-Service
-could
-define
-these
-as
-<em>
-prefix
-</em>
-es
-in
-their
-default
-context
-beside
-the
-<em>
-terms
-</em>
-that
-are
-already
-defined.
-Using
-this
-feature,
-developers
-could
-also
-express
-markup
-like
-this:
-</p>
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">&lt;foaf:Person&gt;</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
-}
-</pre>
-<p>
-Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-default
-context
-in-line
-using
-the
-<code>
-#
-</code>
-character,
-like
-so:
-</p>
-<pre class="example">
-{
-  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "&lt;foaf:Person&gt;",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
-  "myvocab:credits": 500</span>
-}
-</pre>
-<p>
-Think
-of
-the
-<code>
-#
-</code>
-character
-as
-a
-"
-<strong>
-hash
-</strong>
-table",
-which
-maps
-one
-string
-to
-another
-string.
-In
-the
-example
-above,
-the
-<code>
-myvocab
-</code>
-string
-is
-replaced
-with
-"
-<code>
-http://example.org/myvocab#
-</code>
-"
-when
-it
-is
-detected
-above.
-In
-the
-example
-above,
-"
-<code>
-myvocab:credits
-</code>
-"
-would
-expand
-to
-"
-<code>
-http://example.org/myvocab#credits
-</code>
-".
-</p>
-<p>
-This
-mechanism
-is
-a
-short-hand
-for
-RDF,
-and
-if
-defined,
-will
-give
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</p>
-<p>
-</p>
-</div>
-<div id="an-example-of-a-default-context" class="section">
-<h3>
-<span class="secno">
-2.5
-</span>
-An
-Example
-of
-a
-Default
-Context
-</h3>
-<p>
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-A
-JSON-LD
-aware
-Web
-Service
-<em class="rfc2119" title="may">
-may
-</em>
-define
-a
-default
-context.
-For
-example,
-the
-following
-default
-context
-could
-apply
-to
-all
-incoming
-Web
-Service
-calls
-previously
-accepting
-only
-JSON
-data:
-</p>
-<pre class="example">
-{
-  "#": 
-  {
-    "#vocab": "http://example.org/default-vocab#",
-    "#base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-  }
-}
-</pre>
-<p>
-The
-<code>
-#vocab
-</code>
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-term
-that
-doesn't
-resolve
-to
-a
-term
-or
-a
-prefix
-should
-be
-appended
-to
-the
-<code>
-#vocab
-</code>
-IRI.
-This
-is
-done
-to
-ensure
-that
-terms
-can
-be
-transformed
-to
-an
-IRI
-at
-all
-times.
-</p>
-<p>
-The
-<code>
-#base
-</code>
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-relative
-IRI
-<em class="rfc2119" title="must">
-must
-</em>
-be
-appended
-to
-the
-string
-specified
-by
-<code>
-#base
-</code>.
-</p>
-</div>
-</div>
-<div id="markup-examples" class="section">
-<h2>
-<span class="secno">
-3.
-</span>
-Markup
-Examples
-</h2>
-<p>
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</p>
-<div id="rdfa" class="section">
-<h3>
-<span class="secno">
-3.1
-</span>
-RDFa
-</h3>
-<p>
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</p>
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</pre>
-<p>
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</p>
-<pre class="example">
-[
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
- }
-]
-</pre>
-</div>
-<div id="microformats" class="section">
-<h3>
-<span class="secno">
-3.2
-</span>
-Microformats
-</h3>
-<p>
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</p>
-<pre class="example">
-&lt;div class="vcard"&gt;
-<del class="diff-old"> &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-</del>
-<ins class="diff-chg"> &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-</ins>
-&lt;/div&gt;
-</pre>
-<p>
-The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-<code>
-url
-</code>
-and
-<code>
-fn
-</code>
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-<code>
-http://tantek.com
-</code>.
-</p>
-<pre class="example">
-{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-<del class="diff-old">  "fn": "Tantek Çelik"
-</del>
-<ins class="diff-chg">  "fn": "Tantek Çelik"
-</ins>
-}
-</pre>
-</div>
-<div id="microdata" class="section">
-<h3>
-<span class="secno">
-3.3
-</span>
-Microdata
-</h3>
-<p>
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</p>
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</pre>
-<p>
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</p>
-<pre class="example">
-[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-]
-</pre>
-</div>
-</div>
-<div id="the-json-ld-processing-algorithm" class="section">
-<h2>
-<span class="secno">
-4.
-</span>
-The
-JSON-LD
-Processing
-Algorithm
-</h2>
-<p>
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</p>
-<p class="issue">
-The
-Processing
-Algorithm
-is
-a
-work
-in
-progress,
-there
-are
-still
-major
-bugs
-in
-the
-algorithm
-and
-it's
-difficult
-to
-follow.
-It's
-provided
-only
-to
-very
-early
-implementers
-to
-give
-them
-an
-idea
-of
-how
-to
-implement
-a
-processor.
-</p>
-<h4 id="processing-algorithm-terms">
-Processing
-Algorithm
-Terms
-</h4>
-<ul>
-<li>
-<dfn title="default_context" id="dfn-default_context">
-default
-context
-</dfn>
--
-a
-context
-that
-is
-specified
-to
-the
-JSON-LD
-processing
-algorithm
-before
-processing
-begins.
-</li>
-<li>
-<dfn title="default_graph" id="dfn-default_graph">
-default
-graph
-</dfn>
--
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</li>
-<li>
-<dfn title="active_subject" id="dfn-active_subject">
-active
-subject
-</dfn>
--
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="inherited_subject" id="dfn-inherited_subject">
-inherited
-subject
-</dfn>
--
-a
-subject
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-<a class="tref" title="current_subject">
-current
-subject
-</a>
-is
-discovered
-or
-generated.
-</li>
-<li>
-<dfn title="active_property" id="dfn-active_property">
-active
-property
-</dfn>
--
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="inherited_property" id="dfn-inherited_property">
-inherited
-property
-</dfn>
--
-a
-property
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-<a class="tref" title="current_subject">
-current
-subject
-</a>
-is
-discovered
-or
-generated.
-</li>
-<li>
-<dfn title="active_object" id="dfn-active_object">
-active
-object
-</dfn>
--
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="active_context" id="dfn-active_context">
-active
-context
-</dfn>
--
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-the
-top-most
-item
-on
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-</li>
-<li>
-<dfn title="local_context" id="dfn-local_context">
-local
-context
-</dfn>
--
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-<code>
-#
-</code>
-key.
-</li>
-<li>
-<dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</dfn>
--
-A
-list
-of
-triples
-that
-have
-yet
-to
-have
-their
-subject
-set.
-</li>
-<li>
-<dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</dfn>
--
-A
-list
-of
-objects
-that
-cannot
-be
-processed
-until
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-detected
-or
-the
-end
-of
-the
-current
-associative-array
-is
-detected.
-</li>
-<li>
-<dfn title="processor_state" id="dfn-processor_state">
-processor
-state
-</dfn>
--
-the
-processor
-state,
-which
-includes
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack,
-<a class="tref" title="current_subject">
-current
-subject
-</a>,
-<a class="tref" title="current_property">
-current
-property
-</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</a>,
-and
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>.
-</li>
-</ul>
-<h4 id="processing-tokens-and-keywords">
-Processing
-Tokens
-and
-Keywords
-</h4>
-<ul>
-<li>
-<code>
-#
-</code>
--
-Used
-to
-set
-the
-active
-context.
-</li>
-<li>
-<code>
-#base
-</code>
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-active
-context.
-</li>
-<li>
-<code>
-#vocab
-</code>
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-active
-context.
-</li>
-<li>
-<code>
-#types
-</code>
--
-Used
-to
-specify
-type
-coercion.
-</li>
-<li>
-<code>
-<
-</code> and <code>
->
-</code>
--
-Used
-to
-express
-IRIs
-in
-JSON
-values.
-</li>
-<li>
-<code>:
-</code>
--
-The
-separator
-for
-CURIEs
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-</li>
-<li>
-<code>
-@
-</code>
--
-Sets
-the
-active
-subjects.
-</li>
-<li>
-<code>
-a
-</code>
--
-Used
-to
-set
-the
-rdf:type
-of
-the
-active
-subjects.
-</li>
-<li>
-<code>
-\
-</code>
--
-Used
-as
-an
-escape
-character
-to
-escape
-all
-the
-special
-tokens
-and
-keywords.
-</li>
-<li>
-<code>
-^^
-</code>
--
-Used
-to
-express
-the
-data
-type
-for
-Typed
-Literals.
-</li>
-</ul>
-<p>
-The
-algorithm
-below
-is
-designed
-for
-streaming
-(SAX-based)
-implementations.
-Implementers
-will
-find
-that
-non-streaming
-(document-based)
-implementations
-will
-be
-much
-easier
-to
-implement
-as
-full
-access
-to
-the
-JSON
-object
-model
-eliminates
-some
-of
-the
-steps
-that
-are
-necessary
-for
-streaming
-implementations.
-A
-conforming
-JSON-LD
-processor
-<em class="rfc2119" title="must">
-must
-</em>
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>
-that
-the
-following
-algorithm
-generates:
-</p>
-<ol class="algorithm">
-<li id="processing-step-default-context">
-If
-a
-<a class="tref internalDFN" title="default_context" href="#dfn-default_context">
-default
-context
-</a>
-is
-supplied
-to
-the
-processing
-algorithm,
-push
-it
-onto
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-</li>
-<li id="processing-step-associative">
-If
-an
-associative
-array
-is
-detected,
-create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-Copy
-the
-<a class="tref" title="current_context">
-current
-context
-</a>
-stack
-to
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-Push
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-onto
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-'s
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-For
-each
-key-value
-pair
-in
-the
-associative
-array,
-using
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-do
-the
-following:
-<ol class="algorithm">
-<li>
-If
-a
-<code>
-#
-</code>
-key
-is
-found,
-the
-processor
-merges
-each
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-overwriting
-any
-duplicate
-values
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-Process
-each
-object
-in
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>,
-starting
-at
-<a href="#processing-subject">
-Step
-2.2
-</a>.
-</li>
-<li id="processing-associative">
-If
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-has
-not
-been
-detected,
-the
-current
-key-value
-pair
-is
-placed
-into
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>
-and
-processing
-proceeds
-to
-the
-next
-key-value
-pair.
-Otherwise,
-if
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-known
-perform
-the
-following
-steps:
-</li>
-<ol class="algorithm">
-<li id="processing-subject">
-If
-a
-<code>
-@
-</code>
-key
-is
-found,
-the
-processor
-sets
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-value
-after
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-has
-been
-performed.
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-and
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-values
-are
-specified,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-for
-the
-subject,
-the
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-for
-the
-property,
-and
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-for
-the
-object.
-</li>
-<li>
-If
-there
-are
-any
-triples
-in
-the
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</a>,
-complete
-each
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-as
-the
-subject
-for
-each
-triple.
-</li>
-</ol>
-</li>
-<li>
-If
-an
-<code>
-a
-</code>
-key
-is
-found,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-<code>
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type
-</code>.
-</li>
-<li>
-If
-a
-key
-that
-is
-not
-<code>
-#
-</code>,
-<code>
-@
-</code>,
-or
-<code>
-a
-</code>
-is
-found,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Property
-Processing
-</a>
-on
-the
-key.
-</li>
-<li>
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-an
-associative
-array,
-then
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-then
-process
-the
-value
-starting
-at
-<a href="#processing-step-array">
-Step
-3
-</a>
-ensuring
-that
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-are
-copied
-to
-a
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-<li>
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-was
-not
-discovered,
-then:
-<ol class="algorithm">
-<li>
-Generate
-a
-<a class="tref" title="blank_node_identifier">
-blank
-node
-identifier
-</a>
-and
-set
-it
-as
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>.
-</li>
-<li>
-Complete
-any
-previously
-incomplete
-triples
-by
-running
-all
-substeps
-of
-<a href="#processing-subject">
-Step
-2.2.1
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-was
-not
-discovered,
-then
-assume
-that
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-unmodified
-and
-run
-all
-substeps
-of
-<a href="#processing-associative">
-Step
-2.2
-</a>
-on
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>.
-</li>
-</ol>
-</ol>
-</li>
-<li id="processing-step-array">
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-an
-associative
-array,
-processes
-per
-<a href="#processing-step-associative">
-Step
-2
-</a>,
-ensuring
-to
-set
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-to
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-the
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-to
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-in
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-and
-place
-it
-into
-the
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-Processing?
-<div class="issue">
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-generation
-of
-triples?
-For
-example,
-would
-implementing
-this
-be
-worth
-the
-more
-complex
-processing
-rules:
-"ex:orderedItems"
-:
-[["one",
-"two",
-"three"]]
-</div>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<div id="markup-of-rdf-concepts" class="section">
-<h2>
-<span class="secno">
-5.
-</span>
-Markup
-of
-RDF
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-most
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-Javascript
-objects
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-Since
-RDF
-is
-also
-an
-important
-sub-community
-of
-the
-Linked
-Data
-movement,
-it
-is
-important
-that
-all
-RDF
-concepts
-are
-well-represented
-in
-this
-specification.
-This
-section
-details
-how
-each
-RDF
-concept
-can
-be
-expressed
-in
-JSON-LD.
-</p>
-<p class="issue">
-The
-current
-specification
-relies
-on
-microsyntaxes
-to
-express
-things
-like
-IRIs,
-typed
-literals
-and
-CURIEs.
-There
-is
-a
-small
-amount
-of
-debate
-on
-whether
-or
-not
-to
-use
-full-blown
-JSON
-objects
-containing
-things
-like
-"value"
-and
-"datatype".
-The
-original
-authors
-of
-the
-JSON-LD
-specification
-feel
-that
-microsyntaxes
-allow
-a
-much
-simpler,
-less
-error-prone
-structure
-in
-the
-JSON-LD
-objects.
-Proponents
-of
-the
-verbose
-mechanism
-assert
-that
-there
-would
-be
-less
-chance
-of
-data
-markup
-issues
-concerning
-proper
-escaping
-and
-that
-the
-objects,
-while
-more
-verbose,
-would
-be
-easier
-to
-work
-with
-within
-JavaScript
-environments.
-Feedback
-on
-this
-issue
-would
-be
-appreciated.
-</p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-5.1
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-subjects
-and
-many
-objects
-are
-identified.
-IRIs
-can
-be
-expressed
-by
-wrapping
-a
-text
-string
-with
-the
-<code>
-<
-</code> and <code>
->
-</code>
-characters.
-</p>
-<pre class="example">
-{
-...
-  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-object
-to
-an
-IRI
-with
-the
-value
-of
-<code>
-http://manu.sporny.org
-</code>.
-</p>
-<p>
-As
-a
-general
-rule,
-all
-CURIEs
-and
-IRIs
-<em class="rfc2119" title="may">
-may
-</em>
-be
-wrapped
-in
-<code>
-<
-</code> and <code>
->
-</code>
-characters.
-This
-is
-to
-ensure
-that
-there
-is
-a
-simple,
-consistent
-rule
-that
-can
-be
-followed
-when
-authoring
-JSON-LD
-data.
-There
-are,
-however,
-several
-instances
-where
-angle
-brackets
-<em class="rfc2119" title="may">
-may
-</em>
-be
-omitted,
-without
-introducing
-ambiguity,
-to
-ease
-authoring
-burden.
-These
-instances
-are:
-</p>
-<ul>
-<li>
-When
-specifying
-the
-subject
-IRI
-using
-<code>
-@
-</code>.
-</li>
-<li>
-When
-specifying
-the
-RDF
-type
-IRI
-using
-<code>
-a
-</code>.
-</li>
-<li>
-Any
-CURIE
-in
-the
-key
-portion
-of
-a
-JSON
-associative
-array.
-</li>
-</ul>
-Wrapping
-IRIs
-with
-the
-<code>
-<
-</code> and <code>
->
-</code>
-characters
-are
-only
-mandatory
-when
-IRIs
-are
-specified
-as
-values
-in
-the
-JSON
-key-value
-pairs.
-<p>
-</p>
-<p>
-To
-further
-illustrate,
-the
-following
-example
-omissions
-of
-the
-<code>
-<
-</code> and <code>
->
-</code>
-characters
-are
-allowed:
-</p>
-<pre class="example">
-{
-...
-  "@": "<span class="diff">&lt;</span>http://manu.sporny.org/about#manu<span class="diff">&gt;</span>",
-  // CURIE/IRI when specifying the subject can be minimized.
-  "@": "http://manu.sporny.org/about#manu",
-...
-  "a": "<span class="diff">&lt;</span>foaf:Person<span class="diff">&gt;</span>",
-  // CURIE/IRI when specifying the type of an object can be minimized.
-  "a": "foaf:Person",
-...
-  "<span class="diff">&lt;</span>foaf:homepage<span class="diff">&gt;</span>": "&lt;http://manu.sporny.org&gt;",
-  // CURIE/IRI when specifying a property can be minimized.
-  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
-...
-}
-</pre>
-<p>
-At
-all
-other
-times,
-CURIEs
-and
-IRIs
-<em class="rfc2119" title="must">
-must
-</em>
-be
-wrapped
-with
-the
-<code>
-<
-</code> and <code>
->
-</code>
-characters.
-</p>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-5.2
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-A
-subject
-is
-declared
-using
-the
-<code>
-@
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-predicate,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-the
-IRI
-<code>
-http://example.org/people#joebob
-</code>.
-</p>
-<p>
-Note
-that
-subject
-do
-not
-need
-to
-be
-wrapped
-in
-angle
-brackets.
-The
-following
-example
-is
-valid
-JSON-LD
-markup:
-</p>
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-...
-}
-</pre>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-5.3
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-a
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-type-url).
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-(in
-N-Triples
-notation):
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Note
-that
-the
-type
-IRI
-does
-not
-need
-to
-be
-wrapped
-in
-angle
-brackets.
-The
-following
-example
-is
-valid
-JSON-LD
-markup:
-</p>
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "a": "http://xmlns.com/foaf/0.1/Person",
-...
-}
-</pre>
-</div>
-<div id="plain-literals" class="section">
-<h3>
-<span class="secno">
-5.4
-</span>
-Plain
-Literals
-</h3>
-<p>
-Regular
-text
-strings
-are
-called
-"plain
-literals"
-in
-RDF
-and
-are
-easily
-expressed
-using
-regular
-JSON
-strings.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}
-</pre>
-</div>
-<div id="language-specification-in-plain-literals" class="section">
-<h3>
-<span class="secno">
-5.5
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</h3>
-<p>
-JSON-LD
-attempts
-to
-make
-sure
-that
-it
-is
-easy
-to
-express
-triples
-in
-other
-languages
-while
-simultaneously
-ensuring
-that
-hefty
-data
-structures
-aren't
-required
-to
-accomplish
-simple
-language
-markup.
-When
-the
-<code>
-@
-</code>
-symbol
-is
-used
-in
-a
-literal,
-the
-JSON-LD
-processor
-tags
-the
-literal
-text
-with
-the
-language
-tag
-that
-follows
-the
-<code>
-@
-</code>
-symbol.
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "foaf:name": "",
-</del>
-<ins class="diff-chg">  "foaf:name": "<span class="diff">??@ja</span>",
-</ins>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-plain
-literal
-for
-<em>
-<del class="diff-old">花澄
-</del>
-<ins class="diff-chg">??
-</ins>
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-tag
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="typed-literals" class="section">
-<h3>
-<span class="secno">
-5.6
-</span>
-Typed
-Literals
-</h3>
-<p>
-Literals
-may
-also
-be
-typed
-in
-JSON-LD
-by
-using
-the
-<code>
-^^
-</code>
-sequence
-at
-the
-end
-of
-the
-text
-string.
-</p>
-<pre class="example">
-{
-...
-  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-an
-object
-with
-the
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-5.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-arrays.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-array.
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "stu" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "groknar" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-"radface"
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-5.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-typed
-literals
-are
-expressed
-very
-much
-in
-the
-same
-way
-as
-multiple
-properties:
-</p>
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="blank-nodes" class="section">
-<h3>
-<span class="secno">
-5.9
-</span>
-Blank
-Nodes
-</h3>
-<p>
-At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-is
-where
-blank
-nodes
-come
-into
-play.
-In
-JSON-LD,
-blank
-node
-identifiers
-are
-automatically
-created
-if
-a
-subject
-is
-not
-specified
-using
-the
-<code>
-@
-</code>
-key.
-However,
-authors
-may
-name
-blank
-nodes
-by
-using
-the
-special
-<code>
-_
-</code>
-CURIE
-prefix.
-</p>
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<code>
-_:foo
-</code>,
-which
-can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-named
-blank
-node.
-</p>
-</div>
-</div>
-<div id="advanced-features" class="section">
-<h2>
-<span class="secno">
-6.
-</span>
-Advanced
-Features
-</h2>
-<p>
-JSON-LD
-has
-a
-number
-of
-features
-that
-provide
-functionality
-above
-and
-beyond
-the
-core
-functionality
-provided
-by
-RDF.
-The
-following
-sections
-outline
-the
-features
-that
-are
-specific
-to
-JSON-LD.
-</p>
-<div id="escape-character" class="section">
-<h3>
-<span class="secno">
-6.1
-</span>
-Escape
-Character
-</h3>
-<p>
-Special
-characters
-in
-property
-values
-<em class="rfc2119" title="must">
-must
-</em>
-be
-escaped
-in
-order
-to
-not
-be
-interpreted
-as
-CURIEs,
-IRIs,
-language
-tags,
-or
-TypedLiterals.
-</p>
-<p>
-The
-special
-characters
-that
-need
-to
-be
-escaped
-in
-property
-values
-are:
-<code>
-<
-</code> (at the beginning of a string), <code>
->
-</code>
-(at
-the
-end
-of
-a
-string),
-<code>
-@
-</code>,
-and
-<code>
-^
-</code>.
-</p>
-<pre class="example">
-{
-...
-  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}
-</pre>
-</div>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-6.2
-</span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-<del class="diff-old">decimals,
-integers
-</del>
-<ins class="diff-chg">doubles,
-integers,
-</ins>
-and
-boolean
-<del class="diff-old">values,
-</del>
-<ins class="diff-chg">values.
-As
-demonstrated
-below,
-</ins>
-JSON-LD
-utilizes
-that
-information
-to
-create
-<a href="#typed-literals">
-Typed
-Literals
-<del class="diff-old">.
-</del>
-</a>:
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  // This value is automatically converted to having a type of xsd:decimal
-</del>
-<ins class="diff-chg">  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-</ins>
-  "measure:cups": <span class="diff">5.3</span>,
-<ins class="diff-new">  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">"4.8^^&lt;xsd:decimal&gt;"</span>,
-</ins>
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}
-</pre>
-<p class="note">
-<ins class="diff-new">When
-dealing
-with
-a
-number
-of
-modern
-programming
-languages,
-including
-JavaScript
-ECMA-262,
-there
-is
-no
-distinction
-between
-</ins><strong><ins class="diff-new">
-xsd:decimal
-</ins></strong><ins class="diff-new">
-and
-</ins><strong><ins class="diff-new">
-xsd:double
-</ins></strong><ins class="diff-new">
-values.
-That
-is,
-the
-number
-</ins><code><ins class="diff-new">
-5.3
-</ins></code><ins class="diff-new">
-and
-the
-number
-</ins><code><ins class="diff-new">
-5.3e0
-</ins></code><ins class="diff-new">
-are
-treated
-as
-if
-they
-were
-the
-same.
-When
-converting
-from
-JSON-LD
-to
-a
-language-native
-format
-and
-back,
-datatype
-information
-is
-lost
-in
-a
-number
-of
-these
-languages.
-Thus,
-one
-could
-say
-that
-</ins><code><ins class="diff-new">
-5.3
-</ins></code><ins class="diff-new">
-is
-a
-</ins><strong><ins class="diff-new">
-xsd:decimal
-</ins></strong><ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-5.3e0
-</ins></code><ins class="diff-new">
-is
-an
-</ins><strong><ins class="diff-new">
-xsd:double
-</ins></strong><ins class="diff-new">
-in
-JSON-LD,
-but
-when
-both
-values
-are
-converted
-to
-a
-language-native
-format
-the
-datatype
-difference
-between
-the
-two
-is
-lost
-because
-the
-machine-level
-representation
-will
-almost
-always
-be
-a
-</ins><strong><ins class="diff-new">
-double
-</ins></strong>.<ins class="diff-new">
-Implementers
-should
-be
-aware
-of
-this
-potential
-round-tripping
-issue
-between
-</ins><strong><ins class="diff-new">
-xsd:decimal
-</ins></strong><ins class="diff-new">
-and
-</ins><strong><ins class="diff-new">
-xsd:double
-</ins></strong>.<ins class="diff-new">
-Specifically
-objects
-with
-a
-datatype
-of
-</ins><strong><ins class="diff-new">
-xsd:decimal
-</ins></strong><em class="rfc2119" title="must not"><ins class="diff-new">
-must
-not
-</ins></em><ins class="diff-new">
-be
-converted
-to
-a
-language
-native
-type.
-</ins></p>
-</div>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-6.3
-</span>
-Type
-Coercion
-</h3>
-<p>
-JSON-LD
-supports
-the
-coercion
-of
-types
-to
-ensure
-that
-the
-zero-edit
-goal
-of
-JSON-LD
-can
-be
-accomplished.
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-and
-incoming
-or
-outgoing
-types
-to
-the
-proper
-RDF
-type
-based
-on
-a
-mapping
-of
-type
-IRIs
-to
-RDF
-types.
-Using
-type
-conversion,
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-plain
-literals,
-typed
-literals
-and
-IRIs.
-</p>
-<pre class="example">
-{
-  "#": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "#types":
-     {
-        "name": "rdf:PlainLiteral",
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }</span>
-  },
-  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "&lt;John Smith&gt;" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-</div>
-<div id="best-practices" class="section">
-<h2>
-<span class="secno">
-7.
-</span>
-Best
-Practices
-</h2>
-<p>
-The
-nature
-of
-Web
-programming
-allows
-one
-to
-use
-basic
-technologies,
-such
-as
-JSON-LD,
-across
-a
-variety
-of
-systems
-and
-environments.
-This
-section
-attempts
-to
-describe
-some
-of
-those
-environments
-and
-the
-way
-in
-which
-JSON-LD
-can
-be
-integrated
-in
-order
-to
-help
-alleviate
-certain
-development
-headaches.
-</p>
-<div id="javascript" class="section">
-<h3>
-<span class="secno">
-7.1
-</span>
-JavaScript
-</h3>
-<p class="issue">
-It
-is
-expected
-that
-JSON-LD
-will
-be
-used
-quite
-a
-bit
-in
-JavaScript
-environments,
-however,
-features
-like
-IRIs
-requiring
-angled
-brackets
-in
-JSON-LD
-means
-that
-using
-JSON-LD
-directly
-in
-JavaScript
-is
-going
-to
-be
-annoying
-without
-a
-middleware
-layer
-such
-as
-a
-simple
-library
-that
-strips
-JSON-LD
-markup
-before
-JavaScript
-uses
-it.
-One
-could
-say
-that
-JSON-LD
-is
-a
-good
-fit
-for
-the
-RDFa
-API,
-which
-would
-enable
-a
-triple-store
-in
-the
-browser,
-but
-some
-don't
-want
-to
-require
-that
-level
-of
-functionality
-just
-to
-use
-JSON-LD.
-The
-group
-is
-still
-discussing
-the
-best
-way
-to
-proceed,
-so
-input
-on
-how
-JSON-LD
-could
-more
-easily
-be
-utilized
-in
-JavaScript
-environments
-would
-be
-very
-much
-appreciated.
-</p>
-</div>
-<div id="schema-less-databases" class="section">
-<h3>
-<span class="secno">
-7.2
-</span>
-Schema-less
-Databases
-</h3>
-<p class="issue">
-Databases
-such
-as
-CouchDB
-and
-MongoDB
-allow
-the
-creation
-of
-schema-less
-data
-stores.
-RDF
-is
-a
-type
-of
-schema-less
-data
-model
-and
-thus
-lends
-itself
-to
-databases
-such
-as
-CouchDB
-and
-MongoDB.
-Both
-of
-these
-databases
-can
-use
-JSON-LD
-as
-their
-storage
-format.
-The
-group
-needs
-feedback
-from
-CouchDB
-and
-MongoDB
-experts
-regarding
-the
-usefulness
-of
-JSON-LD
-in
-those
-environments.
-</p>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-8.
-</span>
-Advanced
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-taken
-with
-a
-grain
-of
-salt;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<div id="vocabulary-profiles" class="section">
-<h3>
-<span class="secno">
-8.1
-</span>
-Vocabulary
-Profiles
-</h3>
-<p>
-One
-of
-the
-more
-powerful
-features
-of
-RDFa
-1.1
-Core
-is
-the
-ability
-to
-specify
-a
-collection
-of
-prefixes
-and
-terms
-that
-can
-be
-re-used
-by
-a
-processor
-to
-simplfy
-markup.
-JSON-LD
-provides
-a
-similar
-mechanism
-called
-Vocabulary
-Profiles,
-which
-is
-the
-inclusion
-of
-a
-context
-external
-to
-the
-JSON-LD
-document.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-one
-may
-specify
-an
-external
-Vocabulary
-Profile.
-Assume
-the
-following
-profile
-exists
-at
-this
-imaginary
-URL:
-<code>
-http://example.org/profiles/contacts
-</code>.
-</p>
-<pre class="example">
-{
-  "#": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}
-</pre>
-<p>
-The
-profile
-listed
-above
-can
-be
-used
-in
-the
-following
-way:
-</p>
-<pre class="example">
-{
-  "#": { "#profile": "http://example.org/profiles/contacts" },
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-8.2
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-array
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-JSON-LD
-associative
-array.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<pre class="example">
-{
-  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-  "@": 
-  [
-    {
-      "@": "&lt;http://example.org/people#john&gt;",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "&lt;http://example.org/people#jane&gt;",
-      "a": "foaf:Person"
-    }
-  ]
-}
-</pre>
-</div>
-<div id="the-json-ld-api" class="section">
-<h3>
-<span class="secno">
-8.3
-</span>
-The
-JSON-LD
-API
-</h3>
-<p>
-This
-API
-provides
-a
-clean
-mechanism
-that
-enables
-developers
-to
-convert
-JSON-LD
-data
-into
-a
-format
-that
-is
-easier
-to
-work
-with
-in
-various
-programming
-languages.
-</p>
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDParser">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDParser</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span>   <span class="idlMethName"><a href="#widl-JSONLDParser-toObject">toObject</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">map</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>RDFGraph</a></span> <span class="idlMethName"><a href="#widl-JSONLDParser-toRDFGraph">toRDFGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-};</span>
-</pre>
-<div id="methods" class="section">
-<h4>
-<span class="secno">
-8.3.1
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDParser-toObject">
-<code>
-toObject
-</code>
-</dt>
-<dd>
-Parses
-JSON-LD
-text
-into
-an
-object
-that
-allows
-at
-least
-attribute-based
-or
-key-based
-access
-to
-the
-data.
-If
-the
-contents
-are
-a
-disjoint
-graph,
-an
-array
-of
-objects
-are
-returned.
-If
-there
-are
-any
-errors,
-<code>
-null
-</code>
-is
-returned.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-jsonld
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-return
-object.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-map
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmDesc">
-The
-map
-from
-IRIs
-to
-attribute
-names
-for
-the
-resulting
-object.
-Any
-term
-mapping
-that
-is
-not
-mentioned
-in
-the
-map
-will
-not
-be
-available
-in
-the
-resulting
-object.
-You
-<em class="rfc2119" title="may">
-may
-</em>
-map
-<code>
-rdf:type
-</code>
-using
-the
-<code>
-a
-</code>
-key
-or
-the
-<code>
-rdf:type
-</code>
-IRI.
-You
-<em class="rfc2119" title="may">
-may
-</em>
-map
-the
-subject
-by
-using
-the
-<code>
-@
-</code>
-key.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-options
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmOptTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmDesc">
-An
-associative-array
-of
-processing
-options
-to
-enable
-or
-disable
-when
-processing
-the
-JSON-LD
-string.
-A
-conforming
-JSON-LD
-processor
-<em class="rfc2119" title="must">
-must
-</em>
-support
-the
-following
-options:
-<dl>
-<dt>
-indexBySubject
-</dt>
-<dd>
-If
-set
-to
-true,
-the
-returned
-object
-will
-be
-indexed
-by
-subject.
-</dd>
-<dt>
-preserveDatatypes
-</dt>
-<dd>
-If
-set
-to
-true,
-preserves
-the
-datatype
-for
-object
-literals.
-</dd>
-<dt>
-preserveLanguage
-</dt>
-<dd>
-If
-set
-to
-true,
-preserves
-the
-languages
-for
-object
-literals.
-</dd>
-</dl>
-</td>
-</tr>
-<tr>
-<td class="prmName">
-callback
-</td>
-<td class="prmType">
-<code>
-<a href="#idl-def-JSONLDParserCallback" class="idlType">
-<code>
-JSONLDParserCallback
-</code>
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmOptTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-object
-</a>
-</code>
-</div>
-</dd>
-<dt id="widl-JSONLDParser-toRDFGraph">
-<code>
-toRDFGraph
-</code>
-</dt>
-<dd>
-Parses
-JSON-LD
-and
-transforms
-the
-data
-into
-an
-RDFGraph,
-which
-is
-compatible
-with
-the
-RDFa
-API
-specification.
-This
-method
-will
-return
-<code>
-null
-</code>
-if
-there
-are
-any
-errors,
-or
-if
-the
-RDFa
-API
-is
-not
-available
-for
-use.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-jsonld
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-RDFGraph.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-callback
-</td>
-<td class="prmType">
-<code>
-<a href="#idl-def-JSONLDParserCallback" class="idlType">
-<code>
-JSONLDParserCallback
-</code>
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmOptTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-RDFGraph
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<p>
-The
-JSONLDParserCallback
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-input
-data.
-</p>
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDParserCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDParserCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDParserCallback-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre>
-<div id="methods-1" class="section">
-<h4>
-<span class="secno">
-8.3.2
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDParserCallback-error">
-<code>
-error
-</code>
-</dt>
-<dd>
-This
-callback
-is
-invoked
-whenever
-an
-error
-occurs
-during
-processing.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-error
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmDesc">
-A
-descriptive
-error
-string
-returned
-by
-the
-processor.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-void
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<p>
-The
-following
-example
-demonstrates
-how
-to
-convert
-JSON-LD
-to
-a
-JSON
-object
-that
-is
-directly
-usable
-in
-a
-programming
-environment:
-</p>
-<pre class="example">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
-              "http://xmlns.com/foaf/0.1/age" : "age",
-              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-// Map the JSON-LD to a language-native object
-var person = jsonld.toObject(jsonldString, myMap);
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-"Their
-homepage
-is:
-"
-+
-person.homepage);
-</pre>
-<p>
-A
-JSON-LD
-Serializer
-is
-also
-available
-to
-map
-a
-language-native
-object
-to
-JSON-LD.
-</p><pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
-};</span>
-</pre>
-<div id="methods-2" class="section">
-<h4>
-<span class="secno">
-8.3.3
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDSerializer-normalize">
-<code>
-normalize
-</code>
-</dt>
-<dd>
-Serializes
-a
-language-native
-object
-into
-a
-normalized
-JSON-LD
-string.
-Normalization
-is
-important
-when
-performing
-things
-like
-equality
-comparison
-and
-digital
-signature
-creation
-and
-verification.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-obj
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">?
-</ins>
-</td>
-<td class="prmDesc">
-An
-associative
-array
-of
-key-value
-pairs
-that
-should
-be
-converted
-to
-a
-JSON-LD
-string.
-It
-is
-assumed
-that
-a
-map
-already
-exists
-for
-the
-data.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-DOMString
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<h3 id="the-normalization-algorithm">
-The
-Normalization
-Algorithm
-</h3>
-<p class="issue">
-This
-algorithm
-is
-very
-rough,
-untested,
-and
-probably
-contains
-many
-bugs.
-Use
-at
-your
-own
-risk.
-It
-will
-change
-in
-the
-coming
-months.
-</p>
-<p>
-The
-JSON-LD
-normalization
-algorithm
-is
-as
-follows:
-</p>
-<ol class="algorithm">
-<li>
-Remove
-the
-<code>
-#
-</code>
-key
-and
-preserve
-it
-as
-the
-<dfn title="transformation_map" id="dfn-transformation_map">
-transformation
-map
-</dfn>
-while
-running
-this
-algorithm.
-</li>
-<li>
-For
-each
-key
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-If
-the
-transformed
-key
-is
-an
-IRI,
-ensure
-that
-it
-is
-surrounded
-by
-angle
-brackets.
-</li>
-</ol>
-</li>
-<li>
-For
-each
-value
-<ol class="algorithm">
-<li>
-If
-the
-value
-should
-be
-type
-coerced
-per
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>,
-ensure
-that
-it
-is
-transformed
-to
-the
-new
-value.
-</li>
-<li>
-If
-the
-value
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-Typed
-Literal
-and
-the
-type
-is
-a
-CURIE,
-expand
-it
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-If
-the
-final
-value
-is
-an
-IRI,
-ensure
-that
-it
-is
-surrounded
-by
-angle
-brackets.
-</li>
-</ol>
-</li>
-<li>
-Output
-each
-sorted
-key-value
-pair
-without
-any
-extraneous
-whitespace.
-If
-the
-value
-is
-an
-associative
-array,
-perform
-this
-algorithm,
-starting
-at
-step
-#1,
-recursively
-on
-the
-sub-tree.
-</li>
-</ol>
-<p>
-</p>
-<pre class="example">
-var myObj = { "#" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "#types": {
-                   "age" : "xsd:nonNegativeInteger",
-                   "homepage" : "xsd:anyURI" 
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : 42,
-              "homepage" : "http://example.org/people/joe" };
-// Map the language-native object to JSON-LD
-var
-jsonldText
-=
-jsonld.normalize(myObj);
-</pre>
-<p>
-After
-the
-code
-in
-the
-example
-above
-has
-executed,
-the
-<strong>
-jsonldText
-</strong>
-value
-will
-be
-(line-breaks
-added
-for
-readability):
-</p>
-<pre class="example">
-{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
-"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
-"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe
-Jackson"}
-</pre>
-<p>
-<ins class="diff-new">When
-normalizing
-</ins><strong><ins class="diff-new">
-xsd:double
-</ins></strong><ins class="diff-new">
-values,
-implementers
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-ensure
-that
-the
-normalized
-value
-is
-a
-string.
-In
-order
-to
-generate
-the
-string
-from
-a
-</ins><strong><ins class="diff-new">
-double
-</ins></strong><ins class="diff-new">
-value,
-output
-equivalent
-to
-the
-</ins><code><ins class="diff-new">
-printf("%1.6e",
-value)
-</ins></code><ins class="diff-new">
-function
-in
-C
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-used
-where
-</ins><strong><ins class="diff-new">
-"%1.6e"
-</ins></strong><ins class="diff-new">
-is
-the
-string
-formatter
-and
-</ins><strong><ins class="diff-new">
-value
-</ins></strong><ins class="diff-new">
-is
-the
-value
-to
-be
-converted.
-</ins></p><p><ins class="diff-new">
-To
-convert
-the
-a
-double
-value
-in
-JavaScript,
-implementers
-can
-use
-the
-following
-snippet
-of
-code:
-</ins></p><pre class="example"><ins class="diff-new">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
-'$10$2')
-</ins></pre><p class="note"><ins class="diff-new">
-When
-data
-needs
-to
-be
-normalized,
-JSON-LD
-authors
-should
-not
-use
-values
-that
-are
-going
-to
-undergo
-automatic
-conversion.
-This
-is
-due
-to
-the
-lossy
-nature
-of
-</ins><strong><ins class="diff-new">
-xsd:double
-</ins></strong><ins class="diff-new">
-values.
-</ins></p>
-</div>
-</div>
-<div class="appendix section" id="acknowledgements">
-<h2>
-<span class="secno">
-A.
-</span>
-Acknowledgements
-</h2>
-<p>
-The
-editor
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-rationale
-and
-reasoning
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-Longley
-who
-reviewed
-and
-provided
-feedback
-on
-the
-overall
-specification
-and
-contexts,
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-Thanks
-also
-to
-Bradley
-P.
-Allen
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-</p>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-B.
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-B.1
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<dt id="bib-RDF-CONCEPTS">
-[RDF-CONCEPTS]
-</dt>
-<dd>
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-<cite>
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</a>
-</dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-B.2
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-26
-October
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">
-http://www.w3.org/TR/2010/WD-rdfa-core-20101026
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20110201/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1933 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  medium solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-01-february-2011">Unofficial Draft 01 February 2011</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-</dl><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-Developers that embed structured data in their Web pages can choose among
-a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
-and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
-incompatible at the syntax level, can be easily mapped to RDF. JSON has 
-proven to be a highly useful object serialization and messaging format. 
-In an attempt to harmonize the representation of Linked Data in JSON, 
-this specification outlines a common JSON representation format for 
-Linked Data that can be used to represent objects specified via RDFa, 
-Microformats and Microdata.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">2.3 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">2.5 </span>An Example of a Default Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">4. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li></ul></li><li class="tocline"><a href="#advanced-features" class="tocxref"><span class="secno">6. </span>Advanced Features</a><ul class="toc"><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">6.1 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">6.2 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">6.3 </span>Type Coercion</a></li></ul></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">7. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">7.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">7.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">8. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-profiles" class="tocxref"><span class="secno">8.1 </span>Vocabulary Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">8.2 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">8.3 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">8.3.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">8.3.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">8.3.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-<p class="issue">Write the introduction once all of the technical details
-are hammered out. Explain why JSON-LD is designed as a light-weight mechanism
-to express RDFa, Microformats and Microdata. It is primarily intended as
-a way to express Linked Data in Javascript environments as well as a way to pass
-Linked Data to and from Web services. It is designed to be as simple as 
-possible, utilizing the large number of JSON parsers (and understanding) that
-is out there already. It is designed to be able to express key-value pairs,
-RDF data, Microformats data, and Microdata (that is, every data model
-currently in use) using one unified format. It does not require anyone to change
-their JSON, but easily add meaning by adding context in a way that is 
-out-of-band - it is designed to not disturb already deployed systems running
-on JSON, but provide a smooth migration path from JSON to JSON with added
-semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a tiny memory footprint in order to operate.
-</p>
-
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and 
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to write processors for JSON-LD.</li>
-</ul>
-
-<p>
-To understand this specification you must first be familiar with JSON, 
-which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>All comments and discussion takes place on the public mailing list:
-<a href="http://groups.google.com/group/json-ld">json-ld@googlegroups.com
-</a></li>
-
-<li>Specification bugs and issues should be reported in the 
-<a href="http://github.com/digitalbazaar/json-ld/issues">issue tracker</a>.</li>
-
-<li><a href="http://github.com/digitalbazaar/json-ld">Source code</a> for the 
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design-goals-and-rationale" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
-
-<p>The following section outlines the design goals and rationale behind the 
-JSON-LD markup language.
-</p>
-
-<div id="goals" class="section">
-<h3><span class="secno">2.1 </span>Goals</h3>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers don't need to know RDF in order to use the basic functionality
- provided by JSON-LD.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
- <dt>Expressiveness</dt>
- <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable.</dd>
- <dt>Zero Edits</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers.</dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="map-terms-to-iris" class="section">
-<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
-
-<p>Establishing a mechanism to map JSON values to IRIs will
-help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
-be restrictive in declaring a set of terms, rather, experimentation and 
-innovation should be supported as part of the core design of JSON-LD. There are, 
-however, a number of very small design criterial that can ensure that developers 
-will generate good RDF data that will create value for the greater 
-semantic web community and JSON/REST-based Web Services community.
-</p>
-
-<p>We will be using the following JSON object as the example for this section:
-</p>
-
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-}</pre>
-</div>
-
-<div id="the-default-context" class="section">
-<h3><span class="secno">2.3 </span>The Default Context</h3>
-
-<p>A default context is used in RDFa to allow developers to use keywords
-as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
-above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
-The semantic web, just like the document-based web, uses IRIs for
-unambiguous identification. The idea is that these terms mean something, 
-which you will eventually want to query. The semantic web specifies this via 
-<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
-a Vocabulary Document, and <strong>name</strong> is a term in that 
-vocabulary. Paste the two items together and you have an unambiguous identifier
-for a term.
-</p>
-
-<p>Developers, and machines, would be able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much
-like we can use WordNet today to see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Machines need the same sort of 
-dictionary of terms, and URIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>Non-prefixed terms should have term mappings declared in the default
-context so that they may be expanded later.</p>
-            
-<p>If a set of terms, like <strong>Person</strong>, 
-<strong>name</strong>, and <strong>homepage</strong>,
-are pre-defined in the default context, and that context is used to resolve the
-names in JSON objects, machines could automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
-}</pre>
-
-<p class="note">In order to differentiate between plain text and IRIs, the
-<strong><</strong> and <strong>></strong> are used around IRIs.</p>
-
-<p>Doing this would mean that JSON would start to become unambiguously
-machine-readable, play well with the semantic web, and basic markup wouldn't 
-be that much more complex than basic JSON markup. A win, all around.</p>
-</div>
-
-<div id="mashing-up-vocabularies" class="section">
-<h3><span class="secno">2.4 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
-default context beside the <em>terms</em> that are already defined. Using
-this feature, developers could also express markup like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">&lt;foaf:Person&gt;</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-default context in-line using the <code>#</code> character, like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "&lt;foaf:Person&gt;",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
-  "myvocab:credits": 500</span>
-}</pre>
-
-<p>Think of the <code>#</code> character as a "<strong>hash</strong>table", 
-which maps one
-string to another string. In the example above, the <code>myvocab</code>
-string is replaced with "<code>http://example.org/myvocab#</code>" when it
-is detected above. In the example above, "<code>myvocab:credits</code>" would
-expand to "<code>http://example.org/myvocab#credits</code>".</p>
-
-<p>This mechanism is a short-hand for RDF, and if defined, will give
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div id="an-example-of-a-default-context" class="section">
-<h3><span class="secno">2.5 </span>An Example of a Default Context</h3>
-
-<p>JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> define a default context. For example, the
-following default context could apply to all incoming Web Service calls
-previously accepting only JSON data:</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-    "#vocab": "http://example.org/default-vocab#",
-    "#base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-  }
-}</pre>
-
-<p>The <code>#vocab</code> string is a special keyword that states 
-that any term that doesn't resolve to a term or a prefix should be 
-appended to the <code>#vocab</code> IRI. This is done to ensure that 
-terms can be transformed to an IRI at all times.
-</p>
-
-<p>The <code>#base</code> string is a special keyword that states 
-that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
-<code>#base</code>.
-</p>
-</div>
-</div>
-
-<div id="markup-examples" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">3.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-[
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-   "foaf:name": "Bob"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-   "foaf:name": "Eve"
- },
- {
-   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-   "foaf:name": "Manu"
- }
-]</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">3.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">3.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-  },
-  {
-    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-  }
-]</pre>
-</div>
-</div>
-
-<div id="the-json-ld-processing-algorithm" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>The JSON-LD Processing Algorithm</h2>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The Processing Algorithm is a work in progress, there are
-still major bugs in the algorithm and it's difficult to follow. It's provided
-only to very early implementers to give them an idea of how to implement a
-processor.</p>
-
-<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
-<ul>
-<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
-JSON-LD processing algorithm before processing begins.</li>
-<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
-generated by JSON-LD markup.</li>
-<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
-processor should use when generating triples.</li>
-<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
-CURIEs while the processing algorithm is running. The 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
-associative-array level, specified via the <code>#</code> key.</li>
-<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
-yet to have their subject set.</li>
-<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
-processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
-current associative-array is detected.</li>
-<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
-the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
-<a class="tref" title="current_property">current property</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-</li></ul>
-
-<h4 id="processing-tokens-and-keywords">Processing Tokens and Keywords</h4>
-<ul>
-<li><code>#</code> - Used to set the active context.</li>
-<li><code>#base</code> - Used to set the base IRI for all object IRIs affected 
-by the active context.</li>
-<li><code>#vocab</code> - Used to set the base IRI for all property IRIs
-affected by the active context.</li>
-<li><code>#types</code> - Used to specify type coercion.</li>
-<li><code><</code> and <code>></code> - Used to express IRIs in
-JSON values.</li>
-<li><code>:</code> - The separator for CURIEs when used in JSON keys or
-JSON values.</li>
-<li><code>@</code> - Sets the active subjects.</li>
-<li><code>a</code> - Used to set the rdf:type of the active subjects.</li>
-<li><code>\</code> - Used as an escape character to escape all the special
-tokens and keywords.</li>
-<li><code>^^</code> - Used to express the data type for Typed Literals.</li>
-</ul>
-
-<p>The algorithm below is designed for streaming (SAX-based) implementations.
-Implementers will find that non-streaming (document-based) implementations will
-be much easier to implement as full access to the JSON object model eliminates 
-some of the steps that are necessary for streaming implementations. A conforming
-JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
-same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
-
-<ol class="algorithm">
-<li id="processing-step-default-context">If a <a class="tref internalDFN" title="default_context" href="#dfn-default_context">default context</a> is 
-supplied to the
-processing algorithm, push it onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-
-<li id="processing-step-associative">If an associative array is 
-detected, create a new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
-the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
-key-value pair in the associative array, using the newly created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
-
-  <ol class="algorithm">
-
-    <li>If a <code>#</code> key is found, the processor
-    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
-    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
-    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. 
-    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
-    starting at <a href="#processing-subject">Step 2.2</a>.</li>
-
-    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not been detected, the current
-    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
-    and processing proceeds to the next key-value pair. Otherwise, if the
-    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
-
-    <ol class="algorithm">
-
-      <li id="processing-subject">If a <code>@</code> key is found, the 
-      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> has been performed.
-
-      <ol class="algorithm">
-        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
-        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
-        </li>
- 
-        <li>If there are any triples in the 
-        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
-        </li>
-      </ol>
-
-      </li>
-
-      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
-      </li>
-
-      <li>If a key that is not <code>#</code>, 
-      <code>@</code>, or <code>a</code> is found, set the 
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
-      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
-      </li>
-
-      <li>If the value is not an array, set the 
-      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
-      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
-
-      <li>If the value is an associative array, then
-      process the value starting at 
-      <a href="#processing-step-associative">Step 2</a>.</li>
-
-      <li>If the value is a regular array, then process the value 
-      starting at 
-      <a href="#processing-step-array">Step 3</a> ensuring that
-      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
-      
-      <ol class="algorithm">
-        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
-
-        <li>Complete any previously incomplete triples by running all substeps 
-        of <a href="#processing-subject">Step 2.2.1</a>.
-        </li>
-      </ol>
-
-      </li><li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
-      <a href="#processing-associative">Step 2.2</a>
-      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-     </li></ol>
-    </ol>
-  </li>
-
-  <li id="processing-step-array">If a regular array is detected, 
-  process each value in the array by doing the following:
-
-    <ol class="algorithm">
-      <li>If the value is an associative array, processes per 
-      <a href="#processing-step-associative">Step 2</a>, ensuring to set
-      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
-      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
-      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
-      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
-      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
-      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
-
-      <li>If the value is a regular array, should we support RDF 
-      List/Sequence Processing? 
-      <div class="issue">If the value is a regular array, should we support 
-      RDF List/Sequence generation of triples? For example, would implementing
-      this be worth the more complex processing rules: "ex:orderedItems" : 
-      [["one", "two", "three"]]</div></li>
-    </ol>
-  </li>
-</ol>
-
-</div>
-
-<div id="markup-of-rdf-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
-
-<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked up
-in a way that is simple to understand and author by Web developers. In many
-cases, Javascript objects can become Linked Data with the simple addition
-of a context. Since RDF is also an important sub-community of the Linked
-Data movement, it is important that all RDF concepts are well-represented
-in this specification. This section details how each RDF concept can be
-expressed in JSON-LD.</p>
-
-<p class="issue">The current specification relies on microsyntaxes to 
-express things like IRIs, typed literals and CURIEs. There is a small amount
-of debate on whether or not to use full-blown JSON objects containing things
-like "value" and "datatype". The original authors of the JSON-LD specification
-feel that microsyntaxes allow a much simpler, less error-prone structure in 
-the JSON-LD objects. Proponents of the verbose mechanism assert that there
-would be less chance of data markup issues concerning proper escaping and 
-that the objects, while more verbose, would be easier to work with within
-JavaScript environments. Feedback on this issue would be appreciated.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">5.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
-and many objects are identified. IRIs can be expressed by wrapping a
-text string with the <code><</code> and <code>></code> characters.
-</p>
-
-<pre class="example">
-{
-...
-  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
-...
-}</pre>
-
-<p>The example above would set the object to an IRI with the value of
-<code>http://manu.sporny.org</code>.
-</p>
-
-<p>As a general rule, all CURIEs and IRIs <em class="rfc2119" title="may">may</em> be wrapped in <code><</code> 
-and <code>></code> characters. This is to ensure that there is a simple, 
-consistent rule that can be followed when authoring JSON-LD data. There 
-are, however, several instances where angle brackets <em class="rfc2119" title="may">may</em> be omitted, 
-without introducing ambiguity, to ease authoring burden. These instances 
-are:
-
-</p><ul>
-<li>When specifying the subject IRI using <code>@</code>.</li>
-<li>When specifying the RDF type IRI using <code>a</code>.</li>
-<li>Any CURIE in the key portion of a JSON associative array.</li>
-</ul>
-
-Wrapping IRIs with the <code><</code> and <code>></code> 
-characters are only mandatory when IRIs are specified as values in the
-JSON key-value pairs.<p></p>
-
-<p>To further illustrate, the following example omissions of the 
-<code><</code> and <code>></code> characters are allowed:
-</p>
-
-<pre class="example">
-{
-...
-  "@": "<span class="diff">&lt;</span>http://manu.sporny.org/about#manu<span class="diff">&gt;</span>",
-  // CURIE/IRI when specifying the subject can be minimized.
-  "@": "http://manu.sporny.org/about#manu",
-...
-  "a": "<span class="diff">&lt;</span>foaf:Person<span class="diff">&gt;</span>",
-  // CURIE/IRI when specifying the type of an object can be minimized.
-  "a": "foaf:Person",
-...
-  "<span class="diff">&lt;</span>foaf:homepage<span class="diff">&gt;</span>": "&lt;http://manu.sporny.org&gt;",
-  // CURIE/IRI when specifying a property can be minimized.
-  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
-...
-}</pre>
-
-<p>At all other times, CURIEs and IRIs <em class="rfc2119" title="must">must</em> be wrapped with the 
-<code><</code> and <code>></code> characters.</p>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
-
-<p>A subject is declared using the <code>@</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, predicate, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to the IRI 
-<code>http://example.org/people#joebob</code>.
-</p>
-
-<p>Note that subject do not need to be wrapped in angle brackets. The following
-example is valid JSON-LD markup:</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-...
-}</pre>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">5.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the <code>a</code>
-key. Specifying the type in this way will generate a triple of the form 
-(subject, type, type-url).</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple 
-(in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Note that the type IRI does not need to be wrapped in angle brackets. 
-The following example is valid JSON-LD markup:</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "a": "http://xmlns.com/foaf/0.1/Person",
-...
-}</pre>
-
-</div>
-
-<div id="plain-literals" class="section">
-<h3><span class="secno">5.4 </span>Plain Literals</h3>
-
-<p>Regular text strings are called "plain literals" in RDF and are easily
-expressed using regular JSON strings.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="language-specification-in-plain-literals" class="section">
-<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
-
-<p>JSON-LD attempts to make sure that it is easy to express triples in other
-languages while simultaneously ensuring that hefty data structures 
-aren't required to accomplish simple language markup. When the 
-<code>@</code> symbol is used in a literal, the JSON-LD processor tags
-the literal text with the language tag that follows the <code>@</code>
-symbol.
-</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">??@ja</span>",
-...
-}</pre>
-
-<p>The example above would generate a plain literal for <em>??</em> and
-associate the <code>ja</code> language tag with the triple that is
-generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="typed-literals" class="section">
-<h3><span class="secno">5.6 </span>Typed Literals</h3>
-
-<p>Literals may also be typed in JSON-LD by using the <code>^^</code>
-sequence at the end of the text string.</p>
-
-<pre class="example">
-{
-...
-  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
-...
-}</pre>
-
-<p>The example above would generate an object with the value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-arrays. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an array.</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "stu" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "groknar" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "radface" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple typed literals are expressed very much in the same way as 
-multiple properties:</p>
-
-<pre class="example">
-{
-...
-  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="blank-nodes" class="section">
-<h3><span class="secno">5.9 </span>Blank Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this is where blank nodes come
-into play. In JSON-LD, blank node identifiers are automatically created if a 
-subject is not specified using the <code>@</code> key. However, authors may
-name blank nodes by using the special <code>_</code> CURIE prefix.</p>
-
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-named blank node.
-</p>
-
-</div>
-
-</div>
-
-<div id="advanced-features" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>Advanced Features</h2>
-
-<p>JSON-LD has a number of features that provide functionality above and beyond
-the core functionality provided by RDF. The following sections outline the
-features that are specific to JSON-LD.
-</p>
-
-<div id="escape-character" class="section">
-<h3><span class="secno">6.1 </span>Escape Character</h3>
-
-<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
-interpreted as CURIEs, IRIs, language tags, or TypedLiterals.</p>
-
-<p>The special characters that need to be escaped in property values are: 
-<code><</code> (at the beginning of a string), 
-<code>></code> (at the end of a string), <code>@</code>, 
-and <code>^</code>.</p>
-
-<pre class="example">
-{
-...
-  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
-...
-}</pre>
-
-</div>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">6.2 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as doubles, 
-integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
-information to create <a href="#typed-literals">Typed Literals</a>:</p>
-
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">"4.8^^&lt;xsd:decimal&gt;"</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-<p class="note">When dealing with a number of modern programming languages,
-including JavaScript ECMA-262, there is no distinction between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
-the number <code>5.3</code> and the number 
-<code>5.3e0</code> are treated as if they were the same. When converting from 
-JSON-LD to a language-native format and back, datatype information is lost in a 
-number of these languages. Thus, one could say that <code>5.3</code> is a 
-<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
-<strong>xsd:double</strong> in JSON-LD, but when both values are 
-converted to a language-native format the datatype difference between the two 
-is lost because the machine-level representation will almost always be a 
-<strong>double</strong>. 
-Implementers should be aware of this potential round-tripping issue between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
-objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
-to a language native type.
-</p>
-
-</div>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">6.3 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
-JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
-coerce and incoming or outgoing types to the proper RDF type based on a
-mapping of type IRIs to RDF types. Using type conversion, one may convert
-simple JSON data to properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to 
-plain literals, typed literals and IRIs.</p>
-
-<pre class="example">
-{
-  "#": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "#types":
-     {
-        "name": "rdf:PlainLiteral",
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }</span>
-  },
-  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "&lt;John Smith&gt;" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-</div>
-
-<div id="best-practices" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">7. </span>Best Practices</h2>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be 
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<div id="javascript" class="section">
-<h3><span class="secno">7.1 </span>JavaScript</h3>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in 
-JavaScript environments, however, features like IRIs requiring angled
-brackets in JSON-LD means that using JSON-LD directly in JavaScript is going
-to be annoying without a middleware layer such as a simple library that 
-strips JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDFa API, which would enable a triple-store in the 
-browser, but some don't want to require that level of functionality just to use 
-JSON-LD. The group is still discussing the best way to proceed, so input
-on how JSON-LD could more easily be utilized in JavaScript environments
-would be very much appreciated.
-</p>
-</div>
-
-<div id="schema-less-databases" class="section">
-<h3><span class="secno">7.2 </span>Schema-less Databases</h3>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from 
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">8. </span>Advanced Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear whether
-or not the JSON-LD specification is going to support the complexity necessary
-to support each concept. The entire section on Advanced Concepts should be
-taken with a grain of salt; it is merely a list of possibilities where all
-of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="vocabulary-profiles" class="section">
-<h3><span class="secno">8.1 </span>Vocabulary Profiles</h3>
-
-<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
-a collection of prefixes and terms that can be re-used by a processor to simplfy
-markup. JSON-LD provides a similar mechanism called Vocabulary Profiles, which is 
-the inclusion of a context external to the JSON-LD document.</p>
-
-<p>The example below demonstrates how one may specify an external Vocabulary
-Profile. Assume the following profile exists at this imaginary URL:
-<code>http://example.org/profiles/contacts</code>.</p>
-
-<pre class="example">
-{
-  "#": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}</pre>
-
-<p>The profile listed above can be used in the following way:</p>
-
-<pre class="example">
-{
-  "#": { "#profile": "http://example.org/profiles/contacts" },
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">8.2 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an array to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single JSON-LD associative
-array.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-  "@": 
-  [
-    {
-      "@": "&lt;http://example.org/people#john&gt;",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "&lt;http://example.org/people#jane&gt;",
-      "a": "foaf:Person"
-    }
-  ]
-}</pre>
-
-</div>
-
-<div id="the-json-ld-api" class="section">
-<h3><span class="secno">8.3 </span>The JSON-LD API</h3>
-
-<p>This API provides a clean mechanism that enables developers to convert 
-JSON-LD data into a format that is easier to work with in various programming
-languages.
-</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDParser">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDParser</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span>   <span class="idlMethName"><a href="#widl-JSONLDParser-toObject">toObject</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">map</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>RDFGraph</a></span> <span class="idlMethName"><a href="#widl-JSONLDParser-toRDFGraph">toRDFGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-};</span>
-</pre><div id="methods" class="section"><h4><span class="secno">8.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDParser-toObject"><code>toObject</code></dt><dd>Parses JSON-LD text into an object that allows at least attribute-based
-  or key-based access to the data. If the contents are a disjoint graph, an
-  array of objects are returned. If there are any errors, <code>null</code> 
-  is returned.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">The JSON-LD string to parse into the return object.</td></tr><tr><td class="prmName">map</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">The map from IRIs to attribute names for the resulting object. Any
-     term mapping that is not mentioned in the map will not be available in the 
-     resulting object. You <em class="rfc2119" title="may">may</em> map <code>rdf:type</code> using the 
-     <code>a</code> key or the <code>rdf:type</code> IRI. You <em class="rfc2119" title="may">may</em> map the 
-     subject by using the <code>@</code> key.
-     </td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">?</td><td class="prmOptTrue">?</td><td class="prmDesc">An associative-array of processing options to enable or disable when 
-     processing the JSON-LD string. A conforming JSON-LD processor <em class="rfc2119" title="must">must</em> support 
-     the following options:
-     <dl>
-       <dt>indexBySubject</dt>
-       <dd>If set to true, the returned object will be indexed by subject.</dd>
-       <dt>preserveDatatypes</dt>
-       <dd>If set to true, preserves the datatype for object literals.</dd>
-       <dt>preserveLanguage</dt>
-       <dd>If set to true, preserves the languages for object literals.</dd>
-     </dl>
-     </td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a></code></td><td class="prmNullTrue">?</td><td class="prmOptTrue">?</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDParser-toRDFGraph"><code>toRDFGraph</code></dt><dd>Parses JSON-LD and transforms the data into an RDFGraph, which is 
-  compatible with the RDFa API specification. This method will return
-  <code>null</code> if there are any errors, or if the RDFa API is not
-  available for use.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a></code></td><td class="prmNullTrue">?</td><td class="prmOptTrue">?</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>RDFGraph</a></code></div></dd></dl></div>
-
-<p>The JSONLDParserCallback is called whenever a processing error occurs on
-input data.</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDParserCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDParserCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDParserCallback-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre><div id="methods-1" class="section"><h4><span class="secno">8.3.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDParserCallback-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
-
-<p>The following example demonstrates how to convert JSON-LD to a JSON object
-that is directly usable in a programming environment:
-</p>
-
-<pre class="example">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
-              "http://xmlns.com/foaf/0.1/age" : "age",
-              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-
-// Map the JSON-LD to a language-native object
-var person = jsonld.toObject(jsonldString, myMap);
-
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-      "Their homepage is: " + person.homepage);</pre>
-
-<p>A JSON-LD Serializer is also available to map a language-native object
-to JSON-LD.
-
-</p><pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
-};</span>
-</pre><div id="methods-2" class="section"><h4><span class="secno">8.3.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
-  Normalization is important when performing things like equality comparison
-  and digital signature creation and verification.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">An associative array of key-value pairs that should be converted
-     to a JSON-LD string. It is assumed that a map already exists for the
-     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
-
-<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
-
-<p class="issue">This algorithm is very rough, untested, and probably contains
-many bugs. Use at your own risk. It will change in the coming months.</p>
-
-<p>The JSON-LD normalization algorithm is as follows:
-
-</p><ol class="algorithm">
-<li>Remove the <code>#</code> key and preserve it as the 
-<dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
-<li>For each key
- <ol class="algorithm">
-  <li>If the key is a CURIE, expand the CURIE to an IRI using the
-      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-  <li>If the transformed key is an IRI, ensure that it is surrounded by 
-      angle brackets.</li>
- </ol>
-</li>
-<li>For each value
- <ol class="algorithm">
-  <li>If the value should be type coerced per the 
-      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
-      new value.</li>
-  <li>If the value is a CURIE, expand the CURIE to an IRI using the
-      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-  <li>If the value is a Typed Literal and the type is a CURIE,
-      expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-  <li>If the final value is an IRI, ensure that it is surrounded by angle 
-      brackets.</li>
- </ol>
-</li><li>Output each sorted key-value pair without any extraneous whitespace. If 
-the value is an associative array, perform this algorithm, starting
-at step #1, recursively on the sub-tree.</li>
-
-</ol>
-
-<p></p>
-
-<pre class="example">
-var myObj = { "#" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "#types": {
-                   "age" : "xsd:nonNegativeInteger",
-                   "homepage" : "xsd:anyURI" 
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : 42,
-              "homepage" : "http://example.org/people/joe" };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);</pre>
-
-<p>After the code in the example above has executed, the 
-<strong>jsonldText</strong> value will be (line-breaks added for 
-readability):</p>
-
-<pre class="example">
-{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
-"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
-"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe Jackson"}</pre>
-
-<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
-ensure that the normalized value is a string. In order to generate the
-string from a <strong>double</strong> value, output equivalent to the
-<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
-<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
-is the value to be converted.</p>
-
-<p>To convert the a double value in JavaScript, implementers can use the 
-following snippet of code:</p>
-
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
-
-<p class="note">When data needs to be normalized, JSON-LD authors should
-not use values that are going to undergo automatic conversion. This is due
-to the lossy nature of <strong>xsd:double</strong> values.</p>
-
-</div>
-
-</div>
-
-
-
-<div class="appendix section" id="acknowledgements">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>Acknowledgements</h2>
-
-<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
-rationale and reasoning behind the JSON-LD work via his work on RDFj, 
-Dave Longley who reviewed and provided feedback on the overall 
-specification and contexts, and Ian Davis, who created RDF/JSON. Thanks also
-to Bradley P. Allen and Richard Cyganiak for their input on the 
-specification.</p>
-</div>
-
-
-
-
-<div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>26 October 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">http://www.w3.org/TR/2010/WD-rdfa-core-20101026</a> 
-</dd></dl></div></div></body></html>
-
--- a/spec/ED/20110201/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20110507/diff-20110201.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9781 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-
-
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
--
-Linked
-Data
-Expression
-in
-JSON
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-Linked
-Data
-</h2>
-<h2 id="unofficial-draft-07-may-2011">
-Unofficial
-Draft
-<del class="diff-old">01
-February
-</del>
-<ins class="diff-chg">07
-May
-</ins>
-2011
-</h2>
-<dl>
-<dt>
-Editor:
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-</dl>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-Developers
-that
-embed
-structured
-data
-in
-their
-Web
-pages
-can
-choose
-among
-a
-number
-of
-languages
-such
-as
-RDFa
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-],
-Microformats
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
-MICROFORMATS
-</a>
-</cite>
-]
-and
-Microdata
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
-MICRODATA
-</a>
-</cite>
-].
-Each
-of
-these
-structured
-data
-languages,
-while
-incompatible
-at
-the
-syntax
-level,
-can
-be
-easily
-mapped
-to
-RDF.
-JSON
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-format.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-Linked
-Data
-that
-can
-be
-used
-to
-represent
-objects
-specified
-via
-RDFa,
-Microformats
-and
-Microdata.
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-Introduction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-1.2
-</span>
-Contributing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design-goals-and-rationale" class="tocxref">
-<span class="secno">
-2.
-</span>
-Design
-Goals
-and
-Rationale
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals" class="tocxref">
-<span class="secno">
-2.1
-</span>
-Goals
-</a>
-</li>
-<li class="tocline">
-<a href="#map-terms-to-iris" class="tocxref">
-<span class="secno">
-2.2
-</span>
-Map
-Terms
-to
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-context" class="tocxref">
-<span class="secno">
-2.3
-</span>
-The
-<del class="diff-old">Default
-</del>
-<ins class="diff-chg">JSON-LD
-</ins>
-Context
-</a>
-</li>
-<li class="tocline">
-<a href="#unambiguous-identifiers-for-json" class="tocxref">
-<span class="secno">
-2.4
-</span>
-<ins class="diff-new">Unambiguous
-Identifiers
-for
-JSON
-</ins></a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno"><ins class="diff-new">
-2.5
-</ins></span>
-Mashing
-Up
-Vocabularies
-</a>
-</li>
-<li class="tocline">
-<a href="#an-example-of-a-context" class="tocxref">
-<span class="secno">
-<del class="diff-old">2.5
-</del>
-<ins class="diff-chg">2.6
-</ins>
-</span>
-An
-Example
-of
-a
-<del class="diff-old">Default
-</del>
-Context
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-3.
-</span>
-Markup
-Examples
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#rdfa" class="tocxref">
-<span class="secno">
-3.1
-</span>
-RDFa
-</a>
-</li>
-<li class="tocline">
-<a href="#microformats" class="tocxref">
-<span class="secno">
-3.2
-</span>
-Microformats
-</a>
-</li>
-<li class="tocline">
-<a href="#microdata" class="tocxref">
-<span class="secno">
-3.3
-</span>
-Microdata
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-processing-algorithm" class="tocxref">
-<span class="secno">
-4.
-</span>
-The
-JSON-LD
-Processing
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#markup-of-rdf-concepts" class="tocxref">
-<span class="secno">
-5.
-</span>
-Markup
-of
-RDF
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-5.1
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-5.2
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-5.3
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#plain-literals" class="tocxref">
-<span class="secno">
-5.4
-</span>
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#language-specification-in-plain-literals" class="tocxref">
-<span class="secno">
-5.5
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#typed-literals" class="tocxref">
-<span class="secno">
-5.6
-</span>
-Typed
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-5.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-5.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#blank-nodes" class="tocxref">
-<span class="secno">
-5.9
-</span>
-Blank
-Nodes
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-features" class="tocxref">
-<span class="secno">
-6.
-</span>
-Advanced
-Features
-</a>
-<ul class="toc">
-<li class="tocline">
-<del class="diff-old">6.1
-Escape
-Character
-</del>
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Automatic
-Typing
-</a>
-</li>
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.3
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-Type
-Coercion
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#best-practices" class="tocxref">
-<span class="secno">
-7.
-</span>
-Best
-Practices
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#javascript" class="tocxref">
-<span class="secno">
-7.1
-</span>
-JavaScript
-</a>
-</li>
-<li class="tocline">
-<a href="#schema-less-databases" class="tocxref">
-<span class="secno">
-7.2
-</span>
-Schema-less
-Databases
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-8.
-</span>
-Advanced
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#vocabulary-profiles" class="tocxref">
-<span class="secno">
-8.1
-</span>
-Vocabulary
-Profiles
-</a>
-</li>
-<li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-8.2
-</span>
-Disjoint
-Graphs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-api" class="tocxref">
-<span class="secno">
-8.3
-</span>
-The
-JSON-LD
-API
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#methods" class="tocxref">
-<span class="secno">
-8.3.1
-</span>
-Methods
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-1" class="tocxref">
-<span class="secno">
-8.3.2
-</span>
-Methods
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-2" class="tocxref">
-<span class="secno">
-8.3.3
-</span>
-Methods
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-default-context" class="tocxref">
-<span class="secno">
-A.
-</span>
-<ins class="diff-new">The
-Default
-Context
-</ins></a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno"><ins class="diff-new">
-B.
-</ins></span>
-Acknowledgements
-</a>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">C.
-</ins>
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.1
-</del>
-<ins class="diff-chg">C.1
-</ins>
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.2
-</del>
-<ins class="diff-chg">C.2
-</ins>
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<del class="diff-old">Write
-the
-introduction
-once
-all
-of
-the
-technical
-details
-are
-hammered
-out.
-Explain
-why
-</del>
-JSON-LD
-is
-designed
-as
-a
-light-weight
-<del class="diff-old">mechanism
-</del>
-<ins class="diff-chg">syntax
-that
-can
-be
-used
-</ins>
-to
-express
-<del class="diff-old">RDFa,
-Microformats
-and
-Microdata.
-</del>
-<ins class="diff-chg">Linked
-Data.
-</ins>
-It
-is
-primarily
-intended
-<del class="diff-old">as
-</del>
-<ins class="diff-chg">to
-be
-</ins>
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-<del class="diff-old">environments
-as
-well
-as
-a
-way
-to
-pass
-Linked
-Data
-to
-</del>
-and
-<del class="diff-old">from
-</del>
-<ins class="diff-chg">other
-Web-based
-programming
-environments.
-It
-is
-also
-useful
-when
-building
-interoperable
-</ins>
-Web
-<del class="diff-old">services.
-</del>
-<ins class="diff-chg">Services
-and
-when
-storing
-Linked
-Data
-in
-JSON-based
-document
-storage
-engines.
-</ins>
-It
-is
-<ins class="diff-new">practical
-and
-</ins>
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-<del class="diff-old">(and
-understanding)
-</del>
-<ins class="diff-chg">and
-existing
-code
-</ins>
-that
-is
-<del class="diff-old">out
-there
-already.
-</del>
-<ins class="diff-chg">in
-use
-today.
-</ins>
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-Microformats
-data,
-and
-<del class="diff-old">Microdata
-(that
-</del>
-<ins class="diff-chg">Microdata.
-That
-</ins>
-is,
-<ins class="diff-new">it
-supports
-</ins>
-every
-<ins class="diff-new">major
-Web-based
-structured
-</ins>
-data
-model
-<del class="diff-old">currently
-</del>
-in
-<del class="diff-old">use)
-using
-one
-unified
-format.
-</del>
-<ins class="diff-chg">use
-today.
-</ins>
-It
-does
-not
-require
-anyone
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-<del class="diff-old">out-of-band
--
-it
-</del>
-<ins class="diff-chg">out-of-band.
-The
-syntax
-</ins>
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-<del class="diff-old">tiny
-</del>
-<ins class="diff-chg">very
-small
-</ins>
-memory
-footprint
-in
-order
-to
-operate.
-<p>
-</p>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</h3>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-write
-processors
-for
-JSON-LD.
-</li>
-</ul>
-<p>
-To
-understand
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-]
-and
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
-RDF-CONCEPTS
-</a>
-</cite>
-].
-</p>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-1.2
-</span>
-Contributing
-</h3>
-<p>
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</p>
-<ul>
-<li>
-All
-comments
-and
-discussion
-takes
-place
-on
-the
-public
-mailing
-list:
-<del class="diff-old">json-ld@googlegroups.com
-</del>
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
-<ins class="diff-chg">public-linked-json@w3.org
-</ins>
-</a>
-</li>
-<li>
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-<a href="http://github.com/digitalbazaar/json-ld/issues">
-issue
-tracker
-</a>.
-</li>
-<li>
-<a href="http://github.com/digitalbazaar/json-ld">
-Source
-code
-</a>
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</li>
-<li>
-The
-<a href="http://webchat.freenode.net/?channels=#json-ld">
-#json-ld
-</a>
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</li>
-</ul>
-</div>
-</div>
-<div id="design-goals-and-rationale" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Design
-Goals
-and
-Rationale
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="goals" class="section">
-<h3>
-<span class="secno">
-2.1
-</span>
-Goals
-</h3>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-don't
-need
-to
-know
-RDF
-in
-order
-to
-use
-the
-basic
-functionality
-provided
-by
-JSON-LD.
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-should
-be
-100%
-compatible
-with
-JSON.
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-All
-major
-RDF
-concepts
-must
-be
-expressible
-via
-the
-JSON-LD
-syntax.
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-readable.
-</dd>
-<dt>
-Zero
-<del class="diff-old">Edits
-</del>
-<ins class="diff-chg">Edits,
-most
-of
-the
-time
-</ins>
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-<ins class="diff-new">At
-times,
-mapping
-JSON
-to
-RDF
-can
-become
-difficult
--
-in
-these
-instances,
-rather
-than
-having
-JSON-LD
-support
-esoteric
-markup,
-we
-chose
-not
-to
-support
-the
-use
-case
-and
-support
-a
-simplified
-syntax
-instead.
-So,
-while
-we
-strive
-for
-Zero
-Edits,
-it
-was
-not
-always
-possible
-without
-adding
-great
-complexity
-to
-the
-language.
-</ins>
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<div id="map-terms-to-iris" class="section">
-<h3>
-<span class="secno">
-2.2
-</span>
-Map
-Terms
-to
-IRIs
-</h3>
-<p>
-Establishing
-a
-mechanism
-to
-map
-JSON
-values
-to
-IRIs
-will
-help
-in
-the
-mapping
-of
-JSON
-objects
-to
-RDF.
-This
-does
-not
-mean
-that
-JSON-LD
-must
-be
-restrictive
-in
-declaring
-a
-set
-of
-terms,
-rather,
-experimentation
-and
-innovation
-should
-be
-supported
-as
-part
-of
-the
-core
-design
-of
-JSON-LD.
-There
-are,
-however,
-a
-number
-of
-very
-small
-design
-<del class="diff-old">criterial
-</del>
-<ins class="diff-chg">criteria
-</ins>
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-RDF
-data
-that
-will
-create
-value
-for
-the
-greater
-semantic
-web
-community
-and
-JSON/REST-based
-Web
-Services
-community.
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-object
-as
-the
-example
-for
-this
-section:
-</p>
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-<ins class="diff-new">  "avatar": "http://twitter.com/account/profile_image/manusporny"
-</ins>
-}
-</pre>
-</div>
-<div id="the-json-ld-context" class="section">
-<h3>
-<span class="secno">
-2.3
-</span>
-The
-<del class="diff-old">Default
-</del>
-<ins class="diff-chg">JSON-LD
-</ins>
-Context
-</h3>
-<p>
-A
-<del class="diff-old">default
-</del>
-context
-is
-used
-in
-RDFa
-to
-allow
-developers
-to
-use
-<del class="diff-old">keywords
-as
-</del>
-aliases
-for
-IRIs.
-<del class="diff-old">So,
-for
-instance,
-the
-keyword
-name
-above
-could
-refer
-to
-the
-IRI
-http://xmlns.com/foaf/0.1/name
-.
-</del>
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-terms
-mean
-something,
-which
-you
-will
-eventually
-want
-to
-query.
-The
-semantic
-web
-specifies
-this
-via
-<em>
-Vocabulary
-Documents
-</em>.
-The
-IRI
-<em>
-http://xmlns.com/foaf/0.1/
-</em>
-specifies
-a
-Vocabulary
-Document,
-and
-<strong>
-name
-</strong>
-is
-a
-term
-in
-that
-vocabulary.
-<del class="diff-old">Paste
-</del>
-<ins class="diff-chg">Join
-</ins>
-the
-two
-items
-together
-and
-you
-have
-an
-unambiguous
-identifier
-for
-a
-<ins class="diff-new">vocabulary
-</ins>
-term.
-<ins class="diff-new">The
-Compact
-URI
-Expression,
-or
-short-form,
-is
-</ins><code><ins class="diff-new">
-foaf:name
-</ins></code><ins class="diff-new">
-and
-the
-expanded-form
-is
-</ins><code><ins class="diff-new">
-http://xmlns.com/foaf/0.1/name
-</ins></code>.<ins class="diff-new">
-This
-vocabulary
-term
-identifies
-the
-given
-name
-for
-something,
-for
-example
--
-a
-person's
-name.
-</ins>
-</p>
-<p>
-Developers,
-and
-machines,
-would
-be
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-Machines
-need
-the
-same
-sort
-of
-dictionary
-of
-terms,
-and
-URIs
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-<del class="diff-old">Non-prefixed
-terms
-should
-have
-term
-mappings
-declared
-in
-the
-default
-</del>
-<ins class="diff-chg">The
-</ins>
-context
-<del class="diff-old">so
-</del>
-<ins class="diff-chg">provides
-a
-collection
-of
-vocabulary
-terms
-</ins>
-that
-<del class="diff-old">they
-may
-</del>
-<ins class="diff-chg">can
-</ins>
-be
-<del class="diff-old">expanded
-later.
-</del>
-<ins class="diff-chg">used
-for
-a
-JSON
-object.
-</ins>
-</p>
-</div>
-<div id="unambiguous-identifiers-for-json" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">2.4
-</ins></span><ins class="diff-new">
-Unambiguous
-Identifiers
-for
-JSON
-</ins></h3>
-<p>
-If
-a
-set
-of
-terms,
-like
-<strong>
-Person
-</strong>,
-<strong>
-name
-</strong>,
-and
-<strong>
-homepage
-</strong>,
-are
-<del class="diff-old">pre-defined
-</del>
-<ins class="diff-chg">defined
-</ins>
-in
-<del class="diff-old">the
-default
-</del>
-<ins class="diff-chg">a
-</ins>
-context,
-and
-that
-context
-is
-used
-to
-resolve
-the
-names
-in
-JSON
-objects,
-machines
-could
-automatically
-expand
-the
-terms
-to
-something
-meaningful
-and
-unambiguous,
-like
-this:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "",
-</del>
-<ins class="diff-chg">  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-</ins>
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-<del class="diff-old">  ""
-</del>
-<ins class="diff-chg">  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-</ins>
-}
-</pre>
-<del class="diff-old">In
-order
-to
-differentiate
-between
-plain
-text
-and
-IRIs,
-the
-&lt;
-&gt;
-are
-used
-around
-IRIs.
-</del>
-<p>
-Doing
-this
-would
-mean
-that
-JSON
-would
-start
-to
-become
-unambiguously
-machine-readable,
-play
-well
-with
-the
-semantic
-web,
-and
-basic
-markup
-wouldn't
-be
-that
-much
-more
-complex
-than
-basic
-JSON
-markup.
-A
-win,
-all
-around.
-</p>
-</div>
-<div id="mashing-up-vocabularies" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">2.4
-</del>
-<ins class="diff-chg">2.5
-</ins>
-</span>
-Mashing
-Up
-Vocabularies
-</h3>
-<p>
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</p>
-<ul>
-<li>
-<ins class="diff-new">RDF
--
-for
-describing
-information
-about
-objects
-on
-the
-semantic
-web.
-</ins></li><li><ins class="diff-new">
-RDFS
--
-for
-expressing
-things
-like
-labels
-and
-comments.
-</ins></li><li>
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</li>
-<li>
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</li>
-<li>
-FOAF
--
-for
-describing
-social
-networks.
-</li>
-<li>
-Calendar
--
-for
-specifying
-events.
-</li>
-<li>
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</li>
-<li>
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</li>
-<li>
-GEO
--
-for
-describing
-geographic
-location.
-</li>
-<li>
-VCard
--
-for
-describing
-organizations
-and
-people.
-</li>
-<li>
-DOAP
--
-for
-describing
-projects.
-</li>
-</ul>
-<p>
-<del class="diff-old">A
-JSON-LD
-Web
-Service
-could
-define
-</del>
-<ins class="diff-chg">Since
-</ins>
-these
-<del class="diff-old">as
-prefix
-es
-</del>
-<ins class="diff-chg">vocabularies
-are
-very
-popular,
-they
-are
-pre-defined
-</ins>
-in
-<del class="diff-old">their
-</del>
-<ins class="diff-chg">something
-called
-the
-</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
-default
-context
-<del class="diff-old">beside
-the
-terms
-</del>
-</a>,
-<ins class="diff-chg">which
-is
-a
-set
-of
-vocabulary
-prefixes
-</ins>
-that
-are
-<del class="diff-old">already
-defined.
-Using
-</del>
-<ins class="diff-chg">pre-loaded
-in
-all
-JSON-LD
-processors.
-The
-contents
-of
-the
-</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-chg">
-default
-context
-</ins></a><ins class="diff-chg">
-are
-provided
-later
-in
-</ins>
-this
-<del class="diff-old">feature,
-</del>
-<ins class="diff-chg">document.
-Using
-the
-</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-chg">
-default
-context
-</ins></a><ins class="diff-chg">
-allows
-</ins>
-developers
-<del class="diff-old">could
-also
-</del>
-<ins class="diff-chg">to
-</ins>
-express
-<del class="diff-old">markup
-</del>
-<ins class="diff-chg">data
-unambiguously,
-</ins>
-like
-<del class="diff-old">this:
-</del>
-<ins class="diff-chg">so:
-</ins>
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "",
-</del>
-<ins class="diff-chg">  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-</ins>
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-<del class="diff-old">  ",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"
-</del>
-<ins class="diff-chg">  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-</ins>
-}
-</pre>
-<p>
-Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-default
-context
-in-line
-using
-the
-<code>
-<del class="diff-old">#
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
-<del class="diff-old">character,
-</del>
-<ins class="diff-chg">keyword,
-</ins>
-like
-so:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  ,
-  "a": "&lt;foaf:Person&gt;",
-</del>
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-<ins class="diff-chg">  "a": "foaf:Person",
-</ins>
-  "foaf:name": "Manu Sporny",
-<del class="diff-old">  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
-  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;",
-  "myvocab:credits": 500
-</del>
-<ins class="diff-chg">  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-</ins>
-}
-</pre>
-<p>
-<del class="diff-old">Think
-of
-the
-</del>
-<ins class="diff-chg">The
-</ins>
-<code>
-<del class="diff-old">#
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
-<del class="diff-old">character
-as
-a
-"
-hash
-table",
-which
-maps
-</del>
-<ins class="diff-chg">keyword
-is
-used
-to
-change
-how
-the
-JSON-LD
-processor
-evaluates
-key-value
-pairs.
-In
-this
-case,
-it
-was
-used
-to
-map
-</ins>
-one
-string
-<ins class="diff-new">('myvocab')
-</ins>
-to
-another
-<del class="diff-old">string.
-</del>
-<ins class="diff-chg">string,
-which
-is
-interpreted
-as
-a
-IRI.
-</ins>
-In
-the
-example
-above,
-the
-<code>
-myvocab
-</code>
-string
-is
-replaced
-with
-"
-<code>
-http://example.org/myvocab#
-</code>
-"
-when
-it
-is
-<del class="diff-old">detected
-above.
-</del>
-<ins class="diff-chg">detected.
-</ins>
-In
-the
-example
-above,
-"
-<code>
-<del class="diff-old">myvocab:credits
-</del>
-<ins class="diff-chg">myvocab:personality
-</ins>
-</code>
-"
-would
-expand
-to
-"
-<code>
-<del class="diff-old">http://example.org/myvocab#credits
-</del>
-<ins class="diff-chg">http://example.org/myvocab#personality
-</ins>
-</code>
-".
-</p>
-<p>
-This
-mechanism
-is
-a
-short-hand
-for
-RDF,
-<ins class="diff-new">called
-a
-CURIE,
-</ins>
-and
-<del class="diff-old">if
-defined,
-will
-give
-</del>
-<ins class="diff-chg">provides
-</ins>
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</p>
-<p>
-</p>
-</div>
-<div id="an-example-of-a-context" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">2.5
-</del>
-<ins class="diff-chg">2.6
-</ins>
-</span>
-An
-Example
-of
-a
-<del class="diff-old">Default
-</del>
-Context
-</h3>
-<p>
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-A
-JSON-LD
-aware
-Web
-Service
-<em class="rfc2119" title="may">
-may
-</em>
-define
-a
-<del class="diff-old">default
-</del>
-<ins class="diff-chg">known
-</ins>
-context.
-For
-example,
-the
-following
-default
-context
-could
-apply
-to
-all
-incoming
-Web
-Service
-calls
-previously
-accepting
-only
-JSON
-data:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "#": 
-</del>
-<ins class="diff-chg">  "@context": 
-</ins>
-  {
-<del class="diff-old">    "#vocab": "http://example.org/default-vocab#",
-    "#base": "http://example.org/baseurl/",
-</del>
-<ins class="diff-chg">    "@vocab": "http://example.org/default-vocab#",
-    "@base": "http://example.org/baseurl/",
-</ins>
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-<ins class="diff-new">    "@coerce": 
-    {
-      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-</ins>
-  }
-}
-</pre>
-<p>
-The
-<code>
-<del class="diff-old">#vocab
-</del>
-<ins class="diff-chg">@vocab
-</ins>
-</code>
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-term
-that
-doesn't
-resolve
-to
-a
-term
-or
-a
-prefix
-should
-be
-appended
-to
-the
-<code>
-<del class="diff-old">#vocab
-</del>
-<ins class="diff-chg">@vocab
-</ins>
-</code>
-IRI.
-This
-is
-done
-to
-ensure
-that
-terms
-can
-be
-transformed
-to
-an
-IRI
-at
-all
-times.
-</p>
-<p>
-The
-<code>
-<del class="diff-old">#base
-</del>
-<ins class="diff-chg">@base
-</ins>
-</code>
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-relative
-IRI
-<em class="rfc2119" title="must">
-must
-</em>
-be
-appended
-to
-the
-string
-specified
-by
-<code>
-<del class="diff-old">#base
-</del>
-<ins class="diff-chg">@base
-</ins></code>.</p><p><ins class="diff-chg">
-The
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-keyword
-is
-used
-to
-specify
-type
-coersion
-rules
-for
-the
-data.
-For
-each
-key
-in
-the
-map,
-the
-key
-is
-the
-type
-to
-be
-coerced
-to
-and
-the
-value
-is
-the
-vocabulary
-term
-to
-be
-coerced.
-Type
-coersion
-for
-the
-key
-</ins><code><ins class="diff-chg">
-xsd:anyURI
-</ins></code><ins class="diff-chg">
-asserts
-that
-all
-vocabulary
-terms
-listed
-should
-undergo
-coercion
-to
-an
-IRI,
-including
-</ins><code><ins class="diff-chg">
-@base
-</ins></code><ins class="diff-chg">
-processing
-for
-relative
-IRIs
-and
-CURIE
-processing
-for
-compact
-URI
-Expressions
-like
-</ins><code><ins class="diff-chg">
-foaf:homepage
-</ins>
-</code>.
-</p>
-</div>
-</div>
-<div id="markup-examples" class="section">
-<h2>
-<span class="secno">
-3.
-</span>
-Markup
-Examples
-</h2>
-<p>
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</p>
-<div id="rdfa" class="section">
-<h3>
-<span class="secno">
-3.1
-</span>
-RDFa
-</h3>
-<p>
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</p>
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</pre>
-<p>
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</p>
-<pre class="example">
-[
- {
-<del class="diff-old">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-</del>
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-<del class="diff-old">   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
-</del>
-<ins class="diff-chg">   "foaf:homepage": "http://example.com/bob/",
-</ins>
-   "foaf:name": "Bob"
- },
- {
-<del class="diff-old">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-</del>
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-<del class="diff-old">   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
-</del>
-<ins class="diff-chg">   "foaf:homepage": "http://example.com/eve/",
-</ins>
-   "foaf:name": "Eve"
- },
- {
-<del class="diff-old">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-</del>
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-<del class="diff-old">   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
-</del>
-<ins class="diff-chg">   "foaf:homepage": "http://example.com/manu/",
-</ins>
-   "foaf:name": "Manu"
- }
-]
-</pre>
-</div>
-<div id="microformats" class="section">
-<h3>
-<span class="secno">
-3.2
-</span>
-Microformats
-</h3>
-<p>
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</p>
-<pre class="example">
-&lt;div class="vcard"&gt;
-<del class="diff-old"> &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-</del>
-<ins class="diff-chg"> &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-</ins>
-&lt;/div&gt;
-</pre>
-<p>
-The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-<code>
-url
-</code>
-and
-<code>
-fn
-</code>
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-<code>
-http://tantek.com
-</code>.
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "#": 
-</del>
-<ins class="diff-chg">  "@context": 
-</ins>
-  {
-<del class="diff-old">    "vcard": "http://microformats.org/profile/hcard#vcard"
-    "url": "http://microformats.org/profile/hcard#url"
-    "fn": "http://microformats.org/profile/hcard#fn"
-</del>
-<ins class="diff-chg">    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-</ins>
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-<del class="diff-old">  "url": "&lt;http://tantek.com/&gt;",
-  "fn": "Tantek Çelik"
-</del>
-<ins class="diff-chg">  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-</ins>
-}
-</pre>
-</div>
-<div id="microdata" class="section">
-<h3>
-<span class="secno">
-3.3
-</span>
-Microdata
-</h3>
-<p>
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</p>
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</pre>
-<p>
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</p>
-<pre class="example">
-[
-  {
-<del class="diff-old">    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
-</del>
-<ins class="diff-chg">    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-</ins>
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-<del class="diff-old">      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
-</del>
-<ins class="diff-chg">      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-</ins>
-  },
-  {
-<del class="diff-old">    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
-    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
-    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
-</del>
-<ins class="diff-chg">    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-</ins>
-  },
-  {
-<del class="diff-old">    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
-</del>
-<ins class="diff-chg">    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-</ins>
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-<del class="diff-old">    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
-</del>
-<ins class="diff-chg">    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-</ins>
-  }
-]
-</pre>
-</div>
-</div>
-<div id="the-json-ld-processing-algorithm" class="section">
-<h2>
-<span class="secno">
-4.
-</span>
-The
-JSON-LD
-Processing
-Algorithm
-</h2>
-<p>
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</p>
-<p class="issue">
-The
-Processing
-Algorithm
-is
-a
-work
-in
-progress,
-there
-are
-still
-major
-bugs
-in
-the
-algorithm
-and
-it's
-difficult
-to
-follow.
-It's
-provided
-only
-to
-very
-early
-implementers
-to
-give
-them
-an
-idea
-of
-how
-to
-implement
-a
-processor.
-</p>
-<h4 id="processing-algorithm-terms">
-Processing
-Algorithm
-Terms
-</h4>
-<ul>
-<li>
-<dfn title="default_context" id="dfn-default_context">
-default
-context
-</dfn>
--
-a
-context
-that
-is
-specified
-to
-the
-JSON-LD
-processing
-algorithm
-before
-processing
-begins.
-</li>
-<li>
-<dfn title="default_graph" id="dfn-default_graph">
-default
-graph
-</dfn>
--
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</li>
-<li>
-<dfn title="active_subject" id="dfn-active_subject">
-active
-subject
-</dfn>
--
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="inherited_subject" id="dfn-inherited_subject">
-inherited
-subject
-</dfn>
--
-a
-subject
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-<a class="tref" title="current_subject">
-current
-subject
-</a>
-is
-discovered
-or
-generated.
-</li>
-<li>
-<dfn title="active_property" id="dfn-active_property">
-active
-property
-</dfn>
--
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="inherited_property" id="dfn-inherited_property">
-inherited
-property
-</dfn>
--
-a
-property
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-<a class="tref" title="current_subject">
-current
-subject
-</a>
-is
-discovered
-or
-generated.
-</li>
-<li>
-<dfn title="active_object" id="dfn-active_object">
-active
-object
-</dfn>
--
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</li>
-<li>
-<dfn title="active_context" id="dfn-active_context">
-active
-context
-</dfn>
--
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-the
-top-most
-item
-on
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-</li>
-<li>
-<dfn title="local_context" id="dfn-local_context">
-local
-context
-</dfn>
--
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-<code>
-<del class="diff-old">#
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
-<del class="diff-old">key.
-</del>
-<ins class="diff-chg">keyword.
-</ins>
-</li>
-<li>
-<dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</dfn>
--
-A
-list
-of
-triples
-that
-have
-yet
-to
-have
-their
-subject
-set.
-</li>
-<li>
-<dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</dfn>
--
-A
-list
-of
-objects
-that
-cannot
-be
-processed
-until
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-detected
-or
-the
-end
-of
-the
-current
-associative-array
-is
-detected.
-</li>
-<li>
-<dfn title="processor_state" id="dfn-processor_state">
-processor
-state
-</dfn>
--
-the
-processor
-state,
-which
-includes
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack,
-<a class="tref" title="current_subject">
-current
-subject
-</a>,
-<a class="tref" title="current_property">
-current
-property
-</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</a>,
-and
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>.
-</li>
-</ul>
-<h4 id="processing-tokens-and-keywords">
-Processing
-Tokens
-and
-Keywords
-</h4>
-<ul>
-<li>
-<code>
-<del class="diff-old">#
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
--
-Used
-to
-set
-the
-active
-context.
-</li>
-<li>
-<code>
-<del class="diff-old">#base
-</del>
-<ins class="diff-chg">@base
-</ins>
-</code>
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-active
-context.
-</li>
-<li>
-<code>
-<del class="diff-old">#vocab
-</del>
-<ins class="diff-chg">@vocab
-</ins>
-</code>
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-active
-context.
-</li>
-<li>
-<code>
-<del class="diff-old">#types
-</del>
-<ins class="diff-chg">@coerce
-</ins>
-</code>
--
-Used
-to
-specify
-type
-<del class="diff-old">coercion.
-</del>
-<ins class="diff-chg">coercion
-rules.
-</ins>
-</li>
-<li>
-<code>
-<ins class="diff-new">@literal
-</ins></code><ins class="diff-new">
--
-Used
-to
-specify
-a
-literal
-value.
-</ins></li><li>
-<del class="diff-old">&lt;
-&gt;
-</del>
-<code>
-<ins class="diff-chg">@iri
-</ins></code><ins class="diff-chg">
--
-Used
-to
-specify
-an
-IRI
-value.
-</ins></li><li>
-<code>
-<ins class="diff-new">@language
-</ins>
-</code>
--
-Used
-to
-<del class="diff-old">express
-IRIs
-in
-JSON
-values.
-</del>
-<ins class="diff-chg">specify
-the
-language
-for
-a
-literal.
-</ins></li><li><code><ins class="diff-chg">
-@datatype
-</ins></code><ins class="diff-chg">
--
-Used
-to
-specify
-the
-datatype
-for
-a
-literal.
-</ins>
-</li>
-<li>
-<code>:
-</code>
--
-The
-separator
-for
-CURIEs
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-</li>
-<li>
-<code>
-@
-</code>
--
-Sets
-the
-active
-subjects.
-</li>
-<li>
-<code>
-a
-</code>
--
-Used
-to
-set
-the
-rdf:type
-of
-the
-active
-subjects.
-</li>
-<del class="diff-old">\
--
-Used
-as
-an
-escape
-character
-to
-escape
-all
-the
-special
-tokens
-and
-keywords.
-^^
--
-Used
-to
-express
-the
-data
-type
-for
-Typed
-Literals.
-</del>
-</ul>
-<p>
-The
-algorithm
-below
-is
-designed
-for
-streaming
-(SAX-based)
-implementations.
-Implementers
-will
-find
-that
-non-streaming
-(document-based)
-implementations
-will
-be
-much
-easier
-to
-implement
-as
-full
-access
-to
-the
-JSON
-object
-model
-eliminates
-some
-of
-the
-steps
-that
-are
-necessary
-for
-streaming
-implementations.
-A
-conforming
-JSON-LD
-processor
-<em class="rfc2119" title="must">
-must
-</em>
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>
-that
-the
-following
-algorithm
-generates:
-</p>
-<ol class="algorithm">
-<li id="processing-step-default-context">
-<del class="diff-old">If
-a
-</del>
-<ins class="diff-chg">Push
-the
-</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
-default
-context
-</a>
-<del class="diff-old">is
-supplied
-to
-the
-processing
-algorithm,
-push
-it
-</del>
-onto
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-</li>
-<li id="processing-step-associative">
-If
-an
-associative
-array
-is
-detected,
-create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-Copy
-the
-<a class="tref" title="current_context">
-current
-context
-</a>
-stack
-to
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-Push
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-onto
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-'s
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-stack.
-For
-each
-key-value
-pair
-in
-the
-associative
-array,
-using
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-do
-the
-following:
-<ol class="algorithm">
-<li>
-If
-a
-<code>
-<del class="diff-old">#
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
-<del class="diff-old">key
-</del>
-<ins class="diff-chg">keyword
-</ins>
-is
-found,
-the
-processor
-merges
-each
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-overwriting
-any
-duplicate
-values
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-<ins class="diff-new">If
-the
-</ins><code><ins class="diff-new">
-@coerce
-</ins></code><ins class="diff-new">
-key
-is
-found,
-the
-processor
-merges
-each
-key-value
-pair
-in
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
-local
-context
-</ins></a><ins class="diff-new">
-'s
-</ins><code><ins class="diff-new">
-@coerce
-</ins></code><ins class="diff-new">
-mapping
-into
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-'s
-</ins><code><ins class="diff-new">
-@coerce
-</ins></code><ins class="diff-new">
-mapping,
-overwriting
-any
-duplicate
-values
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-'s
-</ins><code><ins class="diff-new">
-@coerce
-</ins></code><ins class="diff-new">
-mapping.
-</ins>
-Process
-each
-object
-in
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>,
-starting
-at
-<a href="#processing-subject">
-Step
-2.2
-</a>.
-</li>
-<li id="processing-associative">
-If
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-has
-not
-been
-detected,
-the
-current
-key-value
-pair
-is
-placed
-into
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>
-and
-processing
-proceeds
-to
-the
-next
-key-value
-pair.
-Otherwise,
-if
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-known
-perform
-the
-following
-steps:
-</li>
-<ol class="algorithm">
-<li id="processing-subject">
-If
-a
-<code>
-@
-</code>
-key
-is
-found,
-the
-processor
-sets
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-value
-after
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-has
-been
-performed.
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-and
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-values
-are
-specified,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-for
-the
-subject,
-the
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-for
-the
-property,
-and
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-for
-the
-object.
-</li>
-<li>
-If
-there
-are
-any
-triples
-in
-the
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
-list
-of
-incomplete
-triples
-</a>,
-complete
-each
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-as
-the
-subject
-for
-each
-triple.
-</li>
-</ol>
-</li>
-<li>
-If
-an
-<code>
-a
-</code>
-key
-is
-found,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-<code>
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type
-</code>.
-</li>
-<li>
-If
-a
-key
-that
-is
-not
-<code>
-<del class="diff-old">#
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>,
-<code>
-@
-</code>,
-or
-<code>
-a
-<del class="diff-old">is
-found,
-</del>
-</code>,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Property
-Processing
-</a>
-on
-the
-key.
-</li>
-<li>
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-an
-associative
-array,
-then
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-then
-process
-the
-value
-starting
-at
-<a href="#processing-step-array">
-Step
-3
-</a>
-ensuring
-that
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-are
-copied
-to
-a
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-<li>
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-was
-not
-discovered,
-then:
-<ol class="algorithm">
-<li>
-Generate
-a
-<a class="tref" title="blank_node_identifier">
-blank
-node
-identifier
-</a>
-and
-set
-it
-as
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>.
-</li>
-<li>
-Complete
-any
-previously
-incomplete
-triples
-by
-running
-all
-substeps
-of
-<a href="#processing-subject">
-Step
-2.2.1
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-was
-not
-discovered,
-then
-assume
-that
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-unmodified
-and
-run
-all
-substeps
-of
-<a href="#processing-associative">
-Step
-2.2
-</a>
-on
-the
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
-list
-of
-unprocessed
-items
-</a>.
-</li>
-</ol>
-</ol>
-</li>
-<li id="processing-step-array">
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-an
-associative
-array,
-processes
-per
-<a href="#processing-step-associative">
-Step
-2
-</a>,
-ensuring
-to
-set
-the
-<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
-inherited
-subject
-</a>
-to
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-the
-<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
-inherited
-property
-</a>
-to
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-in
-the
-newly
-created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#markup-of-rdf-concepts">
-Object
-Processing
-</a>
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-and
-place
-it
-into
-the
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-Processing?
-<div class="issue">
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-generation
-of
-triples?
-For
-example,
-would
-implementing
-this
-be
-worth
-the
-more
-complex
-processing
-rules:
-"ex:orderedItems"
-:
-[["one",
-"two",
-"three"]]
-</div>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<div id="markup-of-rdf-concepts" class="section">
-<h2>
-<span class="secno">
-5.
-</span>
-Markup
-of
-RDF
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-most
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-Javascript
-objects
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-Since
-RDF
-is
-also
-an
-important
-sub-community
-of
-the
-Linked
-Data
-movement,
-it
-is
-important
-that
-all
-RDF
-concepts
-are
-well-represented
-in
-this
-specification.
-This
-section
-details
-how
-each
-RDF
-concept
-can
-be
-expressed
-in
-JSON-LD.
-</p>
-<del class="diff-old">The
-current
-specification
-relies
-on
-microsyntaxes
-to
-express
-things
-like
-IRIs,
-typed
-literals
-and
-CURIEs.
-There
-is
-a
-small
-amount
-of
-debate
-on
-whether
-or
-not
-to
-use
-full-blown
-JSON
-objects
-containing
-things
-like
-"value"
-and
-"datatype".
-The
-original
-authors
-of
-the
-JSON-LD
-specification
-feel
-that
-microsyntaxes
-allow
-a
-much
-simpler,
-less
-error-prone
-structure
-in
-the
-JSON-LD
-objects.
-Proponents
-of
-the
-verbose
-mechanism
-assert
-that
-there
-would
-be
-less
-chance
-of
-data
-markup
-issues
-concerning
-proper
-escaping
-and
-that
-the
-objects,
-while
-more
-verbose,
-would
-be
-easier
-to
-work
-with
-within
-JavaScript
-environments.
-Feedback
-on
-this
-issue
-would
-be
-appreciated.
-</del>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-5.1
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-subjects
-and
-many
-objects
-are
-identified.
-IRIs
-can
-be
-expressed
-<del class="diff-old">by
-wrapping
-</del>
-<ins class="diff-chg">in
-</ins>
-a
-<del class="diff-old">text
-string
-with
-the
-&lt;
-&gt;
-characters.
-</del>
-<ins class="diff-chg">variety
-of
-different
-ways
-in
-JSON-LD.
-</ins>
-</p>
-<del class="diff-old">{
-...
-  "foaf:homepage": "",
-...
-}
-The
-example
-above
-would
-set
-the
-object
-to
-</del>
-<ol>
-<li>
-<ins class="diff-chg">In
-general,
-</ins>
-an
-IRI
-<del class="diff-old">with
-</del>
-<ins class="diff-chg">is
-generated
-if
-it
-is
-in
-</ins>
-the
-<del class="diff-old">value
-of
-http://manu.sporny.org
-.
-As
-a
-general
-rule,
-all
-CURIEs
-and
-IRIs
-may
-be
-wrapped
-</del>
-<ins class="diff-chg">key
-position
-in
-an
-associative
-array.
-There
-are
-special
-rules
-for
-processing
-keys
-</ins>
-in
-<code>
-<del class="diff-old">&lt;
-&gt;
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
-<del class="diff-old">characters.
-This
-is
-to
-ensure
-that
-there
-is
-a
-simple,
-consistent
-rule
-that
-can
-be
-followed
-</del>
-<ins class="diff-chg">and
-</ins>
-when
-<del class="diff-old">authoring
-JSON-LD
-data.
-There
-are,
-however,
-several
-instances
-where
-angle
-brackets
-may
-be
-omitted,
-without
-introducing
-ambiguity,
-to
-ease
-authoring
-burden.
-These
-instances
-are:
-When
-specifying
-</del>
-<ins class="diff-chg">dealing
-with
-keys
-that
-start
-with
-</ins>
-the
-<del class="diff-old">subject
-</del>
-<code>
-<ins class="diff-chg">@
-</ins></code><ins class="diff-chg">
-character.
-</ins></li><li><ins class="diff-chg">
-An
-</ins>
-IRI
-<ins class="diff-new">is
-generated
-for
-the
-value
-specified
-</ins>
-using
-<code>
-@
-<del class="diff-old">.
-</del>
-</code>,
-<ins class="diff-chg">if
-it
-is
-a
-string.
-</ins>
-</li>
-<li>
-<del class="diff-old">When
-specifying
-the
-RDF
-type
-</del>
-<ins class="diff-chg">An
-</ins>
-IRI
-<ins class="diff-new">is
-generated
-for
-the
-value
-specified
-</ins>
-using
-<code>
-a
-</code>.
-</li>
-<li>
-<del class="diff-old">Any
-CURIE
-in
-</del>
-<ins class="diff-chg">An
-IRI
-is
-generated
-for
-</ins>
-the
-<del class="diff-old">key
-portion
-of
-a
-JSON
-associative
-array.
-Wrapping
-IRIs
-with
-</del>
-<ins class="diff-chg">value
-specified
-using
-</ins>
-the
-<code>
-<del class="diff-old">&lt;
-&gt;
-</del>
-<ins class="diff-chg">@iri
-</ins>
-</code>
-<del class="diff-old">characters
-are
-only
-mandatory
-</del>
-<ins class="diff-chg">keyword.
-</ins></li><li><ins class="diff-chg">
-An
-IRI
-is
-generated
-</ins>
-when
-<del class="diff-old">IRIs
-</del>
-<ins class="diff-chg">there
-</ins>
-are
-<del class="diff-old">specified
-as
-values
-</del>
-<code>
-<ins class="diff-chg">@coerce
-</ins></code><ins class="diff-chg">
-rules
-</ins>
-in
-<del class="diff-old">the
-JSON
-key-value
-pairs.
-</del>
-<ins class="diff-chg">effect
-for
-</ins><code><ins class="diff-chg">
-xsd:anyURI
-</ins></code><ins class="diff-chg">
-for
-a
-particular
-vocabulary
-term.
-</ins></li></ol>
-<p>
-<ins class="diff-chg">An
-example
-of
-IRI
-generation
-for
-a
-key
-outside
-of
-a
-</ins><code><ins class="diff-chg">
-@context
-</ins></code>:
-</p>
-<pre class="example">
-<ins class="diff-new">{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}
-</ins></pre>
-<p>
-<del class="diff-old">To
-further
-illustrate,
-</del>
-<ins class="diff-chg">In
-</ins>
-the
-<del class="diff-old">following
-</del>
-example
-<del class="diff-old">omissions
-of
-</del>
-<ins class="diff-chg">above,
-</ins>
-the
-<ins class="diff-new">key
-</ins>
-<code>
-<del class="diff-old">&lt;
-&gt;
-</del>
-<ins class="diff-chg">http://xmlns.com/foaf/0.1/name
-</ins>
-</code>
-<del class="diff-old">characters
-are
-allowed:
-</del>
-<ins class="diff-chg">is
-interpreted
-as
-an
-IRI,
-as
-opposed
-to
-being
-interpreted
-as
-a
-string..
-</ins></p><p><ins class="diff-chg">
-CURIE
-expansion
-also
-occurs
-for
-keys
-in
-JSON-LD:
-</ins>
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "@": "",
-  // CURIE/IRI when specifying the subject can be minimized.
-  "@": "http://manu.sporny.org/about#manu",
-</del>
-<ins class="diff-chg">  "<span class="diff">foaf:name</span>": "Manu Sporny",
-</ins>
-...
-<del class="diff-old">  "a": "",
-  // CURIE/IRI when specifying the type of an object can be minimized.
-  "a": "foaf:Person",
-</del>
-<ins class="diff-chg">}
-</ins></pre><p><code><ins class="diff-chg">
-foaf:name
-</ins></code><ins class="diff-chg">
-above
-will
-automatically
-expand
-out
-to
-the
-IRI
-</ins><code><ins class="diff-chg">
-http://xmlns.com/foaf/0.1/name
-</ins></code>.</p><p><ins class="diff-chg">
-An
-IRI
-is
-generated
-when
-a
-value
-is
-associated
-with
-a
-key
-using
-the
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code><ins class="diff-chg">
-keyword:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-</ins>
-...
-<del class="diff-old">  "": "&lt;http://manu.sporny.org&gt;",
-  // CURIE/IRI when specifying a property can be minimized.
-  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
-</del>
-<ins class="diff-chg">  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-</ins>
-...
-}
-</pre>
-<p>
-<del class="diff-old">At
-all
-other
-times,
-CURIEs
-and
-IRIs
-must
-be
-wrapped
-with
-</del>
-<ins class="diff-chg">If
-type
-coercion
-rules
-are
-specified
-in
-</ins>
-the
-<code>
-<del class="diff-old">&lt;
-&gt;
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
-<del class="diff-old">characters.
-</del>
-<ins class="diff-chg">for
-a
-particular
-vocabulary
-term,
-an
-IRI
-is
-generated:
-</ins>
-</p>
-<pre class="example">
-<ins class="diff-new">{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:anyURI": "foaf:homepage"
-    } 
-  }</span>
-...
-  "foaf:homepage": "http://manu.sporny.org",
-...
-}
-</ins></pre>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-5.2
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-A
-subject
-is
-declared
-using
-the
-<code>
-@
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-<del class="diff-old">predicate,
-</del>
-<ins class="diff-chg">property,
-</ins>
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "",
-</del>
-<ins class="diff-chg">  "<span class="diff">@</span>": "<span class="diff">http://example.org/people#joebob</span>",
-</ins>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-the
-IRI
-<code>
-http://example.org/people#joebob
-</code>.
-</p>
-<del class="diff-old">Note
-that
-subject
-do
-not
-need
-to
-be
-wrapped
-in
-angle
-brackets.
-The
-following
-example
-is
-valid
-JSON-LD
-markup:
-{
-...
-  "@": "http://example.org/people#joebob",
-...
-}
-</del>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-5.3
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-a
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-type-url).
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "@": "&lt;http://example.org/people#joebob&gt;",
-  "",
-</del>
-<ins class="diff-chg">  "@": "http://example.org/people#joebob",
-  "<span class="diff">a</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-</ins>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-(in
-N-Triples
-notation):
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<del class="diff-old">Note
-that
-the
-type
-IRI
-does
-not
-need
-to
-be
-wrapped
-in
-angle
-brackets.
-The
-following
-example
-is
-valid
-JSON-LD
-markup:
-{
-...
-  "@": "http://example.org/people#joebob",
-  "a": "http://xmlns.com/foaf/0.1/Person",
-...
-}
-</del>
-</div>
-<div id="plain-literals" class="section">
-<h3>
-<span class="secno">
-5.4
-</span>
-Plain
-Literals
-</h3>
-<p>
-Regular
-text
-strings
-are
-called
-"plain
-literals"
-in
-RDF
-and
-are
-easily
-expressed
-using
-regular
-JSON
-strings.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}
-</pre>
-</div>
-<div id="language-specification-in-plain-literals" class="section">
-<h3>
-<span class="secno">
-5.5
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</h3>
-<p>
-JSON-LD
-<del class="diff-old">attempts
-to
-make
-sure
-that
-it
-is
-easy
-to
-express
-triples
-in
-other
-languages
-while
-simultaneously
-ensuring
-</del>
-<ins class="diff-chg">makes
-an
-assumption
-</ins>
-that
-<del class="diff-old">hefty
-data
-structures
-aren't
-required
-to
-accomplish
-simple
-</del>
-<ins class="diff-chg">plain
-literals
-with
-associated
-</ins>
-language
-<del class="diff-old">markup.
-When
-the
-@
-symbol
-</del>
-<ins class="diff-chg">encoding
-information
-</ins>
-is
-<ins class="diff-new">not
-very
-common
-when
-</ins>
-used
-in
-<ins class="diff-new">JavaScript
-and
-Web
-Services.
-Thus,
-it
-takes
-</ins>
-a
-<del class="diff-old">literal,
-the
-JSON-LD
-processor
-tags
-the
-literal
-text
-with
-the
-language
-tag
-that
-follows
-the
-@
-symbol.
-</del>
-<ins class="diff-chg">little
-more
-effort
-to
-express
-plain
-literals
-in
-a
-specified
-language.
-</ins>
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "foaf:name": "",
-</del>
-<ins class="diff-chg">  "foaf:name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-</ins>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-plain
-literal
-for
-<em>
-<del class="diff-old">??
-</del>
-<ins class="diff-chg">花澄
-</ins>
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-tag
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="typed-literals" class="section">
-<h3>
-<span class="secno">
-5.6
-</span>
-Typed
-Literals
-</h3>
-<p>
-Literals
-may
-also
-be
-typed
-in
-JSON-LD
-<del class="diff-old">by
-using
-</del>
-<ins class="diff-chg">in
-two
-ways:
-</ins></p><ol><li><ins class="diff-chg">
-By
-utilizing
-</ins>
-the
-<code>
-<del class="diff-old">^^
-</del>
-<ins class="diff-chg">@coerce
-</ins>
-</code>
-<del class="diff-old">sequence
-at
-</del>
-<ins class="diff-chg">keyword.
-</ins></li><li><ins class="diff-chg">
-By
-utilizing
-</ins>
-the
-<del class="diff-old">end
-of
-</del>
-<ins class="diff-chg">expanded
-form
-for
-specifying
-objects.
-</ins></li></ol><p><ins class="diff-chg">
-The
-first
-example
-uses
-</ins>
-the
-<del class="diff-old">text
-string.
-</del>
-<code>
-<ins class="diff-chg">@coerce
-</ins></code><ins class="diff-chg">
-keyword
-to
-express
-a
-typed
-literal:
-</ins>
-</p>
-<pre class="example">
-<del class="diff-old">{
-</del>
-<ins class="diff-chg">{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }</span>
-</ins>
-...
-<del class="diff-old">  "dc:modified": "",
-</del>
-<ins class="diff-chg">  "dc:modified": "2010-05-29T14:17:39+02:00",
-</ins>
-...
-}
-</pre>
-<p>
-The
-<ins class="diff-new">second
-</ins>
-example
-<ins class="diff-new">uses
-the
-expanded
-form
-for
-specifying
-objects:
-</ins></p><pre class="example"><ins class="diff-new">
-{
-...
-  "dc:modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }</span>
-...
-}
-</ins></pre><p><ins class="diff-new">
-Both
-examples
-</ins>
-above
-would
-generate
-an
-object
-with
-the
-<ins class="diff-new">literal
-</ins>
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-5.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-arrays.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-array.
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "@": "&lt;http://example.org/people#joebob&gt;",
-  "foaf:nick": ,
-</del>
-<ins class="diff-chg">  "@": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-</ins>
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-<del class="diff-old">      "stu" .
-</del>
-<ins class="diff-chg">      "joe" .
-</ins>
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-<del class="diff-old">      "groknar" .
-</del>
-<ins class="diff-chg">      "bob" .
-</ins>
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-<del class="diff-old">"radface"
-</del>
-<ins class="diff-chg">"jaybee"
-</ins>
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-5.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-typed
-literals
-<del class="diff-old">are
-</del>
-<ins class="diff-chg">may
-also
-be
-</ins>
-expressed
-<del class="diff-old">very
-much
-in
-</del>
-<ins class="diff-chg">using
-</ins>
-the
-<del class="diff-old">same
-way
-as
-multiple
-properties:
-</del>
-<ins class="diff-chg">expanded
-form
-for
-objects:
-</ins>
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "@": "&lt;http://example.org/articles/8&gt;",
-  "dcterms:modified": ],
-</del>
-<ins class="diff-chg">  "@": "http://example.org/articles/8",
-  "dcterms:modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]</span>
-</ins>
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="blank-nodes" class="section">
-<h3>
-<span class="secno">
-5.9
-</span>
-Blank
-Nodes
-</h3>
-<p>
-At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-is
-where
-blank
-nodes
-come
-into
-play.
-In
-JSON-LD,
-blank
-node
-identifiers
-are
-automatically
-created
-if
-a
-subject
-is
-not
-specified
-using
-the
-<code>
-@
-</code>
-<del class="diff-old">key.
-</del>
-<ins class="diff-chg">keyword.
-</ins>
-However,
-authors
-may
-name
-blank
-nodes
-by
-using
-the
-special
-<code>
-_
-</code>
-CURIE
-prefix.
-</p>
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<code>
-_:foo
-</code>,
-which
-can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-named
-blank
-node.
-</p>
-</div>
-</div>
-<div id="advanced-features" class="section">
-<h2>
-<span class="secno">
-6.
-</span>
-Advanced
-Features
-</h2>
-<p>
-JSON-LD
-has
-a
-number
-of
-features
-that
-provide
-functionality
-above
-and
-beyond
-the
-core
-functionality
-provided
-by
-RDF.
-The
-following
-sections
-outline
-the
-features
-that
-are
-specific
-to
-JSON-LD.
-</p>
-<del class="diff-old">6.1
-Escape
-Character
-Special
-characters
-in
-property
-values
-must
-be
-escaped
-in
-order
-to
-not
-be
-interpreted
-as
-CURIEs,
-IRIs,
-language
-tags,
-or
-TypedLiterals.
-The
-special
-characters
-that
-need
-to
-be
-escaped
-in
-property
-values
-are:
-&lt;
-&gt;
-(at
-the
-end
-of
-a
-string),
-@
-,
-and
-^
-.
-{
-...
-  "example:code": ,
-...
-}
-</del>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-doubles,
-integers,
-and
-boolean
-values.
-As
-demonstrated
-below,
-JSON-LD
-utilizes
-that
-information
-to
-create
-<a href="#typed-literals">
-Typed
-Literals
-</a>:
-</p>
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-<del class="diff-old">  "measure:stones": ,
-</del>
-<ins class="diff-chg">  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-</ins>
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}
-</pre>
-<p class="note">
-When
-dealing
-with
-a
-number
-of
-modern
-programming
-languages,
-including
-JavaScript
-ECMA-262,
-there
-is
-no
-distinction
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>
-values.
-That
-is,
-the
-number
-<code>
-5.3
-</code>
-and
-the
-number
-<code>
-5.3e0
-</code>
-are
-treated
-as
-if
-they
-were
-the
-same.
-When
-converting
-from
-JSON-LD
-to
-a
-language-native
-format
-and
-back,
-datatype
-information
-is
-lost
-in
-a
-number
-of
-these
-languages.
-Thus,
-one
-could
-say
-that
-<code>
-5.3
-</code>
-is
-a
-<strong>
-xsd:decimal
-</strong>
-and
-<code>
-5.3e0
-</code>
-is
-an
-<strong>
-xsd:double
-</strong>
-in
-JSON-LD,
-but
-when
-both
-values
-are
-converted
-to
-a
-language-native
-format
-the
-datatype
-difference
-between
-the
-two
-is
-lost
-because
-the
-machine-level
-representation
-will
-almost
-always
-be
-a
-<strong>
-double
-</strong>.
-Implementers
-should
-be
-aware
-of
-this
-potential
-round-tripping
-issue
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>.
-Specifically
-objects
-with
-a
-datatype
-of
-<strong>
-xsd:decimal
-</strong>
-<em class="rfc2119" title="must not">
-must
-not
-</em>
-be
-converted
-to
-a
-language
-native
-type.
-</p>
-</div>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.3
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-Type
-Coercion
-</h3>
-<p>
-JSON-LD
-supports
-the
-coercion
-of
-types
-to
-ensure
-that
-the
-zero-edit
-goal
-of
-JSON-LD
-can
-be
-accomplished.
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-and
-incoming
-or
-outgoing
-types
-to
-the
-proper
-RDF
-type
-based
-on
-a
-mapping
-of
-type
-IRIs
-to
-RDF
-types.
-Using
-type
-conversion,
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-plain
-literals,
-typed
-literals
-and
-IRIs.
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "#": 
-</del>
-<ins class="diff-chg">  "@context": 
-</ins>
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<del class="diff-old">     "#types":
-</del>
-<span class="diff">     "@type":
-     {
-<del class="diff-old">        "name": "rdf:PlainLiteral",
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-</del>
-<ins class="diff-chg">        "xsd:integer": "age",
-        "xsd:anyURI": "homepage",
-</ins>
-     }</span>
-  },
-<del class="diff-old">  "name": ,
-</del>
-<ins class="diff-chg">  "name": "John Smith",
-</ins>
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-<del class="diff-old">      "&lt;John Smith&gt;" .
-</del>
-<ins class="diff-chg">      "John Smith" .
-</ins>
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-</div>
-<div id="best-practices" class="section">
-<h2>
-<span class="secno">
-7.
-</span>
-Best
-Practices
-</h2>
-<p>
-The
-nature
-of
-Web
-programming
-allows
-one
-to
-use
-basic
-technologies,
-such
-as
-JSON-LD,
-across
-a
-variety
-of
-systems
-and
-environments.
-This
-section
-attempts
-to
-describe
-some
-of
-those
-environments
-and
-the
-way
-in
-which
-JSON-LD
-can
-be
-integrated
-in
-order
-to
-help
-alleviate
-certain
-development
-headaches.
-</p>
-<div id="javascript" class="section">
-<h3>
-<span class="secno">
-7.1
-</span>
-JavaScript
-</h3>
-<p class="issue">
-It
-is
-expected
-that
-JSON-LD
-will
-be
-used
-quite
-a
-bit
-in
-JavaScript
-environments,
-however,
-features
-like
-<del class="diff-old">IRIs
-requiring
-angled
-brackets
-in
-JSON-LD
-means
-</del>
-<ins class="diff-chg">the
-expanded
-form
-for
-object
-values
-mean
-</ins>
-that
-using
-JSON-LD
-directly
-in
-JavaScript
-<del class="diff-old">is
-going
-to
-</del>
-<ins class="diff-chg">may
-</ins>
-be
-annoying
-without
-a
-middleware
-layer
-such
-as
-a
-simple
-library
-that
-<del class="diff-old">strips
-</del>
-<ins class="diff-chg">converts
-</ins>
-JSON-LD
-markup
-before
-JavaScript
-uses
-it.
-One
-could
-say
-that
-JSON-LD
-is
-a
-good
-fit
-for
-the
-<del class="diff-old">RDFa
-</del>
-<ins class="diff-chg">RDF
-</ins>
-API,
-which
-<del class="diff-old">would
-enable
-</del>
-<ins class="diff-chg">enables
-</ins>
-a
-<del class="diff-old">triple-store
-in
-the
-browser,
-</del>
-<ins class="diff-chg">variety
-of
-RDF-based
-Web
-Applications,
-</ins>
-but
-some
-don't
-want
-to
-require
-that
-level
-of
-functionality
-just
-to
-use
-JSON-LD.
-The
-group
-is
-still
-discussing
-the
-best
-way
-to
-proceed,
-so
-input
-on
-how
-JSON-LD
-could
-more
-easily
-be
-utilized
-in
-JavaScript
-environments
-would
-be
-very
-much
-appreciated.
-</p>
-</div>
-<div id="schema-less-databases" class="section">
-<h3>
-<span class="secno">
-7.2
-</span>
-Schema-less
-Databases
-</h3>
-<p class="issue">
-Databases
-such
-as
-CouchDB
-and
-MongoDB
-allow
-the
-creation
-of
-schema-less
-data
-stores.
-RDF
-is
-a
-type
-of
-schema-less
-data
-model
-and
-thus
-lends
-itself
-to
-databases
-such
-as
-CouchDB
-and
-MongoDB.
-Both
-of
-these
-databases
-can
-use
-JSON-LD
-as
-their
-storage
-format.
-The
-group
-needs
-feedback
-from
-CouchDB
-and
-MongoDB
-experts
-regarding
-the
-usefulness
-of
-JSON-LD
-in
-those
-environments.
-</p>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-8.
-</span>
-Advanced
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-<del class="diff-old">taken
-with
-a
-grain
-of
-salt;
-</del>
-<ins class="diff-chg">considered
-as
-discussion
-points;
-</ins>
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<div id="vocabulary-profiles" class="section">
-<h3>
-<span class="secno">
-8.1
-</span>
-Vocabulary
-Profiles
-</h3>
-<p>
-One
-of
-the
-more
-powerful
-features
-of
-RDFa
-1.1
-Core
-is
-the
-ability
-to
-specify
-a
-collection
-of
-prefixes
-and
-terms
-that
-can
-be
-re-used
-by
-a
-processor
-to
-simplfy
-markup.
-JSON-LD
-provides
-a
-similar
-mechanism
-called
-Vocabulary
-Profiles,
-which
-is
-the
-inclusion
-of
-a
-context
-external
-to
-the
-JSON-LD
-document.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-one
-may
-specify
-an
-external
-Vocabulary
-Profile.
-Assume
-the
-following
-profile
-exists
-at
-this
-imaginary
-URL:
-<code>
-http://example.org/profiles/contacts
-</code>.
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "#": 
-</del>
-<ins class="diff-chg">  "@context": 
-</ins>
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}
-</pre>
-<p>
-The
-profile
-listed
-above
-can
-be
-used
-in
-the
-following
-way:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "#": { "#profile": "http://example.org/profiles/contacts" },
-</del>
-<ins class="diff-chg">  "@profile": "http://example.org/profiles/contacts",
-</ins>
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-8.2
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-array
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-JSON-LD
-associative
-array.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
-</del>
-  "@": 
-  [
-    {
-<del class="diff-old">      "@": "&lt;http://example.org/people#john&gt;",
-</del>
-<ins class="diff-chg">      "@": "http://example.org/people#john",
-</ins>
-      "a": "foaf:Person"
-    },
-    {
-<del class="diff-old">      "@": "&lt;http://example.org/people#jane&gt;",
-</del>
-<ins class="diff-chg">      "@": "http://example.org/people#jane",
-</ins>
-      "a": "foaf:Person"
-    }
-  ]
-}
-</pre>
-<p>
-<ins class="diff-new">A
-disjoint
-graph
-could
-also
-be
-expressed
-like
-so:
-</ins></p><pre class="example"><ins class="diff-new">
-[
-  {
-    "@": "http://example.org/people#john",
-    "a": "foaf:Person"
-  },
-  {
-    "@": "http://example.org/people#jane",
-    "a": "foaf:Person"
-  }
-]
-</ins></pre>
-</div>
-<div id="the-json-ld-api" class="section">
-<h3>
-<span class="secno">
-8.3
-</span>
-The
-JSON-LD
-API
-</h3>
-<p>
-This
-API
-provides
-a
-clean
-mechanism
-that
-enables
-developers
-to
-convert
-JSON-LD
-data
-into
-a
-format
-that
-is
-easier
-to
-work
-with
-in
-various
-programming
-languages.
-</p>
-<pre class="idl">
-<del class="diff-old">]
-interface  {
-</del>
-<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDProcessor</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-};</span>
-</pre>
-<div id="methods" class="section">
-<h4>
-<span class="secno">
-8.3.1
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">
-<code>
-<del class="diff-old">toObject
-</del>
-<ins class="diff-chg">toGraph
-</ins>
-</code>
-</dt>
-<dd>
-Parses
-JSON-LD
-<del class="diff-old">text
-</del>
-<ins class="diff-chg">and
-transforms
-the
-data
-</ins>
-into
-an
-<del class="diff-old">object
-that
-allows
-at
-least
-attribute-based
-or
-key-based
-access
-to
-the
-data.
-If
-</del>
-<ins class="diff-chg">Graph,
-which
-is
-compatible
-with
-</ins>
-the
-<del class="diff-old">contents
-are
-a
-disjoint
-graph,
-an
-array
-of
-objects
-are
-returned.
-If
-</del>
-<ins class="diff-chg">RDF
-Interfaces
-API
-specification
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES"><ins class="diff-chg">
-RDF-INTERFACES
-</ins></a></cite><ins class="diff-chg">
-].
-This
-method
-will
-return
-</ins><code><ins class="diff-chg">
-null
-</ins></code><ins class="diff-chg">
-if
-</ins>
-there
-are
-any
-errors,
-<del class="diff-old">null
-</del>
-<ins class="diff-chg">or
-if
-the
-RDF
-Interfaces
-API
-</ins>
-is
-<del class="diff-old">returned.
-</del>
-<ins class="diff-chg">not
-available
-for
-use.
-</ins>
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-jsonld
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✘
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✘
-</ins>
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-<del class="diff-old">return
-object.
-map
-object
-?
-?
-The
-map
-from
-IRIs
-to
-attribute
-names
-for
-the
-resulting
-object.
-Any
-term
-mapping
-that
-is
-not
-mentioned
-in
-the
-map
-will
-not
-be
-available
-in
-the
-resulting
-object.
-You
-may
-map
-rdf:type
-using
-the
-a
-key
-or
-the
-rdf:type
-IRI.
-You
-may
-map
-the
-subject
-by
-using
-the
-@
-key.
-options
-object
-?
-?
-An
-associative-array
-of
-processing
-options
-to
-enable
-or
-disable
-when
-processing
-the
-JSON-LD
-string.
-A
-conforming
-JSON-LD
-processor
-must
-support
-the
-following
-options:
-indexBySubject
-If
-set
-to
-true,
-the
-returned
-object
-will
-be
-indexed
-by
-subject.
-preserveDatatypes
-If
-set
-to
-true,
-preserves
-the
-datatype
-for
-object
-literals.
-preserveLanguage
-If
-set
-to
-true,
-preserves
-the
-languages
-for
-object
-literals.
-</del>
-<ins class="diff-chg">RDFGraph.
-</ins>
-</td>
-</tr>
-<tr>
-<td class="prmName">
-callback
-</td>
-<td class="prmType">
-<code>
-<a>
-JSONLDParserCallback
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✔
-</ins>
-</td>
-<td class="prmOptTrue">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✔
-</ins>
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-<del class="diff-old">object
-</del>
-<ins class="diff-chg">Graph
-</ins>
-</a>
-</code>
-</div>
-</dd>
-<dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">
-<code>
-<del class="diff-old">toRDFGraph
-</del>
-<ins class="diff-chg">toProjection
-</ins>
-</code>
-</dt>
-<dd>
-Parses
-JSON-LD
-<del class="diff-old">and
-transforms
-the
-data
-</del>
-<ins class="diff-chg">text
-</ins>
-into
-an
-<del class="diff-old">RDFGraph,
-which
-is
-compatible
-with
-</del>
-<ins class="diff-chg">RDF
-API
-Projection
-object
-as
-specified
-by
-</ins>
-the
-<del class="diff-old">RDFa
-</del>
-<ins class="diff-chg">RDF
-</ins>
-API
-<del class="diff-old">specification.
-This
-method
-will
-return
-null
-if
-</del>
-<ins class="diff-chg">specification
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDF-API"><ins class="diff-chg">
-RDF-API
-</ins></a></cite><ins class="diff-chg">
-].
-If
-</ins>
-there
-are
-any
-errors,
-<del class="diff-old">or
-if
-the
-RDFa
-API
-</del>
-<code>
-<ins class="diff-chg">null
-</ins></code>
-is
-<del class="diff-old">not
-available
-for
-use.
-</del>
-<ins class="diff-chg">returned.
-</ins>
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-jsonld
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✘
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✘
-</ins>
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-<del class="diff-old">RDFGraph.
-</del>
-<ins class="diff-chg">Projection.
-</ins>
-</td>
-</tr>
-<tr>
-<td class="prmName">
-<del class="diff-old">callback
-</del>
-<ins class="diff-chg">template
-</ins>
-</td>
-<td class="prmType">
-<code>
-<a>
-<ins class="diff-chg">object
-</ins></a></code></td><td class="prmNullTrue"><ins class="diff-chg">
-✔
-</ins></td><td class="prmOptFalse"><ins class="diff-chg">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-chg">
-The
-Projection
-template
-to
-use
-when
-building
-the
-Projection.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-chg">
-subject
-</ins></td><td class="prmType">
-<code>
-<del class="diff-old">JSONLDParserCallback
-</del>
-<a>
-<ins class="diff-chg">DOMString
-</ins></a>
-</code>
-</td>
-<td class="prmNullTrue">
-<ins class="diff-new">✔
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-subject
-to
-use
-when
-building
-the
-Projection.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-callback
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-JSONLDParserCallback
-</ins>
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✔
-</ins>
-</td>
-<td class="prmOptTrue">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✔
-</ins>
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-<del class="diff-old">RDFGraph
-</del>
-<ins class="diff-chg">object
-</ins>
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<p>
-The
-JSONLDParserCallback
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-input
-data.
-</p>
-<pre class="idl">
-<del class="diff-old">]
-interface  {
-</del>
-<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre>
-<div id="methods-1" class="section">
-<h4>
-<span class="secno">
-8.3.2
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error">
-<code>
-error
-</code>
-</dt>
-<dd>
-This
-callback
-is
-invoked
-whenever
-an
-error
-occurs
-during
-processing.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-error
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✘
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✘
-</ins>
-</td>
-<td class="prmDesc">
-A
-descriptive
-error
-string
-returned
-by
-the
-processor.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-void
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<p>
-The
-following
-example
-demonstrates
-how
-to
-convert
-JSON-LD
-to
-a
-<del class="diff-old">JSON
-object
-</del>
-<ins class="diff-chg">projection
-</ins>
-that
-is
-directly
-usable
-in
-a
-programming
-environment:
-</p>
-<pre class="example">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-<del class="diff-old">var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
-              "http://xmlns.com/foaf/0.1/age" : "age",
-              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-</del>
-<ins class="diff-chg">var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-</ins>
-// Map the JSON-LD to a language-native object
-<del class="diff-old">var person = jsonld.toObject(jsonldString, myMap);
-</del>
-<ins class="diff-chg">var person = jsonld.toProjection(jsonldString, myTemplate);
-</ins>
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-"Their
-homepage
-is:
-"
-+
-person.homepage);
-</pre>
-<p>
-A
-JSON-LD
-Serializer
-is
-also
-available
-to
-map
-a
-language-native
-object
-to
-JSON-LD.
-</p><pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
-};</span>
-</pre>
-<div id="methods-2" class="section">
-<h4>
-<span class="secno">
-8.3.3
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj">
-<code>
-normalize
-</code>
-</dt>
-<dd>
-Serializes
-a
-language-native
-object
-into
-a
-normalized
-JSON-LD
-string.
-Normalization
-is
-important
-when
-performing
-things
-like
-equality
-comparison
-and
-digital
-signature
-creation
-and
-verification.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-obj
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✘
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">?
-</del>
-<ins class="diff-chg">✘
-</ins>
-</td>
-<td class="prmDesc">
-An
-associative
-array
-of
-key-value
-pairs
-that
-should
-be
-converted
-to
-a
-JSON-LD
-string.
-It
-is
-assumed
-that
-a
-map
-already
-exists
-for
-the
-data.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-DOMString
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<h3 id="the-normalization-algorithm">
-The
-Normalization
-Algorithm
-</h3>
-<p class="issue">
-This
-algorithm
-is
-very
-rough,
-untested,
-and
-probably
-contains
-many
-bugs.
-Use
-at
-your
-own
-risk.
-It
-will
-change
-in
-the
-coming
-months.
-</p>
-<p>
-The
-JSON-LD
-normalization
-algorithm
-is
-as
-follows:
-</p>
-<ol class="algorithm">
-<li>
-Remove
-the
-<code>
-<del class="diff-old">#
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
-key
-and
-preserve
-it
-as
-the
-<dfn title="transformation_map" id="dfn-transformation_map">
-transformation
-map
-</dfn>
-while
-running
-this
-algorithm.
-</li>
-<li>
-For
-each
-key
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<del class="diff-old">If
-the
-transformed
-key
-is
-an
-IRI,
-ensure
-that
-it
-is
-surrounded
-by
-angle
-brackets.
-</del>
-</ol>
-</li>
-<li>
-For
-each
-value
-<ol class="algorithm">
-<li>
-If
-the
-value
-should
-be
-type
-coerced
-per
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>,
-ensure
-that
-it
-is
-transformed
-to
-the
-new
-value.
-</li>
-<li>
-If
-the
-value
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-Typed
-Literal
-and
-the
-type
-is
-a
-CURIE,
-expand
-it
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-<del class="diff-old">If
-</del>
-<ins class="diff-chg">When
-generating
-</ins>
-the
-final
-<ins class="diff-new">value,
-use
-expanded
-object
-</ins>
-value
-<del class="diff-old">is
-an
-IRI,
-ensure
-that
-it
-is
-surrounded
-by
-angle
-brackets.
-</del>
-<ins class="diff-chg">form
-to
-store
-all
-IRIs,
-typed
-literals
-and
-plain
-literals
-with
-language
-information.
-</ins>
-</li>
-</ol>
-</li>
-<li>
-Output
-each
-sorted
-key-value
-pair
-without
-any
-extraneous
-whitespace.
-If
-the
-value
-is
-an
-associative
-array,
-perform
-this
-algorithm,
-starting
-at
-step
-#1,
-recursively
-on
-the
-sub-tree.
-<ins class="diff-new">There
-should
-be
-no
-nesting
-in
-the
-outputted
-JSON
-data.
-That
-is,
-the
-top-most
-element
-should
-be
-an
-array.
-Each
-item
-in
-the
-array
-contains
-a
-single
-subject
-with
-a
-corresponding
-array
-of
-properties
-in
-UTF-8
-sort
-order.
-Any
-related
-objects
-that
-are
-complex
-objects
-themselves
-should
-be
-given
-a
-top-level
-object
-in
-the
-top-level
-array.
-</ins>
-</li>
-</ol>
-<p class="issue">
-<ins class="diff-chg">Note
-that
-normalizing
-named
-blank
-nodes
-is
-impossible
-at
-present
-since
-one
-would
-have
-to
-specify
-a
-blank
-node
-naming
-algorithm.
-For
-the
-time
-being,
-you
-cannot
-normalize
-graphs
-that
-contain
-named
-blank
-nodes.
-However,
-normalizing
-graphs
-that
-contain
-non-named
-blank
-nodes
-is
-supported.
-</ins>
-</p>
-<pre class="example">
-<del class="diff-old">var myObj = { "#" : { 
-</del>
-<ins class="diff-chg">var myObj = { "@context" : { 
-</ins>
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-<del class="diff-old">                "#types": {
-                   "age" : "xsd:nonNegativeInteger",
-                   "homepage" : "xsd:anyURI" 
-</del>
-<ins class="diff-chg">                "@type": {
-                   "xsd:nonNegativeInteger": "age",
-                   "xsd:anyURI": "homepage"
-</ins>
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : 42,
-              "homepage" : "http://example.org/people/joe" };
-// Map the language-native object to JSON-LD
-var
-jsonldText
-=
-jsonld.normalize(myObj);
-</pre>
-<p>
-After
-the
-code
-in
-the
-example
-above
-has
-executed,
-the
-<strong>
-jsonldText
-</strong>
-value
-will
-be
-(line-breaks
-added
-for
-readability):
-</p>
-<pre class="example">
-<del class="diff-old">{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
-"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
-"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe
-Jackson"}
-</del>
-<ins class="diff-chg">[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
-"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
-"http://xmlns.com/foaf/0.1/name":"Joe
-Jackson"}]
-</ins>
-</pre>
-<p>
-When
-normalizing
-<strong>
-xsd:double
-</strong>
-values,
-implementers
-<em class="rfc2119" title="must">
-must
-</em>
-ensure
-that
-the
-normalized
-value
-is
-a
-string.
-In
-order
-to
-generate
-the
-string
-from
-a
-<strong>
-double
-</strong>
-value,
-output
-equivalent
-to
-the
-<code>
-printf("%1.6e",
-value)
-</code>
-function
-in
-C
-<em class="rfc2119" title="must">
-must
-</em>
-be
-used
-where
-<strong>
-"%1.6e"
-</strong>
-is
-the
-string
-formatter
-and
-<strong>
-value
-</strong>
-is
-the
-value
-to
-be
-converted.
-</p>
-<p>
-To
-convert
-the
-a
-double
-value
-in
-JavaScript,
-implementers
-can
-use
-the
-following
-snippet
-of
-code:
-</p>
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
-'$10$2')
-</pre>
-<p class="note">
-When
-data
-needs
-to
-be
-normalized,
-JSON-LD
-authors
-should
-not
-use
-values
-that
-are
-going
-to
-undergo
-automatic
-conversion.
-This
-is
-due
-to
-the
-lossy
-nature
-of
-<strong>
-xsd:double
-</strong>
-values.
-</p>
-</div>
-</div>
-<div class="appendix section" id="the-default-context">
-<h2>
-<span class="secno">
-A.
-</span>
-<ins class="diff-new">The
-Default
-Context
-</ins></h2><p><ins class="diff-new">
-The
-</ins><dfn title="default_context" id="dfn-default_context-1"><ins class="diff-new">
-default
-context
-</ins></dfn><ins class="diff-new">
-is
-provided
-to
-ensure
-that
-there
-are
-a
-reasonable
-set
-of
-prefixes
-and
-terms
-available
-to
-all
-JSON-LD
-developers.
-Mappings
-specified
-by
-the
-default
-context
-</ins><em class="rfc2119" title="should not"><ins class="diff-new">
-should
-not
-</ins></em><ins class="diff-new">
-be
-overwritten
-by
-JSON-LD
-authors.
-All
-JSON-LD
-processors
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-load
-the
-following
-context
-in
-as
-the
-intial
-context
-before
-processing
-JSON-LD
-text.
-</ins></p><pre><ins class="diff-new">
-{
-  "@context":
-  {
-    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
-    "owl": "http://www.w3.org/2002/07/owl#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dcterms": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "vcard": "http://www.w3.org/2006/vcard/ns# ",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "cc": "http://creativecommons.org/ns#",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "com": "http://purl.org/commerce#",
-    "ps": "http://purl.org/payswarm#",
-    "gr": "http://purl.org/goodrelations/v1#",
-    "sig": "http://purl.org/signature#",
-    "ccard": "http://purl.org/commerce/creditcard#"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-}
-</ins></pre></div><div class="appendix section" id="acknowledgements"><h2><span class="secno"><ins class="diff-new">
-B.
-</ins></span>
-Acknowledgements
-</h2>
-<p>
-The
-editor
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-rationale
-and
-reasoning
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-Longley
-who
-<del class="diff-old">reviewed
-and
-</del>
-<ins class="diff-chg">reviewed,
-</ins>
-provided
-<del class="diff-old">feedback
-</del>
-<ins class="diff-chg">feedback,
-and
-performed
-several
-implementation
-</ins>
-on
-the
-<del class="diff-old">overall
-specification
-and
-contexts,
-</del>
-<ins class="diff-chg">specification,
-</ins>
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-Thanks
-also
-to
-<ins class="diff-new">Nathan
-Rixham,
-</ins>
-Bradley
-P.
-Allen
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-</p>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">C.
-</ins>
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">B.1
-</del>
-<ins class="diff-chg">C.1
-</ins>
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<dt id="bib-RDF-API">
-<ins class="diff-new">[RDF-API]
-</ins></dt><dd><ins class="diff-new">
-Manu
-Sporny,
-Benjamin
-Adrian,
-Nathan
-Rixham;
-et
-al.
-</ins><a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><cite><ins class="diff-new">
-RDF
-API
-</ins></cite></a><ins class="diff-new">
-Latest.
-W3C
-Editor's
-Draft.
-URL:
-</ins><a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><ins class="diff-new">
-http://www.w3.org/2010/02/rdfa/sources/rdf-api/
-</ins></a></dd>
-<dt id="bib-RDF-CONCEPTS">
-[RDF-CONCEPTS]
-</dt>
-<dd>
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-<cite>
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</a>
-</dd>
-<dt id="bib-RDF-INTERFACES">
-<ins class="diff-new">[RDF-INTERFACES]
-</ins></dt><dd><ins class="diff-new">
-Nathan
-Rixham,
-Manu
-Sporny,
-Benjamin
-Adrian;
-et
-al.
-</ins><a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><cite><ins class="diff-new">
-RDF
-Interfaces
-</ins></cite></a><ins class="diff-new">
-Latest.
-W3C
-Editor's
-Draft.
-URL:
-</ins><a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><ins class="diff-new">
-http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/
-</ins></a></dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-<del class="diff-old">Crockford
-</del>
-<ins class="diff-chg">Crockford.
-</ins>
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-<cite>
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</cite>
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">B.2
-</del>
-<ins class="diff-chg">C.2
-</ins>
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-<del class="diff-old">26
-October
-2010.
-</del>
-<ins class="diff-chg">31
-March
-2011.
-</ins>
-W3C
-Working
-Draft.
-URL:
-<del class="diff-old">http://www.w3.org/TR/2010/WD-rdfa-core-20101026
-</del>
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-<ins class="diff-chg">http://www.w3.org/TR/2011/WD-rdfa-core-20110331
-</ins>
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20110507/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2016 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-07-may-2011">Unofficial Draft 07 May 2011</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-</dl><p>This document is also available in this non-normative format: <a href="diff-20110201.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-Developers that embed structured data in their Web pages can choose among
-a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
-and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
-incompatible at the syntax level, can be easily mapped to RDF. JSON has 
-proven to be a highly useful object serialization and messaging format. 
-In an attempt to harmonize the representation of Linked Data in JSON, 
-this specification outlines a common JSON representation format for 
-Linked Data that can be used to represent objects specified via RDFa, 
-Microformats and Microdata.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-json-ld-context" class="tocxref"><span class="secno">2.3 </span>The JSON-LD Context</a></li><li class="tocline"><a href="#unambiguous-identifiers-for-json" class="tocxref"><span class="secno">2.4 </span>Unambiguous Identifiers for JSON</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.5 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-context" class="tocxref"><span class="secno">2.6 </span>An Example of a Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">4. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li></ul></li><li class="tocline"><a href="#advanced-features" class="tocxref"><span class="secno">6. </span>Advanced Features</a><ul class="toc"><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">6.1 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">6.2 </span>Type Coercion</a></li></ul></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">7. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">7.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">7.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">8. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-profiles" class="tocxref"><span class="secno">8.1 </span>Vocabulary Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">8.2 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">8.3 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">8.3.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">8.3.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">8.3.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">A. </span>The Default Context</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">B. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-JSON-LD is designed as a light-weight syntax that can be used to express 
-Linked Data. It is primarily intended to be a way to express Linked Data 
-in Javascript and other Web-based programming environments. It is also 
-useful when building interoperable Web Services and when storing Linked 
-Data in JSON-based document storage engines. It is practical and designed 
-to be as simple as possible, utilizing the large number of JSON parsers 
-and existing code that is in use today. It is designed to be able to 
-express key-value pairs, RDF data, Microformats data, and Microdata.
-That is, it supports every major Web-based structured data model in use 
-today. It does not require anyone to change their JSON, but easily add 
-meaning by adding context in a way that is out-of-band. The syntax is 
-designed to not disturb already deployed systems running on JSON, but 
-provide a smooth migration path from JSON to JSON with added
-semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a very small memory footprint in order to operate.
-<p></p>
-
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and 
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to write processors for JSON-LD.</li>
-</ul>
-
-<p>
-To understand this specification you must first be familiar with JSON, 
-which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>All comments and discussion takes place on the public mailing list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
-</li>
-
-<li>Specification bugs and issues should be reported in the 
-<a href="http://github.com/digitalbazaar/json-ld/issues">issue tracker</a>.</li>
-
-<li><a href="http://github.com/digitalbazaar/json-ld">Source code</a> for the 
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design-goals-and-rationale" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
-
-<p>The following section outlines the design goals and rationale behind the 
-JSON-LD markup language.
-</p>
-
-<div id="goals" class="section">
-<h3><span class="secno">2.1 </span>Goals</h3>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers don't need to know RDF in order to use the basic functionality
- provided by JSON-LD.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
- <dt>Expressiveness</dt>
- <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable.</dd>
- <dt>Zero Edits, most of the time</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers. At times, mapping JSON to 
- RDF can become difficult - in these instances, rather than having JSON-LD
- support esoteric markup, we chose not to support the use case and
- support a simplified syntax instead. So, while we strive for Zero Edits,
- it was not always possible without adding great complexity to the language.
- </dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="map-terms-to-iris" class="section">
-<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
-
-<p>Establishing a mechanism to map JSON values to IRIs will
-help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
-be restrictive in declaring a set of terms, rather, experimentation and 
-innovation should be supported as part of the core design of JSON-LD. There are, 
-however, a number of very small design criteria that can ensure that developers 
-will generate good RDF data that will create value for the greater 
-semantic web community and JSON/REST-based Web Services community.
-</p>
-
-<p>We will be using the following JSON object as the example for this section:
-</p>
-
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-</div>
-
-<div id="the-json-ld-context" class="section">
-<h3><span class="secno">2.3 </span>The JSON-LD Context</h3>
-
-<p>A context is used in RDFa to allow developers to use aliases for 
-IRIs. The semantic web, just like the document-based web, uses IRIs for
-unambiguous identification. The idea is that these terms mean something, 
-which you will eventually want to query. The semantic web specifies this via 
-<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> 
-specifies a Vocabulary Document, and <strong>name</strong> is a term in 
-that vocabulary. Join the two items together and you have an unambiguous 
-identifier for a vocabulary term. The Compact URI Expression, or short-form,
-is <code>foaf:name</code> and the expanded-form is
-<code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary term identifies
-the given name for something, for example - a person's name.
-</p>
-
-<p>Developers, and machines, would be able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much like we can use WordNet today to 
-see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Machines need the same sort of 
-dictionary of terms, and URIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>The context provides a collection of vocabulary terms that can be used
-for a JSON object.</p>
-</div>
-
-<div id="unambiguous-identifiers-for-json" class="section">
-<h3><span class="secno">2.4 </span>Unambiguous Identifiers for JSON</h3>
-            
-<p>If a set of terms, like <strong>Person</strong>, 
-<strong>name</strong>, and <strong>homepage</strong>,
-are defined in a context, and that context is used to resolve the
-names in JSON objects, machines could automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Doing this would mean that JSON would start to become unambiguously
-machine-readable, play well with the semantic web, and basic markup wouldn't 
-be that much more complex than basic JSON markup. A win, all around.</p>
-</div>
-
-<div id="mashing-up-vocabularies" class="section">
-<h3><span class="secno">2.5 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>RDF - for describing information about objects on the semantic web.</li>
-   <li>RDFS - for expressing things like labels and comments.</li>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>Since these vocabularies are very popular, they are pre-defined in
-something called the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a>, which is a set of
-vocabulary prefixes that are pre-loaded in all JSON-LD processors. The
-contents of the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> are provided later in this 
-document. Using the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> allows developers to 
-express data unambiguously, like so:</p>
-
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-default context in-line using the <code>@context</code> keyword, like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}</pre>
-
-<p>The <code>@context</code> keyword is used to change how the JSON-LD
-processor evaluates key-value pairs. In this case, it was used to
-map one string ('myvocab') to another string, which is interpreted as
-a IRI. In the example above, the <code>myvocab</code> string is replaced 
-with "<code>http://example.org/myvocab#</code>" when it
-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 for RDF, called a CURIE, and provides
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div id="an-example-of-a-context" class="section">
-<h3><span class="secno">2.6 </span>An Example of a Context</h3>
-
-<p>JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> define a known context. For example, the
-following default context could apply to all incoming Web Service calls
-previously accepting only JSON data:</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-    "@vocab": "http://example.org/default-vocab#",
-    "@base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-}</pre>
-
-<p>The <code>@vocab</code> string is a special keyword that states 
-that any term that doesn't resolve to a term or a prefix should be 
-appended to the <code>@vocab</code> IRI. This is done to ensure that 
-terms can be transformed to an IRI at all times.
-</p>
-
-<p>The <code>@base</code> string is a special keyword that states 
-that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
-<code>@base</code>.
-</p>
-
-<p>The <code>@coerce</code> keyword is used to specify type coersion
-rules for the data. For each key in the map, the key is the type to
-be coerced to and the value is the vocabulary term to be coerced.
-Type coersion for the key <code>xsd:anyURI</code> asserts that all 
-vocabulary terms listed should undergo coercion to an IRI, including
-<code>@base</code> processing for relative IRIs and CURIE processing
-for compact URI Expressions like <code>foaf:homepage</code>.
-</p>
-
-</div>
-</div>
-
-<div id="markup-examples" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">3.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-[
- {
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/bob/",
-   "foaf:name": "Bob"
- },
- {
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/eve/",
-   "foaf:name": "Eve"
- },
- {
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/manu/",
-   "foaf:name": "Manu"
- }
-]</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">3.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">3.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]</pre>
-</div>
-</div>
-
-<div id="the-json-ld-processing-algorithm" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>The JSON-LD Processing Algorithm</h2>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The Processing Algorithm is a work in progress, there are
-still major bugs in the algorithm and it's difficult to follow. It's provided
-only to very early implementers to give them an idea of how to implement a
-processor.</p>
-
-<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
-<ul>
-<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
-JSON-LD processing algorithm before processing begins.</li>
-<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
-generated by JSON-LD markup.</li>
-<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
-processor should use when generating triples.</li>
-<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
-higher level of processing to be used to generate a triple once a 
-<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
-<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
-processor should use when generating triples.</li>
-<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
-CURIEs while the processing algorithm is running. The 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
-associative-array level, specified via the <code>@context</code> keyword.</li>
-<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
-yet to have their subject set.</li>
-<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
-processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
-current associative-array is detected.</li>
-<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
-the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
-<a class="tref" title="current_property">current property</a>,
-<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
-<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-</li></ul>
-
-<h4 id="processing-tokens-and-keywords">Processing Tokens and Keywords</h4>
-<ul>
-<li><code>@context</code> - Used to set the active context.</li>
-<li><code>@base</code> - Used to set the base IRI for all object IRIs affected 
-by the active context.</li>
-<li><code>@vocab</code> - Used to set the base IRI for all property IRIs
-affected by the active context.</li>
-<li><code>@coerce</code> - Used to specify type coercion rules.</li>
-<li><code>@literal</code> - Used to specify a literal value.</li>
-<li><code>@iri</code> - Used to specify an IRI value.</li>
-<li><code>@language</code> - Used to specify the language for a literal.</li>
-<li><code>@datatype</code> - Used to specify the datatype for a literal.</li>
-<li><code>:</code> - The separator for CURIEs when used in JSON keys or
-JSON values.</li>
-<li><code>@</code> - Sets the active subjects.</li>
-<li><code>a</code> - Used to set the rdf:type of the active subjects.</li>
-</ul>
-
-<p>The algorithm below is designed for streaming (SAX-based) implementations.
-Implementers will find that non-streaming (document-based) implementations will
-be much easier to implement as full access to the JSON object model eliminates 
-some of the steps that are necessary for streaming implementations. A conforming
-JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
-same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
-
-<ol class="algorithm">
-<li id="processing-step-default-context">Push the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> 
-onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
-
-<li id="processing-step-associative">If an associative array is 
-detected, create a new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
-the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
-key-value pair in the associative array, using the newly created
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
-
-  <ol class="algorithm">
-
-    <li>If a <code>@context</code> keyword is found, the processor
-    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
-    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
-    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the 
-    <code>@coerce</code> key is found, the processor
-    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
-    <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
-    <code>@coerce</code> mapping, overwriting any duplicate values in 
-    the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
-    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
-    starting at <a href="#processing-subject">Step 2.2</a>.</li>
-
-    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not 
-    been detected, the current
-    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
-    and processing proceeds to the next key-value pair. Otherwise, if the
-    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
-
-    <ol class="algorithm">
-
-      <li id="processing-subject">If a <code>@</code> key is found, the 
-      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> has been 
-      performed.
-
-      <ol class="algorithm">
-        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
-        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
-        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
-        </li>
- 
-        <li>If there are any triples in the 
-        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
-        </li>
-      </ol>
-
-      </li>
-
-      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
-      </li>
-
-      <li>If a key that is not <code>@context</code>, 
-      <code>@</code>, or <code>a</code>, set the 
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
-      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
-      </li>
-
-      <li>If the value is not an array, set the 
-      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
-      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
-      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
-      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
-
-      <li>If the value is an associative array, then
-      process the value starting at 
-      <a href="#processing-step-associative">Step 2</a>.</li>
-
-      <li>If the value is a regular array, then process the value 
-      starting at 
-      <a href="#processing-step-array">Step 3</a> ensuring that
-      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
-      
-      <ol class="algorithm">
-        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
-
-        <li>Complete any previously incomplete triples by running all substeps 
-        of <a href="#processing-subject">Step 2.2.1</a>.
-        </li>
-      </ol>
-
-      </li><li>If the end of the associative array is detected, and a
-      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
-      <a href="#processing-associative">Step 2.2</a>
-      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
-     </li></ol>
-    </ol>
-  </li>
-
-  <li id="processing-step-array">If a regular array is detected, 
-  process each value in the array by doing the following:
-
-    <ol class="algorithm">
-      <li>If the value is an associative array, processes per 
-      <a href="#processing-step-associative">Step 2</a>, ensuring to set
-      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
-      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-
-      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
-      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
-      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
-      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
-      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
-
-      <li>If the value is a regular array, should we support RDF 
-      List/Sequence Processing? 
-      <div class="issue">If the value is a regular array, should we support 
-      RDF List/Sequence generation of triples? For example, would implementing
-      this be worth the more complex processing rules: "ex:orderedItems" : 
-      [["one", "two", "three"]]</div></li>
-    </ol>
-  </li>
-</ol>
-
-</div>
-
-<div id="markup-of-rdf-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
-
-<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked 
-up in a way that is simple to understand and author by Web developers. In many
-cases, Javascript objects can become Linked Data with the simple addition
-of a context. Since RDF is also an important sub-community of the Linked
-Data movement, it is important that all RDF concepts are well-represented
-in this specification. This section details how each RDF concept can be
-expressed in JSON-LD.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">5.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
-and many objects are identified. IRIs can be expressed in a variety of
-different ways in JSON-LD.</p>
-
-<ol>
-  <li>In general, an IRI is generated if it is in the key position in 
-    an associative array. There are special rules for processing keys in
-    <code>@context</code> and when dealing with keys that start with the
-    <code>@</code> character.</li>
-  <li>An IRI is generated for the value specified using <code>@</code>, if
-    it is a string.</li>
-  <li>An IRI is generated for the value specified using <code>a</code>.</li>
-  <li>An IRI is generated for the value specified using the <code>@iri</code> 
-    keyword.</li>
-  <li>An IRI is generated when there are <code>@coerce</code> rules in 
-    effect for <code>xsd:anyURI</code> for a particular vocabulary term.</li>
-</ol>
-
-<p>An example of IRI generation for a key outside of a <code>@context</code>:
-</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p>In the example above, the key 
-<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
-opposed to being interpreted as a string..</p>
-
-<p>CURIE expansion also occurs for keys in JSON-LD:</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><code>foaf:name</code> above will automatically expand out to the IRI
-<code>http://xmlns.com/foaf/0.1/name</code>.</p>
-
-<p>An IRI is generated when a value is associated with a key using 
-the <code>@iri</code> keyword:</p>
-
-<pre class="example">
-{
-...
-  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}</pre>
-
-<p>If type coercion rules are specified in the <code>@context</code> for
-a particular vocabulary term, an IRI is generated:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:anyURI": "foaf:homepage"
-    } 
-  }</span>
-...
-  "foaf:homepage": "http://manu.sporny.org",
-...
-}</pre>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
-
-<p>A subject is declared using the <code>@</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, property, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to the IRI 
-<code>http://example.org/people#joebob</code>.
-</p>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">5.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the <code>a</code>
-key. Specifying the type in this way will generate a triple of the form 
-(subject, type, type-url).</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "<span class="diff">a</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple 
-(in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-</div>
-
-<div id="plain-literals" class="section">
-<h3><span class="secno">5.4 </span>Plain Literals</h3>
-
-<p>Regular text strings are called "plain literals" in RDF and are easily
-expressed using regular JSON strings.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="language-specification-in-plain-literals" class="section">
-<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
-
-<p>JSON-LD makes an assumption that plain literals with associated
-language encoding information is not very common when used in
-JavaScript and Web Services. Thus, it takes a little more
-effort to express plain literals in a specified language.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}</pre>
-
-<p>The example above would generate a plain literal for <em>花澄</em> and
-associate the <code>ja</code> language tag with the triple that is
-generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="typed-literals" class="section">
-<h3><span class="secno">5.6 </span>Typed Literals</h3>
-
-<p>Literals may also be typed in JSON-LD in two ways:</p>
-
-<ol>
-  <li>By utilizing the <code>@coerce</code> keyword.</li>
-  <li>By utilizing the expanded form for specifying objects.</li>
-</ol>
-
-<p>The first example uses the <code>@coerce</code> keyword to express a
-typed literal:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }</span>
-...
-  "dc:modified": "2010-05-29T14:17:39+02:00",
-...
-}</pre>
-
-<p>The second example uses the expanded form for specifying objects:</p>
-
-<pre class="example">
-{
-...
-  "dc:modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }</span>
-...
-}</pre>
-
-<p>Both examples above would generate an object with the literal value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-arrays. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an array.</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "jaybee" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple typed literals may also be expressed using the expanded
-form for objects:</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/articles/8",
-  "dcterms:modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]</span>
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="blank-nodes" class="section">
-<h3><span class="secno">5.9 </span>Blank Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this is where blank nodes come
-into play. In JSON-LD, blank node identifiers are automatically created if a 
-subject is not specified using the <code>@</code> keyword. However, authors 
-may name blank nodes by using the special <code>_</code> CURIE prefix.</p>
-
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-named blank node.
-</p>
-
-</div>
-
-</div>
-
-<div id="advanced-features" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>Advanced Features</h2>
-
-<p>JSON-LD has a number of features that provide functionality above and beyond
-the core functionality provided by RDF. The following sections outline the
-features that are specific to JSON-LD.
-</p>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">6.1 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as doubles, 
-integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
-information to create <a href="#typed-literals">Typed Literals</a>:</p>
-
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-<p class="note">When dealing with a number of modern programming languages,
-including JavaScript ECMA-262, there is no distinction between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
-the number <code>5.3</code> and the number 
-<code>5.3e0</code> are treated as if they were the same. When converting from 
-JSON-LD to a language-native format and back, datatype information is lost in a 
-number of these languages. Thus, one could say that <code>5.3</code> is a 
-<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
-<strong>xsd:double</strong> in JSON-LD, but when both values are 
-converted to a language-native format the datatype difference between the two 
-is lost because the machine-level representation will almost always be a 
-<strong>double</strong>. 
-Implementers should be aware of this potential round-tripping issue between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
-objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
-to a language native type.
-</p>
-
-</div>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">6.2 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
-JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
-coerce and incoming or outgoing types to the proper RDF type based on a
-mapping of type IRIs to RDF types. Using type conversion, one may convert
-simple JSON data to properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to 
-plain literals, typed literals and IRIs.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@type":
-     {
-        "xsd:integer": "age",
-        "xsd:anyURI": "homepage",
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-</div>
-
-<div id="best-practices" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">7. </span>Best Practices</h2>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be 
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<div id="javascript" class="section">
-<h3><span class="secno">7.1 </span>JavaScript</h3>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in 
-JavaScript environments, however, features like the expanded form for
-object values mean that using JSON-LD directly in JavaScript may be 
-annoying without a middleware layer such as a simple library that 
-converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDF API, which enables a variety of RDF-based
-Web Applications, but some don't want to require that level of functionality 
-just to use JSON-LD. The group is still discussing the best way to proceed, 
-so input on how JSON-LD could more easily be utilized in JavaScript 
-environments would be very much appreciated.
-</p>
-</div>
-
-<div id="schema-less-databases" class="section">
-<h3><span class="secno">7.2 </span>Schema-less Databases</h3>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from 
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">8. </span>Advanced Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear 
-whether or not the JSON-LD specification is going to support the complexity 
-necessary to support each concept. The entire section on Advanced Concepts 
-should be considered as discussion points; it is merely a list of 
-possibilities where all of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="vocabulary-profiles" class="section">
-<h3><span class="secno">8.1 </span>Vocabulary Profiles</h3>
-
-<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
-a collection of prefixes and terms that can be re-used by a processor to simplfy
-markup. JSON-LD provides a similar mechanism called Vocabulary Profiles, which is 
-the inclusion of a context external to the JSON-LD document.</p>
-
-<p>The example below demonstrates how one may specify an external Vocabulary
-Profile. Assume the following profile exists at this imaginary URL:
-<code>http://example.org/profiles/contacts</code>.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}</pre>
-
-<p>The profile listed above can be used in the following way:</p>
-
-<pre class="example">
-{
-  "@profile": "http://example.org/profiles/contacts",
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">8.2 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an array to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single JSON-LD associative
-array.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "@": 
-  [
-    {
-      "@": "http://example.org/people#john",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "http://example.org/people#jane",
-      "a": "foaf:Person"
-    }
-  ]
-}</pre>
-
-<p>A disjoint graph could also be expressed like so:</p>
-
-<pre class="example">
-[
-  {
-    "@": "http://example.org/people#john",
-    "a": "foaf:Person"
-  },
-  {
-    "@": "http://example.org/people#jane",
-    "a": "foaf:Person"
-  }
-]</pre>
-
-</div>
-
-<div id="the-json-ld-api" class="section">
-<h3><span class="secno">8.3 </span>The JSON-LD API</h3>
-
-<p>This API provides a clean mechanism that enables developers to convert 
-JSON-LD data into a format that is easier to work with in various programming
-languages.
-</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDProcessor</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-};</span>
-</pre><div id="methods" class="section"><h4><span class="secno">8.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback"><code>toGraph</code></dt><dd>Parses JSON-LD and transforms the data into an Graph, which is 
-  compatible with the RDF Interfaces API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">RDF-INTERFACES</a></cite>]. 
-  This method will 
-  return <code>null</code> if there are any errors, or if the RDF Interfaces 
-  API is not available for use.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>Graph</a></code></div></dd><dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback"><code>toProjection</code></dt><dd>Parses JSON-LD text into an RDF API Projection object as specified
-    by the RDF API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-API">RDF-API</a></cite>].
-    If there are any errors, <code>null</code> is returned.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the Projection.</td></tr><tr><td class="prmName">template</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The Projection template to use when building the Projection.</td></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject to use when building the Projection.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
-
-<p>The JSONLDParserCallback is called whenever a processing error occurs on
-input data.</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre><div id="methods-1" class="section"><h4><span class="secno">8.3.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
-
-<p>The following example demonstrates how to convert JSON-LD to a projection
-that is directly usable in a programming environment:
-</p>
-
-<pre class="example">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-
-// Map the JSON-LD to a language-native object
-var person = jsonld.toProjection(jsonldString, myTemplate);
-
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-      "Their homepage is: " + person.homepage);</pre>
-
-<p>A JSON-LD Serializer is also available to map a language-native object
-to JSON-LD.
-
-</p><pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
-};</span>
-</pre><div id="methods-2" class="section"><h4><span class="secno">8.3.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
-  Normalization is important when performing things like equality comparison
-  and digital signature creation and verification.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An associative array of key-value pairs that should be converted
-     to a JSON-LD string. It is assumed that a map already exists for the
-     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
-
-<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
-
-<p class="issue">This algorithm is very rough, untested, and probably contains
-many bugs. Use at your own risk. It will change in the coming months.</p>
-
-<p>The JSON-LD normalization algorithm is as follows:</p>
-
-<ol class="algorithm">
-  <li>Remove the <code>@context</code> key and preserve it as the 
-  <dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
-  <li>For each key
-   <ol class="algorithm">
-    <li>If the key is a CURIE, expand the CURIE to an IRI using the
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-   </ol>
-  </li>
-  <li>For each value
-   <ol class="algorithm">
-    <li>If the value should be type coerced per the 
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
-        new value.</li>
-    <li>If the value is a CURIE, expand the CURIE to an IRI using the
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-    <li>If the value is a Typed Literal and the type is a CURIE,
-        expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-    <li>When generating the final value, use expanded object value form to
-      store all IRIs, typed literals and plain literals with language
-      information.</li>
-   </ol>
-  </li><li>Output each sorted key-value pair without any extraneous whitespace. If 
-  the value is an associative array, perform this algorithm, starting
-  at step #1, recursively on the sub-tree. There should be no nesting in
-  the outputted JSON data. That is, the top-most element should be an
-  array. Each item in the array contains a single subject with a 
-  corresponding array of properties in UTF-8 sort order. Any related 
-  objects that are complex objects themselves should be given a top-level 
-  object in the top-level array.</li>
-  
-</ol>
-
-<p class="issue">Note that normalizing named blank nodes is impossible at
-present since one would have to specify a blank node naming algorithm. For
-the time being, you cannot normalize graphs that contain named blank
-nodes. However, normalizing graphs that contain non-named blank nodes 
-is supported.</p>
-
-<pre class="example">
-var myObj = { "@context" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "@type": {
-                   "xsd:nonNegativeInteger": "age",
-                   "xsd:anyURI": "homepage"
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : 42,
-              "homepage" : "http://example.org/people/joe" };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);</pre>
-
-<p>After the code in the example above has executed, the 
-<strong>jsonldText</strong> value will be (line-breaks added for 
-readability):</p>
-
-<pre class="example">
-[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
-"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
-"http://xmlns.com/foaf/0.1/name":"Joe Jackson"}]</pre>
-
-<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
-ensure that the normalized value is a string. In order to generate the
-string from a <strong>double</strong> value, output equivalent to the
-<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
-<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
-is the value to be converted.</p>
-
-<p>To convert the a double value in JavaScript, implementers can use the 
-following snippet of code:</p>
-
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
-
-<p class="note">When data needs to be normalized, JSON-LD authors should
-not use values that are going to undergo automatic conversion. This is due
-to the lossy nature of <strong>xsd:double</strong> values.</p>
-
-</div>
-
-</div>
-
-
-
-<div class="appendix section" id="the-default-context">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>The Default Context</h2>
-
-<p>The <dfn title="default_context" id="dfn-default_context-1">default context</dfn> is provided to ensure that there are a
-reasonable set of prefixes and terms available to all JSON-LD developers.
-Mappings specified by the default context <em class="rfc2119" title="should not">should not</em> be overwritten by
-JSON-LD authors. All JSON-LD processors <em class="rfc2119" title="must">must</em> load the following context 
-in as the intial context before processing JSON-LD text.</p>
-
-<pre>
-{
-  "@context":
-  {
-    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
-    "owl": "http://www.w3.org/2002/07/owl#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dcterms": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "vcard": "http://www.w3.org/2006/vcard/ns# ",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "cc": "http://creativecommons.org/ns#",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "com": "http://purl.org/commerce#",
-    "ps": "http://purl.org/payswarm#",
-    "gr": "http://purl.org/goodrelations/v1#",
-    "sig": "http://purl.org/signature#",
-    "ccard": "http://purl.org/commerce/creditcard#"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-}
-</pre>
-</div>
-
-
-<div class="appendix section" id="acknowledgements">
-
-<!-- OddPage -->
-<h2><span class="secno">B. </span>Acknowledgements</h2>
-
-<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
-rationale and reasoning behind the JSON-LD work via his work on RDFj, 
-Dave Longley who reviewed, provided feedback, and performed several
-implementation on the specification, and Ian Davis, who created RDF/JSON. 
-Thanks also to Nathan Rixham, Bradley P. Allen and Richard Cyganiak for their 
-input on the specification.</p>
-</div>
-
-
-
-
-<div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">C. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">C.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-API">[RDF-API]</dt><dd>Manu Sporny, Benjamin Adrian, Nathan Rixham; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><cite>RDF API</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">http://www.w3.org/2010/02/rdfa/sources/rdf-api/</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RDF-INTERFACES">[RDF-INTERFACES]</dt><dd>Nathan Rixham, Manu Sporny, Benjamin Adrian; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><cite>RDF Interfaces</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/</a>
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20110507/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20110615/diff-20110507.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11363 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-
-
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
--
-Linked
-Data
-Expression
-in
-JSON
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-Linked
-Data
-</h2>
-<h2 id="unofficial-draft-15-june-2011">
-Unofficial
-Draft
-<del class="diff-old">07
-May
-</del>
-<ins class="diff-chg">15
-June
-</ins>
-2011
-</h2>
-<dl>
-<dt>
-<del class="diff-old">Editor:
-</del>
-<ins class="diff-chg">Editors:
-</ins>
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-<dd>
-<a href="http://greggkellogg.net/">
-<ins class="diff-new">Gregg
-Kellogg
-</ins></a>,<ins class="diff-new">
-Kellogg
-Associates
-</ins></dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-</dl>
-<p>
-This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-<a href="diff-20110507.html">
-diff
-to
-previous
-version
-</a>.
-</p>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-Developers
-that
-embed
-structured
-data
-in
-their
-Web
-pages
-can
-choose
-among
-a
-number
-of
-languages
-such
-as
-RDFa
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-],
-Microformats
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
-MICROFORMATS
-</a>
-</cite>
-]
-and
-Microdata
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
-MICRODATA
-</a>
-</cite>
-].
-Each
-of
-these
-structured
-data
-languages,
-while
-incompatible
-at
-the
-syntax
-level,
-can
-be
-easily
-mapped
-to
-RDF.
-JSON
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-format.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-Linked
-Data
-that
-can
-be
-used
-to
-represent
-objects
-specified
-via
-RDFa,
-Microformats
-and
-Microdata.
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-Introduction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-1.2
-</span>
-Contributing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design-goals-and-rationale" class="tocxref">
-<span class="secno">
-2.
-</span>
-Design
-Goals
-and
-Rationale
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals" class="tocxref">
-<span class="secno">
-2.1
-</span>
-Goals
-</a>
-</li>
-<li class="tocline">
-<a href="#map-terms-to-iris" class="tocxref">
-<span class="secno">
-2.2
-</span>
-Map
-Terms
-to
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-context" class="tocxref">
-<span class="secno">
-2.3
-</span>
-The
-JSON-LD
-Context
-</a>
-</li>
-<li class="tocline">
-<a href="#unambiguous-identifiers-for-json" class="tocxref">
-<span class="secno">
-2.4
-</span>
-Unambiguous
-Identifiers
-for
-JSON
-</a>
-</li>
-<li class="tocline">
-<a href="#mashing-up-vocabularies" class="tocxref">
-<span class="secno">
-2.5
-</span>
-Mashing
-Up
-Vocabularies
-</a>
-</li>
-<li class="tocline">
-<a href="#an-example-of-a-context" class="tocxref">
-<span class="secno">
-2.6
-</span>
-An
-Example
-of
-a
-Context
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-3.
-</span>
-Markup
-Examples
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#rdfa" class="tocxref">
-<span class="secno">
-3.1
-</span>
-RDFa
-</a>
-</li>
-<li class="tocline">
-<a href="#microformats" class="tocxref">
-<span class="secno">
-3.2
-</span>
-Microformats
-</a>
-</li>
-<li class="tocline">
-<a href="#microdata" class="tocxref">
-<span class="secno">
-3.3
-</span>
-Microdata
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<del class="diff-old">4.
-The
-JSON-LD
-Processing
-Algorithm
-</del>
-<a href="#markup-of-rdf-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">4.
-</ins>
-</span>
-Markup
-of
-RDF
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">4.1
-</ins>
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">4.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.3
-</del>
-<ins class="diff-chg">4.3
-</ins>
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#plain-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.4
-</del>
-<ins class="diff-chg">4.4
-</ins>
-</span>
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#language-specification-in-plain-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.5
-</del>
-<ins class="diff-chg">4.5
-</ins>
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#typed-literals" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.6
-</del>
-<ins class="diff-chg">4.6
-</ins>
-</span>
-Typed
-Literals
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.7
-</del>
-<ins class="diff-chg">4.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.8
-</del>
-<ins class="diff-chg">4.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#blank-nodes" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.9
-</del>
-<ins class="diff-chg">4.9
-</ins>
-</span>
-Blank
-Nodes
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-features" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">5.
-</ins>
-</span>
-Advanced
-Features
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">5.1
-</ins>
-</span>
-Automatic
-Typing
-</a>
-</li>
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">5.2
-</ins>
-</span>
-Type
-Coercion
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-processing-algorithm" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">6.
-</ins></span><ins class="diff-chg">
-The
-JSON-LD
-Processing
-Algorithm
-</ins></a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno"><ins class="diff-chg">
-6.1
-</ins></span><ins class="diff-chg">
-Overview
-</ins></a></li><li class="tocline"><a href="#processing-algorithm-terms" class="tocxref"><span class="secno"><ins class="diff-chg">
-6.2
-</ins></span><ins class="diff-chg">
-Processing
-Algorithm
-Terms
-</ins></a></li><li class="tocline"><a href="#processing-tokens-and-keywords" class="tocxref"><span class="secno"><ins class="diff-chg">
-6.3
-</ins></span><ins class="diff-chg">
-Processing
-Tokens
-and
-Keywords
-</ins></a></li><li class="tocline"><a href="#context" class="tocxref"><span class="secno"><ins class="diff-chg">
-6.4
-</ins></span><ins class="diff-chg">
-Context
-</ins></a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno"><ins class="diff-chg">
-6.4.1
-</ins></span><ins class="diff-chg">
-Coerce
-</ins></a></li></ul></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno"><ins class="diff-chg">
-6.5
-</ins></span><ins class="diff-chg">
-Chaining
-</ins></a></li><li class="tocline"><a href="#iri-processing" class="tocxref"><span class="secno"><ins class="diff-chg">
-6.6
-</ins></span><ins class="diff-chg">
-IRI
-Processing
-</ins></a></li></ul></li><li class="tocline"><a href="#sequence" class="tocxref">
-<span class="secno">
-7.
-</span>
-<ins class="diff-new">Sequence
-</ins></a></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno"><ins class="diff-new">
-8.
-</ins></span>
-Best
-Practices
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#javascript" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.1
-</del>
-<ins class="diff-chg">8.1
-</ins>
-</span>
-JavaScript
-</a>
-</li>
-<li class="tocline">
-<a href="#schema-less-databases" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.2
-</del>
-<ins class="diff-chg">8.2
-</ins>
-</span>
-Schema-less
-Databases
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.
-</del>
-<ins class="diff-chg">9.
-</ins>
-</span>
-Advanced
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#vocabulary-profiles" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.1
-</del>
-<ins class="diff-chg">9.1
-</ins>
-</span>
-Vocabulary
-Profiles
-</a>
-</li>
-<li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.2
-</del>
-<ins class="diff-chg">9.2
-</ins>
-</span>
-Disjoint
-Graphs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-api" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.3
-</del>
-<ins class="diff-chg">9.3
-</ins>
-</span>
-The
-JSON-LD
-API
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#methods" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.3.1
-</del>
-<ins class="diff-chg">9.3.1
-</ins>
-</span>
-Methods
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.3.2
-</del>
-<ins class="diff-chg">9.3.2
-</ins>
-</span>
-Methods
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-2" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.3.3
-</del>
-<ins class="diff-chg">9.3.3
-</ins>
-</span>
-Methods
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-default-context" class="tocxref">
-<span class="secno">
-A.
-</span>
-The
-Default
-Context
-</a>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-B.
-</span>
-Acknowledgements
-</a>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-C.
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-C.1
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-C.2
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<p>
-JSON-LD
-is
-designed
-as
-a
-light-weight
-syntax
-that
-can
-be
-used
-to
-express
-Linked
-Data.
-It
-is
-primarily
-intended
-to
-be
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-and
-other
-Web-based
-programming
-environments.
-It
-is
-also
-useful
-when
-building
-interoperable
-Web
-Services
-and
-when
-storing
-Linked
-Data
-in
-JSON-based
-document
-storage
-engines.
-It
-is
-practical
-and
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-and
-existing
-code
-that
-is
-in
-use
-today.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-Microformats
-data,
-and
-Microdata.
-That
-is,
-it
-supports
-every
-major
-Web-based
-structured
-data
-model
-in
-use
-today.
-It
-does
-not
-require
-anyone
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-out-of-band.
-The
-syntax
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-very
-small
-memory
-footprint
-in
-order
-to
-operate.
-</p>
-<p>
-<ins class="diff-new">JSON,
-as
-specified
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
-RFC4627
-</ins></a>
-</cite>
-<ins class="diff-new">],
-is
-a
-simple
-language
-for
-representing
-objects
-on
-the
-web.
-Linked
-Data
-is
-a
-way
-of
-describing
-content
-across
-different
-documents,
-or
-web
-resources.
-Web
-resources
-are
-described
-using
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a><ins class="diff-new">
-s,
-and
-typically
-are
-dereferencable
-entities
-that
-may
-be
-used
-to
-find
-more
-information,
-creating
-a
-"web
-of
-knowledge".
-JSON-LD
-is
-intended
-to
-be
-a
-simple
-publishing
-method
-for
-expressing
-linked
-data
-in
-JSON.
-</ins>
-</p>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</h3>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-write
-processors
-for
-JSON-LD.
-</li>
-</ul>
-<p>
-To
-understand
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-]
-and
-<ins class="diff-new">RDF
-as
-described
-in
-</ins>
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
-RDF-CONCEPTS
-</a>
-</cite>
-].
-</p>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-1.2
-</span>
-Contributing
-</h3>
-<p>
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</p>
-<ul>
-<li>
-All
-comments
-and
-discussion
-takes
-place
-on
-the
-public
-mailing
-list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
-public-linked-json@w3.org
-</a>
-</li>
-<li>
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-<a href="https://github.com/json-ld/json-ld.org/issues">
-issue
-tracker
-</a>.
-</li>
-<li>
-<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
-Source
-code
-</a>
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</li>
-<li>
-The
-<a href="http://webchat.freenode.net/?channels=#json-ld">
-#json-ld
-</a>
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</li>
-</ul>
-</div>
-</div>
-<div id="design-goals-and-rationale" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Design
-Goals
-and
-Rationale
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="goals" class="section">
-<h3>
-<span class="secno">
-2.1
-</span>
-Goals
-</h3>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-don't
-need
-to
-know
-RDF
-in
-order
-to
-use
-the
-basic
-functionality
-provided
-by
-JSON-LD.
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-should
-be
-100%
-compatible
-with
-JSON.
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-All
-major
-RDF
-concepts
-must
-be
-expressible
-via
-the
-JSON-LD
-syntax.
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-readable.
-</dd>
-<dt>
-Zero
-Edits,
-most
-of
-the
-time
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-At
-times,
-mapping
-JSON
-to
-RDF
-can
-become
-difficult
--
-in
-these
-instances,
-rather
-than
-having
-JSON-LD
-support
-esoteric
-markup,
-we
-chose
-not
-to
-support
-the
-use
-case
-and
-support
-a
-simplified
-syntax
-instead.
-So,
-while
-we
-strive
-for
-Zero
-Edits,
-it
-was
-not
-always
-possible
-without
-adding
-great
-complexity
-to
-the
-language.
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<div id="map-terms-to-iris" class="section">
-<h3>
-<span class="secno">
-2.2
-</span>
-Map
-Terms
-to
-IRIs
-</h3>
-<p>
-<ins class="diff-new">An
-Internationalized
-Resource
-Identifier
-(
-</ins><dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
-IRI
-</ins></abbr></dfn><ins class="diff-new">
-)
-as
-described
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-new">
-RFC3987
-</ins></a></cite><ins class="diff-new">
-],
-is
-a
-mechanism
-for
-representing
-unique
-identifiers
-on
-the
-web.
-In
-Linked
-Data,
-IRIs
-(or
-URI
-references)
-are
-commonly
-used
-for
-describing
-entities
-and
-properties.
-</ins></p><p>
-Establishing
-a
-mechanism
-to
-map
-JSON
-values
-to
-IRIs
-will
-help
-in
-the
-mapping
-of
-JSON
-objects
-to
-RDF.
-This
-does
-not
-mean
-that
-JSON-LD
-must
-be
-restrictive
-in
-declaring
-a
-set
-of
-terms,
-rather,
-experimentation
-and
-innovation
-should
-be
-supported
-as
-part
-of
-the
-core
-design
-of
-JSON-LD.
-There
-are,
-however,
-a
-number
-of
-very
-small
-design
-criteria
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-RDF
-data
-that
-will
-create
-value
-for
-the
-greater
-semantic
-web
-community
-and
-JSON/REST-based
-Web
-Services
-community.
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-object
-as
-the
-example
-for
-this
-section:
-</p>
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-</div>
-<div id="the-json-ld-context" class="section">
-<h3>
-<span class="secno">
-2.3
-</span>
-The
-JSON-LD
-Context
-</h3>
-<p>
-A
-context
-is
-used
-<del class="diff-old">in
-RDFa
-</del>
-to
-allow
-developers
-to
-use
-aliases
-for
-<del class="diff-old">IRIs.
-</del>
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-<ins class="diff-chg">IRI
-</ins></a><ins class="diff-chg">
-s.
-</ins>
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-terms
-mean
-something,
-which
-you
-will
-eventually
-want
-to
-query.
-<ins class="diff-new">A
-context
-allows
-the
-expression
-of
-a
-number
-of
-terms
-which
-map
-directly
-to
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a><ins class="diff-new">
-s.
-For
-example,
-the
-term
-</ins><code><ins class="diff-new">
-name
-</ins></code><ins class="diff-new">
-may
-map
-directly
-to
-the
-IRI
-</ins><code><ins class="diff-new">
-http://xmlns.com/foaf/0.1/name
-</ins></code>.<ins class="diff-new">
-This
-allows
-JSON-LD
-documents
-to
-be
-constructed
-using
-common
-JSON
-syntax
-of
-using
-simple
-name/value
-pairs.
-</ins></p><p><ins class="diff-new">
-To
-reduce
-the
-number
-of
-different
-terms
-that
-must
-be
-defined,
-JSON-LD
-also
-allows
-terms
-to
-be
-used
-to
-expand
-Compact
-URIs
-(
-</ins><abbr title="Compact URI"><ins class="diff-new">
-CURIE
-</ins></abbr><ins class="diff-new">
-).
-</ins>
-The
-semantic
-web
-specifies
-this
-via
-<em>
-Vocabulary
-Documents
-<del class="diff-old">.
-The
-</del>
-</em>,
-<ins class="diff-chg">in
-which
-a
-prefix
-is
-associated
-with
-a
-document,
-and
-a
-suffix
-is
-used
-to
-create
-an
-IRI
-based
-on
-this
-vocabulary.
-For
-example,
-the
-</ins>
-IRI
-<em>
-http://xmlns.com/foaf/0.1/
-</em>
-specifies
-a
-Vocabulary
-Document,
-and
-<strong>
-name
-</strong>
-is
-a
-term
-in
-that
-vocabulary.
-Join
-the
-two
-items
-together
-and
-you
-have
-an
-unambiguous
-identifier
-for
-a
-vocabulary
-term.
-The
-Compact
-URI
-Expression,
-or
-short-form,
-is
-<code>
-foaf:name
-</code>
-and
-the
-expanded-form
-is
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-vocabulary
-term
-identifies
-the
-given
-name
-for
-something,
-for
-example
--
-a
-person's
-name.
-</p>
-<p>
-Developers,
-and
-machines,
-would
-be
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-Machines
-need
-the
-same
-sort
-of
-dictionary
-of
-terms,
-and
-URIs
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-The
-context
-provides
-a
-collection
-of
-vocabulary
-terms
-that
-can
-be
-used
-for
-a
-JSON
-object.
-</p>
-</div>
-<div id="unambiguous-identifiers-for-json" class="section">
-<h3>
-<span class="secno">
-2.4
-</span>
-Unambiguous
-Identifiers
-for
-JSON
-</h3>
-<p>
-If
-a
-set
-of
-terms,
-like
-<strong>
-Person
-</strong>,
-<strong>
-name
-</strong>,
-and
-<strong>
-homepage
-</strong>,
-are
-defined
-in
-a
-context,
-and
-that
-context
-is
-used
-to
-resolve
-the
-names
-in
-JSON
-objects,
-machines
-could
-automatically
-expand
-the
-terms
-to
-something
-meaningful
-and
-unambiguous,
-like
-this:
-</p>
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-<p>
-Doing
-this
-would
-mean
-that
-JSON
-would
-start
-to
-become
-unambiguously
-machine-readable,
-play
-well
-with
-the
-semantic
-web,
-and
-basic
-markup
-wouldn't
-be
-that
-much
-more
-complex
-than
-basic
-JSON
-markup.
-A
-win,
-all
-around.
-</p>
-</div>
-<div id="mashing-up-vocabularies" class="section">
-<h3>
-<span class="secno">
-2.5
-</span>
-Mashing
-Up
-Vocabularies
-</h3>
-<p>
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</p>
-<ul>
-<li>
-RDF
--
-for
-describing
-information
-about
-objects
-on
-the
-semantic
-web.
-</li>
-<li>
-RDFS
--
-for
-expressing
-things
-like
-labels
-and
-comments.
-</li>
-<li>
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</li>
-<li>
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</li>
-<li>
-FOAF
--
-for
-describing
-social
-networks.
-</li>
-<li>
-Calendar
--
-for
-specifying
-events.
-</li>
-<li>
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</li>
-<li>
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</li>
-<li>
-GEO
--
-for
-describing
-geographic
-location.
-</li>
-<li>
-VCard
--
-for
-describing
-organizations
-and
-people.
-</li>
-<li>
-DOAP
--
-for
-describing
-projects.
-</li>
-</ul>
-<p>
-Since
-these
-vocabularies
-are
-very
-popular,
-they
-are
-pre-defined
-in
-something
-called
-the
-<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
-default
-context
-</a>,
-which
-is
-a
-set
-of
-vocabulary
-prefixes
-that
-are
-pre-loaded
-in
-all
-JSON-LD
-processors.
-The
-contents
-of
-the
-<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
-default
-context
-</a>
-are
-provided
-later
-in
-this
-document.
-Using
-the
-<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
-default
-context
-</a>
-allows
-developers
-to
-express
-data
-unambiguously,
-like
-so:
-</p>
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-<p>
-Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-<del class="diff-old">default
-</del>
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-<ins class="diff-chg">active
-</ins>
-context
-</a>
-in-line
-using
-the
-<code>
-@context
-</code>
-keyword,
-like
-so:
-</p>
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}
-</pre>
-<p>
-The
-<code>
-@context
-</code>
-keyword
-is
-used
-to
-change
-how
-the
-JSON-LD
-processor
-evaluates
-key-value
-pairs.
-In
-this
-case,
-it
-was
-used
-to
-map
-one
-string
-('myvocab')
-to
-another
-string,
-which
-is
-interpreted
-as
-a
-<del class="diff-old">IRI.
-</del>
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-<ins class="diff-chg">IRI
-</ins></a>.
-In
-the
-example
-above,
-the
-<code>
-myvocab
-</code>
-string
-is
-replaced
-with
-"
-<code>
-http://example.org/myvocab#
-</code>
-"
-when
-it
-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
-for
-RDF,
-called
-a
-CURIE,
-and
-provides
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</p>
-<p>
-</p>
-</div>
-<div id="an-example-of-a-context" class="section">
-<h3>
-<span class="secno">
-2.6
-</span>
-An
-Example
-of
-a
-Context
-</h3>
-<p>
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-A
-JSON-LD
-aware
-Web
-Service
-<em class="rfc2119" title="may">
-may
-</em>
-define
-a
-known
-context.
-For
-example,
-the
-following
-<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
-default
-context
-</a>
-could
-apply
-to
-all
-incoming
-Web
-Service
-calls
-previously
-accepting
-only
-JSON
-data:
-</p>
-<pre class="example">
-{
-  "@context": 
-  {
-    "@vocab": "http://example.org/default-vocab#",
-    "@base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-    "@coerce": 
-    {
-<del class="diff-old">      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
-</del>
-<ins class="diff-chg">      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
-</ins>
-      "xsd:integer": "foaf:age"
-    }
-  }
-}
-</pre>
-<p>
-The
-<code>
-@vocab
-</code>
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-term
-that
-doesn't
-resolve
-to
-a
-term
-or
-a
-prefix
-should
-be
-appended
-to
-the
-<code>
-@vocab
-</code>
-IRI.
-This
-is
-done
-to
-ensure
-that
-terms
-can
-be
-transformed
-to
-an
-IRI
-at
-all
-times.
-</p>
-<p>
-The
-<code>
-@base
-</code>
-string
-is
-a
-special
-keyword
-that
-states
-that
-any
-relative
-IRI
-<em class="rfc2119" title="must">
-must
-</em>
-be
-appended
-to
-the
-string
-specified
-by
-<code>
-@base
-</code>.
-</p>
-<p>
-The
-<code>
-@coerce
-</code>
-keyword
-is
-used
-to
-specify
-type
-<del class="diff-old">coersion
-</del>
-<ins class="diff-chg">coercion
-</ins>
-rules
-for
-the
-data.
-For
-each
-key
-in
-the
-map,
-the
-key
-is
-the
-type
-to
-be
-coerced
-to
-and
-the
-value
-is
-the
-vocabulary
-term
-to
-be
-coerced.
-Type
-<del class="diff-old">coersion
-</del>
-<ins class="diff-chg">coercion
-</ins>
-for
-the
-key
-<code>
-xsd:anyURI
-</code>
-asserts
-that
-all
-vocabulary
-terms
-listed
-should
-undergo
-coercion
-to
-an
-IRI,
-including
-<code>
-@base
-</code>
-processing
-for
-relative
-IRIs
-and
-CURIE
-processing
-for
-compact
-URI
-Expressions
-<del class="diff-old">like
-</del>
-<ins class="diff-chg">such
-as
-</ins>
-<code>
-foaf:homepage
-</code>.
-</p>
-</div>
-</div>
-<div id="markup-examples" class="section">
-<h2>
-<span class="secno">
-3.
-</span>
-Markup
-Examples
-</h2>
-<p>
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</p>
-<div id="rdfa" class="section">
-<h3>
-<span class="secno">
-3.1
-</span>
-RDFa
-</h3>
-<p>
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</p>
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</pre>
-<p>
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</p>
-<pre class="example">
-[
- {
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/bob/",
-   "foaf:name": "Bob"
- },
- {
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/eve/",
-   "foaf:name": "Eve"
- },
- {
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/manu/",
-   "foaf:name": "Manu"
- }
-]
-</pre>
-</div>
-<div id="microformats" class="section">
-<h3>
-<span class="secno">
-3.2
-</span>
-Microformats
-</h3>
-<p>
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</p>
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-</pre>
-<p>
-The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-<code>
-url
-</code>
-and
-<code>
-fn
-</code>
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-<code>
-http://tantek.com
-</code>.
-</p>
-<pre class="example">
-{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}
-</pre>
-</div>
-<div id="microdata" class="section">
-<h3>
-<span class="secno">
-3.3
-</span>
-Microdata
-</h3>
-<p>
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</p>
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</pre>
-<p>
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</p>
-<pre class="example">
-[
-  {
-    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]
-</pre>
-</div>
-</div>
-<del class="diff-old">4.
-The
-JSON-LD
-Processing
-Algorithm
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-The
-Processing
-Algorithm
-is
-a
-work
-in
-progress,
-there
-are
-still
-major
-bugs
-in
-the
-algorithm
-and
-it's
-difficult
-to
-follow.
-It's
-provided
-only
-to
-very
-early
-implementers
-to
-give
-them
-an
-idea
-of
-how
-to
-implement
-a
-processor.
-Processing
-Algorithm
-Terms
-default
-context
--
-a
-context
-that
-is
-specified
-to
-the
-JSON-LD
-processing
-algorithm
-before
-processing
-begins.
-default
-graph
--
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-active
-subject
--
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-inherited
-subject
--
-a
-subject
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-current
-subject
-is
-discovered
-or
-generated.
-active
-property
--
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-inherited
-property
--
-a
-property
-that
-was
-detected
-at
-a
-higher
-level
-of
-processing
-to
-be
-used
-to
-generate
-a
-triple
-once
-a
-current
-subject
-is
-discovered
-or
-generated.
-active
-object
--
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-active
-context
--
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-active
-context
-is
-the
-top-most
-item
-on
-the
-active
-context
-stack.
-local
-context
--
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-@context
-keyword.
-list
-of
-incomplete
-triples
--
-A
-list
-of
-triples
-that
-have
-yet
-to
-have
-their
-subject
-set.
-list
-of
-unprocessed
-items
--
-A
-list
-of
-objects
-that
-cannot
-be
-processed
-until
-a
-local
-context
-is
-detected
-or
-the
-end
-of
-the
-current
-associative-array
-is
-detected.
-processor
-state
--
-the
-processor
-state,
-which
-includes
-the
-active
-context
-stack,
-current
-subject
-,
-current
-property
-,
-list
-of
-incomplete
-triples
-,
-and
-the
-list
-of
-unprocessed
-items
-.
-Processing
-Tokens
-and
-Keywords
-@context
--
-Used
-to
-set
-the
-active
-context.
-@base
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-active
-context.
-@vocab
--
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-active
-context.
-@coerce
--
-Used
-to
-specify
-type
-coercion
-rules.
-@literal
--
-Used
-to
-specify
-a
-literal
-value.
-@iri
--
-Used
-to
-specify
-an
-IRI
-value.
-@language
--
-Used
-to
-specify
-the
-language
-for
-a
-literal.
-@datatype
--
-Used
-to
-specify
-the
-datatype
-for
-a
-literal.
-:
--
-The
-separator
-for
-CURIEs
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-@
--
-Sets
-the
-active
-subjects.
-a
--
-Used
-to
-set
-the
-rdf:type
-of
-the
-active
-subjects.
-The
-algorithm
-below
-is
-designed
-for
-streaming
-(SAX-based)
-implementations.
-Implementers
-will
-find
-that
-non-streaming
-(document-based)
-implementations
-will
-be
-much
-easier
-to
-implement
-as
-full
-access
-to
-the
-JSON
-object
-model
-eliminates
-some
-of
-the
-steps
-that
-are
-necessary
-for
-streaming
-implementations.
-A
-conforming
-JSON-LD
-processor
-must
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-default
-graph
-that
-the
-following
-algorithm
-generates:
-Push
-the
-default
-context
-onto
-the
-active
-context
-stack.
-If
-an
-associative
-array
-is
-detected,
-create
-a
-new
-processor
-state
-.
-Copy
-the
-current
-context
-stack
-to
-the
-newly
-created
-processor
-state
-.
-Push
-the
-active
-context
-onto
-the
-newly
-created
-processor
-state
-'s
-active
-context
-stack.
-For
-each
-key-value
-pair
-in
-the
-associative
-array,
-using
-the
-newly
-created
-processor
-state
-do
-the
-following:
-If
-a
-@context
-keyword
-is
-found,
-the
-processor
-merges
-each
-key-value
-pair
-in
-the
-local
-context
-into
-the
-active
-context
-,
-overwriting
-any
-duplicate
-values
-in
-the
-active
-context
-.
-If
-the
-@coerce
-key
-is
-found,
-the
-processor
-merges
-each
-key-value
-pair
-in
-the
-local
-context
-'s
-@coerce
-mapping
-into
-the
-active
-context
-'s
-@coerce
-mapping,
-overwriting
-any
-duplicate
-values
-in
-the
-active
-context
-'s
-@coerce
-mapping.
-Process
-each
-object
-in
-the
-list
-of
-unprocessed
-items
-,
-starting
-at
-Step
-2.2
-.
-If
-the
-local
-context
-has
-not
-been
-detected,
-the
-current
-key-value
-pair
-is
-placed
-into
-the
-list
-of
-unprocessed
-items
-and
-processing
-proceeds
-to
-the
-next
-key-value
-pair.
-Otherwise,
-if
-the
-local
-context
-is
-known
-perform
-the
-following
-steps:
-If
-a
-@
-key
-is
-found,
-the
-processor
-sets
-the
-active
-subject
-to
-the
-value
-after
-Object
-Processing
-has
-been
-performed.
-If
-the
-inherited
-subject
-and
-inherited
-property
-values
-are
-specified,
-generate
-a
-triple
-using
-the
-inherited
-subject
-for
-the
-subject,
-the
-inherited
-property
-for
-the
-property,
-and
-the
-active
-subject
-for
-the
-object.
-If
-there
-are
-any
-triples
-in
-the
-list
-of
-incomplete
-triples
-,
-complete
-each
-triple
-using
-the
-active
-subject
-as
-the
-subject
-for
-each
-triple.
-If
-an
-a
-key
-is
-found,
-set
-the
-active
-property
-to
-http://www.w3.org/1999/02/22-rdf-syntax-ns#type
-.
-If
-a
-key
-that
-is
-not
-@context
-,
-@
-,
-or
-a
-,
-set
-the
-active
-property
-by
-performing
-Property
-Processing
-on
-the
-key.
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-active
-object
-by
-performing
-Object
-Processing
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-active
-subject
-,
-the
-active
-property
-and
-the
-active
-object
-.
-If
-the
-value
-is
-an
-associative
-array,
-then
-process
-the
-value
-starting
-at
-Step
-2
-.
-If
-the
-value
-is
-a
-regular
-array,
-then
-process
-the
-value
-starting
-at
-Step
-3
-ensuring
-that
-the
-active
-subject
-and
-the
-active
-property
-are
-copied
-to
-a
-newly
-created
-processor
-state
-.
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-active
-subject
-was
-not
-discovered,
-then:
-Generate
-a
-blank
-node
-identifier
-and
-set
-it
-as
-the
-active
-subject
-.
-Complete
-any
-previously
-incomplete
-triples
-by
-running
-all
-substeps
-of
-Step
-2.2.1
-.
-If
-the
-end
-of
-the
-associative
-array
-is
-detected,
-and
-a
-local
-context
-was
-not
-discovered,
-then
-assume
-that
-the
-active
-context
-is
-unmodified
-and
-run
-all
-substeps
-of
-Step
-2.2
-on
-the
-list
-of
-unprocessed
-items
-.
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following:
-If
-the
-value
-is
-an
-associative
-array,
-processes
-per
-Step
-2
-,
-ensuring
-to
-set
-the
-inherited
-subject
-to
-the
-active
-subject
-and
-the
-inherited
-property
-to
-the
-active
-property
-in
-the
-newly
-created
-processor
-state
-.
-If
-the
-value
-is
-not
-an
-array,
-set
-the
-active
-object
-by
-performing
-Object
-Processing
-on
-the
-value.
-Generate
-a
-triple
-representing
-the
-active
-subject
-,
-the
-active
-property
-and
-the
-active
-object
-and
-place
-it
-into
-the
-default
-graph
-.
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-Processing?
-If
-the
-value
-is
-a
-regular
-array,
-should
-we
-support
-RDF
-List/Sequence
-generation
-of
-triples?
-For
-example,
-would
-implementing
-this
-be
-worth
-the
-more
-complex
-processing
-rules:
-"ex:orderedItems"
-:
-[["one",
-"two",
-"three"]]
-</del>
-<div id="markup-of-rdf-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">4.
-</ins>
-</span>
-Markup
-of
-RDF
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-most
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-Javascript
-objects
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-Since
-RDF
-is
-also
-an
-important
-sub-community
-of
-the
-Linked
-Data
-movement,
-it
-is
-important
-that
-all
-RDF
-concepts
-are
-well-represented
-in
-this
-specification.
-This
-section
-details
-how
-each
-RDF
-concept
-can
-be
-expressed
-in
-JSON-LD.
-</p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">4.1
-</ins>
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-subjects
-and
-many
-objects
-are
-identified.
-IRIs
-can
-be
-expressed
-in
-a
-variety
-of
-different
-ways
-in
-JSON-LD.
-</p>
-<ol>
-<li>
-In
-general,
-an
-IRI
-is
-generated
-if
-it
-is
-in
-the
-key
-position
-in
-an
-associative
-array.
-There
-are
-special
-rules
-for
-processing
-keys
-in
-<code>
-@context
-</code>
-and
-when
-dealing
-with
-keys
-that
-start
-with
-the
-<code>
-@
-</code>
-character.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-@
-</code>,
-if
-it
-is
-a
-string.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-a
-</code>.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-the
-<code>
-@iri
-</code>
-keyword.
-</li>
-<li>
-An
-IRI
-is
-generated
-when
-there
-are
-<code>
-@coerce
-</code>
-rules
-in
-effect
-for
-<code>
-xsd:anyURI
-</code>
-for
-a
-particular
-vocabulary
-term.
-</li>
-</ol>
-<p>
-An
-example
-of
-IRI
-generation
-for
-a
-key
-outside
-of
-a
-<code>
-@context
-</code>:
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-In
-the
-example
-above,
-the
-key
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-is
-interpreted
-as
-an
-IRI,
-as
-opposed
-to
-being
-interpreted
-as
-a
-string..
-</p>
-<p>
-<ins class="diff-new">Term
-expansion
-occurs
-for
-IRIs
-if
-a
-term
-is
-defined
-within
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a>:</p><pre class="example"><ins class="diff-new">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}
-</ins></pre><p>
-CURIE
-expansion
-also
-occurs
-for
-keys
-in
-JSON-LD:
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-<code>
-foaf:name
-</code>
-above
-will
-automatically
-expand
-out
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-</p>
-<p>
-An
-IRI
-is
-generated
-when
-a
-value
-is
-associated
-with
-a
-key
-using
-the
-<code>
-@iri
-</code>
-keyword:
-</p>
-<pre class="example">
-{
-...
-  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}
-</pre>
-<p>
-If
-type
-coercion
-rules
-are
-specified
-in
-the
-<code>
-@context
-</code>
-for
-a
-particular
-vocabulary
-term,
-an
-IRI
-is
-generated:
-</p>
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:anyURI": "foaf:homepage"
-    } 
-  }</span>
-...
-  "foaf:homepage": "http://manu.sporny.org",
-...
-}
-</pre>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">4.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-A
-subject
-is
-declared
-using
-the
-<code>
-@
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-property,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-the
-IRI
-<code>
-http://example.org/people#joebob
-</code>.
-</p>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.3
-</del>
-<ins class="diff-chg">4.3
-</ins>
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-a
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-type-url).
-</p>
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "<span class="diff">a</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-(in
-N-Triples
-notation):
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-</div>
-<div id="plain-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.4
-</del>
-<ins class="diff-chg">4.4
-</ins>
-</span>
-Plain
-Literals
-</h3>
-<p>
-Regular
-text
-strings
-are
-called
-<del class="diff-old">"plain
-literals"
-</del>
-<ins class="diff-chg">a
-</ins><dfn title="plain_literal" id="dfn-plain_literal"><ins class="diff-chg">
-plain
-literal
-</ins></dfn>
-in
-RDF
-and
-are
-easily
-expressed
-using
-regular
-JSON
-strings.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}
-</pre>
-</div>
-<div id="language-specification-in-plain-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.5
-</del>
-<ins class="diff-chg">4.5
-</ins>
-</span>
-Language
-Specification
-in
-Plain
-Literals
-</h3>
-<p>
-JSON-LD
-makes
-an
-assumption
-that
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-<del class="diff-old">literals
-</del>
-<ins class="diff-chg">literal
-</ins></a><ins class="diff-chg">
-s
-</ins>
-with
-associated
-language
-encoding
-information
-is
-not
-very
-common
-when
-used
-in
-JavaScript
-and
-Web
-Services.
-Thus,
-it
-takes
-a
-little
-more
-effort
-to
-express
-plain
-literals
-in
-a
-specified
-language.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-for
-<em>
-花澄
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-tag
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="typed-literals" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.6
-</del>
-<ins class="diff-chg">4.6
-</ins>
-</span>
-Typed
-Literals
-</h3>
-<p>
-<ins class="diff-new">A
-</ins><dfn title="typed_literal" id="dfn-typed_literal"><ins class="diff-new">
-typed
-literal
-</ins></dfn><ins class="diff-new">
-is
-indicated
-by
-attaching
-a
-IRI
-to
-the
-end
-of
-a
-</ins><a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal"><ins class="diff-new">
-plain
-literal
-</ins></a>,<ins class="diff-new">
-and
-this
-IRI
-indicates
-the
-literal's
-datatype.
-</ins>
-Literals
-may
-<del class="diff-old">also
-</del>
-be
-typed
-in
-JSON-LD
-in
-<del class="diff-old">two
-</del>
-<ins class="diff-chg">three
-</ins>
-ways:
-</p>
-<ol>
-<li>
-By
-utilizing
-the
-<code>
-@coerce
-</code>
-keyword.
-</li>
-<li>
-By
-utilizing
-the
-expanded
-form
-for
-specifying
-objects.
-</li>
-<li>
-<ins class="diff-new">By
-using
-a
-native
-JSON
-datatype.
-</ins></li>
-</ol>
-<p>
-The
-first
-example
-uses
-the
-<code>
-@coerce
-</code>
-keyword
-to
-express
-a
-typed
-literal:
-</p>
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }</span>
-...
-  "dc:modified": "2010-05-29T14:17:39+02:00",
-...
-}
-</pre>
-<p>
-The
-second
-example
-uses
-the
-expanded
-form
-for
-specifying
-objects:
-</p>
-<pre class="example">
-{
-...
-  "dc:modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }</span>
-...
-}
-</pre>
-<p>
-Both
-examples
-above
-would
-generate
-an
-object
-with
-the
-literal
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.7
-</del>
-<ins class="diff-chg">4.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-arrays.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-array.
-</p>
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-"jaybee"
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.8
-</del>
-<ins class="diff-chg">4.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-<del class="diff-old">literals
-</del>
-<ins class="diff-chg">literal
-</ins></a><ins class="diff-chg">
-s
-</ins>
-may
-also
-be
-expressed
-using
-the
-expanded
-form
-for
-objects:
-</p>
-<pre class="example">
-{
-...
-  "@": "http://example.org/articles/8",
-  "dcterms:modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]</span>
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="blank-nodes" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.9
-</del>
-<ins class="diff-chg">4.9
-</ins>
-</span>
-Blank
-Nodes
-</h3>
-<p>
-At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-is
-where
-blank
-nodes
-come
-into
-play.
-In
-JSON-LD,
-blank
-node
-identifiers
-are
-automatically
-created
-if
-a
-subject
-is
-not
-specified
-using
-the
-<code>
-@
-</code>
-keyword.
-However,
-authors
-may
-name
-blank
-nodes
-by
-using
-the
-special
-<code>
-_
-</code>
-CURIE
-prefix.
-</p>
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<code>
-_:foo
-</code>,
-which
-can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-named
-blank
-node.
-</p>
-</div>
-</div>
-<div id="advanced-features" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">5.
-</ins>
-</span>
-Advanced
-Features
-</h2>
-<p>
-JSON-LD
-has
-a
-number
-of
-features
-that
-provide
-functionality
-above
-and
-beyond
-the
-core
-functionality
-provided
-by
-RDF.
-The
-following
-sections
-outline
-the
-features
-that
-are
-specific
-to
-JSON-LD.
-</p>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">5.1
-</ins>
-</span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-doubles,
-integers,
-and
-boolean
-values.
-As
-demonstrated
-below,
-JSON-LD
-utilizes
-that
-information
-to
-create
-<del class="diff-old">Typed
-Literals
-:
-</del>
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-<ins class="diff-chg">typed
-literal
-</ins></a><ins class="diff-chg">
-s:
-</ins>
-</p>
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}
-</pre>
-<p class="note">
-When
-dealing
-with
-a
-number
-of
-modern
-programming
-languages,
-including
-JavaScript
-ECMA-262,
-there
-is
-no
-distinction
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>
-values.
-That
-is,
-the
-number
-<code>
-5.3
-</code>
-and
-the
-number
-<code>
-5.3e0
-</code>
-are
-treated
-as
-if
-they
-were
-the
-same.
-When
-converting
-from
-JSON-LD
-to
-a
-language-native
-format
-and
-back,
-datatype
-information
-is
-lost
-in
-a
-number
-of
-these
-languages.
-Thus,
-one
-could
-say
-that
-<code>
-5.3
-</code>
-is
-a
-<strong>
-xsd:decimal
-</strong>
-and
-<code>
-5.3e0
-</code>
-is
-an
-<strong>
-xsd:double
-</strong>
-in
-JSON-LD,
-but
-when
-both
-values
-are
-converted
-to
-a
-language-native
-format
-the
-datatype
-difference
-between
-the
-two
-is
-lost
-because
-the
-machine-level
-representation
-will
-almost
-always
-be
-a
-<strong>
-double
-</strong>.
-Implementers
-should
-be
-aware
-of
-this
-potential
-round-tripping
-issue
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>.
-Specifically
-objects
-with
-a
-datatype
-of
-<strong>
-xsd:decimal
-</strong>
-<em class="rfc2119" title="must not">
-must
-not
-</em>
-be
-converted
-to
-a
-language
-native
-type.
-</p>
-</div>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">5.2
-</ins>
-</span>
-Type
-Coercion
-</h3>
-<p>
-JSON-LD
-supports
-the
-coercion
-of
-types
-to
-ensure
-that
-the
-zero-edit
-goal
-of
-JSON-LD
-can
-be
-accomplished.
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-and
-incoming
-or
-outgoing
-types
-to
-the
-proper
-RDF
-type
-based
-on
-a
-mapping
-of
-type
-IRIs
-to
-RDF
-types.
-Using
-type
-conversion,
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-<del class="diff-old">literals,
-</del>
-<ins class="diff-chg">literal
-</ins></a><ins class="diff-chg">
-s,
-</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-<del class="diff-old">literals
-</del>
-<ins class="diff-chg">literal
-</ins></a><ins class="diff-chg">
-s
-</ins>
-and
-IRIs.
-</p>
-<pre class="example">
-{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<del class="diff-old">     "@type":
-</del>
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-        "xsd:anyURI": "homepage",
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-</div>
-<div id="the-json-ld-processing-algorithm" class="section">
-<h2>
-<span class="secno">
-<ins class="diff-chg">6.
-</ins></span><ins class="diff-chg">
-The
-JSON-LD
-Processing
-Algorithm
-</ins></h2><p><ins class="diff-chg">
-The
-JSON-LD
-Processing
-Model
-describes
-processing
-rules
-for
-extracting
-RDF
-from
-a
-JSON-LD
-document.
-Note
-that
-many
-uses
-of
-JSON-LD
-may
-not
-require
-generation
-of
-RDF.
-</ins></p><p><ins class="diff-chg">
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</ins></p><p class="issue"><ins class="diff-chg">
-The
-Processing
-Algorithm
-is
-a
-work
-in
-progress.
-</ins></p><div class="informative section" id="overview"><h3><span class="secno"><ins class="diff-chg">
-6.1
-</ins></span><ins class="diff-chg">
-Overview
-</ins></h3><p><em><ins class="diff-chg">
-This
-section
-is
-non-normative.
-</ins></em></p><p><ins class="diff-chg">
-JSON-LD
-is
-intended
-to
-have
-an
-easy
-to
-parse
-grammar
-that
-closely
-models
-existing
-practice
-in
-using
-JSON
-for
-describing
-object
-representations.
-This
-allows
-the
-use
-of
-existing
-libraries
-for
-parsing
-JSON
-in
-a
-document-oriented
-fashion,
-or
-can
-allow
-for
-stream-based
-parsing
-similar
-to
-SAX.
-</ins></p><p><ins class="diff-chg">
-As
-with
-other
-grammars
-used
-for
-describing
-linked
-data,
-a
-key
-concept
-is
-that
-of
-a
-</ins><em><ins class="diff-chg">
-resource
-</ins></em>.<ins class="diff-chg">
-Resources
-may
-be
-of
-three
-basic
-types:
-</ins><em><ins class="diff-chg">
-IRI
-</ins></em><ins class="diff-chg">
-s,
-for
-describing
-externally
-named
-entities,
-</ins><em><ins class="diff-chg">
-BNodes
-</ins></em>,<ins class="diff-chg">
-resources
-for
-which
-an
-external
-name
-does
-not
-exist,
-or
-is
-not
-known,
-and
-Literals,
-which
-describe
-terminal
-entities
-such
-as
-strings,
-dates
-and
-other
-representations
-having
-a
-lexical
-representation
-possibly
-including
-an
-explicit
-language
-or
-datatype.
-</ins></p><p><ins class="diff-chg">
-Data
-described
-with
-JSON-LD
-may
-be
-considered
-to
-be
-the
-representation
-of
-a
-graph
-made
-up
-of
-</ins><em><ins class="diff-chg">
-subject
-</ins></em><ins class="diff-chg">
-and
-</ins><em><ins class="diff-chg">
-object
-</ins></em><ins class="diff-chg">
-resources
-related
-via
-a
-</ins><em><ins class="diff-chg">
-predicate
-</ins></em><ins class="diff-chg">
-resource.
-However,
-specific
-implementations
-may
-choose
-to
-operate
-on
-the
-document
-as
-a
-normal
-JSON
-description
-of
-objects
-having
-attributes.
-</ins></p></div><div id="processing-algorithm-terms" class="section"><h3><span class="secno"><ins class="diff-chg">
-6.2
-</ins></span><ins class="diff-chg">
-Processing
-Algorithm
-Terms
-</ins></h3><dl><dt><dfn title="default_context" id="dfn-default_context"><ins class="diff-chg">
-default
-context
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-context
-that
-is
-specified
-to
-the
-JSON-LD
-processing
-algorithm
-before
-processing
-begins.
-</ins></dd><dt><dfn title="default_graph" id="dfn-default_graph"><ins class="diff-chg">
-default
-graph
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</ins></dd><dt><dfn title="active_subject" id="dfn-active_subject"><ins class="diff-chg">
-active
-subject
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</ins></dd><dt><dfn title="active_property" id="dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</ins></dd><dt><dfn title="active_object" id="dfn-active_object"><ins class="diff-chg">
-active
-object
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</ins></dd><dt><dfn title="active_context" id="dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-is
-the
-context
-contained
-within
-the
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a>.</dd><dt><dfn title="local_context" id="dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-</ins><code><ins class="diff-chg">
-@context
-</ins></code><ins class="diff-chg">
-keyword.
-</ins></dd><dt><dfn title="processor_state" id="dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a>,<ins class="diff-chg">
-which
-includes
-the
-</ins><a class="tref" title="active__context"><ins class="diff-chg">
-active
-context
-</ins></a>,<a class="tref" title="current_subject"><ins class="diff-chg">
-current
-subject
-</ins></a>,<ins class="diff-chg">
-and
-</ins><a class="tref" title="current_property"><ins class="diff-chg">
-current
-property
-</ins></a>.<ins class="diff-chg">
-The
-</ins><a class="tref" title="processor__state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-is
-managed
-as
-a
-stack
-with
-elements
-from
-the
-previous
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-copied
-into
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-when
-entering
-a
-new
-associative
-array.
-</ins></dd></dl></div><div id="processing-tokens-and-keywords" class="section"><h3><span class="secno"><ins class="diff-chg">
-6.3
-</ins></span><ins class="diff-chg">
-Processing
-Tokens
-and
-Keywords
-</ins></h3><dl><dt><code><ins class="diff-chg">
-@context
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-set
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a>.</dd><dt><code><ins class="diff-chg">
-@base
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a>.</dd><dt><code><ins class="diff-chg">
-@profile
-</ins></code></dt><dd><ins class="diff-chg">
-A
-reference
-to
-a
-remote
-context
-description
-used
-to
-set
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a>.</dd><dt><code><ins class="diff-chg">
-@vocab
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a>.</dd><dt><code><ins class="diff-chg">
-@coerce
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-specify
-type
-coercion
-rules.
-</ins></dd><dt><code><ins class="diff-chg">
-@literal
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-specify
-a
-literal
-value.
-</ins></dd><dt><code><ins class="diff-chg">
-@iri
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-specify
-an
-IRI
-value.
-</ins></dd><dt><code><ins class="diff-chg">
-@language
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-specify
-the
-language
-for
-a
-literal.
-</ins></dd><dt><code><ins class="diff-chg">
-@datatype
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-specify
-the
-datatype
-for
-a
-literal.
-</ins></dd><dt><code>:</code></dt><dd><ins class="diff-chg">
-The
-separator
-for
-CURIEs
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-</ins></dd><dt><code><ins class="diff-chg">
-@
-</ins></code></dt><dd><ins class="diff-chg">
-Sets
-the
-active
-subjects.
-</ins></dd><dt><code><ins class="diff-chg">
-a
-</ins></code></dt><dd><ins class="diff-chg">
-Used
-to
-set
-the
-rdf:type
-of
-the
-active
-subjects.
-This
-token
-may
-be
-conferred
-as
-syntactic
-sugar
-for
-rdf:type.
-</ins></dd></dl><p class="issue"><ins class="diff-chg">
-Use
-</ins><code><ins class="diff-chg">
-@source
-</ins></code><ins class="diff-chg">
-instead
-of
-</ins><code><ins class="diff-chg">
-@
-</ins></code><ins class="diff-chg">
-?
-</ins></p><p class="issue"><ins class="diff-chg">
-Use
-</ins><code><ins class="diff-chg">
-@type
-</ins></code><ins class="diff-chg">
-instead
-of
-</ins><code><ins class="diff-chg">
-a
-</ins></code><ins class="diff-chg">
-?
-Note
-that
-both
-are
-just
-semantic
-sugar
-for
-</ins><code><ins class="diff-chg">
-rdf:type
-</ins></code>.</p></div><div id="context" class="section"><h3><span class="secno"><ins class="diff-chg">
-6.4
-</ins></span><ins class="diff-chg">
-Context
-</ins></h3><p><ins class="diff-chg">
-Processing
-of
-JSON-LD
-is
-managed
-recursively
-using
-a
-process
-described
-in
-</ins><a href="sequence"><ins class="diff-chg">
-Sequence
-</ins></a>.<ins class="diff-chg">
-During
-processing,
-each
-rule
-is
-applied
-using
-information
-provided
-by
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a>.<ins class="diff-chg">
-Processing
-begins
-by
-pushing
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-onto
-the
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-stack
-and
-initializing
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-with
-the
-</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-chg">
-default
-context
-</ins></a>.<ins class="diff-chg">
-If
-a
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-is
-encountered,
-information
-from
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-is
-merged
-into
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a>.</p><p class="issue"><ins class="diff-chg">
-Should
-the
-document
-URL
-be
-used
-as
-the
-default
-for
-</ins><code><ins class="diff-chg">
-@base
-</ins></code><ins class="diff-chg">
-in
-the
-</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-chg">
-default
-context
-</ins></a><ins class="diff-chg">
-?
-</ins></p><p><ins class="diff-chg">
-The
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-is
-used
-for
-expanding
-keys
-and
-values
-of
-an
-associative
-array
-(or
-elements
-of
-a
-list
-(see
-</ins><span a="#list-processing"><ins class="diff-chg">
-List
-Processing
-</ins></span><ins class="diff-chg">
-)).
-</ins></p><p><ins class="diff-chg">
-A
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-is
-identified
-within
-an
-associative
-array
-having
-a
-key
-of
-</ins><code><ins class="diff-chg">
-@context
-</ins></code><ins class="diff-chg">
-with
-an
-associative
-array
-value.
-When
-processing
-a
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a>,<ins class="diff-chg">
-special
-rules
-apply:
-</ins></p><ul><li><ins class="diff-chg">
-The
-key
-</ins><code><ins class="diff-chg">
-@base
-</ins></code><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-have
-a
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-IRI
-and
-is
-saved
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-to
-perform
-term
-mapping
-as
-described
-in
-</ins><a href="#iri-processing"><ins class="diff-chg">
-IRI
-Processing
-</ins></a>.</li><li><ins class="diff-chg">
-The
-key
-</ins><code><ins class="diff-chg">
-@vocab
-</ins></code><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-have
-a
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-IRI
-and
-is
-saved
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-to
-perform
-term
-mapping
-as
-described
-in
-</ins><a href="#iri-processing"><ins class="diff-chg">
-IRI
-Processing
-</ins></a>.</li><li><ins class="diff-chg">
-The
-key
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-have
-a
-value
-of
-an
-associative
-array.
-Processing
-of
-the
-associative
-array
-is
-described
-</ins><a href="#coerce"><ins class="diff-chg">
-below
-</ins></a></li><li><ins class="diff-chg">
-Otherwise,
-the
-key
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-have
-the
-lexical
-form
-of
-</ins><cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName"><ins class="diff-chg">
-NCName
-</ins></a></cite><ins class="diff-chg">
-and
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-have
-the
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-IRI.
-Merge
-each
-key-value
-pair
-into
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a>,<ins class="diff-chg">
-overwriting
-any
-duplicate
-values.
-</ins></li></ul><p><ins class="diff-chg">
-A
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-may
-also
-be
-loaded
-from
-an
-external
-document
-using
-the
-</ins><code><ins class="diff-chg">
-@profile
-</ins></code><ins class="diff-chg">
-key
-as
-described
-in
-</ins><a href="#vocabulary-profiles"><ins class="diff-chg">
-Vocabulary
-Profiles
-</ins></a>.</p><div id="coerce" class="section"><h4><span class="secno"><ins class="diff-chg">
-6.4.1
-</ins></span><ins class="diff-chg">
-Coerce
-</ins></h4><p><ins class="diff-chg">
-Map
-each
-key-value
-pair
-in
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-'s
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-mapping
-into
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-'s
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-mapping,
-overwriting
-any
-duplicate
-values
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-'s
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-mapping.
-The
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-mapping
-has
-a
-either
-of
-a
-single
-CURIE
-or
-of
-an
-array
-of
-CURIEs.
-When
-merging
-with
-an
-existing
-mapping
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a>,<ins class="diff-chg">
-map
-all
-CURIE
-values
-to
-array
-form
-and
-replace
-with
-the
-union
-of
-the
-value
-from
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-and
-the
-value
-of
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a>.<ins class="diff-chg">
-If
-the
-result
-is
-an
-array
-with
-a
-single
-CURIE,
-the
-processor
-</ins><em class="rfc2119" title="may"><ins class="diff-chg">
-may
-</ins></em><ins class="diff-chg">
-represent
-this
-as
-a
-string
-value.
-</ins></p></div></div><div id="chaining" class="section"><h3><span class="secno"><ins class="diff-chg">
-6.5
-</ins></span><ins class="diff-chg">
-Chaining
-</ins></h3><p><ins class="diff-chg">
-Object
-</ins><dfn title="chaining" id="dfn-chaining"><ins class="diff-chg">
-chaining
-</ins></dfn><ins class="diff-chg">
-is
-a
-JSON-LD
-feature
-that
-allows
-an
-author
-to
-use
-the
-definition
-of
-JSON-LD
-objects
-as
-</ins><a class="tref" title="property"><ins class="diff-chg">
-property
-</ins></a><ins class="diff-chg">
-values.
-This
-is
-a
-commonly
-used
-mechanism
-for
-creating
-a
-parent-child
-relationship
-between
-objects.
-</ins></p><p><ins class="diff-chg">
-The
-example
-shows
-an
-two
-objects
-related
-by
-a
-property
-from
-the
-first
-object:
-</ins></p>  <pre class="example"><ins class="diff-chg">
-{
-...
-  "foaf:name": "Manu Sporny",
-  "<span class="diff">foaf:knows</span>": {
-    "<span class="diff">a</span>": "<span class="diff">foaf:Person</span>",
-    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}
-</ins></pre><p><ins class="diff-chg">
-An
-object
-definition
-may
-be
-used
-anyplace
-a
-value
-is
-legal
-in
-JSON-LD.
-</ins></p></div><div id="iri-processing" class="section"><h3><span class="secno"><ins class="diff-chg">
-6.6
-</ins></span><ins class="diff-chg">
-IRI
-Processing
-</ins></h3><p><ins class="diff-chg">
-Keys
-and
-some
-values
-are
-evaluated
-to
-produce
-an
-IRI.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-a
-value
-representing
-an
-IRI
-into
-an
-actual
-IRI.
-</ins></p><p><ins class="diff-chg">
-IRIs
-may
-be
-represented
-as
-an
-explicit
-string,
-or
-as
-a
-CURIE,
-as
-a
-value
-relative
-to
-</ins><code><ins class="diff-chg">
-@base
-</ins></code><ins class="diff-chg">
-or
-</ins><code><ins class="diff-chg">
-@vocab
-</ins></code>.</p><p><ins class="diff-chg">
-CURIEs
-are
-defined
-more
-formally
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-chg">
-RDFA-CORE
-</ins></a></cite><ins class="diff-chg">
-]
-</ins><cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies"><ins class="diff-chg">
-section
-6
-"CURIE
-Syntax
-Definition"
-</ins></a></cite>.<ins class="diff-chg">
-Generally,
-a
-CURIE
-is
-composed
-of
-a
-</ins><em><ins class="diff-chg">
-prefix
-</ins></em><ins class="diff-chg">
-and
-a
-</ins><em><ins class="diff-chg">
-suffix
-</ins></em><ins class="diff-chg">
-separated
-by
-a
-':'.
-In
-JSON-LD,
-either
-the
-prefix
-may
-be
-the
-empty
-string,
-denoting
-the
-</ins><dfn title="default_prefix" id="dfn-default_prefix"><ins class="diff-chg">
-default
-prefix
-</ins></dfn>.</p><p><ins class="diff-chg">
-The
-procedure
-for
-generating
-an
-IRI
-is:
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Split
-the
-value
-into
-a
-</ins><em><ins class="diff-chg">
-prefix
-</ins></em><ins class="diff-chg">
-and
-</ins><em><ins class="diff-chg">
-suffix
-</ins></em><ins class="diff-chg">
-from
-the
-first
-occurrence
-of
-':'.
-</ins></li><li><ins class="diff-chg">
-If
-the
-prefix
-is
-a
-'_',
-generate
-a
-named
-BNode
-using
-the
-suffix
-as
-the
-name.
-</ins></li><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-contains
-a
-mapping
-for
-</ins><em><ins class="diff-chg">
-prefix
-</ins></em>,<ins class="diff-chg">
-generate
-an
-IRI
-by
-prepending
-the
-mapped
-prefix
-to
-the
-(possibly
-empty)
-suffix.
-Note
-that
-an
-empty
-suffix
-and
-no
-suffix
-(meaning
-the
-value
-contains
-no
-':'
-string
-at
-all)
-are
-treated
-equivalently.
-</ins></li><li><ins class="diff-chg">
-If
-the
-IRI
-being
-processed
-is
-for
-a
-property
-(i.e.,
-a
-key
-value
-in
-an
-associative
-array,
-or
-a
-value
-in
-a
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-mapping)
-and
-the
-active
-context
-has
-a
-</ins><code><ins class="diff-chg">
-@vocab
-</ins></code><ins class="diff-chg">
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-the
-method
-described
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-chg">
-RFC3987
-</ins></a></cite><ins class="diff-chg">
-].
-</ins></li><li><ins class="diff-chg">
-If
-the
-IRI
-being
-processed
-is
-for
-a
-subject
-or
-object
-(i.e.,
-not
-a
-property)
-and
-the
-active
-context
-has
-a
-</ins><code><ins class="diff-chg">
-@base
-</ins></code><ins class="diff-chg">
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-the
-method
-described
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-chg">
-RFC3987
-</ins></a></cite><ins class="diff-chg">
-].
-</ins></li><li><ins class="diff-chg">
-Otherwise,
-use
-the
-value
-directly
-as
-an
-IRI.
-</ins></li></ol><p></p></div></div><div id="sequence" class="section">
-<h2>
-<span class="secno">
-7.
-</span>
-<ins class="diff-new">Sequence
-</ins></h2><p><ins class="diff-new">
-The
-algorithm
-below
-is
-designed
-for
-in-memory
-implementations
-with
-random
-access
-to
-associative
-array
-elements.
-For
-a
-description
-of
-a
-streaming
-implementation,
-see
-</ins><a href="streaming-processors"><ins class="diff-new">
-Appendix
-B
-</ins></a>.</p><p><ins class="diff-new">
-A
-conforming
-JSON-LD
-processor
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-new">
-default
-graph
-</ins></a><ins class="diff-new">
-that
-the
-following
-algorithm
-generates:
-</ins></p><ol class="algorithm"><li id="processing-step-default-context"><ins class="diff-new">
-Create
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a><ins class="diff-new">
-with
-with
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-set
-to
-the
-</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-new">
-default
-context
-</ins></a><ins class="diff-new">
-and
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-and
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-initialized
-to
-NULL.
-</ins></li><li id="processing-step-associative"><ins class="diff-new">
-If
-an
-associative
-array
-is
-detected,
-perform
-the
-following
-steps:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-associative
-array
-has
-a
-</ins><code><ins class="diff-new">
-@context
-</ins></code><ins class="diff-new">
-key,
-process
-the
-local
-context
-as
-described
-in
-</ins><a href="context"><ins class="diff-new">
-Context
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-associative
-array
-has
-an
-</ins><code><ins class="diff-new">
-@iri
-</ins></code><ins class="diff-new">
-key,
-set
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-by
-performing
-</ins><a href="#iri-processing"><ins class="diff-new">
-IRI
-Processing
-</ins></a><ins class="diff-new">
-on
-the
-associated
-value.
-Generate
-a
-triple
-representing
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<ins class="diff-new">
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a>.<ins class="diff-new">
-Return
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-to
-the
-calling
-location.
-</ins></li><li><ins class="diff-new">
-If
-the
-associative
-array
-has
-a
-</ins><code><ins class="diff-new">
-@literal
-</ins></code><ins class="diff-new">
-key,
-set
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-to
-a
-literal
-value
-as
-follows:
-</ins><ul><li><ins class="diff-new">
-as
-a
-</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"><ins class="diff-new">
-typed
-literal
-</ins></a><ins class="diff-new">
-if
-the
-associative
-array
-contains
-a
-</ins><code><ins class="diff-new">
-@datatype
-</ins></code><ins class="diff-new">
-key
-after
-performing
-</ins><a href="#iri-processing"><ins class="diff-new">
-IRI
-Processing
-</ins></a><ins class="diff-new">
-on
-the
-specified
-</ins><code><ins class="diff-new">
-@datatype
-</ins></code>.</li><li><ins class="diff-new">
-otherwise,
-as
-a
-</ins><a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal"><ins class="diff-new">
-plain
-literal
-</ins></a>.<ins class="diff-new">
-If
-the
-associative
-array
-contains
-a
-</ins><code><ins class="diff-new">
-@language
-</ins></code><ins class="diff-new">
-key,
-use
-it's
-value
-to
-set
-the
-language
-of
-the
-plain
-literal.
-</ins></li></ul><ins class="diff-new">
-Generate
-a
-triple
-representing
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<ins class="diff-new">
-the
-</ins><a class="tref" title="active__property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a>.<ins class="diff-new">
-Return
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-to
-the
-calling
-location.
-</ins></li><li><ins class="diff-new">
-If
-the
-associative
-array
-has
-a
-</ins><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
-key:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-value
-is
-a
-string,
-set
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-to
-the
-result
-of
-performing
-</ins><a href="#iri-processing"><ins class="diff-new">
-IRI
-Processing
-</ins></a>.<ins class="diff-new">
-Generate
-a
-triple
-representing
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<ins class="diff-new">
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a>.<ins class="diff-new">
-Set
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a>.</li><li><ins class="diff-new">
-Create
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a><ins class="diff-new">
-using
-copies
-of
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a>,<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-and
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-process
-the
-value
-starting
-at
-</ins><a href="#processing-step-associative"><ins class="diff-new">
-Step
-2
-</ins></a>,<ins class="diff-new">
-set
-the
-</ins><a class="tref" title="active__subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-to
-the
-result
-and
-proceed
-using
-the
-previous
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a>.</li></ol></li><li><ins class="diff-new">
-If
-the
-associative
-array
-does
-not
-have
-a
-</ins><code><ins class="diff-new">
-@
-</ins></code><ins class="diff-new">
-key,
-set
-the
-</ins><a class="tref" title="active__object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-to
-newly
-generated
-</ins><a class="tref" title="blank_node_identifier"><ins class="diff-new">
-blank
-node
-identifier
-</ins></a>.<ins class="diff-new">
-Generate
-a
-triple
-representing
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<ins class="diff-new">
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a>.<ins class="diff-new">
-Set
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref" title="active__object"><ins class="diff-new">
-active
-object
-</ins></a>.</li><li><ins class="diff-new">
-For
-each
-key
-in
-the
-associative
-array
-that
-has
-not
-already
-been
-processed,
-perform
-the
-following
-steps:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-key
-is
-</ins><code><ins class="diff-new">
-a
-</ins></code>,<ins class="diff-new">
-set
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-to
-</ins><code><ins class="diff-new">
-rdf:type
-</ins></code>.</li><li><ins class="diff-new">
-Otherwise,
-set
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-to
-the
-result
-of
-performing
-</ins><a href="#iri-processing"><ins class="diff-new">
-IRI
-Processing
-</ins></a><ins class="diff-new">
-on
-the
-key.
-</ins></li><li><ins class="diff-new">
-Create
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a><ins class="diff-new">
-copies
-of
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a>,<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-and
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-process
-the
-value
-starting
-at
-</ins><a href="#processing-step-associative"><ins class="diff-new">
-Step
-2
-</ins></a><ins class="diff-new">
-and
-proceed
-using
-the
-previous
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a>.</li></ol></li><li><ins class="diff-new">
-Return
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-to
-the
-calling
-location.
-</ins></li></ol></li><li><ins class="diff-new">
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following
-returning
-the
-result
-of
-processing
-the
-last
-value
-in
-the
-array:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-value
-is
-a
-regular
-array,
-generate
-an
-RDF
-List
-by
-linking
-each
-element
-of
-the
-list
-using
-</ins><code><ins class="diff-new">
-rdf:first
-</ins></code><ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-rdf:next
-</ins></code>,<ins class="diff-new">
-terminating
-the
-list
-with
-</ins><code><ins class="diff-new">
-rdf:nil
-</ins></code><ins class="diff-new">
-using
-the
-following
-sequence:
-</ins><ol><li><ins class="diff-new">
-If
-the
-list
-has
-no
-element,
-generate
-a
-triple
-using
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-rdf:nil
-</ins></code>.</li><li><ins class="diff-new">
-Otherwise,
-generate
-a
-triple
-using
-using
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-a
-newly
-generated
-BNode
-identified
-as
-</ins><em><ins class="diff-new">
-first
-bnode
-</ins></em>.</li><li><ins class="diff-new">
-For
-each
-element
-other
-than
-the
-last
-element
-in
-the
-list:
-</ins><ol><li><ins class="diff-new">
-Create
-a
-processor
-state
-using
-the
-active
-context,
-</ins><em><ins class="diff-new">
-first
-bnode
-</ins></em><ins class="diff-new">
-as
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-rdf:first
-</ins></code><ins class="diff-new">
-as
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a>.</li><li><ins class="diff-new">
-Unless
-this
-is
-the
-last
-element
-in
-the
-list,
-generate
-a
-new
-BNode
-identified
-as
-</ins><em><ins class="diff-new">
-rest
-bnode
-</ins></em>,<ins class="diff-new">
-otherwise
-use
-</ins><code><ins class="diff-new">
-rdf:nil
-</ins></code>.</li><li><ins class="diff-new">
-Generate
-a
-new
-triple
-using
-</ins><em><ins class="diff-new">
-first
-bnode
-</ins></em>,<code><ins class="diff-new">
-rdf:rest
-</ins></code><ins class="diff-new">
-and
-</ins><em><ins class="diff-new">
-rest
-bnode
-</ins></em>.</li><li><ins class="diff-new">
-Set
-</ins><em><ins class="diff-new">
-first
-bnode
-</ins></em><ins class="diff-new">
-to
-</ins><em><ins class="diff-new">
-rest
-bnode
-</ins></em>.</li></ol></li></ol></li><li><ins class="diff-new">
-Otherwise,
-create
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a><ins class="diff-new">
-copies
-of
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a>,<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a><ins class="diff-new">
-and
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-process
-the
-value
-starting
-at
-</ins><a href="#processing-step-associative"><ins class="diff-new">
-Step
-2
-</ins></a><ins class="diff-new">
-and
-proceed
-using
-the
-previous
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
-processor
-state
-</ins></a>.</li></ol></li><li><ins class="diff-new">
-If
-a
-string
-is
-detected,
-generate
-a
-triple
-using
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-and
-a
-</ins><a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal"><ins class="diff-new">
-plain
-literal
-</ins></a><ins class="diff-new">
-value
-created
-from
-the
-string.
-</ins></li><li><ins class="diff-new">
-If
-a
-number
-is
-detected,
-generate
-a
-</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"><ins class="diff-new">
-typed
-literal
-</ins></a><ins class="diff-new">
-using
-a
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-either
-</ins><code><ins class="diff-new">
-xsd:integer
-</ins></code><ins class="diff-new">
-or
-</ins><code><ins class="diff-new">
-xsd:double
-</ins></code>,<ins class="diff-new">
-depending
-on
-if
-the
-value
-contains
-a
-fractional
-and/or
-an
-exponential
-component.
-Generate
-a
-triple
-using
-the
-</ins><a class="tref" title="active__subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-and
-the
-generated
-typed
-literal.
-</ins></li><li><ins class="diff-new">
-Otherwise,
-if
-</ins><strong><ins class="diff-new">
-true
-</ins></strong><ins class="diff-new">
-or
-</ins><strong><ins class="diff-new">
-false
-</ins></strong><ins class="diff-new">
-is
-detected,
-generate
-a
-triple
-using
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-and
-a
-</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"><ins class="diff-new">
-typed
-literal
-</ins></a><ins class="diff-new">
-value
-created
-from
-the
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-</ins><code><ins class="diff-new">
-xsd:boolean
-</ins></code>.</li></ol></div><div id="best-practices" class="section"><h2><span class="secno"><ins class="diff-new">
-8.
-</ins></span>
-Best
-Practices
-</h2>
-<p>
-The
-nature
-of
-Web
-programming
-allows
-one
-to
-use
-basic
-technologies,
-such
-as
-JSON-LD,
-across
-a
-variety
-of
-systems
-and
-environments.
-This
-section
-attempts
-to
-describe
-some
-of
-those
-environments
-and
-the
-way
-in
-which
-JSON-LD
-can
-be
-integrated
-in
-order
-to
-help
-alleviate
-certain
-development
-headaches.
-</p>
-<div id="javascript" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">7.1
-</del>
-<ins class="diff-chg">8.1
-</ins>
-</span>
-JavaScript
-</h3>
-<p class="issue">
-It
-is
-expected
-that
-JSON-LD
-will
-be
-used
-quite
-a
-bit
-in
-JavaScript
-environments,
-however,
-features
-like
-the
-expanded
-form
-for
-object
-values
-mean
-that
-using
-JSON-LD
-directly
-in
-JavaScript
-may
-be
-annoying
-without
-a
-middleware
-layer
-such
-as
-a
-simple
-library
-that
-converts
-JSON-LD
-markup
-before
-JavaScript
-uses
-it.
-One
-could
-say
-that
-JSON-LD
-is
-a
-good
-fit
-for
-the
-RDF
-API,
-which
-enables
-a
-variety
-of
-RDF-based
-Web
-Applications,
-but
-some
-don't
-want
-to
-require
-that
-level
-of
-functionality
-just
-to
-use
-JSON-LD.
-The
-group
-is
-still
-discussing
-the
-best
-way
-to
-proceed,
-so
-input
-on
-how
-JSON-LD
-could
-more
-easily
-be
-utilized
-in
-JavaScript
-environments
-would
-be
-very
-much
-appreciated.
-</p>
-</div>
-<div id="schema-less-databases" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">7.2
-</del>
-<ins class="diff-chg">8.2
-</ins>
-</span>
-Schema-less
-Databases
-</h3>
-<p class="issue">
-Databases
-such
-as
-CouchDB
-and
-MongoDB
-allow
-the
-creation
-of
-schema-less
-data
-stores.
-RDF
-is
-a
-type
-of
-schema-less
-data
-model
-and
-thus
-lends
-itself
-to
-databases
-such
-as
-CouchDB
-and
-MongoDB.
-Both
-of
-these
-databases
-can
-use
-JSON-LD
-as
-their
-storage
-format.
-The
-group
-needs
-feedback
-from
-CouchDB
-and
-MongoDB
-experts
-regarding
-the
-usefulness
-of
-JSON-LD
-in
-those
-environments.
-</p>
-<p class="issue">
-<ins class="diff-new">MongoDB
-does
-not
-allow
-the
-'.'
-character
-to
-be
-used
-in
-key
-names.
-This
-prevents
-developers
-from
-storing
-IRIs
-as
-keys,
-which
-also
-prevents
-storage
-of
-the
-data
-in
-normalized
-form.
-While
-this
-issue
-can
-be
-avoided
-by
-using
-CURIEs
-for
-key
-values,
-it
-is
-not
-known
-if
-this
-mechanism
-is
-enough
-to
-allow
-JSON-LD
-to
-be
-used
-in
-MongoDB
-in
-a
-way
-that
-is
-useful
-to
-developers.
-</ins></p>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">8.
-</del>
-<ins class="diff-chg">9.
-</ins>
-</span>
-Advanced
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-considered
-as
-discussion
-points;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<div id="vocabulary-profiles" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">8.1
-</del>
-<ins class="diff-chg">9.1
-</ins>
-</span>
-Vocabulary
-Profiles
-</h3>
-<p>
-One
-of
-the
-more
-powerful
-features
-of
-RDFa
-1.1
-Core
-is
-the
-ability
-to
-specify
-a
-collection
-of
-prefixes
-and
-terms
-that
-can
-be
-re-used
-by
-a
-processor
-to
-simplfy
-markup.
-JSON-LD
-provides
-a
-similar
-mechanism
-called
-Vocabulary
-Profiles,
-which
-is
-the
-inclusion
-of
-a
-context
-external
-to
-the
-JSON-LD
-document.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-one
-may
-specify
-an
-external
-Vocabulary
-Profile.
-Assume
-the
-following
-profile
-exists
-at
-this
-imaginary
-URL:
-<code>
-http://example.org/profiles/contacts
-</code>.
-</p>
-<pre class="example">
-{
-  "@context": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}
-</pre>
-<p>
-The
-profile
-listed
-above
-can
-be
-used
-in
-the
-following
-way:
-</p>
-<pre class="example">
-{
-  "@profile": "http://example.org/profiles/contacts",
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">8.2
-</del>
-<ins class="diff-chg">9.2
-</ins>
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-array
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-JSON-LD
-associative
-array.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<pre class="example">
-{
-  "@": 
-  [
-    {
-      "@": "http://example.org/people#john",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "http://example.org/people#jane",
-      "a": "foaf:Person"
-    }
-  ]
-}
-</pre>
-<p>
-A
-disjoint
-graph
-could
-also
-be
-expressed
-like
-so:
-</p>
-<pre class="example">
-[
-  {
-    "@": "http://example.org/people#john",
-    "a": "foaf:Person"
-  },
-  {
-    "@": "http://example.org/people#jane",
-    "a": "foaf:Person"
-  }
-]
-</pre>
-</div>
-<div id="the-json-ld-api" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">8.3
-</del>
-<ins class="diff-chg">9.3
-</ins>
-</span>
-The
-JSON-LD
-API
-</h3>
-<p>
-This
-API
-provides
-a
-clean
-mechanism
-that
-enables
-developers
-to
-convert
-JSON-LD
-data
-into
-a
-format
-that
-is
-easier
-to
-work
-with
-in
-various
-programming
-languages.
-</p>
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDProcessor</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-};</span>
-</pre>
-<div id="methods" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">8.3.1
-</del>
-<ins class="diff-chg">9.3.1
-</ins>
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">
-<code>
-toGraph
-</code>
-</dt>
-<dd>
-Parses
-JSON-LD
-and
-transforms
-the
-data
-into
-an
-Graph,
-which
-is
-compatible
-with
-the
-RDF
-Interfaces
-API
-specification
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">
-RDF-INTERFACES
-</a>
-</cite>
-].
-This
-method
-will
-return
-<code>
-null
-</code>
-if
-there
-are
-any
-errors,
-or
-if
-the
-RDF
-Interfaces
-API
-is
-not
-available
-for
-use.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-jsonld
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-RDFGraph.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-callback
-</td>
-<td class="prmType">
-<code>
-<a>
-JSONLDParserCallback
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptTrue">
-✔
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-Graph
-</a>
-</code>
-</div>
-</dd>
-<dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">
-<code>
-toProjection
-</code>
-</dt>
-<dd>
-Parses
-JSON-LD
-text
-into
-an
-RDF
-API
-Projection
-object
-as
-specified
-by
-the
-RDF
-API
-specification
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-API">
-RDF-API
-</a>
-</cite>
-].
-If
-there
-are
-any
-errors,
-<code>
-null
-</code>
-is
-returned.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-jsonld
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-Projection.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-template
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-Projection
-template
-to
-use
-when
-building
-the
-Projection.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-subject
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-subject
-to
-use
-when
-building
-the
-Projection.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-callback
-</td>
-<td class="prmType">
-<code>
-<a>
-JSONLDParserCallback
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptTrue">
-✔
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-object
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<p>
-The
-JSONLDParserCallback
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-input
-data.
-</p>
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre>
-<div id="methods-1" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">8.3.2
-</del>
-<ins class="diff-chg">9.3.2
-</ins>
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error">
-<code>
-error
-</code>
-</dt>
-<dd>
-This
-callback
-is
-invoked
-whenever
-an
-error
-occurs
-during
-processing.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-error
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-A
-descriptive
-error
-string
-returned
-by
-the
-processor.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-void
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<p>
-The
-following
-example
-demonstrates
-how
-to
-convert
-JSON-LD
-to
-a
-projection
-that
-is
-directly
-usable
-in
-a
-programming
-environment:
-</p>
-<pre class="example">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-// Map the JSON-LD to a language-native object
-var person = jsonld.toProjection(jsonldString, myTemplate);
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-"Their
-homepage
-is:
-"
-+
-person.homepage);
-</pre>
-<p>
-A
-JSON-LD
-Serializer
-is
-also
-available
-to
-map
-a
-language-native
-object
-to
-JSON-LD.
-</p><pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
-};</span>
-</pre>
-<div id="methods-2" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">8.3.3
-</del>
-<ins class="diff-chg">9.3.3
-</ins>
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj">
-<code>
-normalize
-</code>
-</dt>
-<dd>
-Serializes
-a
-language-native
-object
-into
-a
-normalized
-JSON-LD
-string.
-Normalization
-is
-important
-when
-performing
-things
-like
-equality
-comparison
-and
-digital
-signature
-creation
-and
-verification.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-obj
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-An
-associative
-array
-of
-key-value
-pairs
-that
-should
-be
-converted
-to
-a
-JSON-LD
-string.
-It
-is
-assumed
-that
-a
-map
-already
-exists
-for
-the
-data.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-DOMString
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<h3 id="the-normalization-algorithm">
-The
-Normalization
-Algorithm
-</h3>
-<p class="issue">
-This
-algorithm
-is
-very
-rough,
-untested,
-and
-probably
-contains
-many
-bugs.
-Use
-at
-your
-own
-risk.
-It
-will
-change
-in
-the
-coming
-months.
-</p>
-<p>
-The
-JSON-LD
-normalization
-algorithm
-is
-as
-follows:
-</p>
-<ol class="algorithm">
-<li>
-Remove
-the
-<code>
-@context
-</code>
-key
-and
-preserve
-it
-as
-the
-<dfn title="transformation_map" id="dfn-transformation_map">
-transformation
-map
-</dfn>
-while
-running
-this
-algorithm.
-</li>
-<li>
-For
-each
-key
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-</ol>
-</li>
-<li>
-For
-each
-value
-<ol class="algorithm">
-<li>
-If
-the
-value
-should
-be
-type
-coerced
-per
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>,
-ensure
-that
-it
-is
-transformed
-to
-the
-new
-value.
-</li>
-<li>
-If
-the
-value
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-<del class="diff-old">Typed
-Literal
-</del>
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-<ins class="diff-chg">typed
-literal
-</ins></a>
-and
-the
-type
-is
-a
-CURIE,
-expand
-it
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-When
-generating
-the
-final
-value,
-use
-expanded
-object
-value
-form
-to
-store
-all
-IRIs,
-typed
-literals
-and
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-<del class="diff-old">literals
-</del>
-<ins class="diff-chg">literal
-</ins></a><ins class="diff-chg">
-s
-</ins>
-with
-language
-information.
-</li>
-</ol>
-</li>
-<li>
-Output
-each
-sorted
-key-value
-pair
-without
-any
-extraneous
-whitespace.
-If
-the
-value
-is
-an
-associative
-array,
-perform
-this
-algorithm,
-starting
-at
-step
-#1,
-recursively
-on
-the
-sub-tree.
-There
-should
-be
-no
-nesting
-in
-the
-outputted
-JSON
-data.
-That
-is,
-the
-top-most
-element
-should
-be
-an
-array.
-Each
-item
-in
-the
-array
-contains
-a
-single
-subject
-with
-a
-corresponding
-array
-of
-properties
-in
-UTF-8
-sort
-order.
-Any
-related
-objects
-that
-are
-complex
-objects
-themselves
-should
-be
-given
-a
-top-level
-object
-in
-the
-top-level
-array.
-</li>
-</ol>
-<p class="issue">
-Note
-that
-normalizing
-named
-blank
-nodes
-is
-impossible
-at
-present
-since
-one
-would
-have
-to
-specify
-a
-blank
-node
-naming
-algorithm.
-For
-the
-time
-being,
-you
-cannot
-normalize
-graphs
-that
-contain
-named
-blank
-nodes.
-However,
-normalizing
-graphs
-that
-contain
-non-named
-blank
-nodes
-is
-supported.
-</p>
-<pre class="example">
-var myObj = { "@context" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-<del class="diff-old">                "@type": {
-</del>
-<ins class="diff-chg">                "@coerce": {
-</ins>
-                   "xsd:nonNegativeInteger": "age",
-                   "xsd:anyURI": "homepage"
-                }
-              },
-              "name" : "Joe Jackson",
-<del class="diff-old">              "age" : 42,
-</del>
-<ins class="diff-chg">              "age" : "42",
-</ins>
-              "homepage" : "http://example.org/people/joe" };
-// Map the language-native object to JSON-LD
-var
-jsonldText
-=
-jsonld.normalize(myObj);
-</pre>
-<p>
-After
-the
-code
-in
-the
-example
-above
-has
-executed,
-the
-<strong>
-jsonldText
-</strong>
-value
-will
-be
-(line-breaks
-added
-for
-readability):
-</p>
-<pre class="example">
-[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
-"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
-"http://xmlns.com/foaf/0.1/name":"Joe
-Jackson"}]
-</pre>
-<p>
-When
-normalizing
-<strong>
-xsd:double
-</strong>
-values,
-implementers
-<em class="rfc2119" title="must">
-must
-</em>
-ensure
-that
-the
-normalized
-value
-is
-a
-string.
-In
-order
-to
-generate
-the
-string
-from
-a
-<strong>
-double
-</strong>
-value,
-output
-equivalent
-to
-the
-<code>
-printf("%1.6e",
-value)
-</code>
-function
-in
-C
-<em class="rfc2119" title="must">
-must
-</em>
-be
-used
-where
-<strong>
-"%1.6e"
-</strong>
-is
-the
-string
-formatter
-and
-<strong>
-value
-</strong>
-is
-the
-value
-to
-be
-converted.
-</p>
-<p>
-To
-convert
-the
-a
-double
-value
-in
-JavaScript,
-implementers
-can
-use
-the
-following
-snippet
-of
-code:
-</p>
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
-'$10$2')
-</pre>
-<p class="note">
-When
-data
-needs
-to
-be
-normalized,
-JSON-LD
-authors
-should
-not
-use
-values
-that
-are
-going
-to
-undergo
-automatic
-conversion.
-This
-is
-due
-to
-the
-lossy
-nature
-of
-<strong>
-xsd:double
-</strong>
-values.
-</p>
-<p class="issue">
-<ins class="diff-new">Round-tripping
-data
-can
-be
-problematic
-if
-we
-mix
-and
-match
-@coerce
-rules
-with
-JSON-native
-datatypes,
-like
-integers.
-Consider
-the
-following
-code
-example:
-</ins></p><pre class="example"><ins class="diff-new">
-var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-// Convert the normalized object back to a JavaScript object
-var
-myObj2
-=
-jsonld.parse(jsonldText);
-</ins></pre><p class="issue"><ins class="diff-new">
-At
-this
-point,
-myObj2
-and
-myObj
-will
-have
-different
-values
-for
-the
-"number"
-value.
-myObj
-will
-be
-the
-number
-42,
-while
-myObj2
-will
-be
-the
-string
-"42".
-This
-type
-of
-data
-round-tripping
-error
-can
-bite
-developers.
-We
-are
-currently
-wondering
-if
-having
-a
-"coerce
-validation"
-phase
-in
-the
-parsing/normalization
-phases
-would
-be
-a
-good
-idea.
-It
-would
-prevent
-data
-round-tripping
-issues
-like
-the
-one
-mentioned
-above.
-</ins></p>
-</div>
-</div>
-<div class="appendix section" id="the-default-context">
-<h2>
-<span class="secno">
-A.
-</span>
-The
-Default
-Context
-</h2>
-<p>
-The
-<dfn title="default_context" id="dfn-default_context-1">
-default
-context
-</dfn>
-is
-provided
-to
-ensure
-that
-there
-are
-a
-reasonable
-set
-of
-prefixes
-and
-terms
-available
-to
-all
-JSON-LD
-developers.
-Mappings
-specified
-by
-the
-<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
-default
-context
-</a>
-<em class="rfc2119" title="should not">
-should
-not
-</em>
-be
-overwritten
-by
-JSON-LD
-authors.
-All
-JSON-LD
-processors
-<em class="rfc2119" title="must">
-must
-</em>
-load
-the
-following
-context
-in
-as
-the
-intial
-context
-before
-processing
-JSON-LD
-text.
-</p>
-<pre>
-{
-  "@context":
-  {
-<ins class="diff-new">    "@vocab": "",
-</ins>
-    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
-    "owl": "http://www.w3.org/2002/07/owl#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dcterms": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "vcard": "http://www.w3.org/2006/vcard/ns# ",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "cc": "http://creativecommons.org/ns#",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "com": "http://purl.org/commerce#",
-    "ps": "http://purl.org/payswarm#",
-    "gr": "http://purl.org/goodrelations/v1#",
-    "sig": "http://purl.org/signature#",
-    "ccard": "http://purl.org/commerce/creditcard#"
-    "@coerce": 
-    {
-<del class="diff-old">      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
-</del>
-<ins class="diff-chg">      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
-</ins>
-      "xsd:integer": "foaf:age"
-    }
-  }
-}
-</pre>
-</div>
-<div class="appendix section" id="acknowledgements">
-<h2>
-<span class="secno">
-B.
-</span>
-Acknowledgements
-</h2>
-<p>
-The
-editor
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-rationale
-and
-reasoning
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-Longley
-who
-reviewed,
-provided
-feedback,
-and
-performed
-several
-implementation
-on
-the
-specification,
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-Thanks
-also
-to
-Nathan
-Rixham,
-Bradley
-P.
-Allen
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-</p>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-C.
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-C.1
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<dt id="bib-RDF-API">
-[RDF-API]
-</dt>
-<dd>
-Manu
-Sporny,
-Benjamin
-Adrian,
-Nathan
-Rixham;
-et
-al.
-<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">
-<cite>
-RDF
-API
-</cite>
-</a>
-Latest.
-W3C
-Editor's
-Draft.
-URL:
-<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">
-http://www.w3.org/2010/02/rdfa/sources/rdf-api/
-</a>
-</dd>
-<dt id="bib-RDF-CONCEPTS">
-[RDF-CONCEPTS]
-</dt>
-<dd>
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-<cite>
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</a>
-</dd>
-<dt id="bib-RDF-INTERFACES">
-[RDF-INTERFACES]
-</dt>
-<dd>
-Nathan
-Rixham,
-Manu
-Sporny,
-Benjamin
-Adrian;
-et
-al.
-<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">
-<cite>
-RDF
-Interfaces
-</cite>
-</a>
-Latest.
-W3C
-Editor's
-Draft.
-URL:
-<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">
-http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/
-</a>
-</dd>
-<dt id="bib-RFC3987">
-<ins class="diff-new">[RFC3987]
-</ins></dt><dd><ins class="diff-new">
-M.
-Dürst;
-M.
-Suignard.
-</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><cite><ins class="diff-new">
-Internationalized
-Resource
-Identifiers
-(IRIs).
-</ins></cite></a><ins class="diff-new">
-January
-2005.
-Internet
-RFC
-3987.
-URL:
-</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><ins class="diff-new">
-http://www.ietf.org/rfc/rfc3987.txt
-</ins>
-</a>
-</dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford.
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-<cite>
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</cite>
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-C.2
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-31
-March
-2011.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-http://www.w3.org/TR/2011/WD-rdfa-core-20110331
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20110615/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2255 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD - Linked Data Expression in JSON</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  medium dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-15-june-2011">Unofficial Draft 15 June 2011</h2><dl><dt>Editors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
-<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-</dl><p>This document is also available in this non-normative format: <a href="diff-20110507.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-Developers that embed structured data in their Web pages can choose among
-a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
-and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
-incompatible at the syntax level, can be easily mapped to RDF. JSON has 
-proven to be a highly useful object serialization and messaging format. 
-In an attempt to harmonize the representation of Linked Data in JSON, 
-this specification outlines a common JSON representation format for 
-Linked Data that can be used to represent objects specified via RDFa, 
-Microformats and Microdata.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-json-ld-context" class="tocxref"><span class="secno">2.3 </span>The JSON-LD Context</a></li><li class="tocline"><a href="#unambiguous-identifiers-for-json" class="tocxref"><span class="secno">2.4 </span>Unambiguous Identifiers for JSON</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.5 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-context" class="tocxref"><span class="secno">2.6 </span>An Example of a Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">4. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">4.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">4.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">4.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">4.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">4.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">4.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">4.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">4.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">4.9 </span>Blank Nodes</a></li></ul></li><li class="tocline"><a href="#advanced-features" class="tocxref"><span class="secno">5. </span>Advanced Features</a><ul class="toc"><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">5.1 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">5.2 </span>Type Coercion</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">6. </span>The JSON-LD Processing Algorithm</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">6.1 </span>Overview</a></li><li class="tocline"><a href="#processing-algorithm-terms" class="tocxref"><span class="secno">6.2 </span>Processing Algorithm Terms</a></li><li class="tocline"><a href="#processing-tokens-and-keywords" class="tocxref"><span class="secno">6.3 </span>Processing Tokens and Keywords</a></li><li class="tocline"><a href="#context" class="tocxref"><span class="secno">6.4 </span>Context</a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno">6.4.1 </span>Coerce</a></li></ul></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">6.5 </span>Chaining</a></li><li class="tocline"><a href="#iri-processing" class="tocxref"><span class="secno">6.6 </span>IRI Processing</a></li></ul></li><li class="tocline"><a href="#sequence" class="tocxref"><span class="secno">7. </span>Sequence</a></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">8. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">8.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">8.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">9. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-profiles" class="tocxref"><span class="secno">9.1 </span>Vocabulary Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">9.2 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">9.3 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">9.3.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">9.3.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">9.3.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">A. </span>The Default Context</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">B. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-<p>
-JSON-LD is designed as a light-weight syntax that can be used to express 
-Linked Data. It is primarily intended to be a way to express Linked Data 
-in Javascript and other Web-based programming environments. It is also 
-useful when building interoperable Web Services and when storing Linked 
-Data in JSON-based document storage engines. It is practical and designed 
-to be as simple as possible, utilizing the large number of JSON parsers 
-and existing code that is in use today. It is designed to be able to 
-express key-value pairs, RDF data, Microformats data, and Microdata.
-That is, it supports every major Web-based structured data model in use 
-today. It does not require anyone to change their JSON, but easily add 
-meaning by adding context in a way that is out-of-band. The syntax is 
-designed to not disturb already deployed systems running on JSON, but 
-provide a smooth migration path from JSON to JSON with added
-semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a very small memory footprint in order to operate.
-</p>
-
-<p>
-  JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing objects on the web.
-  Linked Data is a way of describing content across different documents, or web resources. Web
-  resources are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s, and typically are dereferencable entities that may be used
-  to find more information, creating a "web of knowledge". JSON-LD is intended to be a simple
-  publishing method for expressing linked data in JSON.
-</p>
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and 
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to write processors for JSON-LD.</li>
-</ul>
-
-<p>
-To understand this specification you must first be familiar with JSON, 
-which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and RDF as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>All comments and discussion takes place on the public mailing list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
-</li>
-
-<li>Specification bugs and issues should be reported in the 
-<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
-
-<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the 
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design-goals-and-rationale" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
-
-<p>The following section outlines the design goals and rationale behind the 
-JSON-LD markup language.
-</p>
-
-<div id="goals" class="section">
-<h3><span class="secno">2.1 </span>Goals</h3>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers don't need to know RDF in order to use the basic functionality
- provided by JSON-LD.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
- <dt>Expressiveness</dt>
- <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable.</dd>
- <dt>Zero Edits, most of the time</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers. At times, mapping JSON to 
- RDF can become difficult - in these instances, rather than having JSON-LD
- support esoteric markup, we chose not to support the use case and
- support a simplified syntax instead. So, while we strive for Zero Edits,
- it was not always possible without adding great complexity to the language.
- </dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="map-terms-to-iris" class="section">
-<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
-
-<p>
-  An Internationalized Resource Identifier (<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>)
-  as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique identifiers on the web. In Linked Data,
-  IRIs (or URI references) are commonly used for describing entities and properties.
-</p>
-
-<p>Establishing a mechanism to map JSON values to IRIs will
-help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
-be restrictive in declaring a set of terms, rather, experimentation and 
-innovation should be supported as part of the core design of JSON-LD. There are, 
-however, a number of very small design criteria that can ensure that developers 
-will generate good RDF data that will create value for the greater 
-semantic web community and JSON/REST-based Web Services community.
-</p>
-
-<p>We will be using the following JSON object as the example for this section:
-</p>
-
-<pre class="example">
-{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-</div>
-
-<div id="the-json-ld-context" class="section">
-<h3><span class="secno">2.3 </span>The JSON-LD Context</h3>
-
-<p>A context is used to allow developers to use aliases for 
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. The semantic web, just like the document-based web, uses IRIs for
-unambiguous identification. The idea is that these terms mean something, 
-which you will eventually want to query. A context allows the expression of a number of
-terms which map directly to <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. For example, the term <code>name</code>
-may map directly to the IRI <code>http://xmlns.com/foaf/0.1/name</code>. This allows
-JSON-LD documents to be constructed using common JSON syntax of using simple name/value
-pairs.
-</p>
-<p>
-To reduce the number of different terms that must be defined, JSON-LD also allows terms
-to be used to expand Compact URIs (<abbr title="Compact URI">CURIE</abbr>).
-The semantic web specifies this via <em>Vocabulary Documents</em>, in which a prefix is
-associated with a document, and a suffix is used to create an IRI based on this vocabulary.
-For example, the IRI <em>http://xmlns.com/foaf/0.1/</em> 
-specifies a Vocabulary Document, and <strong>name</strong> is a term in 
-that vocabulary. Join the two items together and you have an unambiguous 
-identifier for a vocabulary term. The Compact URI Expression, or short-form,
-is <code>foaf:name</code> and the expanded-form is
-<code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary term identifies
-the given name for something, for example - a person's name.
-</p>
-
-<p>Developers, and machines, would be able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much like we can use WordNet today to 
-see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Machines need the same sort of 
-dictionary of terms, and URIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>The context provides a collection of vocabulary terms that can be used
-for a JSON object.</p>
-</div>
-
-<div id="unambiguous-identifiers-for-json" class="section">
-<h3><span class="secno">2.4 </span>Unambiguous Identifiers for JSON</h3>
-            
-<p>If a set of terms, like <strong>Person</strong>, 
-<strong>name</strong>, and <strong>homepage</strong>,
-are defined in a context, and that context is used to resolve the
-names in JSON objects, machines could automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Doing this would mean that JSON would start to become unambiguously
-machine-readable, play well with the semantic web, and basic markup wouldn't 
-be that much more complex than basic JSON markup. A win, all around.</p>
-</div>
-
-<div id="mashing-up-vocabularies" class="section">
-<h3><span class="secno">2.5 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>RDF - for describing information about objects on the semantic web.</li>
-   <li>RDFS - for expressing things like labels and comments.</li>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>Since these vocabularies are very popular, they are pre-defined in
-something called the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a>, which is a set of
-vocabulary prefixes that are pre-loaded in all JSON-LD processors. The
-contents of the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> are provided later in this 
-document. Using the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> allows developers to 
-express data unambiguously, like so:</p>
-
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword, like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}</pre>
-
-<p>The <code>@context</code> keyword is used to change how the JSON-LD
-processor evaluates key-value pairs. In this case, it was used to
-map one string ('myvocab') to another string, which is interpreted as
-a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced 
-with "<code>http://example.org/myvocab#</code>" when it
-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 for RDF, called a CURIE, and provides
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div id="an-example-of-a-context" class="section">
-<h3><span class="secno">2.6 </span>An Example of a Context</h3>
-
-<p>JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> define a known context. For example, the
-following <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> could apply to all incoming Web Service calls
-previously accepting only JSON data:</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-    "@vocab": "http://example.org/default-vocab#",
-    "@base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-}</pre>
-
-<p>The <code>@vocab</code> string is a special keyword that states 
-that any term that doesn't resolve to a term or a prefix should be 
-appended to the <code>@vocab</code> IRI. This is done to ensure that 
-terms can be transformed to an IRI at all times.
-</p>
-
-<p>The <code>@base</code> string is a special keyword that states 
-that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
-<code>@base</code>.
-</p>
-
-<p>The <code>@coerce</code> keyword is used to specify type coercion
-rules for the data. For each key in the map, the key is the type to
-be coerced to and the value is the vocabulary term to be coerced.
-Type coercion for the key <code>xsd:anyURI</code> asserts that all 
-vocabulary terms listed should undergo coercion to an IRI, including
-<code>@base</code> processing for relative IRIs and CURIE processing
-for compact URI Expressions such as <code>foaf:homepage</code>.
-</p>
-
-</div>
-</div>
-
-<div id="markup-examples" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">3.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-[
- {
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/bob/",
-   "foaf:name": "Bob"
- },
- {
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/eve/",
-   "foaf:name": "Eve"
- },
- {
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/manu/",
-   "foaf:name": "Manu"
- }
-]</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">3.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">3.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]</pre>
-</div>
-</div>
-
-<div id="markup-of-rdf-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>Markup of RDF Concepts</h2>
-
-<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked 
-up in a way that is simple to understand and author by Web developers. In many
-cases, Javascript objects can become Linked Data with the simple addition
-of a context. Since RDF is also an important sub-community of the Linked
-Data movement, it is important that all RDF concepts are well-represented
-in this specification. This section details how each RDF concept can be
-expressed in JSON-LD.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">4.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
-and many objects are identified. IRIs can be expressed in a variety of
-different ways in JSON-LD.</p>
-
-<ol>
-  <li>In general, an IRI is generated if it is in the key position in 
-    an associative array. There are special rules for processing keys in
-    <code>@context</code> and when dealing with keys that start with the
-    <code>@</code> character.</li>
-  <li>An IRI is generated for the value specified using <code>@</code>, if
-    it is a string.</li>
-  <li>An IRI is generated for the value specified using <code>a</code>.</li>
-  <li>An IRI is generated for the value specified using the <code>@iri</code> 
-    keyword.</li>
-  <li>An IRI is generated when there are <code>@coerce</code> rules in 
-    effect for <code>xsd:anyURI</code> for a particular vocabulary term.</li>
-</ol>
-
-<p>An example of IRI generation for a key outside of a <code>@context</code>:
-</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p>In the example above, the key 
-<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
-opposed to being interpreted as a string..</p>
-
-<p>Term expansion occurs for IRIs if a term is defined within the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p>CURIE expansion also occurs for keys in JSON-LD:</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><code>foaf:name</code> above will automatically expand out to the IRI
-<code>http://xmlns.com/foaf/0.1/name</code>.</p>
-
-<p>An IRI is generated when a value is associated with a key using 
-the <code>@iri</code> keyword:</p>
-
-<pre class="example">
-{
-...
-  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}</pre>
-
-<p>If type coercion rules are specified in the <code>@context</code> for
-a particular vocabulary term, an IRI is generated:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:anyURI": "foaf:homepage"
-    } 
-  }</span>
-...
-  "foaf:homepage": "http://manu.sporny.org",
-...
-}</pre>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">4.2 </span>Identifying the Subject</h3>
-
-<p>A subject is declared using the <code>@</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, property, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to the IRI 
-<code>http://example.org/people#joebob</code>.
-</p>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">4.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the <code>a</code>
-key. Specifying the type in this way will generate a triple of the form 
-(subject, type, type-url).</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "<span class="diff">a</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple 
-(in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-</div>
-
-<div id="plain-literals" class="section">
-<h3><span class="secno">4.4 </span>Plain Literals</h3>
-
-<p>Regular text strings are called a <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn> in RDF and are easily
-expressed using regular JSON strings.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="language-specification-in-plain-literals" class="section">
-<h3><span class="secno">4.5 </span>Language Specification in Plain Literals</h3>
-
-<p>JSON-LD makes an assumption that <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s with associated
-language encoding information is not very common when used in
-JavaScript and Web Services. Thus, it takes a little more
-effort to express plain literals in a specified language.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}</pre>
-
-<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for <em>花澄</em> and
-associate the <code>ja</code> language tag with the triple that is
-generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="typed-literals" class="section">
-<h3><span class="secno">4.6 </span>Typed Literals</h3>
-
-<p>
-  A <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn> is indicated by attaching a IRI to the end of a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>, and this
-  IRI indicates the literal's datatype. Literals may be typed in JSON-LD in three ways:
-</p>
-
-<ol>
-  <li>By utilizing the <code>@coerce</code> keyword.</li>
-  <li>By utilizing the expanded form for specifying objects.</li>
-  <li>By using a native JSON datatype.</li>
-</ol>
-
-<p>The first example uses the <code>@coerce</code> keyword to express a
-typed literal:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }</span>
-...
-  "dc:modified": "2010-05-29T14:17:39+02:00",
-...
-}</pre>
-
-<p>The second example uses the expanded form for specifying objects:</p>
-
-<pre class="example">
-{
-...
-  "dc:modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }</span>
-...
-}</pre>
-
-<p>Both examples above would generate an object with the literal value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">4.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-arrays. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an array.</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "jaybee" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">4.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
-form for objects:</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/articles/8",
-  "dcterms:modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]</span>
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="blank-nodes" class="section">
-<h3><span class="secno">4.9 </span>Blank Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this is where blank nodes come
-into play. In JSON-LD, blank node identifiers are automatically created if a 
-subject is not specified using the <code>@</code> keyword. However, authors 
-may name blank nodes by using the special <code>_</code> CURIE prefix.</p>
-
-<pre class="example">
-{
-...
-  "@": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-named blank node.
-</p>
-
-</div>
-</div>
-
-<div id="advanced-features" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Advanced Features</h2>
-
-<p>JSON-LD has a number of features that provide functionality above and beyond
-the core functionality provided by RDF. The following sections outline the
-features that are specific to JSON-LD.
-</p>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">5.1 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as doubles, 
-integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
-information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
-
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-<p class="note">When dealing with a number of modern programming languages,
-including JavaScript ECMA-262, there is no distinction between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
-the number <code>5.3</code> and the number 
-<code>5.3e0</code> are treated as if they were the same. When converting from 
-JSON-LD to a language-native format and back, datatype information is lost in a 
-number of these languages. Thus, one could say that <code>5.3</code> is a 
-<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
-<strong>xsd:double</strong> in JSON-LD, but when both values are 
-converted to a language-native format the datatype difference between the two 
-is lost because the machine-level representation will almost always be a 
-<strong>double</strong>. 
-Implementers should be aware of this potential round-tripping issue between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
-objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
-to a language native type.
-</p>
-
-</div>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">5.2 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
-JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
-coerce and incoming or outgoing types to the proper RDF type based on a
-mapping of type IRIs to RDF types. Using type conversion, one may convert
-simple JSON data to properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to 
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-        "xsd:anyURI": "homepage",
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-</div>
-
-<div id="the-json-ld-processing-algorithm" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>The JSON-LD Processing Algorithm</h2>
-<p>
-  The JSON-LD Processing Model describes processing rules for extracting RDF
-  from a JSON-LD document. Note that many uses of JSON-LD may not require generation of RDF.
-</p>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The Processing Algorithm is a work in progress.</p>
-
-<div class="informative section" id="overview">
-  <h3><span class="secno">6.1 </span>Overview</h3><p><em>This section is non-normative.</em></p>
-  <p>
-    JSON-LD is intended to have an easy to parse grammar that closely models existing
-    practice in using JSON for describing object representations. This allows the use
-    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
-    for stream-based parsing similar to SAX.
-  </p>
-  <p>
-    As with other grammars used for describing linked data, a key concept is that of
-    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
-    externally named entities, <em>BNodes</em>, resources for which an external name does not
-    exist, or is not known, and Literals, which describe terminal entities such as strings,
-    dates and other representations having a lexical representation possibly including
-    an explicit language or datatype.
-  </p>
-  <p>
-    Data described with JSON-LD may be considered to be the representation of a graph made
-    up of <em>subject</em> and <em>object</em> resources related via a <em>predicate</em> resource.
-    However, specific implementations may choose to operate on the document as a normal
-    JSON description of objects having attributes.
-  </p>
-</div>
-
-<div id="processing-algorithm-terms" class="section">
-  <h3><span class="secno">6.2 </span>Processing Algorithm Terms</h3>
-  <dl>
-    <dt><dfn title="default_context" id="dfn-default_context">default context</dfn></dt>
-    <dd>
-      a context that is specified to the JSON-LD processing algorithm
-      before processing begins.
-    </dd>
-    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
-    <dd>
-      the destination graph for all triples generated by JSON-LD markup.
-    </dd>
-    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
-    <dd>
-      the currently active subject that the processor should use when
-      generating triples.
-    </dd>
-    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
-    <dd>
-      the currently active property that the processor should use when
-      generating triples.
-    </dd>
-    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
-    <dd>
-      the currently active object that the processor should use when
-      generating triples.
-    </dd>
-    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
-    <dd>
-      a context that is used to resolve CURIEs while the processing
-      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context contained within the
-      <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-    </dd>
-    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
-    <dd>
-      a context that is specified at the JSON associative-array level,
-      specified via the <code>@context</code> keyword.
-    </dd>
-    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
-    <dd>
-      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
-      context</a>, <a class="tref" title="current_subject">current subject</a>, and <a class="tref" title="current_property">current property</a>. The <a class="tref" title="processor__state">processor
-      state</a> is managed as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
-      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new associative array.
-    </dd>
-  </dl>
-</div>
-
-<div id="processing-tokens-and-keywords" class="section">
-  <h3><span class="secno">6.3 </span>Processing Tokens and Keywords</h3>
-  <dl>
-  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
-  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@profile</code></dt><dd>A reference to a remote context description used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
-  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
-  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
-  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
-  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
-  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
-  <dt><code>:</code></dt><dd>The separator for CURIEs when used in JSON keys or JSON values.</dd>
-  <dt><code>@</code></dt><dd>Sets the active subjects.</dd>
-  <dt><code>a</code></dt><dd>Used to set the rdf:type of the active subjects. This token may be conferred as syntactic sugar for rdf:type.</dd>
-  </dl>
-  <p class="issue">Use <code>@source</code> instead of <code>@</code>?</p>
-  <p class="issue">Use <code>@type</code> instead of <code>a</code>? Note that both are just semantic sugar for <code>rdf:type</code>.</p>
-</div>
-
-<div id="context" class="section">
-  <h3><span class="secno">6.4 </span>Context</h3>
-  <p>
-    Processing of JSON-LD is managed recursively using a process described in <a href="sequence">Sequence</a>.
-    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
-    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
-    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-  </p>
-  <p class="issue">Should the document URL be used as the default for <code>@base</code> in the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a>?</p>
-  <p>
-    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of an associative array (or elements
-    of a list (see <span a="#list-processing">List Processing</span>)).
-  </p>
-  <p>
-    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within an associative array having a key of <code>@context</code> with an associative
-    array value. When processing a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, special rules apply:
-  </p>
-  <ul>
-    <li>The key <code>@base</code> <em class="rfc2119" title="must">must</em> have a value of a simple string with the lexical
-    form of IRI and is saved in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to perform term mapping as described in <a href="#iri-processing">IRI Processing</a>.</li>
-    <li>The key <code>@vocab</code> <em class="rfc2119" title="must">must</em> have a value of a simple string with the lexical
-    form of IRI and is saved in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to perform term mapping as described in <a href="#iri-processing">IRI Processing</a>.</li>
-    <li>The key <code>@coerce</code> <em class="rfc2119" title="must">must</em> have a value of an associative array. Processing
-      of the associative array is described <a href="#coerce">below</a></li>
-    <li>Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of
-      <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite>
-      and <em class="rfc2119" title="must">must</em> have the value of a simple string with the lexical form of IRI.
-      Merge each key-value pair into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
-      any duplicate values.
-    </li>
-  </ul>
-  <p>A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> may also be loaded from an external document using the <code>@profile</code>
-    key as described in <a href="#vocabulary-profiles">Vocabulary Profiles</a>.
-  </p>
-  <div id="coerce" class="section">
-    <h4><span class="secno">6.4.1 </span>Coerce</h4>
-    <p>
-      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
-      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
-      <code>@coerce</code> mapping, overwriting any duplicate values in 
-      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
-      The <code>@coerce</code> mapping has a either of a single CURIE or of an
-      array of CURIEs. When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-      map all CURIE values to array form and replace with the union of the value from
-      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an array
-      with a single CURIE, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
-    </p>
-  </div>
-</div>
-
-<div id="chaining" class="section">
-  <h3><span class="secno">6.5 </span>Chaining</h3>
-  <p>
-    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to use the definition
-    of JSON-LD objects as <a class="tref" title="property">property</a> values. This is a commonly used mechanism for
-    creating a parent-child relationship between objects.
-  </p>
-  <p>The example shows an two objects related by a property from the first object:</p>
-
-  <pre class="example">
-{
-...
-  "foaf:name": "Manu Sporny",
-  "<span class="diff">foaf:knows</span>": {
-    "<span class="diff">a</span>": "<span class="diff">foaf:Person</span>",
-    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}</pre>
-  
-  <p>
-    An object definition may be used anyplace a value is legal in JSON-LD.
-  </p>
-</div>
-
-<div id="iri-processing" class="section">
-  <h3><span class="secno">6.6 </span>IRI Processing</h3>
-  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
-    transforming a value representing an IRI into an actual IRI.</p>
-  <p>IRIs may be represented as an explicit string, or as a CURIE, as a value relative to <code>@base</code>
-    or <code>@vocab</code>.</p>
-  <p>
-    CURIEs are defined more formally in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">section 6 "CURIE Syntax Definition"</a></cite>.
-    Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em> separated by a ':'. In
-    JSON-LD, either the prefix may be the empty string, denoting the <dfn title="default_prefix" id="dfn-default_prefix">default prefix</dfn>.
-  </p>
-  <p>The procedure for generating an IRI is:
-    </p><ol class="algorithm">
-      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
-      <li>If the prefix is a '_', generate a named BNode using the suffix as the name.</li>
-      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
-        by prepending the mapped prefix to the (possibly empty) suffix. Note that an empty
-        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
-      <li>If the IRI being processed is for a property (i.e., a key value in an associative array, or a
-        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
-        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>].</li>
-      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
-        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>].</li>
-      <li>Otherwise, use the value directly as an IRI.</li>
-    </ol>
-  <p></p>
-  </div>
-</div>
-
-
-
-<div id="sequence" class="section">
-  
-<!-- OddPage -->
-<h2><span class="secno">7. </span>Sequence</h2>
-
-  <p>
-    The algorithm below is designed for in-memory implementations with random access to associative
-    array elements. For a description of a streaming implementation, see <a href="streaming-processors">Appendix B</a>.
-  </p>
-  <p>
-    A conforming JSON-LD processor <em class="rfc2119" title="must">must</em> implement a
-    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
-    algorithm generates:
-  </p>
-
-  <ol class="algorithm">
-    <li id="processing-step-default-context">
-      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
-      <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      initialized to NULL.
-    </li>
-
-    <li id="processing-step-associative">
-      If an associative array is detected, perform the following steps:
-      <ol class="algorithm">
-        <li>
-          If the associative array has a <code>@context</code> key, process the local context as
-          described in <a href="context">Context</a>.
-        </li>
-        <li>
-          If the associative array has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
-          performing <a href="#iri-processing">IRI Processing</a> on the associated value. Generate a
-          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-        <li>
-          If the associative array has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-          to a literal value as follows:
-          <ul>
-            <li>
-              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the associative array contains a <code>@datatype</code> key
-              after performing <a href="#iri-processing">IRI Processing</a> on the specified<code>@datatype</code>.
-            </li>
-            <li>
-              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the associative array contains
-              a <code>@language</code> key, use it's value to set the language of the plain literal.
-            </li>
-          </ul>
-          Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref" title="active__property">active
-          property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-        <li>If the associative array has a <code>@</code> key:
-          <ol class="algorithm">
-            <li>
-              If the value is a string, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
-              <a href="#iri-processing">IRI Processing</a>. Generate a
-              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
-            </li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
-              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          If the associative array does not have a <code>@</code> key, set the <a class="tref" title="active__object">active
-          object</a> to newly generated <a class="tref" title="blank_node_identifier">blank node identifier</a>. Generate a triple
-          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
-          object</a>.
-        </li>
-        <li>
-          For each key in the associative array that has not already been processed, perform
-          the following steps:
-          <ol class="algorithm">
-            <li>If the key is <code>a</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-            to <code>rdf:type</code>.
-            </li>
-            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
-            <a href="#iri-processing">IRI Processing</a> on the key.</li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
-              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-      </ol>
-    </li>
-
-    <li>
-      If a regular array is detected, process each value in the array by doing the following
-      returning the result of processing the last value in the array:
-
-      <ol class="algorithm">
-        <li>
-          If the value is a regular array, generate an RDF List by linking
-          each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
-          using the following sequence:
-          <ol>
-            <li>
-              If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-              and <code>rdf:nil</code>.
-            </li>
-            <li>
-              Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-              and a newly generated BNode identified as <em>first bnode</em>.
-            </li>
-            <li>
-              For each element other than the last element in the list:
-              <ol>
-                <li>Create a processor state using the active context, <em>first bnode</em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
-                <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest bnode</em>, otherwise use <code>rdf:nil</code>.</li>
-                <li>Generate a new triple using <em>first bnode</em>, <code>rdf:rest</code> and <em>rest bnode</em>.</li>
-                <li>Set <em>first bnode</em> to <em>rest bnode</em>.</li>
-              </ol>
-            </li>
-          </ol>
-        </li>
-        <li>
-          Otherwise, create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-          <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-          starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
-          previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-        </li>
-      </ol>
-    </li>
-    
-    <li>
-      If a string is detected, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-      and a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from the string.
-    </li>
-    
-    <li>
-      If a number is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
-      the value with datatype set to either <code>xsd:integer</code> or
-      <code>xsd:double</code>, depending on if the value contains a
-      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
-      subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and the generated typed literal.
-    </li>
-    
-    <li>
-      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
-      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
-      value with datatype set to <code>xsd:boolean</code>.
-    </li>
-  </ol>
-</div>
-
-<div id="best-practices" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">8. </span>Best Practices</h2>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be 
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<div id="javascript" class="section">
-<h3><span class="secno">8.1 </span>JavaScript</h3>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in 
-JavaScript environments, however, features like the expanded form for
-object values mean that using JSON-LD directly in JavaScript may be 
-annoying without a middleware layer such as a simple library that 
-converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDF API, which enables a variety of RDF-based
-Web Applications, but some don't want to require that level of functionality 
-just to use JSON-LD. The group is still discussing the best way to proceed, 
-so input on how JSON-LD could more easily be utilized in JavaScript 
-environments would be very much appreciated.
-</p>
-</div>
-
-<div id="schema-less-databases" class="section">
-<h3><span class="secno">8.2 </span>Schema-less Databases</h3>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from 
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-
-<p class="issue">MongoDB does not allow the '.' character to be used in
-key names. This prevents developers from storing IRIs as keys, which also
-prevents storage of the data in normalized form. While this issue can
-be avoided by using CURIEs for key values, it is not known if this
-mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
-is useful to developers.
-</p>
-
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">9. </span>Advanced Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear 
-whether or not the JSON-LD specification is going to support the complexity 
-necessary to support each concept. The entire section on Advanced Concepts 
-should be considered as discussion points; it is merely a list of 
-possibilities where all of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="vocabulary-profiles" class="section">
-<h3><span class="secno">9.1 </span>Vocabulary Profiles</h3>
-
-<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
-a collection of prefixes and terms that can be re-used by a processor to simplfy
-markup. JSON-LD provides a similar mechanism called Vocabulary Profiles, which is 
-the inclusion of a context external to the JSON-LD document.</p>
-
-<p>The example below demonstrates how one may specify an external Vocabulary
-Profile. Assume the following profile exists at this imaginary URL:
-<code>http://example.org/profiles/contacts</code>.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}</pre>
-
-<p>The profile listed above can be used in the following way:</p>
-
-<pre class="example">
-{
-  "@profile": "http://example.org/profiles/contacts",
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">9.2 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an array to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single JSON-LD associative
-array.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "@": 
-  [
-    {
-      "@": "http://example.org/people#john",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "http://example.org/people#jane",
-      "a": "foaf:Person"
-    }
-  ]
-}</pre>
-
-<p>A disjoint graph could also be expressed like so:</p>
-
-<pre class="example">
-[
-  {
-    "@": "http://example.org/people#john",
-    "a": "foaf:Person"
-  },
-  {
-    "@": "http://example.org/people#jane",
-    "a": "foaf:Person"
-  }
-]</pre>
-
-</div>
-
-<div id="the-json-ld-api" class="section">
-<h3><span class="secno">9.3 </span>The JSON-LD API</h3>
-
-<p>This API provides a clean mechanism that enables developers to convert 
-JSON-LD data into a format that is easier to work with in various programming
-languages.
-</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDProcessor</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-};</span>
-</pre><div id="methods" class="section"><h4><span class="secno">9.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback"><code>toGraph</code></dt><dd>Parses JSON-LD and transforms the data into an Graph, which is 
-  compatible with the RDF Interfaces API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">RDF-INTERFACES</a></cite>]. 
-  This method will 
-  return <code>null</code> if there are any errors, or if the RDF Interfaces 
-  API is not available for use.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>Graph</a></code></div></dd><dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback"><code>toProjection</code></dt><dd>Parses JSON-LD text into an RDF API Projection object as specified
-    by the RDF API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-API">RDF-API</a></cite>].
-    If there are any errors, <code>null</code> is returned.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the Projection.</td></tr><tr><td class="prmName">template</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The Projection template to use when building the Projection.</td></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject to use when building the Projection.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
-
-<p>The JSONLDParserCallback is called whenever a processing error occurs on
-input data.</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre><div id="methods-1" class="section"><h4><span class="secno">9.3.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
-
-<p>The following example demonstrates how to convert JSON-LD to a projection
-that is directly usable in a programming environment:
-</p>
-
-<pre class="example">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-
-// Map the JSON-LD to a language-native object
-var person = jsonld.toProjection(jsonldString, myTemplate);
-
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-      "Their homepage is: " + person.homepage);</pre>
-
-<p>A JSON-LD Serializer is also available to map a language-native object
-to JSON-LD.
-
-</p><pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
-};</span>
-</pre><div id="methods-2" class="section"><h4><span class="secno">9.3.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
-  Normalization is important when performing things like equality comparison
-  and digital signature creation and verification.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An associative array of key-value pairs that should be converted
-     to a JSON-LD string. It is assumed that a map already exists for the
-     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
-
-<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
-
-<p class="issue">This algorithm is very rough, untested, and probably contains
-many bugs. Use at your own risk. It will change in the coming months.</p>
-
-<p>The JSON-LD normalization algorithm is as follows:</p>
-
-<ol class="algorithm">
-  <li>Remove the <code>@context</code> key and preserve it as the 
-  <dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
-  <li>For each key
-   <ol class="algorithm">
-    <li>If the key is a CURIE, expand the CURIE to an IRI using the
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-   </ol>
-  </li>
-  <li>For each value
-   <ol class="algorithm">
-    <li>If the value should be type coerced per the 
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
-        new value.</li>
-    <li>If the value is a CURIE, expand the CURIE to an IRI using the
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-    <li>If the value is a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> and the type is a CURIE,
-        expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-    <li>When generating the final value, use expanded object value form to
-      store all IRIs, typed literals and <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s with language
-      information.</li>
-   </ol>
-  </li>
-  <li>Output each sorted key-value pair without any extraneous whitespace. If 
-  the value is an associative array, perform this algorithm, starting
-  at step #1, recursively on the sub-tree. There should be no nesting in
-  the outputted JSON data. That is, the top-most element should be an
-  array. Each item in the array contains a single subject with a 
-  corresponding array of properties in UTF-8 sort order. Any related 
-  objects that are complex objects themselves should be given a top-level 
-  object in the top-level array.</li>
-  
-</ol>
-
-<p class="issue">Note that normalizing named blank nodes is impossible at
-present since one would have to specify a blank node naming algorithm. For
-the time being, you cannot normalize graphs that contain named blank
-nodes. However, normalizing graphs that contain non-named blank nodes 
-is supported.</p>
-
-<pre class="example">
-var myObj = { "@context" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "age",
-                   "xsd:anyURI": "homepage"
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : "42",
-              "homepage" : "http://example.org/people/joe" };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);</pre>
-
-<p>After the code in the example above has executed, the 
-<strong>jsonldText</strong> value will be (line-breaks added for 
-readability):</p>
-
-<pre class="example">
-[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
-"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
-"http://xmlns.com/foaf/0.1/name":"Joe Jackson"}]</pre>
-
-<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
-ensure that the normalized value is a string. In order to generate the
-string from a <strong>double</strong> value, output equivalent to the
-<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
-<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
-is the value to be converted.</p>
-
-<p>To convert the a double value in JavaScript, implementers can use the 
-following snippet of code:</p>
-
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
-
-<p class="note">When data needs to be normalized, JSON-LD authors should
-not use values that are going to undergo automatic conversion. This is due
-to the lossy nature of <strong>xsd:double</strong> values.</p>
-
-<p class="issue">Round-tripping data can be problematic if we mix and
-match @coerce rules with JSON-native datatypes, like integers. Consider the 
-following code example:</p>
-
-<pre class="example">
-var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-
-// Convert the normalized object back to a JavaScript object
-var myObj2 = jsonld.parse(jsonldText);</pre>
-
-<p class="issue">At this point, myObj2 and myObj will have different
-values for the "number" value. myObj will be the number 42, while
-myObj2 will be the string "42". This type of data round-tripping
-error can bite developers. We are currently wondering if having a
-"coerce validation" phase in the parsing/normalization phases would be a 
-good idea. It would prevent data round-tripping issues like the
-one mentioned above.</p>
-
-</div>
-
-</div>
-
-
-
-<div class="appendix section" id="the-default-context">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>The Default Context</h2>
-
-<p>The <dfn title="default_context" id="dfn-default_context-1">default context</dfn> is provided to ensure that there are a
-reasonable set of prefixes and terms available to all JSON-LD developers.
-Mappings specified by the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> <em class="rfc2119" title="should not">should not</em> be overwritten by
-JSON-LD authors. All JSON-LD processors <em class="rfc2119" title="must">must</em> load the following context 
-in as the intial context before processing JSON-LD text.</p>
-
-<pre>
-{
-  "@context":
-  {
-    "@vocab": "",
-    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
-    "owl": "http://www.w3.org/2002/07/owl#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dcterms": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "vcard": "http://www.w3.org/2006/vcard/ns# ",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "cc": "http://creativecommons.org/ns#",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "com": "http://purl.org/commerce#",
-    "ps": "http://purl.org/payswarm#",
-    "gr": "http://purl.org/goodrelations/v1#",
-    "sig": "http://purl.org/signature#",
-    "ccard": "http://purl.org/commerce/creditcard#"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-}
-</pre>
-</div>
-
-<div class="appendix section" id="acknowledgements">
-
-<!-- OddPage -->
-<h2><span class="secno">B. </span>Acknowledgements</h2>
-
-<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
-rationale and reasoning behind the JSON-LD work via his work on RDFj, 
-Dave Longley who reviewed, provided feedback, and performed several
-implementation on the specification, and Ian Davis, who created RDF/JSON. 
-Thanks also to Nathan Rixham, Bradley P. Allen and Richard Cyganiak for their 
-input on the specification.</p>
-</div>
-
-
-
-
-<div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">C. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">C.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-API">[RDF-API]</dt><dd>Manu Sporny, Benjamin Adrian, Nathan Rixham; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><cite>RDF API</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">http://www.w3.org/2010/02/rdfa/sources/rdf-api/</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RDF-INTERFACES">[RDF-INTERFACES]</dt><dd>Nathan Rixham, Manu Sporny, Benjamin Adrian; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><cite>RDF Interfaces</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/</a>
-</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20110615/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20110803/diff-20110615.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14536 +0,0 @@
-<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
-<html lang="en" dir="ltr">
-<head>
-<title>JSON-LD 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<!-- 
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-  -->
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  1px dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8"><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-
-
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
-<del class="diff-old">-
-Linked
-Data
-Expression
-in
-JSON
-</del>
-<ins class="diff-chg">1.0
-</ins>
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-<del class="diff-old">Linked
-</del>
-<ins class="diff-chg">Linking
-</ins>
-Data
-</h2>
-<h2 id="unofficial-draft-03-august-2011">
-Unofficial
-Draft
-<del class="diff-old">15
-June
-</del>
-<ins class="diff-chg">03
-August
-</ins>
-2011
-</h2>
-<dl>
-<dt>
-Editors:
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-<dd>
-<a href="http://greggkellogg.net/">
-Gregg
-Kellogg
-</a>,
-Kellogg
-Associates
-</dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar,
-Inc.
-</a>
-</dd>
-</dl>
-<del class="diff-old">This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-diff
-to
-previous
-version
-.
-</del>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr>
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-<del class="diff-old">Developers
-that
-embed
-structured
-data
-in
-their
-Web
-pages
-can
-choose
-among
-a
-number
-of
-languages
-such
-as
-RDFa
-[
-RDFA-CORE
-],
-Microformats
-</del>
-<ins class="diff-chg">JSON
-</ins>
-[
-<cite>
-<del class="diff-old">MICROFORMATS
-</del>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-<ins class="diff-chg">RFC4627
-</ins>
-</a>
-</cite>
-]
-<del class="diff-old">and
-Microdata
-[
-MICRODATA
-].
-Each
-of
-these
-structured
-data
-languages,
-while
-incompatible
-at
-the
-syntax
-level,
-can
-be
-easily
-mapped
-to
-RDF.
-JSON
-</del>
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-format.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-<ins class="diff-new">expressing
-directed
-graphs;
-mixing
-both
-</ins>
-Linked
-Data
-<del class="diff-old">that
-can
-be
-used
-to
-represent
-objects
-specified
-via
-RDFa,
-Microformats
-</del>
-and
-<del class="diff-old">Microdata.
-</del>
-<ins class="diff-chg">non-Linked
-Data
-in
-a
-single
-document.
-</ins>
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-Introduction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-1.2
-</span>
-Contributing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design" class="tocxref">
-<span class="secno">
-2.
-</span>
-Design
-<del class="diff-old">Goals
-and
-Rationale
-</del>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals-and-rationale" class="tocxref">
-<span class="secno">
-2.1
-</span>
-Goals
-<ins class="diff-new">and
-Rationale
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#linked-data" class="tocxref">
-<span class="secno">
-2.2
-</span>
-<del class="diff-old">Map
-Terms
-to
-IRIs
-</del>
-<ins class="diff-chg">Linked
-Data
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#linking-data" class="tocxref">
-<span class="secno">
-2.3
-</span>
-<del class="diff-old">The
-JSON-LD
-Context
-</del>
-<ins class="diff-chg">Linking
-Data
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#the-context" class="tocxref">
-<span class="secno">
-2.4
-</span>
-<del class="diff-old">Unambiguous
-Identifiers
-for
-JSON
-2.5
-Mashing
-Up
-Vocabularies
-</del>
-<ins class="diff-chg">The
-Context
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#inside-a-context" class="tocxref">
-<span class="secno">
-<del class="diff-old">2.6
-</del>
-<ins class="diff-chg">2.4.1
-</ins>
-</span>
-<del class="diff-old">An
-Example
-of
-</del>
-<ins class="diff-chg">Inside
-</ins>
-a
-Context
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<del class="diff-old">3.
-Markup
-Examples
-3.1
-RDFa
-3.2
-Microformats
-</del>
-<a href="#from-json-to-json-ld" class="tocxref">
-<span class="secno">
-<del class="diff-old">3.3
-</del>
-<ins class="diff-chg">2.5
-</ins>
-</span>
-<del class="diff-old">Microdata
-</del>
-<ins class="diff-chg">From
-JSON
-to
-JSON-LD
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#basic-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.
-</del>
-<ins class="diff-chg">3.
-</ins>
-</span>
-<del class="diff-old">Markup
-of
-RDF
-</del>
-<ins class="diff-chg">Basic
-</ins>
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.1
-</del>
-<ins class="diff-chg">3.1
-</ins>
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.2
-</del>
-<ins class="diff-chg">3.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.3
-</del>
-<ins class="diff-chg">3.3
-</ins>
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#strings" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.4
-</del>
-<ins class="diff-chg">3.4
-</ins>
-</span>
-<del class="diff-old">Plain
-Literals
-</del>
-<ins class="diff-chg">Strings
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#string-internationalization" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.5
-</del>
-<ins class="diff-chg">3.5
-</ins>
-</span>
-<del class="diff-old">Language
-Specification
-in
-Plain
-Literals
-</del>
-<ins class="diff-chg">String
-Internationalization
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#datatypes" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.6
-</del>
-<ins class="diff-chg">3.6
-</ins>
-</span>
-<del class="diff-old">Typed
-Literals
-</del>
-<ins class="diff-chg">Datatypes
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.7
-</del>
-<ins class="diff-chg">3.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.8
-</del>
-<ins class="diff-chg">3.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#compaction" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.9
-</del>
-<ins class="diff-chg">3.9
-</ins>
-</span>
-<del class="diff-old">Blank
-Nodes
-</del>
-<ins class="diff-chg">Compaction
-</ins></a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.10
-</ins></span><ins class="diff-chg">
-Expansion
-</ins></a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.11
-</ins></span><ins class="diff-chg">
-Framing
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">4.
-</ins>
-</span>
-Advanced
-<del class="diff-old">Features
-</del>
-<ins class="diff-chg">Concepts
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">4.1
-</ins>
-</span>
-Automatic
-Typing
-</a>
-</li>
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">4.2
-</ins>
-</span>
-Type
-Coercion
-</a>
-</li>
-<li class="tocline">
-<a href="#chaining" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">4.3
-</ins>
-</span>
-<del class="diff-old">The
-JSON-LD
-Processing
-Algorithm
-</del>
-<ins class="diff-chg">Chaining
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-unlabeled-nodes" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">4.4
-</ins>
-</span>
-<del class="diff-old">Overview
-</del>
-<ins class="diff-chg">Identifying
-Unlabeled
-Nodes
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#overriding-keywords" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">4.5
-</ins>
-</span>
-<del class="diff-old">Processing
-Algorithm
-Terms
-</del>
-<ins class="diff-chg">Overriding
-Keywords
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.3
-</del>
-<ins class="diff-chg">4.6
-</ins>
-</span>
-<del class="diff-old">Processing
-Tokens
-and
-Keywords
-</del>
-<ins class="diff-chg">Normalization
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#algorithms" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.4
-</del>
-<ins class="diff-chg">5.
-</ins>
-</span>
-<del class="diff-old">Context
-</del>
-<ins class="diff-chg">Algorithms
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#compaction-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.4.1
-</del>
-<ins class="diff-chg">5.1
-</ins>
-</span>
-<del class="diff-old">Coerce
-</del>
-<ins class="diff-chg">Compaction
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#expansion-1" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">5.2
-</ins></span><ins class="diff-chg">
-Expansion
-</ins></a>
-</li>
-<li class="tocline">
-<a href="#framing-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.5
-</del>
-<ins class="diff-chg">5.3
-</ins>
-</span>
-<del class="diff-old">Chaining
-</del>
-<ins class="diff-chg">Framing
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.6
-</del>
-<ins class="diff-chg">5.4
-</ins>
-</span>
-<del class="diff-old">IRI
-Processing
-</del>
-<ins class="diff-chg">Normalization
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">5.5
-</ins></span><ins class="diff-chg">
-RDF
-Conversion
-</ins></a><ul class="toc">
-<li class="tocline">
-<a href="#overview" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">5.5.1
-</ins>
-</span>
-<del class="diff-old">Sequence
-</del>
-<ins class="diff-chg">Overview
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#processing-algorithm-terms" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.
-</del>
-<ins class="diff-chg">5.5.2
-</ins>
-</span>
-<del class="diff-old">Best
-Practices
-</del>
-<ins class="diff-chg">Processing
-Algorithm
-Terms
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#processing-tokens-and-keywords" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.1
-</del>
-<ins class="diff-chg">5.5.3
-</ins>
-</span>
-<del class="diff-old">JavaScript
-</del>
-<ins class="diff-chg">Processing
-Tokens
-and
-Keywords
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#context-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.2
-</del>
-<ins class="diff-chg">5.5.4
-</ins>
-</span>
-<del class="diff-old">Schema-less
-Databases
-</del>
-<ins class="diff-chg">Context
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#iri-processing" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">5.5.5
-</ins></span><ins class="diff-chg">
-IRI
-Processing
-</ins></a>
-</li>
-<li class="tocline">
-<a href="#sequence" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.
-</del>
-<ins class="diff-chg">5.5.6
-</ins>
-</span>
-<del class="diff-old">Advanced
-Concepts
-</del>
-<ins class="diff-chg">Sequence
-</ins>
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#experimental-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.1
-</del>
-<ins class="diff-chg">6.
-</ins>
-</span>
-<del class="diff-old">Vocabulary
-Profiles
-</del>
-<ins class="diff-chg">Experimental
-Concepts
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.2
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Disjoint
-Graphs
-</a>
-</li>
-<li class="tocline">
-<a href="#the-json-ld-api" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-The
-JSON-LD
-API
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#methods" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3.1
-</del>
-<ins class="diff-chg">6.2.1
-</ins>
-</span>
-Methods
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3.2
-</del>
-<ins class="diff-chg">6.2.2
-</ins>
-</span>
-Methods
-</a>
-</li>
-<li class="tocline">
-<a href="#methods-2" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3.3
-</del>
-<ins class="diff-chg">6.2.3
-</ins>
-</span>
-Methods
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-A.
-</span>
-<del class="diff-old">The
-Default
-Context
-</del>
-<ins class="diff-chg">Markup
-Examples
-</ins></a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno"><ins class="diff-chg">
-A.1
-</ins></span><ins class="diff-chg">
-RDFa
-</ins></a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno"><ins class="diff-chg">
-A.2
-</ins></span><ins class="diff-chg">
-Microformats
-</ins></a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno"><ins class="diff-chg">
-A.3
-</ins></span><ins class="diff-chg">
-Microdata
-</ins></a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno"><ins class="diff-chg">
-A.4
-</ins></span><ins class="diff-chg">
-Mashing
-Up
-Vocabularies
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">A.5
-</ins>
-</span>
-Acknowledgements
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-<del class="diff-old">C.
-</del>
-<ins class="diff-chg">B.
-</ins>
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">C.1
-</del>
-<ins class="diff-chg">B.1
-</ins>
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">C.2
-</del>
-<ins class="diff-chg">B.2
-</ins>
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<p>
-<ins class="diff-new">JSON,
-as
-specified
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
-RFC4627
-</ins></a></cite><ins class="diff-new">
-],
-is
-a
-simple
-language
-for
-representing
-data
-on
-the
-Web.
-Linked
-Data
-is
-a
-technique
-for
-describing
-content
-across
-different
-documents
-or
-Web
-sites.
-Web
-resources
-are
-described
-using
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a><ins class="diff-new">
-s,
-and
-typically
-are
-dereferencable
-entities
-that
-may
-be
-used
-to
-find
-more
-information,
-creating
-a
-"Web
-of
-Knowledge".
-JSON-LD
-is
-intended
-to
-be
-a
-simple
-publishing
-method
-for
-expressing
-not
-only
-Linked
-Data
-in
-JSON,
-but
-for
-adding
-semantics
-to
-existing
-JSON.
-</ins></p><p>
-JSON-LD
-is
-designed
-as
-a
-light-weight
-syntax
-that
-can
-be
-used
-to
-express
-Linked
-Data.
-It
-is
-primarily
-intended
-to
-be
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-and
-other
-Web-based
-programming
-environments.
-It
-is
-also
-useful
-when
-building
-interoperable
-Web
-Services
-and
-when
-storing
-Linked
-Data
-in
-JSON-based
-document
-storage
-engines.
-It
-is
-practical
-and
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-and
-existing
-code
-that
-is
-in
-use
-today.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-<ins class="diff-new">RDFa
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-new">
-RDFA-CORE
-</ins></a></cite><ins class="diff-new">
-]
-data,
-</ins>
-Microformats
-<ins class="diff-new">[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS"><ins class="diff-new">
-MICROFORMATS
-</ins></a></cite><ins class="diff-new">
-]
-</ins>
-data,
-and
-<del class="diff-old">Microdata.
-</del>
-<ins class="diff-chg">Microdata
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA"><ins class="diff-chg">
-MICRODATA
-</ins></a></cite><ins class="diff-chg">
-].
-</ins>
-That
-is,
-it
-supports
-every
-major
-Web-based
-structured
-data
-model
-in
-use
-today.
-<del class="diff-old">It
-</del>
-</p>
-<p>
-<ins class="diff-chg">The
-syntax
-</ins>
-does
-not
-require
-<del class="diff-old">anyone
-</del>
-<ins class="diff-chg">many
-applications
-</ins>
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-<ins class="diff-new">either
-in-band
-or
-</ins>
-out-of-band.
-The
-syntax
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-very
-small
-memory
-footprint
-in
-order
-to
-operate.
-</p>
-<del class="diff-old">JSON,
-as
-specified
-in
-[
-RFC4627
-],
-is
-a
-simple
-language
-for
-representing
-objects
-on
-the
-web.
-Linked
-Data
-is
-a
-way
-of
-describing
-content
-across
-different
-documents,
-or
-web
-resources.
-Web
-resources
-are
-described
-using
-IRI
-s,
-and
-typically
-are
-dereferencable
-entities
-that
-may
-be
-used
-to
-find
-more
-information,
-creating
-a
-"web
-of
-knowledge".
-JSON-LD
-is
-intended
-to
-be
-a
-simple
-publishing
-method
-for
-expressing
-linked
-data
-in
-JSON.
-</del>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</h3>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-<del class="diff-old">write
-</del>
-<ins class="diff-chg">implement
-</ins>
-processors
-<ins class="diff-new">and
-APIs
-</ins>
-for
-JSON-LD.
-</li>
-</ul>
-<p>
-To
-understand
-<ins class="diff-new">the
-basics
-in
-</ins>
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-<ins class="diff-new">].
-To
-understand
-the
-API
-and
-how
-it
-is
-intended
-to
-operate
-in
-a
-programming
-environment,
-it
-is
-useful
-to
-have
-working
-knowledge
-of
-the
-JavaScript
-programming
-language
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262"><ins class="diff-new">
-ECMA-262
-</ins></a></cite>
-]
-and
-<ins class="diff-new">WebIDL
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL"><ins class="diff-new">
-WEBIDL
-</ins></a></cite><ins class="diff-new">
-].
-To
-understand
-how
-JSON-LD
-maps
-to
-RDF,
-it
-is
-helpful
-to
-be
-familiar
-with
-the
-basic
-</ins>
-RDF
-<del class="diff-old">as
-described
-in
-</del>
-<ins class="diff-chg">concepts
-</ins>
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
-RDF-CONCEPTS
-</a>
-</cite>
-].
-</p>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-1.2
-</span>
-Contributing
-</h3>
-<p>
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</p>
-<ul>
-<li>
-<del class="diff-old">All
-comments
-and
-</del>
-<ins class="diff-chg">Technical
-</ins>
-discussion
-<del class="diff-old">takes
-place
-</del>
-<ins class="diff-chg">typically
-occurs
-</ins>
-on
-the
-public
-mailing
-list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
-public-linked-json@w3.org
-</a>
-</li>
-<li>
-<a href="http://json-ld.org/minutes/">
-<ins class="diff-new">Public
-teleconferences
-</ins></a><ins class="diff-new">
-are
-held
-on
-Tuesdays
-at
-1500UTC
-on
-the
-second
-and
-fourth
-week
-of
-each
-month.
-</ins></li><li>
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-<a href="https://github.com/json-ld/json-ld.org/issues">
-issue
-tracker
-</a>.
-</li>
-<li>
-<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
-Source
-code
-</a>
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</li>
-<li>
-The
-<a href="http://webchat.freenode.net/?channels=#json-ld">
-#json-ld
-</a>
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</li>
-</ul>
-</div>
-</div>
-<div id="design" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Design
-<del class="diff-old">Goals
-and
-Rationale
-</del>
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="goals-and-rationale" class="section">
-<h3>
-<span class="secno">
-2.1
-</span>
-Goals
-<ins class="diff-new">and
-Rationale
-</ins>
-</h3>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-<del class="diff-old">don't
-</del>
-need
-<del class="diff-old">to
-</del>
-<ins class="diff-chg">only
-</ins>
-know
-<del class="diff-old">RDF
-in
-order
-</del>
-<ins class="diff-chg">JSON
-and
-three
-keywords
-</ins>
-to
-use
-the
-basic
-functionality
-<del class="diff-old">provided
-by
-</del>
-<ins class="diff-chg">in
-</ins>
-JSON-LD.
-<ins class="diff-new">No
-extra
-processors
-or
-software
-libraries
-are
-necessary
-to
-use
-JSON-LD
-in
-its
-most
-basic
-form.
-The
-language
-attempts
-to
-ensure
-that
-developers
-have
-an
-easy
-learning
-curve.
-</ins>
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-<del class="diff-old">should
-</del>
-<ins class="diff-chg">must
-</ins>
-be
-100%
-compatible
-with
-JSON.
-<ins class="diff-new">This
-ensures
-that
-all
-of
-the
-standard
-JSON
-libraries
-work
-seamlessly
-with
-JSON-LD
-documents.
-</ins>
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-<del class="diff-old">All
-major
-RDF
-concepts
-</del>
-<ins class="diff-chg">The
-syntax
-</ins>
-must
-be
-<del class="diff-old">expressible
-via
-the
-JSON-LD
-syntax.
-</del>
-<ins class="diff-chg">able
-to
-express
-directed
-graphs,
-which
-have
-been
-proven
-to
-be
-able
-to
-simply
-express
-almost
-every
-real
-world
-data
-model.
-</ins>
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-<del class="diff-old">readable.
-</del>
-<ins class="diff-chg">readable,
-requiring
-as
-little
-as
-possible
-from
-the
-developer.
-</ins></dd><dt><ins class="diff-chg">
-Pragmatism
-</ins></dt><dd><ins class="diff-chg">
-Mixing
-the
-expression
-of
-pure
-Linked
-Data
-with
-data
-that
-is
-not
-linked
-was
-an
-approach
-that
-was
-driven
-by
-pragmatism.
-JSON-LD
-attempts
-to
-be
-more
-practical
-than
-theoretical
-in
-its
-approach
-to
-Linked
-Data.
-</ins>
-</dd>
-<dt>
-Zero
-Edits,
-most
-of
-the
-time
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-At
-times,
-mapping
-JSON
-to
-<del class="diff-old">RDF
-</del>
-<ins class="diff-chg">a
-graph
-representation
-</ins>
-can
-become
-<del class="diff-old">difficult
--
-in
-</del>
-<ins class="diff-chg">difficult.
-In
-</ins>
-these
-instances,
-rather
-than
-having
-JSON-LD
-support
-esoteric
-markup,
-we
-chose
-not
-to
-support
-the
-use
-case
-and
-support
-a
-simplified
-syntax
-instead.
-So,
-while
-<del class="diff-old">we
-strive
-for
-</del>
-Zero
-<del class="diff-old">Edits,
-</del>
-<ins class="diff-chg">Edits
-was
-a
-goal,
-</ins>
-it
-was
-not
-always
-possible
-without
-adding
-great
-complexity
-to
-the
-language.
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<div id="linked-data" class="section">
-<h3>
-<span class="secno">
-2.2
-</span>
-<del class="diff-old">Map
-Terms
-</del>
-<ins class="diff-chg">Linked
-Data
-</ins></h3><p><ins class="diff-chg">
-The
-following
-definition
-for
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a><ins class="diff-chg">
-is
-the
-one
-that
-will
-be
-used
-for
-this
-specification.
-</ins></p><ol><li><dfn title="Linked_Data" id="dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></dfn><ins class="diff-chg">
-is
-a
-set
-of
-documents,
-each
-containing
-a
-representation
-of
-a
-linked
-data
-graph.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="linked_data_graph" id="dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></dfn><ins class="diff-chg">
-is
-a
-labeled
-directed
-graph,
-where
-nodes
-are
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a><ins class="diff-chg">
-s
-or
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><ins class="diff-chg">
-s,
-and
-edges
-are
-properties.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="subject" id="dfn-subject"><ins class="diff-chg">
-subject
-</ins></dfn><ins class="diff-chg">
-is
-any
-node
-in
-a
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a><ins class="diff-chg">
-with
-at
-least
-one
-outgoing
-edge.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
-should
-</ins></em><ins class="diff-chg">
-be
-labeled
-with
-a
-IRI.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="property" id="dfn-property"><ins class="diff-chg">
-property
-</ins></dfn><ins class="diff-chg">
-is
-an
-edge
-of
-the
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a><ins class="diff-chg">
-.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-be
-labeled
-with
-an
-IRI.
-</ins></li><li><ins class="diff-chg">
-An
-</ins><dfn title="object" id="dfn-object"><ins class="diff-chg">
-object
-</ins></dfn><ins class="diff-chg">
-is
-a
-node
-in
-a
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a><ins class="diff-chg">
-with
-at
-least
-one
-incoming
-edge.
-</ins></li><li><ins class="diff-chg">
-An
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><em class="rfc2119" title="may"><ins class="diff-chg">
-may
-</ins></em><ins class="diff-chg">
-be
-labeled
-with
-an
-IRI.
-</ins></li><li><ins class="diff-chg">
-An
-IRI
-that
-is
-a
-label
-in
-a
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
-should
-</ins></em><ins class="diff-chg">
-be
-dereferencable
-</ins>
-to
-<del class="diff-old">IRIs
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a><ins class="diff-chg">
-document
-describing
-the
-labeled
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a>,<a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><ins class="diff-chg">
-or
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><ins class="diff-chg">
-.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="literal" id="dfn-literal"><ins class="diff-chg">
-literal
-</ins></dfn><ins class="diff-chg">
-is
-an
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><ins class="diff-chg">
-with
-a
-label
-that
-is
-not
-an
-IRI
-</ins></li></ol><p><ins class="diff-chg">
-Note
-that
-the
-definition
-for
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a><ins class="diff-chg">
-above
-is
-silent
-on
-the
-topic
-of
-unlabeled
-nodes.
-Unlabeled
-nodes
-are
-not
-considered
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a>.<ins class="diff-chg">
-However,
-this
-specification
-allows
-for
-the
-expression
-of
-unlabled
-nodes,
-as
-most
-graph-based
-data
-sets
-on
-the
-Web
-contain
-a
-number
-of
-associated
-nodes
-that
-are
-not
-named
-and
-thus
-are
-not
-directly
-de-referenceable.
-</ins></p></div><div id="linking-data" class="section"><h3><span class="secno"><ins class="diff-chg">
-2.3
-</ins></span><ins class="diff-chg">
-Linking
-Data
-</ins>
-</h3>
-<p>
-An
-Internationalized
-Resource
-Identifier
-(
-<dfn title="IRI" id="dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>
-<del class="diff-old">)
-</del>
-<ins class="diff-chg">),
-</ins>
-as
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-],
-is
-a
-mechanism
-for
-representing
-unique
-identifiers
-on
-the
-web.
-In
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-<del class="diff-old">Data,
-IRIs
-(or
-URI
-references)
-are
-</del>
-<ins class="diff-chg">Data
-</ins></a>,<ins class="diff-chg">
-an
-IRI
-is
-</ins>
-commonly
-used
-for
-<del class="diff-old">describing
-entities
-and
-properties.
-</del>
-<ins class="diff-chg">expressing
-a
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a>,<ins class="diff-chg">
-a
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><ins class="diff-chg">
-or
-an
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a>.
-</p>
-<p>
-<del class="diff-old">Establishing
-</del>
-<ins class="diff-chg">JSON-LD
-defines
-</ins>
-a
-mechanism
-to
-map
-JSON
-values
-to
-<del class="diff-old">IRIs
-will
-help
-in
-the
-mapping
-of
-JSON
-objects
-to
-RDF.
-</del>
-<ins class="diff-chg">IRIs.
-</ins>
-This
-does
-not
-mean
-that
-JSON-LD
-<del class="diff-old">must
-</del>
-<ins class="diff-chg">requires
-every
-key
-or
-value
-to
-</ins>
-be
-<del class="diff-old">restrictive
-in
-declaring
-a
-set
-of
-terms,
-rather,
-experimentation
-</del>
-<ins class="diff-chg">an
-IRI,
-but
-rather
-ensures
-that
-keys
-</ins>
-and
-<del class="diff-old">innovation
-should
-</del>
-<ins class="diff-chg">values
-can
-</ins>
-be
-<del class="diff-old">supported
-as
-part
-of
-</del>
-<ins class="diff-chg">mapped
-to
-IRIs
-if
-</ins>
-the
-<del class="diff-old">core
-design
-of
-JSON-LD.
-</del>
-<ins class="diff-chg">developer
-so
-desires
-to
-transform
-their
-data
-into
-Linked
-Data.
-</ins>
-There
-<del class="diff-old">are,
-however,
-</del>
-<ins class="diff-chg">are
-</ins>
-a
-<del class="diff-old">number
-of
-very
-small
-design
-criteria
-</del>
-<ins class="diff-chg">few
-techniques
-</ins>
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-<del class="diff-old">RDF
-data
-that
-will
-create
-value
-</del>
-<ins class="diff-chg">Linked
-Data
-</ins>
-for
-the
-<del class="diff-old">greater
-semantic
-web
-community
-and
-JSON/REST-based
-Web
-Services
-community.
-</del>
-<ins class="diff-chg">Web.
-JSON-LD
-formalizes
-those
-techniques.
-</ins>
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-<del class="diff-old">object
-</del>
-<ins class="diff-chg">markup
-</ins>
-as
-the
-example
-for
-<ins class="diff-new">the
-rest
-of
-</ins>
-this
-section:
-</p>
-<del class="diff-old">{
-  "a": "Person",
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-</del>
-<pre class="example">{
-<ins class="diff-chg">  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-</ins>
-}
-</pre>
-</div>
-<div id="the-context" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">2.3
-</del>
-<ins class="diff-chg">2.4
-</ins>
-</span>
-The
-<del class="diff-old">JSON-LD
-</del>
-Context
-</h3>
-<p>
-<del class="diff-old">A
-</del>
-<ins class="diff-chg">In
-JSON-LD,
-a
-</ins>
-context
-is
-used
-to
-allow
-developers
-to
-<del class="diff-old">use
-aliases
-for
-</del>
-<ins class="diff-chg">map
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s
-to
-</ins>
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s.
-<ins class="diff-new">A
-</ins><dfn title="term" id="dfn-term"><ins class="diff-new">
-term
-</ins></dfn><ins class="diff-new">
-is
-a
-short
-word
-that
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-be
-expanded
-to
-an
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a>.
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-<del class="diff-old">terms
-</del>
-<a class="tref internalDFN" title="term" href="#dfn-term">
-<ins class="diff-chg">term
-</ins></a><ins class="diff-chg">
-s
-</ins>
-mean
-<del class="diff-old">something,
-which
-you
-will
-eventually
-want
-to
-query.
-A
-context
-allows
-the
-expression
-of
-a
-number
-</del>
-<ins class="diff-chg">something
-that
-may
-be
-</ins>
-of
-<del class="diff-old">terms
-which
-map
-directly
-</del>
-<ins class="diff-chg">use
-</ins>
-to
-<del class="diff-old">IRI
-s.
-</del>
-<ins class="diff-chg">other
-developers.
-</ins>
-For
-example,
-the
-term
-<code>
-name
-</code>
-may
-map
-directly
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-allows
-JSON-LD
-documents
-to
-be
-constructed
-using
-<ins class="diff-new">the
-</ins>
-common
-JSON
-<del class="diff-old">syntax
-</del>
-<ins class="diff-chg">practice
-</ins>
-of
-<del class="diff-old">using
-</del>
-simple
-name/value
-<del class="diff-old">pairs.
-</del>
-<ins class="diff-chg">pairs
-while
-ensuring
-that
-the
-data
-is
-useful
-outside
-of
-the
-database
-or
-page
-in
-which
-it
-resides.
-</ins>
-</p>
-<p>
-<del class="diff-old">To
-reduce
-</del>
-<ins class="diff-chg">These
-Linked
-Data
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s
-are
-typically
-collected
-in
-a
-context
-and
-then
-used
-by
-adding
-a
-single
-line
-to
-</ins>
-the
-<del class="diff-old">number
-of
-different
-</del>
-<ins class="diff-chg">JSON
-markup
-above:
-</ins></p><pre class="example">{
  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
<ins class="diff-chg">
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</ins></pre><p><ins class="diff-chg">
-The
-addition
-above
-transforms
-the
-previous
-JSON
-document
-into
-a
-JSON
-document
-with
-added
-semantics
-because
-the
-</ins><code><ins class="diff-chg">
-@context
-</ins></code><ins class="diff-chg">
-specifies
-how
-the
-</ins><strong><ins class="diff-chg">
-name
-</ins></strong>,<strong><ins class="diff-chg">
-homepage
-</ins></strong>,<ins class="diff-chg">
-and
-</ins><strong><ins class="diff-chg">
-avatar
-</ins></strong>
-terms
-<del class="diff-old">that
-must
-be
-defined,
-JSON-LD
-also
-</del>
-<ins class="diff-chg">map
-to
-IRIs.
-Mapping
-those
-keys
-to
-IRIs
-gives
-the
-data
-global
-context.
-If
-two
-developers
-use
-the
-same
-IRI
-to
-describe
-a
-property,
-they
-are
-more
-than
-likely
-expressing
-the
-same
-concept.
-This
-</ins>
-allows
-<del class="diff-old">terms
-</del>
-<ins class="diff-chg">both
-developers
-</ins>
-to
-<del class="diff-old">be
-used
-</del>
-<ins class="diff-chg">re-use
-each
-others
-data
-without
-having
-</ins>
-to
-<del class="diff-old">expand
-Compact
-URIs
-(
-CURIE
-).
-</del>
-<ins class="diff-chg">agree
-to
-how
-their
-data
-will
-inter-operate
-on
-a
-site-by-site
-basis.
-</ins></p><p>
-The
-semantic
-web
-<del class="diff-old">specifies
-this
-via
-</del>
-<ins class="diff-chg">uses
-a
-special
-type
-of
-document
-called
-a
-</ins>
-<em>
-<ins class="diff-new">Web
-</ins>
-Vocabulary
-<del class="diff-old">Documents
-,
-in
-which
-</del>
-</em>
-<ins class="diff-chg">to
-define
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s.
-A
-context
-is
-</ins>
-a
-<ins class="diff-new">type
-of
-Web
-vocabulary.
-Typically,
-these
-Web
-Vocabulary
-documents
-have
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-<del class="diff-old">is
-</del>
-</a>
-<ins class="diff-chg">es
-</ins>
-associated
-with
-<del class="diff-old">a
-document,
-</del>
-<ins class="diff-chg">them
-</ins>
-and
-<ins class="diff-new">contain
-</ins>
-a
-<del class="diff-old">suffix
-</del>
-<ins class="diff-chg">number
-of
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-declarations.
-A
-</ins><dfn title="prefix" id="dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></dfn>,<ins class="diff-chg">
-like
-a
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a>,
-is
-<del class="diff-old">used
-</del>
-<ins class="diff-chg">a
-short
-word
-that
-expands
-</ins>
-to
-<del class="diff-old">create
-an
-IRI
-based
-on
-this
-</del>
-<ins class="diff-chg">a
-Web
-Vocabulary
-IRI.
-</ins><a class="tref internalDFN" title="Prefix" href="#dfn-prefix"><ins class="diff-chg">
-Prefix
-</ins></a><ins class="diff-chg">
-es
-are
-helpful
-when
-a
-developer
-wants
-to
-mix
-multiple
-vocabularies
-together
-in
-a
-context,
-but
-does
-not
-want
-to
-go
-to
-the
-trouble
-of
-defining
-every
-single
-term
-in
-every
-single
-</ins>
-vocabulary.
-<ins class="diff-new">Some
-Web
-Vocabularies
-may
-have
-10-20
-terms
-defined.
-If
-a
-developer
-wants
-to
-use
-3-4
-different
-vocabularies,
-the
-number
-of
-terms
-that
-would
-have
-to
-be
-declared
-in
-a
-single
-context
-would
-become
-quite
-large.
-To
-reduce
-the
-number
-of
-different
-terms
-that
-must
-be
-defined,
-JSON-LD
-also
-allows
-prefixes
-to
-be
-used
-to
-compact
-IRIs.
-</ins></p><p></p><p>
-For
-example,
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/
-</code>
-specifies
-a
-<ins class="diff-new">Web
-</ins>
-Vocabulary
-<del class="diff-old">Document,
-and
-</del>
-<ins class="diff-chg">which
-may
-be
-represented
-using
-the
-</ins><code><ins class="diff-chg">
-foaf
-</ins></code><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></a>.<ins class="diff-chg">
-The
-</ins><code><ins class="diff-chg">
-foaf
-</ins></code><ins class="diff-chg">
-Web
-Vocabulary
-contains
-a
-term
-called
-</ins><strong><ins class="diff-chg">
-name
-</ins></strong>.<ins class="diff-chg">
-If
-you
-join
-the
-</ins><code><ins class="diff-chg">
-foaf
-</ins></code><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></a><ins class="diff-chg">
-with
-the
-</ins>
-<strong>
-name
-</strong>
-<del class="diff-old">is
-</del>
-<ins class="diff-chg">suffix,
-you
-can
-build
-</ins>
-a
-<del class="diff-old">term
-in
-</del>
-<ins class="diff-chg">compact
-IRI
-</ins>
-that
-<del class="diff-old">vocabulary.
-Join
-the
-two
-items
-together
-and
-you
-have
-</del>
-<ins class="diff-chg">will
-expand
-out
-into
-</ins>
-an
-<del class="diff-old">unambiguous
-identifier
-</del>
-<ins class="diff-chg">absolute
-IRI
-</ins>
-for
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">the
-</ins><code><ins class="diff-chg">
-http://xmlns.com/foaf/0.1/name
-</ins></code>
-vocabulary
-term.
-<del class="diff-old">The
-Compact
-URI
-Expression,
-</del>
-<ins class="diff-chg">That
-is,
-the
-compact
-IRI,
-</ins>
-or
-short-form,
-is
-<code>
-foaf:name
-</code>
-and
-the
-expanded-form
-is
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-vocabulary
-term
-<del class="diff-old">identifies
-the
-given
-name
-for
-something,
-for
-example
--
-</del>
-<ins class="diff-chg">is
-used
-to
-specify
-</ins>
-a
-person's
-name.
-</p>
-<p>
-Developers,
-and
-machines,
-<del class="diff-old">would
-be
-</del>
-<ins class="diff-chg">are
-</ins>
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-<del class="diff-old">Machines
-</del>
-<ins class="diff-chg">Developers
-and
-machines
-</ins>
-need
-the
-same
-sort
-of
-dictionary
-of
-<del class="diff-old">terms,
-and
-URIs
-</del>
-<ins class="diff-chg">terms.
-IRIs
-</ins>
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-The
-context
-provides
-a
-collection
-of
-vocabulary
-<del class="diff-old">terms
-</del>
-<a class="tref internalDFN" title="term" href="#dfn-term">
-<ins class="diff-chg">term
-</ins></a><ins class="diff-chg">
-s
-and
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></a><ins class="diff-chg">
-es
-</ins>
-that
-can
-be
-used
-<del class="diff-old">for
-a
-</del>
-<ins class="diff-chg">to
-expand
-</ins>
-JSON
-<del class="diff-old">object.
-</del>
-<ins class="diff-chg">keys
-and
-values
-into
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
-IRI
-</ins></a><ins class="diff-chg">
-s.
-</ins>
-</p>
-<div id="inside-a-context" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">2.4
-</del>
-<ins class="diff-chg">2.4.1
-</ins>
-</span>
-<del class="diff-old">Unambiguous
-Identifiers
-for
-JSON
-If
-a
-set
-of
-terms,
-like
-Person
-,
-name
-,
-and
-homepage
-,
-are
-defined
-in
-</del>
-<ins class="diff-chg">Inside
-</ins>
-a
-<del class="diff-old">context,
-and
-that
-context
-is
-used
-to
-resolve
-</del>
-<ins class="diff-chg">Context
-</ins></h4><p><ins class="diff-chg">
-In
-</ins>
-the
-<del class="diff-old">names
-in
-JSON
-objects,
-machines
-could
-automatically
-expand
-</del>
-<ins class="diff-chg">previous
-section,
-</ins>
-the
-<del class="diff-old">terms
-</del>
-<ins class="diff-chg">developer
-used
-the
-</ins><code><ins class="diff-chg">
-@context
-</ins></code><ins class="diff-chg">
-keyword
-</ins>
-to
-<ins class="diff-new">pull
-in
-an
-external
-context.
-That
-context
-document,
-if
-de-referenced,
-would
-look
-</ins>
-something
-<del class="diff-old">meaningful
-and
-unambiguous,
-</del>
-like
-this:
-</p>
-<del class="diff-old">{
-  "",
-  "": "Manu Sporny",
-  "": "http://manu.sporny.org"
-  "": "http://twitter.com/account/profile_image/manusporny"
-</del>
-<pre class="example">{
-<ins class="diff-chg">    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-</ins>
-}
-</pre>
-<p>
-<del class="diff-old">Doing
-this
-would
-mean
-that
-JSON
-would
-start
-to
-become
-unambiguously
-machine-readable,
-play
-well
-with
-the
-semantic
-web,
-and
-basic
-markup
-wouldn't
-be
-that
-much
-more
-complex
-than
-basic
-JSON
-markup.
-</del>
-A
-<del class="diff-old">win,
-all
-around.
-2.5
-Mashing
-Up
-Vocabularies
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-RDF
--
-for
-describing
-information
-about
-objects
-on
-the
-semantic
-web.
-RDFS
--
-for
-expressing
-things
-like
-labels
-and
-comments.
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-Dublin
-Core
--
-for
-describing
-creative
-works.
-FOAF
--
-for
-describing
-social
-networks.
-Calendar
--
-for
-specifying
-events.
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-GEO
--
-for
-describing
-geographic
-location.
-VCard
--
-for
-describing
-organizations
-and
-people.
-DOAP
--
-for
-describing
-projects.
-Since
-these
-vocabularies
-are
-very
-popular,
-they
-are
-pre-defined
-in
-something
-called
-the
-default
-</del>
-<ins class="diff-chg">JSON-LD
-</ins>
-context
-<del class="diff-old">,
-which
-</del>
-<ins class="diff-chg">document
-</ins>
-is
-a
-<del class="diff-old">set
-of
-vocabulary
-prefixes
-that
-are
-pre-loaded
-in
-all
-JSON-LD
-processors.
-The
-contents
-of
-the
-default
-context
-</del>
-<ins class="diff-chg">simple
-mapping
-from
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins>
-</a>
-<del class="diff-old">are
-provided
-later
-in
-this
-document.
-Using
-the
-default
-context
-</del>
-<ins class="diff-chg">s
-and
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins>
-</a>
-<del class="diff-old">allows
-developers
-</del>
-<ins class="diff-chg">es
-</ins>
-to
-<del class="diff-old">express
-data
-unambiguously,
-like
-so:
-{
-  "",
-  "": "Manu Sporny",
-  "": "http://manu.sporny.org/",
-  "": "http://twitter.com/account/profile_image/manusporny"
-}
-Developers
-can
-</del>
-<ins class="diff-chg">IRIs.
-Contexts
-may
-</ins>
-also
-<del class="diff-old">specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-active
-context
-</del>
-<ins class="diff-chg">contain
-datatype
-information
-for
-certain
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins>
-</a>
-<del class="diff-old">in-line
-using
-the
-@context
-keyword,
-like
-so:
-{
-  ,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny",
-  "myvocab:personality": "friendly"
-}
-The
-@context
-keyword
-is
-used
-to
-change
-how
-the
-JSON-LD
-processor
-evaluates
-key-value
-pairs.
-In
-this
-case,
-it
-was
-used
-to
-map
-one
-string
-('myvocab')
-to
-another
-string,
-which
-is
-interpreted
-</del>
-<ins class="diff-chg">s
-</ins>
-as
-<del class="diff-old">a
-IRI
-.
-In
-the
-example
-above,
-the
-myvocab
-string
-is
-replaced
-with
-"
-http://example.org/myvocab#
-"
-when
-it
-is
-detected.
-In
-</del>
-<ins class="diff-chg">well
-as
-other
-processing
-instructions
-for
-</ins>
-the
-<del class="diff-old">example
-above,
-"
-myvocab:personality
-"
-would
-expand
-to
-"
-http://example.org/myvocab#personality
-".
-</del>
-<ins class="diff-chg">JSON-LD
-processor.
-</ins>
-</p>
-<p>
-<ins class="diff-new">Contexts
-may
-be
-specified
-in-line.
-</ins>
-This
-<del class="diff-old">mechanism
-is
-a
-short-hand
-for
-RDF,
-called
-</del>
-<ins class="diff-chg">ensures
-that
-JSON-LD
-documents
-can
-be
-processed
-when
-</ins>
-a
-<del class="diff-old">CURIE,
-and
-provides
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-</del>
-<ins class="diff-chg">JSON-LD
-processor
-does
-not
-have
-access
-</ins>
-to
-<del class="diff-old">RDF.
-</del>
-<ins class="diff-chg">the
-Web.
-</ins>
-</p>
-<del class="diff-old">2.6
-An
-Example
-of
-a
-Context
-</del>
-<p>
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-<ins class="diff-new">This
-means
-that
-developers
-can
-also
-specify
-a
-context
-for
-JSON
-data
-in
-an
-out-of-band
-fashion
-via
-the
-API.
-The
-API
-is
-described
-later
-in
-this
-document.
-</ins>
-A
-JSON-LD
-aware
-Web
-Service
-<em class="rfc2119" title="may">
-may
-</em>
-<ins class="diff-new">also
-</ins>
-define
-a
-<del class="diff-old">known
-context.
-For
-example,
-the
-following
-default
-</del>
-context
-<del class="diff-old">could
-apply
-to
-all
-incoming
-Web
-Service
-calls
-previously
-accepting
-only
-JSON
-data:
-{
-  "@context": 
-  {
-    "@vocab": "http://example.org/default-vocab#",
-    "@base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-}
-The
-@vocab
-string
-is
-a
-special
-keyword
-</del>
-that
-<del class="diff-old">states
-that
-any
-term
-that
-doesn't
-resolve
-to
-a
-term
-or
-a
-prefix
-should
-</del>
-<ins class="diff-chg">will
-</ins>
-be
-<del class="diff-old">appended
-</del>
-<ins class="diff-chg">pre-loaded
-for
-all
-calls
-</ins>
-to
-the
-<del class="diff-old">@vocab
-IRI.
-</del>
-<ins class="diff-chg">service.
-</ins>
-This
-<del class="diff-old">is
-done
-to
-ensure
-that
-terms
-can
-be
-transformed
-to
-an
-IRI
-at
-all
-times.
-The
-@base
-string
-is
-a
-special
-keyword
-that
-states
-</del>
-<ins class="diff-chg">allows
-services
-</ins>
-that
-<del class="diff-old">any
-relative
-IRI
-must
-be
-appended
-to
-the
-string
-specified
-by
-@base
-.
-The
-@coerce
-keyword
-is
-used
-to
-specify
-type
-coercion
-rules
-for
-the
-data.
-For
-each
-key
-in
-the
-map,
-the
-key
-is
-the
-type
-to
-be
-coerced
-to
-</del>
-<ins class="diff-chg">have
-previously
-been
-publishing
-</ins>
-and
-<del class="diff-old">the
-value
-is
-the
-vocabulary
-term
-</del>
-<ins class="diff-chg">receiving
-JSON
-data
-</ins>
-to
-<del class="diff-old">be
-coerced.
-Type
-coercion
-for
-the
-key
-xsd:anyURI
-asserts
-that
-all
-vocabulary
-terms
-listed
-should
-undergo
-coercion
-</del>
-<ins class="diff-chg">accept
-JSON-LD
-data
-without
-requiring
-client
-software
-</ins>
-to
-<del class="diff-old">an
-IRI,
-including
-@base
-processing
-for
-relative
-IRIs
-and
-CURIE
-processing
-for
-compact
-URI
-Expressions
-such
-as
-foaf:homepage
-.
-</del>
-<ins class="diff-chg">change.
-</ins>
-</p>
-</div>
-</div>
-<div id="from-json-to-json-ld" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">3.
-</del>
-<ins class="diff-chg">2.5
-</ins>
-</span>
-<del class="diff-old">Markup
-Examples
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-</del>
-<ins class="diff-chg">From
-JSON
-</ins>
-to
-<del class="diff-old">express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-</del>
-JSON-LD
-<del class="diff-old">is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-3.1
-RDFa
-</del>
-</h3>
-<p>
-<del class="diff-old">The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-</del>
-<ins class="diff-chg">If
-a
-set
-of
-terms
-such
-as,
-</ins><strong><ins class="diff-chg">
-name
-</ins></strong>,<strong><ins class="diff-chg">
-homepage
-</ins></strong>,
-and
-<del class="diff-old">homepages.
-&lt;div &gt;
-   &lt;ul&gt;
-      &lt;li &gt;
-        &lt;a &gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li &gt;
-        &lt;a &gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li &gt;
-        &lt;a &gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-</del>
-<strong>
-<ins class="diff-chg">avatar
-</ins></strong>,
-are
-<del class="diff-old">other
-ways
-to
-mark-up
-this
-information
-such
-</del>
-<ins class="diff-chg">defined
-in
-a
-context,
-and
-</ins>
-that
-<del class="diff-old">the
-</del>
-context
-is
-<del class="diff-old">not
-repeated.
-[
- {
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/bob/",
-   "foaf:name": "Bob"
- },
- {
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/eve/",
-   "foaf:name": "Eve"
- },
- {
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/manu/",
-   "foaf:name": "Manu"
- }
-]
-3.2
-Microformats
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-</del>
-<ins class="diff-chg">used
-</ins>
-to
-<del class="diff-old">express
-how
-</del>
-<ins class="diff-chg">resolve
-</ins>
-the
-<del class="diff-old">Microformat
-is
-represented
-</del>
-<ins class="diff-chg">names
-</ins>
-in
-<del class="diff-old">JSON-LD.
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-The
-representation
-of
-the
-hCard
-expresses
-</del>
-<ins class="diff-chg">JSON
-objects,
-machines
-are
-able
-to
-automatically
-expand
-</ins>
-the
-<del class="diff-old">Microformat
-</del>
-terms
-<del class="diff-old">in
-the
-context
-and
-uses
-them
-directly
-for
-the
-url
-and
-fn
-properties.
-Also
-note
-that
-the
-Microformat
-</del>
-to
-<del class="diff-old">JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-http://tantek.com
-.
-</del>
-<ins class="diff-chg">something
-meaningful
-and
-unambiguous,
-like
-this:
-</ins>
-</p>
-<del class="diff-old">{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-</del>
-<pre class="example">{
-<ins class="diff-chg">  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-</ins>
-}
-</pre>
-<del class="diff-old">3.3
-Microdata
-</del>
-<p>
-<del class="diff-old">The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-</del>
-<ins class="diff-chg">Doing
-this
-allows
-JSON
-</ins>
-to
-<del class="diff-old">avoid
-contexts
-and
-instead
-refer
-</del>
-<ins class="diff-chg">be
-unambiguously
-machine-readable
-without
-requiring
-developers
-that
-use
-JSON
-</ins>
-to
-<del class="diff-old">items
-by
-</del>
-<ins class="diff-chg">drastically
-change
-</ins>
-their
-<del class="diff-old">full
-IRI.
-</del>
-<ins class="diff-chg">workflow.
-</ins>
-</p>
-<del class="diff-old">[
-  {
-    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]
-</del>
-</div>
-</div>
-<div id="basic-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">4.
-</del>
-<ins class="diff-chg">3.
-</ins>
-</span>
-<del class="diff-old">Markup
-of
-RDF
-</del>
-<ins class="diff-chg">Basic
-</ins>
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-<del class="diff-old">most
-</del>
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-<del class="diff-old">Javascript
-objects
-</del>
-<ins class="diff-chg">regular
-JSON
-markup
-</ins>
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-<del class="diff-old">Since
-RDF
-is
-also
-an
-important
-sub-community
-of
-the
-Linked
-Data
-movement,
-it
-is
-important
-that
-all
-RDF
-concepts
-</del>
-<ins class="diff-chg">As
-more
-JSON-LD
-features
-</ins>
-are
-<del class="diff-old">well-represented
-in
-this
-specification.
-This
-section
-details
-how
-each
-RDF
-concept
-can
-be
-expressed
-in
-JSON-LD.
-</del>
-<ins class="diff-chg">used,
-more
-semantics
-are
-added
-to
-the
-JSON
-markup.
-</ins>
-</p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.1
-</del>
-<ins class="diff-chg">3.1
-</ins>
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-<del class="diff-old">subjects
-</del>
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-<ins class="diff-chg">subject
-</ins></a><ins class="diff-chg">
-s
-</ins>
-and
-many
-<del class="diff-old">objects
-</del>
-<a class="tref internalDFN" title="object" href="#dfn-object">
-<ins class="diff-chg">object
-</ins></a>
-are
-<del class="diff-old">identified.
-</del>
-<ins class="diff-chg">named.
-</ins>
-IRIs
-can
-be
-expressed
-in
-a
-variety
-of
-different
-ways
-in
-JSON-LD.
-</p>
-<ol>
-<li>
-In
-general,
-<del class="diff-old">an
-IRI
-is
-generated
-if
-it
-is
-</del>
-<a class="tref internalDFN" title="term" href="#dfn-term">
-<ins class="diff-chg">term
-</ins></a><ins class="diff-chg">
-s
-</ins>
-in
-the
-key
-position
-in
-an
-associative
-<del class="diff-old">array.
-</del>
-<ins class="diff-chg">array
-that
-have
-a
-mapping
-to
-an
-IRI
-in
-the
-context
-are
-expanded
-to
-an
-IRI
-by
-JSON-LD
-processors.
-</ins>
-There
-are
-special
-rules
-for
-processing
-keys
-in
-<code>
-@context
-</code>
-and
-when
-dealing
-with
-keys
-that
-start
-with
-the
-<code>
-@
-</code>
-character.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>,
-if
-it
-is
-a
-string.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">@type
-</ins>
-</code>.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-the
-<code>
-@iri
-</code>
-keyword.
-</li>
-<li>
-An
-IRI
-is
-generated
-when
-there
-are
-<code>
-@coerce
-</code>
-rules
-in
-effect
-for
-<del class="diff-old">xsd:anyURI
-for
-</del>
-a
-<del class="diff-old">particular
-vocabulary
-term.
-</del>
-<ins class="diff-chg">key
-named
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code>.
-</li>
-</ol>
-<p>
-<del class="diff-old">An
-example
-of
-IRI
-generation
-for
-a
-</del>
-<ins class="diff-chg">IRIs
-can
-be
-expressed
-directly
-in
-the
-</ins>
-key
-<del class="diff-old">outside
-of
-a
-@context
-:
-</del>
-<ins class="diff-chg">position
-like
-so:
-</ins>
-</p>
-<del class="diff-old">{
-...
-  "": "Manu Sporny",
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-</ins>
-}
-</pre>
-<p>
-In
-the
-example
-above,
-the
-key
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-is
-interpreted
-as
-an
-IRI,
-as
-opposed
-to
-being
-interpreted
-as
-a
-string..
-</p>
-<p>
-Term
-expansion
-occurs
-for
-IRIs
-if
-a
-term
-is
-defined
-within
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>:
-</p>
-<del class="diff-old">{
-  ""},
-...
-  "": "Manu Sporny",
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-</ins>
-}
-</pre>
-<p>
-<del class="diff-old">CURIE
-expansion
-also
-occurs
-for
-keys
-</del>
-<a class="tref internalDFN" title="Prefix" href="#dfn-prefix">
-<ins class="diff-chg">Prefix
-</ins></a><ins class="diff-chg">
-es
-are
-expanded
-when
-used
-</ins>
-in
-<del class="diff-old">JSON-LD:
-</del>
-<ins class="diff-chg">keys:
-</ins>
-</p>
-<del class="diff-old">{
-...
-  "": "Manu Sporny",
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
-...
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-...
-</ins>
-}
-</pre>
-<p>
-<code>
-foaf:name
-</code>
-above
-will
-automatically
-expand
-out
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-</p>
-<p>
-An
-IRI
-is
-generated
-when
-a
-value
-is
-associated
-with
-a
-key
-using
-the
-<code>
-@iri
-</code>
-keyword:
-</p>
-<del class="diff-old">{
-...
-  "foaf:homepage": { "": "http://manu.sporny.org" }
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-</ins>
-}
-</pre>
-<p>
-If
-type
-coercion
-rules
-are
-specified
-in
-the
-<code>
-@context
-</code>
-for
-a
-particular
-vocabulary
-term,
-an
-IRI
-is
-generated:
-</p>
-<del class="diff-old">{
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:anyURI": "foaf:homepage"
-    } 
-  }
-...
-  "foaf:homepage": "http://manu.sporny.org",
-...
-</del>
-<pre class="example">{<span class="diff">
-<ins class="diff-chg">  "@context": 
-  { 
-    "@coerce": 
-    {
-      "@iri": "foaf:homepage"
-    }
-  }</span>
-...
-  "foaf:homepage": "http://manu.sporny.org/",
-...
-</ins>
-}
-</pre>
-<p>
-<ins class="diff-new">Even
-though
-the
-value
-</ins><code><ins class="diff-new">
-http://manu.sporny.org/
-</ins></code><ins class="diff-new">
-is
-a
-string,
-the
-type
-coercion
-rules
-will
-transform
-the
-value
-into
-an
-IRI
-when
-processed
-by
-a
-JSON-LD
-Processor
-</ins></p>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.2
-</del>
-<ins class="diff-chg">3.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-A
-subject
-is
-declared
-using
-the
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-property,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<del class="diff-old">{
-...
-  "",
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-</ins>
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-the
-IRI
-<code>
-http://example.org/people#joebob
-</code>.
-</p>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.3
-</del>
-<ins class="diff-chg">3.3
-</ins>
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">@type
-</ins>
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-type-url).
-</p>
-<del class="diff-old">{
-...
-  "@": "http://example.org/people#joebob",
-  "",
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "@subject": "http://example.org/people#joebob",
-  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-</ins>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-<ins class="diff-new">if
-the
-JSON-LD
-document
-is
-mapped
-to
-RDF
-</ins>
-(in
-N-Triples
-notation):
-</p>
-<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-</del>
-<pre class="example">&lt;http://example.org/people#joebob&gt; 
-<ins class="diff-chg">   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-</ins>
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-</div>
-<div id="strings" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.4
-</del>
-<ins class="diff-chg">3.4
-</ins>
-</span>
-<del class="diff-old">Plain
-Literals
-</del>
-<ins class="diff-chg">Strings
-</ins>
-</h3>
-<p>
-Regular
-text
-<del class="diff-old">strings
-are
-called
-a
-</del>
-<ins class="diff-chg">strings,
-also
-refered
-to
-as
-</ins>
-<dfn title="plain_literal" id="dfn-plain_literal">
-plain
-literal
-</dfn>
-<del class="diff-old">in
-RDF
-and
-</del>
-<ins class="diff-chg">s,
-</ins>
-are
-easily
-expressed
-using
-regular
-JSON
-strings.
-</p>
-<del class="diff-old">{
-...
-  "foaf:name": "",
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-</ins>
-}
-</pre>
-</div>
-<div id="string-internationalization" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.5
-</del>
-<ins class="diff-chg">3.5
-</ins>
-</span>
-<del class="diff-old">Language
-Specification
-in
-Plain
-Literals
-</del>
-<ins class="diff-chg">String
-Internationalization
-</ins>
-</h3>
-<p>
-JSON-LD
-makes
-an
-assumption
-that
-<del class="diff-old">plain
-literal
-s
-</del>
-<ins class="diff-chg">strings
-</ins>
-with
-associated
-language
-encoding
-information
-<del class="diff-old">is
-</del>
-<ins class="diff-chg">are
-</ins>
-not
-very
-common
-when
-used
-in
-JavaScript
-and
-Web
-Services.
-Thus,
-it
-takes
-a
-little
-more
-effort
-to
-express
-<del class="diff-old">plain
-literals
-in
-a
-specified
-language.
-</del>
-<ins class="diff-chg">strings
-with
-associated
-language
-information.
-</ins>
-</p>
-<del class="diff-old">{
-...
-  "foaf:name": 
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "foaf:name": <span class="diff">
-  {
-    "@literal": "&#33457;&#28548;",
-    "@language": "ja"
-  }</span>
-...
-</ins>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-for
-<em>
-<del class="diff-old">花澄
-</del>
-<ins class="diff-chg">&#33457;&#28548;
-</ins>
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-<del class="diff-old">tag
-</del>
-<ins class="diff-chg">code
-</ins>
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="datatypes" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.6
-</del>
-<ins class="diff-chg">3.6
-</ins>
-</span>
-<del class="diff-old">Typed
-Literals
-</del>
-<ins class="diff-chg">Datatypes
-</ins>
-</h3>
-<p>
-A
-<ins class="diff-new">value
-with
-an
-associated
-datatype,
-also
-known
-as
-a
-</ins>
-<dfn title="typed_literal" id="dfn-typed_literal">
-typed
-literal
-</dfn>,
-is
-indicated
-by
-<del class="diff-old">attaching
-a
-IRI
-to
-the
-end
-of
-</del>
-<ins class="diff-chg">associating
-</ins>
-a
-<del class="diff-old">plain
-</del>
-literal
-<del class="diff-old">,
-and
-this
-</del>
-<ins class="diff-chg">with
-an
-</ins>
-IRI
-<ins class="diff-new">which
-</ins>
-indicates
-the
-<ins class="diff-new">typed
-</ins>
-literal's
-datatype.
-<del class="diff-old">Literals
-</del>
-<ins class="diff-chg">Typed
-literals
-</ins>
-may
-be
-<del class="diff-old">typed
-</del>
-<ins class="diff-chg">expressed
-</ins>
-in
-JSON-LD
-in
-three
-ways:
-</p>
-<ol>
-<li>
-By
-utilizing
-the
-<code>
-@coerce
-</code>
-keyword.
-</li>
-<li>
-By
-utilizing
-the
-expanded
-form
-for
-specifying
-objects.
-</li>
-<li>
-By
-using
-a
-native
-JSON
-datatype.
-</li>
-</ol>
-<p>
-The
-first
-example
-uses
-the
-<code>
-@coerce
-</code>
-keyword
-to
-express
-a
-typed
-literal:
-</p>
-<del class="diff-old">{
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }
-...
-  "dc:modified": "2010-05-29T14:17:39+02:00",
-...
-</del>
-<pre class="example">{<span class="diff">
-<ins class="diff-chg">  "@context": 
-  { 
-    "xsd": "http://www.w3.org/2001/XMLSchema#"
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }</span>
-...
-  "dc:modified": "2010-05-29T14:17:39+02:00",
-...
-</ins>
-}
-</pre>
-<p>
-The
-second
-example
-uses
-the
-expanded
-form
-for
-specifying
-objects:
-</p>
-<del class="diff-old">{
-...
-  "dc:modified": 
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "dc:modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }</span>
-...
-</ins>
-}
-</pre>
-<p>
-Both
-examples
-above
-would
-generate
-an
-object
-with
-the
-literal
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-<p>
-<ins class="diff-new">The
-third
-example
-uses
-a
-built-in
-native
-JSON
-type,
-a
-number,
-to
-express
-a
-datatype:
-</ins></p><pre class="example">{
<ins class="diff-new">
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:age": <span class="diff">31</span>
-...
-}
-</ins></pre><ins class="diff-new">
-d
-</ins><p><ins class="diff-new">
-The
-example
-above
-would
-generate
-the
-following
-triple:
-</ins></p><pre class="example">&lt;http://example.org/people#joebob&gt; 
<ins class="diff-new">
-   &lt;http://xmlns.com/foaf/0.1/age&gt; 
-"31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
-.
-</ins></pre>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.7
-</del>
-<ins class="diff-chg">3.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-arrays.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-array.
-</p>
-<del class="diff-old">{
-...
-  "@": "http://example.org/people#joebob",
-  "foaf:nick": ,
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "@": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-</ins>
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-</del>
-<pre class="example">&lt;http://example.org/people#joebob&gt; 
-<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-</ins>
-"jaybee"
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.8
-</del>
-<ins class="diff-chg">3.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s
-may
-also
-be
-expressed
-using
-the
-expanded
-form
-for
-objects:
-</p>
-<del class="diff-old">{
-...
-  "@": "http://example.org/articles/8",
-  "dcterms:modified": 
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  "@": "http://example.org/articles/8",
-  "dcterms:modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]</span>
-...
-</ins>
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<del class="diff-old">&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-</del>
-<pre class="example">&lt;http://example.org/articles/8&gt; 
-<ins class="diff-chg">   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-</ins>
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="compaction" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.9
-</del>
-<ins class="diff-chg">3.9
-</ins>
-</span>
-<del class="diff-old">Blank
-Nodes
-</del>
-<ins class="diff-chg">Compaction
-</ins>
-</h3>
-<p>
-<del class="diff-old">At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-</del>
-<ins class="diff-chg">Compaction
-is
-</ins>
-the
-<del class="diff-old">subject.
-Typically,
-this
-</del>
-<ins class="diff-chg">process
-of
-taking
-a
-JSON-LD
-document
-and
-applying
-a
-context
-such
-that
-the
-most
-compact
-form
-of
-the
-document
-</ins>
-is
-<del class="diff-old">where
-blank
-nodes
-come
-into
-play.
-In
-JSON-LD,
-blank
-node
-identifiers
-</del>
-<ins class="diff-chg">generated.
-JSON
-is
-typically
-expressed
-in
-a
-very
-compact,
-key-value
-format.
-That
-is,
-full
-IRIs
-</ins>
-are
-<del class="diff-old">automatically
-created
-if
-</del>
-<ins class="diff-chg">rarely
-used
-as
-keys.
-At
-times,
-</ins>
-a
-<del class="diff-old">subject
-</del>
-<ins class="diff-chg">JSON-LD
-document
-may
-be
-received
-that
-</ins>
-is
-not
-<del class="diff-old">specified
-using
-</del>
-<ins class="diff-chg">in
-its
-most
-compact
-form.
-JSON-LD,
-via
-the
-API,
-provides
-a
-way
-to
-compact
-a
-JSON-LD
-document.
-</ins></p><p><ins class="diff-chg">
-For
-example,
-assume
-the
-following
-JSON-LD
-input
-document:
-</ins></p><pre class="example">{
<ins class="diff-chg">
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}
-</ins></pre><p><ins class="diff-chg">
-Additionally,
-assume
-the
-following
-developer-supplied
-JSON-LD
-context:
-</ins></p><pre class="example">{
<ins class="diff-chg">
-   "name": "http://xmlns.com/foaf/0.1/name",
-   "homepage": "http://xmlns.com/foaf/0.1/homepage",
-   "@coerce": 
-   {
-      "@iri": ["homepage"]
-   }
-}
-</ins></pre><p><ins class="diff-chg">
-Running
-the
-JSON-LD
-Compaction
-algorithm
-given
-the
-context
-supplied
-above
-against
-</ins>
-the
-<ins class="diff-new">JSON-LD
-input
-document
-provided
-above
-would
-result
-in
-the
-following
-output:
-</ins></p><pre class="example">{
<ins class="diff-new">
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}
-</ins></pre><p><ins class="diff-new">
-The
-compaction
-algorithm
-also
-enables
-the
-developer
-to
-map
-any
-expanded
-format
-into
-an
-application-specific
-compacted
-format.
-While
-the
-context
-provided
-above
-mapped
-</ins>
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">http://xmlns.com/foaf/0.1/name
-</ins>
-</code>
-<del class="diff-old">keyword.
-However,
-authors
-may
-</del>
-<ins class="diff-chg">to
-</ins><strong>
-name
-<del class="diff-old">blank
-nodes
-</del>
-</strong>,
-<ins class="diff-chg">it
-could
-have
-also
-mapped
-it
-to
-any
-arbitrary
-string
-provided
-</ins>
-by
-<del class="diff-old">using
-</del>
-the
-<del class="diff-old">special
-_
-CURIE
-prefix.
-</del>
-<ins class="diff-chg">developer.
-</ins>
-</p>
-<del class="diff-old">{
-...
-  "@": "",
-...
-</del>
-</div>
-<div id="expansion" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-chg">3.10
-</ins></span><ins class="diff-chg">
-Expansion
-</ins></h3><p><ins class="diff-chg">
-Expansion
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document
-and
-applying
-a
-context
-such
-that
-all
-IRI,
-datatypes,
-and
-literal
-values
-are
-expanded
-so
-that
-the
-context
-is
-no
-longer
-necessary.
-JSON-LD
-document
-expansion
-is
-typically
-used
-when
-re-mapping
-JSON-LD
-documents
-to
-application-specific
-JSON
-documents
-or
-as
-a
-part
-of
-the
-</ins><a href="#normalization"><ins class="diff-chg">
-Normalization
-</ins></a><ins class="diff-chg">
-process.
-</ins></p><p><ins class="diff-chg">
-For
-example,
-assume
-the
-following
-JSON-LD
-input
-document:
-</ins></p><pre class="example">{
<ins class="diff-chg">
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-</ins>
-}
-</pre>
-<p>
-<del class="diff-old">The
-example
-</del>
-<ins class="diff-chg">Running
-the
-JSON-LD
-Expansion
-algorithm
-against
-the
-JSON-LD
-input
-document
-provided
-</ins>
-above
-would
-<del class="diff-old">set
-</del>
-<ins class="diff-chg">result
-in
-</ins>
-the
-<del class="diff-old">subject
-</del>
-<ins class="diff-chg">following
-output:
-</ins></p><pre class="example">{
<ins class="diff-chg">
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}
-</ins></pre></div><div id="framing" class="section"><h3><span class="secno"><ins class="diff-chg">
-3.11
-</ins></span><ins class="diff-chg">
-Framing
-</ins></h3><p><ins class="diff-chg">
-A
-JSON-LD
-document
-is
-a
-representation
-of
-a
-directed
-graph.
-A
-single
-directed
-graph
-can
-have
-many
-different
-serializations,
-each
-expressing
-exactly
-the
-same
-information.
-Developers
-typically
-work
-with
-trees,
-also
-called
-associative
-arrays,
-when
-dealing
-with
-JSON.
-While
-mapping
-a
-graph
-</ins>
-to
-<del class="diff-old">_:foo
-,
-which
-</del>
-<ins class="diff-chg">a
-tree
-can
-be
-done,
-the
-layout
-of
-the
-end
-result
-must
-be
-specified
-in
-advance.
-A
-</ins><dfn title="Frame" id="dfn-frame"><ins class="diff-chg">
-Frame
-</ins></dfn>
-can
-<del class="diff-old">then
-</del>
-be
-used
-<del class="diff-old">later
-</del>
-<ins class="diff-chg">by
-a
-developer
-</ins>
-on
-<ins class="diff-new">a
-JSON-LD
-document
-to
-specify
-a
-deterministic
-layout
-for
-a
-graph.
-</ins></p><p><ins class="diff-new">
-Framing
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document,
-which
-expresses
-a
-graph
-of
-information,
-and
-applying
-a
-specific
-graph
-layout
-(called
-a
-</ins><a class="tref internalDFN" title="Frame" href="#dfn-frame"><ins class="diff-new">
-Frame
-</ins></a><ins class="diff-new">
-).
-</ins></p><p><ins class="diff-new">
-The
-JSON-LD
-document
-below
-expresses
-a
-library,
-a
-book
-and
-a
-chapter:
-</ins></p><pre class="example">{
<ins class="diff-new">
-   "@subject": 
-   [{
-      "@subject": "http://example.org/library",
-      "@type": "ex:Library",
-      "ex:contains": "http://example.org/library/the-republic"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": "http://example.org/library/the-republic#introduction"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": "ex:Chapter",
-      "dc:description": "An introductory chapter on The Republic.",
-      "dc:title": "The Introduction"
-   }],
-   "@context": 
-   {
-      "@coerce": 
-      {
-         "@iri": "ex:contains"
-      },
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   }
-}
-</ins></pre><p><ins class="diff-new">
-Developers
-typically
-like
-to
-operate
-on
-items
-in
-a
-hierarchical,
-tree-based
-fashion.
-Ideally,
-a
-developer
-would
-want
-the
-data
-above
-sorted
-into
-top-level
-libraries,
-then
-the
-books
-that
-are
-contained
-in
-each
-library,
-and
-then
-the
-chapters
-contained
-</ins>
-in
-<ins class="diff-new">each
-book.
-To
-achieve
-that
-layout,
-the
-developer
-can
-define
-the
-following
-</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-new">
-frame
-</ins></a>:</p><pre class="example">{
<ins class="diff-new">
-   "@context": {
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   },
-   "@type": "ex:Library",
-   "ex:contains": {
-      "@type": "ex:Book",
-      "ex:contains": {
-         "@type": "ex:Chapter"
-      }
-   }
-}
-</ins></pre><p><ins class="diff-new">
-When
-the
-framing
-algorithm
-is
-run
-against
-</ins>
-the
-<ins class="diff-new">previously
-defined
-</ins>
-JSON-LD
-<del class="diff-old">markup
-</del>
-<ins class="diff-chg">document,
-paired
-with
-the
-</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
-frame
-</ins></a><ins class="diff-chg">
-above,
-the
-following
-JSON-LD
-document
-is
-the
-end
-result:
-</ins></p><pre class="example">{
<ins class="diff-chg">
-   "@context": 
-   {
-      "ex": "http://example.org/vocab#",
-      "dc": "http://purl.org/dc/elements/1.1/"
-   }
-   "@subject": "http://example.org/library",
-   "@type": "ex:Library",
-   "ex:contains": 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": 
-      {
-         "@subject": "http://example.org/library/the-republic#introduction",
-         "@type": "ex:Chapter",
-         "dc:description": "An introductory chapter on The Republic.",
-         "dc:title": "The Introduction"
-      },
-   },
-}
-</ins></pre><p><ins class="diff-chg">
-The
-JSON-LD
-framing
-algorithm
-allows
-developers
-</ins>
-to
-<del class="diff-old">refer
-back
-</del>
-<ins class="diff-chg">query
-by
-example
-and
-force
-a
-specific
-tree
-layout
-</ins>
-to
-<del class="diff-old">the
-named
-blank
-node.
-</del>
-<ins class="diff-chg">a
-JSON-LD
-document.
-</ins>
-</p>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">4.
-</ins>
-</span>
-Advanced
-<del class="diff-old">Features
-</del>
-<ins class="diff-chg">Concepts
-</ins>
-</h2>
-<p>
-JSON-LD
-has
-a
-number
-of
-features
-that
-provide
-functionality
-above
-and
-beyond
-the
-core
-functionality
-<del class="diff-old">provided
-by
-RDF.
-</del>
-<ins class="diff-chg">described
-above.
-</ins>
-The
-following
-sections
-outline
-the
-features
-that
-are
-specific
-to
-JSON-LD.
-</p>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">4.1
-</ins>
-</span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-doubles,
-integers,
-and
-boolean
-values.
-As
-demonstrated
-below,
-JSON-LD
-utilizes
-that
-information
-to
-create
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s:
-</p>
-<del class="diff-old">{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": ,
-  "measure:cups": ,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": ,
-  // The following value should never be converted to a language-native type
-  "measure:stones": ,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": ,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": ,
-...
-</del>
-<pre class="example">{
-<ins class="diff-chg">...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-</ins>
-}
-</pre>
-<p class="note">
-When
-dealing
-with
-a
-number
-of
-modern
-programming
-languages,
-including
-JavaScript
-ECMA-262,
-there
-is
-no
-distinction
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>
-values.
-That
-is,
-the
-number
-<code>
-5.3
-</code>
-and
-the
-number
-<code>
-5.3e0
-</code>
-are
-treated
-as
-if
-they
-were
-the
-same.
-When
-converting
-from
-JSON-LD
-to
-a
-language-native
-format
-and
-back,
-datatype
-information
-is
-lost
-in
-a
-number
-of
-these
-languages.
-Thus,
-one
-could
-say
-that
-<code>
-5.3
-</code>
-is
-a
-<strong>
-xsd:decimal
-</strong>
-and
-<code>
-5.3e0
-</code>
-is
-an
-<strong>
-xsd:double
-</strong>
-in
-JSON-LD,
-but
-when
-both
-values
-are
-converted
-to
-a
-language-native
-format
-the
-datatype
-difference
-between
-the
-two
-is
-lost
-because
-the
-machine-level
-representation
-will
-almost
-always
-be
-a
-<strong>
-double
-</strong>.
-Implementers
-should
-be
-aware
-of
-this
-potential
-round-tripping
-issue
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>.
-Specifically
-objects
-with
-a
-datatype
-of
-<strong>
-xsd:decimal
-</strong>
-<em class="rfc2119" title="must not">
-must
-not
-</em>
-be
-converted
-to
-a
-language
-native
-type.
-</p>
-</div>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">4.2
-</ins>
-</span>
-Type
-Coercion
-</h3>
-<p>
-JSON-LD
-supports
-the
-coercion
-of
-<del class="diff-old">types
-</del>
-<ins class="diff-chg">values
-</ins>
-to
-<del class="diff-old">ensure
-that
-the
-zero-edit
-goal
-of
-JSON-LD
-can
-be
-accomplished.
-</del>
-<ins class="diff-chg">particular
-data
-types.
-</ins>
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-<del class="diff-old">and
-</del>
-<ins class="diff-chg">the
-</ins>
-incoming
-or
-outgoing
-types
-to
-the
-proper
-<del class="diff-old">RDF
-</del>
-<ins class="diff-chg">data
-</ins>
-type
-based
-on
-a
-mapping
-of
-<ins class="diff-new">data
-</ins>
-type
-IRIs
-to
-<del class="diff-old">RDF
-</del>
-<ins class="diff-chg">property
-</ins>
-types.
-Using
-type
-<del class="diff-old">conversion,
-</del>
-<ins class="diff-chg">coercion,
-</ins>
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-s,
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s
-and
-IRIs.
-</p>
-<del class="diff-old">{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "@coerce":
-     {
-        "xsd:integer": "age",
-        "xsd:anyURI": "homepage",
-     }
-  },
-  "name": "John Smith",
-  "age": ,
-  "homepage": 
-</del>
-<pre class="example">{
-<ins class="diff-chg">  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-</ins><span class="diff">     "@coerce":
<ins class="diff-chg">
-     {
-        "xsd:integer": "age",
-        "@iri": "homepage",
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-</ins>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<del class="diff-old">_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-</del>
-<pre class="example">_:bnode1
-<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-</ins>
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-<div id="chaining" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">4.3
-</ins></span><ins class="diff-new">
-Chaining
-</ins></h3><p><ins class="diff-new">
-Object
-</ins><dfn title="chaining" id="dfn-chaining"><ins class="diff-new">
-chaining
-</ins></dfn><ins class="diff-new">
-is
-a
-JSON-LD
-feature
-that
-allows
-an
-author
-to
-use
-the
-definition
-of
-JSON-LD
-objects
-as
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-new">
-property
-</ins></a><ins class="diff-new">
-values.
-This
-is
-a
-commonly
-used
-mechanism
-for
-creating
-a
-parent-child
-relationship
-between
-two
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-new">
-subject
-</ins></a><ins class="diff-new">
-s.
-</ins></p><p><ins class="diff-new">
-The
-example
-shows
-an
-two
-subjects
-related
-by
-a
-property
-from
-the
-first
-subject:
-</ins></p>  <pre class="example">{
<ins class="diff-new">
-...
-  "foaf:name": "Manu Sporny",
-  "<span class="diff">foaf:knows</span>": {
-    "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}
-</ins></pre><p><ins class="diff-new">
-An
-object
-definition,
-like
-the
-one
-used
-above,
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-be
-used
-as
-a
-JSON
-value
-at
-any
-point
-in
-JSON-LD.
-</ins></p>
-</div>
-<div id="identifying-unlabeled-nodes" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">4.4
-</ins>
-</span>
-<ins class="diff-new">Identifying
-Unlabeled
-Nodes
-</ins></h3><p><ins class="diff-new">
-At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-type
-of
-node
-is
-called
-an
-unlabeled
-node
-or
-a
-blank
-node.
-In
-JSON-LD,
-unlabeled
-node
-identifiers
-are
-automatically
-created
-if
-a
-subject
-is
-not
-specified
-using
-the
-</ins><code><ins class="diff-new">
-@subject
-</ins></code><ins class="diff-new">
-keyword.
-However,
-authors
-may
-provide
-identifiers
-for
-unlabeled
-nodes
-by
-using
-the
-special
-</ins><code><ins class="diff-new">
-_
-</ins></code><ins class="diff-new">
-(underscore)
-CURIE
-prefix.
-</ins></p><pre class="example">{
<ins class="diff-new">
-...
-  "@subject": "<span class="diff">_:foo</span>",
-...
-}
-</ins></pre><p>
-The
-<ins class="diff-new">example
-above
-would
-set
-the
-subject
-to
-</ins><code><ins class="diff-new">
-_:foo
-</ins></code>,<ins class="diff-new">
-which
-can
-then
-be
-used
-later
-on
-in
-the
-</ins>
-JSON-LD
-<del class="diff-old">Processing
-Algorithm
-</del>
-<ins class="diff-chg">markup
-to
-refer
-back
-to
-the
-unlabeled
-node.
-This
-practice,
-however,
-is
-usually
-frowned
-upon
-when
-generating
-Linked
-Data.
-If
-a
-developer
-finds
-that
-they
-refer
-to
-the
-unlabeled
-node
-more
-than
-once,
-they
-should
-consider
-naming
-the
-node
-using
-a
-resolve-able
-IRI.
-</ins></p></div><div id="overriding-keywords" class="section"><h3><span class="secno"><ins class="diff-chg">
-4.5
-</ins></span><ins class="diff-chg">
-Overriding
-Keywords
-</ins></h3><p><ins class="diff-chg">
-JSON-LD
-allows
-all
-of
-the
-syntax
-keywords,
-except
-for
-</ins><code><ins class="diff-chg">
-@context
-</ins></code>,<ins class="diff-chg">
-to
-be
-overridden.
-This
-feature
-allows
-more
-legacy
-JSON
-content
-to
-be
-supported
-by
-JSON-LD.
-It
-also
-allows
-developers
-to
-design
-domain-specific
-implementations
-using
-only
-the
-JSON-LD
-context.
-</ins></p><pre class="example">{
<ins class="diff-chg">
-  "@context": 
-  {  
-</ins>     <span class="diff">"url": "@subject"</span>,
     <span class="diff">"a": "@type"</span>,
<ins class="diff-chg">
-     "name": "http://schema.org/name"
-  },
-  "url": "http://example.com/about#gregg",
-  "a": "http://schema.org/Person",
-  "name": "Gregg Kellogg"
-}
-</ins></pre><p><ins class="diff-chg">
-In
-the
-example
-above,
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-and
-</ins><code><ins class="diff-chg">
-@type
-</ins></code><ins class="diff-chg">
-keywords
-have
-been
-overridden
-by
-</ins><strong><ins class="diff-chg">
-url
-</ins></strong><ins class="diff-chg">
-and
-</ins><strong><ins class="diff-chg">
-a
-</ins></strong>,<ins class="diff-chg">
-respectively.
-</ins></p></div><div id="normalization" class="section"><h3><span class="secno"><ins class="diff-chg">
-4.6
-</ins></span><ins class="diff-chg">
-Normalization
-</ins></h3><p><ins class="diff-chg">
-Normalization
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document
-and
-performing
-a
-deterministic
-transformation
-on
-that
-document
-that
-results
-in
-a
-final
-document
-that
-any
-conforming
-JSON-LD
-processor
-would
-have
-generated
-given
-the
-same
-input
-document.
-The
-problem
-is
-a
-fairly
-difficult
-technical
-problem
-to
-solve
-because
-it
-requires
-a
-directed
-graph
-to
-be
-ordered
-into
-a
-set
-of
-nodes
-and
-edges
-in
-a
-deterministic
-way.
-This
-is
-easy
-to
-do
-when
-all
-of
-the
-nodes
-have
-unique
-names,
-but
-very
-difficult
-to
-do
-when
-some
-of
-the
-nodes
-are
-unlabeled.
-</ins></p><p><ins class="diff-chg">
-Normalization
-is
-useful
-when
-comparing
-two
-graphs
-against
-one
-another,
-when
-generating
-a
-detailed
-list
-of
-differences
-between
-two
-graphs,
-and
-when
-generating
-a
-cryptographic
-digital
-signature
-for
-information
-contained
-in
-a
-graph
-or
-when
-generating
-a
-hash
-of
-the
-information
-contained
-in
-a
-graph.
-</ins></p><p><ins class="diff-chg">
-The
-example
-below
-is
-an
-un-normalized
-JSON-LD
-document:
-</ins></p><pre class="example">{
<ins class="diff-chg">
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-      "@coerce": 
-      {
-         "@iri": ["homepage"]
-      }
-   }
-}
-</ins></pre><p><ins class="diff-chg">
-The
-example
-below
-is
-the
-normalized
-form
-of
-the
-JSON-LD
-document
-above:
-</ins></p><p class="note"><ins class="diff-chg">
-Whitespace
-is
-used
-below
-to
-aid
-readability.
-The
-normalization
-algorithm
-for
-JSON-LD
-remove
-all
-unnecessary
-whitespace
-in
-the
-fully
-normalized
-form.
-</ins></p><pre class="example">[{
<ins class="diff-chg">
-    "@subject": 
-    {
-        "@iri": "_:c14n0"
-    },
-    "http://xmlns.com/foaf/0.1/homepage": 
-    {
-        "@iri": "http://manu.sporny.org/"
-    },
-    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
-}]
-</ins></pre><p><ins class="diff-chg">
-Notice
-how
-all
-of
-the
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s
-have
-been
-expanded
-and
-sorted
-in
-alphabetical
-order.
-Also,
-notice
-how
-the
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a><ins class="diff-chg">
-has
-been
-labeled
-with
-a
-blank
-node
-identifier.
-Normalization
-ensures
-that
-any
-arbitrary
-graph
-containing
-exactly
-the
-same
-information
-would
-be
-normalized
-to
-exactly
-the
-same
-form
-shown
-above.
-</ins></p></div></div><div id="algorithms" class="section"><h2><span class="secno"><ins class="diff-chg">
-5.
-</ins></span><ins class="diff-chg">
-Algorithms
-</ins>
-</h2>
-<div id="compaction-1" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">5.1
-</ins></span><ins class="diff-new">
-Compaction
-</ins></h3><p class="issue"><ins class="diff-new">
-TBD:
-Explain
-compaction
-algorithm.
-</ins></p></div><div id="expansion-1" class="section"><h3><span class="secno"><ins class="diff-new">
-5.2
-</ins></span><ins class="diff-new">
-Expansion
-</ins></h3><p class="issue"><ins class="diff-new">
-TBD:
-Explain
-expansion
-algorithm.
-</ins></p></div><div id="framing-1" class="section"><h3><span class="secno"><ins class="diff-new">
-5.3
-</ins></span><ins class="diff-new">
-Framing
-</ins></h3><p class="issue"><ins class="diff-new">
-TBD:
-Explain
-framing
-algorithm.
-</ins></p></div><div id="normalization-1" class="section"><h3><span class="secno"><ins class="diff-new">
-5.4
-</ins></span><ins class="diff-new">
-Normalization
-</ins></h3><p class="issue"><ins class="diff-new">
-TBD:
-Explain
-normalization
-algorithm.
-</ins></p></div><div id="rdf-conversion" class="section"><h3><span class="secno"><ins class="diff-new">
-5.5
-</ins></span><ins class="diff-new">
-RDF
-Conversion
-</ins></h3><p><ins class="diff-new">
-A
-JSON-LD
-document
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-be
-converted
-to
-any
-other
-RDF-compatible
-document
-format
-using
-the
-algorithm
-specified
-in
-this
-section.
-</ins></p>
-<p>
-The
-JSON-LD
-Processing
-Model
-describes
-processing
-rules
-for
-extracting
-RDF
-from
-a
-JSON-LD
-document.
-Note
-that
-many
-uses
-of
-JSON-LD
-may
-not
-require
-generation
-of
-RDF.
-</p>
-<p>
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-<ins class="diff-new">to
-RDF
-</ins>
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</p>
-<p class="issue">
-The
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">RDF
-Conversion
-</ins>
-Algorithm
-is
-a
-work
-in
-progress.
-</p>
-<div class="informative section" id="overview">
-<h4>
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">5.5.1
-</ins>
-</span>
-Overview
-</h4>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-JSON-LD
-is
-intended
-to
-have
-an
-easy
-to
-parse
-grammar
-that
-closely
-models
-existing
-practice
-in
-using
-JSON
-for
-describing
-object
-representations.
-This
-allows
-the
-use
-of
-existing
-libraries
-for
-parsing
-JSON
-in
-a
-document-oriented
-fashion,
-or
-can
-allow
-for
-stream-based
-parsing
-similar
-to
-SAX.
-</p>
-<p>
-As
-with
-other
-grammars
-used
-for
-describing
-<del class="diff-old">linked
-data,
-</del>
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-<ins class="diff-chg">Linked
-Data
-</ins></a>,
-a
-key
-concept
-is
-that
-of
-a
-<em>
-resource
-</em>.
-Resources
-may
-be
-of
-three
-basic
-types:
-<em>
-IRI
-</em>
-s,
-for
-describing
-externally
-named
-entities,
-<em>
-BNodes
-</em>,
-resources
-for
-which
-an
-external
-name
-does
-not
-exist,
-or
-is
-not
-known,
-and
-Literals,
-which
-describe
-terminal
-entities
-such
-as
-strings,
-dates
-and
-other
-representations
-having
-a
-lexical
-representation
-possibly
-including
-an
-explicit
-language
-or
-datatype.
-</p>
-<p>
-Data
-described
-with
-JSON-LD
-may
-be
-considered
-to
-be
-the
-representation
-of
-a
-graph
-made
-up
-of
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>
-and
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-resources
-related
-via
-a
-<del class="diff-old">predicate
-</del>
-<a class="tref internalDFN" title="property" href="#dfn-property">
-<ins class="diff-chg">property
-</ins></a>
-resource.
-However,
-specific
-implementations
-may
-choose
-to
-operate
-on
-the
-document
-as
-a
-normal
-JSON
-description
-of
-objects
-having
-attributes.
-</p>
-</div>
-<div id="processing-algorithm-terms" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">5.5.2
-</ins>
-</span>
-Processing
-Algorithm
-Terms
-</h4>
-<dl>
-<dt>
-<del class="diff-old">default
-</del>
-<dfn title="initial_context" id="dfn-initial_context">
-<ins class="diff-chg">initial
-</ins>
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-specified
-to
-the
-JSON-LD
-processing
-algorithm
-before
-processing
-begins.
-</dd>
-<dt>
-<dfn title="default_graph" id="dfn-default_graph">
-default
-graph
-</dfn>
-</dt>
-<dd>
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</dd>
-<dt>
-<dfn title="active_subject" id="dfn-active_subject">
-active
-subject
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</dd>
-<dt>
-<dfn title="active_property" id="dfn-active_property">
-active
-property
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</dd>
-<dt>
-<dfn title="active_object" id="dfn-active_object">
-active
-object
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-generating
-triples.
-</dd>
-<dt>
-<dfn title="active_context" id="dfn-active_context">
-active
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-the
-context
-contained
-within
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</dd>
-<dt>
-<dfn title="local_context" id="dfn-local_context">
-local
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-<code>
-@context
-</code>
-keyword.
-</dd>
-<dt>
-<dfn title="processor_state" id="dfn-processor_state">
-processor
-state
-</dfn>
-</dt>
-<dd>
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>,
-which
-includes
-the
-<a class="tref" title="active__context">
-active
-context
-</a>,
-<a class="tref" title="current_subject">
-current
-subject
-</a>,
-and
-<a class="tref" title="current_property">
-current
-property
-</a>.
-The
-<a class="tref" title="processor__state">
-processor
-state
-</a>
-is
-managed
-as
-a
-stack
-with
-elements
-from
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copied
-into
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-when
-entering
-a
-new
-associative
-array.
-</dd>
-</dl>
-</div>
-<div id="processing-tokens-and-keywords" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">6.3
-</del>
-<ins class="diff-chg">5.5.3
-</ins>
-</span>
-Processing
-Tokens
-and
-Keywords
-</h4>
-<dl>
-<dt>
-<code>
-@context
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</dd>
-<dt>
-<code>
-@base
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</dd>
-<dt>
-<code>
-<del class="diff-old">@profile
-A
-reference
-to
-a
-remote
-context
-description
-used
-to
-set
-the
-local
-context
-.
-</del>
-@vocab
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</dd>
-<dt>
-<code>
-@coerce
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-type
-coercion
-rules.
-</dd>
-<dt>
-<code>
-@literal
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-a
-literal
-value.
-</dd>
-<dt>
-<code>
-@iri
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-an
-IRI
-value.
-</dd>
-<dt>
-<code>
-@language
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-the
-language
-for
-a
-literal.
-</dd>
-<dt>
-<code>
-@datatype
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-the
-datatype
-for
-a
-literal.
-</dd>
-<dt>
-<code>:
-</code>
-</dt>
-<dd>
-The
-separator
-for
-CURIEs
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-</dd>
-<dt>
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>
-</dt>
-<dd>
-Sets
-the
-active
-subjects.
-</dd>
-<dt>
-<code>
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">@type
-</ins>
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-rdf:type
-of
-the
-active
-subjects.
-This
-token
-may
-be
-conferred
-as
-syntactic
-sugar
-for
-rdf:type.
-</dd>
-</dl>
-<del class="diff-old">Use
-@source
-instead
-of
-@
-?
-Use
-@type
-instead
-of
-a
-?
-Note
-that
-both
-are
-just
-semantic
-sugar
-for
-rdf:type
-.
-</del>
-</div>
-<div id="context-1" class="section">
-<h4 id="context">
-<span class="secno">
-<del class="diff-old">6.4
-</del>
-<ins class="diff-chg">5.5.4
-</ins>
-</span>
-Context
-</h4>
-<p>
-Processing
-of
-JSON-LD
-is
-managed
-recursively
-using
-a
-process
-described
-in
-<a href="sequence">
-Sequence
-</a>.
-During
-processing,
-each
-rule
-is
-applied
-using
-information
-provided
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-Processing
-begins
-by
-pushing
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-onto
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-stack
-and
-initializing
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-with
-the
-<del class="diff-old">default
-</del>
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-<ins class="diff-chg">initial
-</ins>
-context
-</a>.
-If
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-encountered,
-information
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-merged
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</p>
-<p class="issue">
-Should
-the
-document
-URL
-be
-used
-as
-the
-default
-for
-<code>
-@base
-</code>
-in
-the
-<del class="diff-old">default
-</del>
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-<ins class="diff-chg">initial
-</ins>
-context
-</a>
-?
-</p>
-<p>
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-used
-for
-expanding
-keys
-and
-values
-of
-an
-associative
-array
-(or
-elements
-of
-a
-list
-(see
-<span a="#list-processing">
-List
-Processing
-</span>
-)).
-</p>
-<p>
-A
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-identified
-within
-an
-associative
-array
-having
-a
-key
-of
-<code>
-@context
-</code>
-with
-an
-associative
-array
-value.
-When
-processing
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>,
-special
-rules
-apply:
-</p>
-<ul>
-<li>
-The
-key
-<code>
-@base
-</code>
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-IRI
-and
-is
-saved
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-to
-perform
-term
-mapping
-as
-described
-in
-<a href="#iri-processing">
-IRI
-Processing
-</a>.
-</li>
-<li>
-The
-key
-<code>
-@vocab
-</code>
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-IRI
-and
-is
-saved
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-to
-perform
-term
-mapping
-as
-described
-in
-<a href="#iri-processing">
-IRI
-Processing
-</a>.
-</li>
-<li>
-The
-key
-<code>
-@coerce
-</code>
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-an
-associative
-array.
-Processing
-of
-the
-associative
-array
-is
-described
-<a href="#coerce">
-below
-</a>
-</li>
-<li>
-Otherwise,
-the
-key
-<em class="rfc2119" title="must">
-must
-</em>
-have
-the
-lexical
-form
-of
-<cite>
-<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">
-NCName
-</a>
-</cite>
-and
-<em class="rfc2119" title="must">
-must
-</em>
-have
-the
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-IRI.
-Merge
-each
-key-value
-pair
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-overwriting
-any
-duplicate
-values.
-</li>
-</ul>
-<del class="diff-old">A
-local
-context
-may
-also
-be
-loaded
-from
-an
-external
-document
-using
-the
-@profile
-key
-as
-described
-in
-Vocabulary
-Profiles
-.
-6.4.1
-</del>
-<div class="section">
-<h5 id="coerce">
-Coerce
-</h5>
-<p>
-Map
-each
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping,
-overwriting
-any
-duplicate
-values
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping.
-The
-<code>
-@coerce
-</code>
-mapping
-has
-<del class="diff-old">a
-</del>
-either
-<del class="diff-old">of
-</del>
-a
-single
-CURIE
-or
-<del class="diff-old">of
-</del>
-an
-array
-of
-CURIEs.
-When
-merging
-with
-an
-existing
-mapping
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-map
-all
-CURIE
-values
-to
-array
-form
-and
-replace
-with
-the
-union
-of
-the
-value
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-and
-the
-value
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-If
-the
-result
-is
-an
-array
-with
-a
-single
-CURIE,
-the
-processor
-<em class="rfc2119" title="may">
-may
-</em>
-represent
-this
-as
-a
-string
-value.
-</p>
-</div>
-</div>
-<del class="diff-old">6.5
-Chaining
-Object
-chaining
-is
-a
-JSON-LD
-feature
-that
-allows
-an
-author
-to
-use
-the
-definition
-of
-JSON-LD
-objects
-as
-property
-values.
-This
-is
-a
-commonly
-used
-mechanism
-for
-creating
-a
-parent-child
-relationship
-between
-objects.
-The
-example
-shows
-an
-two
-objects
-related
-by
-a
-property
-from
-the
-first
-object:
-  
-{
-...
-  "foaf:name": "Manu Sporny",
-  "": {
-    "",
-    "",
-  }
-...
-}
-An
-object
-definition
-may
-be
-used
-anyplace
-a
-value
-is
-legal
-in
-JSON-LD.
-</del>
-<div id="iri-processing" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">6.6
-</del>
-<ins class="diff-chg">5.5.5
-</ins>
-</span>
-IRI
-Processing
-</h4>
-<p>
-Keys
-and
-some
-values
-are
-evaluated
-to
-produce
-an
-IRI.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-a
-value
-representing
-an
-IRI
-into
-an
-actual
-IRI.
-</p>
-<p>
-IRIs
-may
-be
-represented
-as
-an
-explicit
-string,
-or
-as
-a
-CURIE,
-as
-a
-value
-relative
-to
-<code>
-@base
-</code>
-or
-<code>
-@vocab
-</code>.
-</p>
-<p>
-CURIEs
-are
-defined
-more
-formally
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-]
-<cite>
-<a href="http://www.w3.org/TR/rdfa-core/#s_curies">
-section
-6
-"CURIE
-Syntax
-Definition"
-</a>
-</cite>.
-Generally,
-a
-CURIE
-is
-composed
-of
-a
-<em>
-prefix
-</em>
-and
-a
-<em>
-suffix
-</em>
-separated
-by
-a
-':'.
-In
-JSON-LD,
-either
-the
-prefix
-may
-be
-the
-empty
-string,
-denoting
-the
-<dfn title="default_prefix" id="dfn-default_prefix">
-default
-prefix
-</dfn>.
-</p>
-<p>
-The
-procedure
-for
-generating
-an
-IRI
-is:
-</p>
-<ol class="algorithm">
-<li>
-Split
-the
-value
-into
-a
-<em>
-prefix
-</em>
-and
-<em>
-suffix
-</em>
-from
-the
-first
-occurrence
-of
-':'.
-</li>
-<li>
-If
-the
-prefix
-is
-a
-'_',
-generate
-a
-named
-BNode
-using
-the
-suffix
-as
-the
-name.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-contains
-a
-mapping
-for
-<em>
-prefix
-</em>,
-generate
-an
-IRI
-by
-prepending
-the
-mapped
-prefix
-to
-the
-(possibly
-empty)
-suffix.
-Note
-that
-an
-empty
-suffix
-and
-no
-suffix
-(meaning
-the
-value
-contains
-no
-':'
-string
-at
-all)
-are
-treated
-equivalently.
-</li>
-<li>
-If
-the
-IRI
-being
-processed
-is
-for
-a
-property
-(i.e.,
-a
-key
-value
-in
-an
-associative
-array,
-or
-a
-value
-in
-a
-<code>
-@coerce
-</code>
-mapping)
-and
-the
-active
-context
-has
-a
-<code>
-@vocab
-</code>
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-the
-method
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-].
-</li>
-<li>
-If
-the
-IRI
-being
-processed
-is
-for
-a
-subject
-or
-object
-(i.e.,
-not
-a
-property)
-and
-the
-active
-context
-has
-a
-<code>
-@base
-</code>
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-the
-method
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-].
-</li>
-<li>
-Otherwise,
-use
-the
-value
-directly
-as
-an
-IRI.
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="sequence" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">5.5.6
-</ins>
-</span>
-Sequence
-</h4>
-<p>
-The
-algorithm
-below
-is
-designed
-for
-in-memory
-implementations
-with
-random
-access
-to
-associative
-array
-elements.
-<del class="diff-old">For
-a
-description
-of
-a
-streaming
-implementation,
-see
-Appendix
-B
-.
-</del>
-</p>
-<p>
-A
-conforming
-JSON-LD
-processor
-<em class="rfc2119" title="must">
-must
-</em>
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>
-that
-the
-following
-algorithm
-generates:
-</p>
-<ol class="algorithm">
-<li id="processing-step-default-context">
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-with
-with
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-set
-to
-the
-<del class="diff-old">default
-</del>
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-<ins class="diff-chg">initial
-</ins>
-context
-</a>
-and
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-initialized
-to
-NULL.
-</li>
-<li id="processing-step-associative">
-If
-an
-associative
-array
-is
-detected,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-associative
-array
-has
-a
-<code>
-@context
-</code>
-key,
-process
-the
-local
-context
-as
-described
-in
-<a href="#context">
-Context
-</a>.
-</li>
-<li>
-If
-the
-associative
-array
-has
-an
-<code>
-@iri
-</code>
-key,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#iri-processing">
-IRI
-Processing
-</a>
-on
-the
-associated
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-<li>
-If
-the
-associative
-array
-has
-a
-<code>
-@literal
-</code>
-key,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-a
-literal
-value
-as
-follows:
-<ul>
-<li>
-as
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-if
-the
-associative
-array
-contains
-a
-<code>
-@datatype
-</code>
-key
-after
-performing
-<a href="#iri-processing">
-IRI
-Processing
-</a>
-on
-the
-specified
-<code>
-@datatype
-</code>.
-</li>
-<li>
-otherwise,
-as
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>.
-If
-the
-associative
-array
-contains
-a
-<code>
-@language
-</code>
-key,
-use
-it's
-value
-to
-set
-the
-language
-of
-the
-plain
-literal.
-</li>
-</ul>
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref" title="active__property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-<li>
-If
-the
-associative
-array
-has
-a
-<code>
-@
-</code>
-key:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-a
-string,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-result
-of
-performing
-<a href="#iri-processing">
-IRI
-Processing
-</a>.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Set
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-using
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>,
-set
-the
-<a class="tref" title="active__subject">
-active
-subject
-</a>
-to
-the
-result
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-the
-associative
-array
-does
-not
-have
-a
-<code>
-@
-</code>
-key,
-set
-the
-<a class="tref" title="active__object">
-active
-object
-</a>
-to
-newly
-generated
-<a class="tref" title="blank_node_identifier">
-blank
-node
-identifier
-</a>.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Set
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-<a class="tref" title="active__object">
-active
-object
-</a>.
-</li>
-<li>
-For
-each
-key
-in
-the
-associative
-array
-that
-has
-not
-already
-been
-processed,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-<code>
-a
-</code>,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-<code>
-rdf:type
-</code>.
-</li>
-<li>
-Otherwise,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-the
-result
-of
-performing
-<a href="#iri-processing">
-IRI
-Processing
-</a>
-on
-the
-key.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-</ol>
-</li>
-<li>
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following
-returning
-the
-result
-of
-processing
-the
-last
-value
-in
-the
-array:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-a
-regular
-array,
-generate
-an
-RDF
-List
-by
-linking
-each
-element
-of
-the
-list
-using
-<code>
-rdf:first
-</code>
-and
-<code>
-rdf:next
-</code>,
-terminating
-the
-list
-with
-<code>
-rdf:nil
-</code>
-using
-the
-following
-sequence:
-<ol>
-<li>
-If
-the
-list
-has
-no
-element,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-<code>
-rdf:nil
-</code>.
-</li>
-<li>
-Otherwise,
-generate
-a
-triple
-using
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-a
-newly
-generated
-BNode
-identified
-as
-<em>
-first
-bnode
-</em>.
-</li>
-<li>
-For
-each
-element
-other
-than
-the
-last
-element
-in
-the
-list:
-<ol>
-<li>
-Create
-a
-processor
-state
-using
-the
-active
-context,
-<em>
-first
-bnode
-</em>
-as
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-and
-<code>
-rdf:first
-</code>
-as
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>.
-</li>
-<li>
-Unless
-this
-is
-the
-last
-element
-in
-the
-list,
-generate
-a
-new
-BNode
-identified
-as
-<em>
-rest
-bnode
-</em>,
-otherwise
-use
-<code>
-rdf:nil
-</code>.
-</li>
-<li>
-Generate
-a
-new
-triple
-using
-<em>
-first
-bnode
-</em>,
-<code>
-rdf:rest
-</code>
-and
-<em>
-rest
-bnode
-</em>.
-</li>
-<li>
-Set
-<em>
-first
-bnode
-</em>
-to
-<em>
-rest
-bnode
-</em>.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-<li>
-Otherwise,
-create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-a
-string
-is
-detected,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-and
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-value
-created
-from
-the
-string.
-</li>
-<li>
-If
-a
-number
-is
-detected,
-generate
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-using
-a
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-either
-<code>
-xsd:integer
-</code>
-or
-<code>
-xsd:double
-</code>,
-depending
-on
-if
-the
-value
-contains
-a
-fractional
-and/or
-an
-exponential
-component.
-Generate
-a
-triple
-using
-the
-<a class="tref" title="active__subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-and
-the
-generated
-typed
-literal.
-</li>
-<li>
-Otherwise,
-if
-<strong>
-true
-</strong>
-or
-<strong>
-false
-</strong>
-is
-detected,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-and
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-value
-created
-from
-the
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-<code>
-xsd:boolean
-</code>.
-</li>
-</ol>
-</div>
-<del class="diff-old">8.
-Best
-Practices
-The
-nature
-of
-Web
-programming
-allows
-one
-to
-use
-basic
-technologies,
-such
-as
-JSON-LD,
-across
-a
-variety
-of
-systems
-and
-environments.
-This
-section
-attempts
-to
-describe
-some
-of
-those
-environments
-and
-the
-way
-in
-which
-JSON-LD
-can
-be
-integrated
-in
-order
-to
-help
-alleviate
-certain
-development
-headaches.
-8.1
-JavaScript
-It
-is
-expected
-that
-JSON-LD
-will
-be
-used
-quite
-a
-bit
-in
-JavaScript
-environments,
-however,
-features
-like
-the
-expanded
-form
-for
-object
-values
-mean
-that
-using
-JSON-LD
-directly
-in
-JavaScript
-may
-be
-annoying
-without
-a
-middleware
-layer
-such
-as
-a
-simple
-library
-that
-converts
-JSON-LD
-markup
-before
-JavaScript
-uses
-it.
-One
-could
-say
-that
-JSON-LD
-is
-a
-good
-fit
-for
-the
-RDF
-API,
-which
-enables
-a
-variety
-of
-RDF-based
-Web
-Applications,
-but
-some
-don't
-want
-to
-require
-that
-level
-of
-functionality
-just
-to
-use
-JSON-LD.
-The
-group
-is
-still
-discussing
-the
-best
-way
-to
-proceed,
-so
-input
-on
-how
-JSON-LD
-could
-more
-easily
-be
-utilized
-in
-JavaScript
-environments
-would
-be
-very
-much
-appreciated.
-8.2
-Schema-less
-Databases
-Databases
-such
-as
-CouchDB
-and
-MongoDB
-allow
-the
-creation
-of
-schema-less
-data
-stores.
-RDF
-is
-a
-type
-of
-schema-less
-data
-model
-and
-thus
-lends
-itself
-to
-databases
-such
-as
-CouchDB
-and
-MongoDB.
-Both
-of
-these
-databases
-can
-use
-JSON-LD
-as
-their
-storage
-format.
-The
-group
-needs
-feedback
-from
-CouchDB
-and
-MongoDB
-experts
-regarding
-the
-usefulness
-of
-JSON-LD
-in
-those
-environments.
-MongoDB
-does
-not
-allow
-the
-'.'
-character
-to
-be
-used
-in
-key
-names.
-This
-prevents
-developers
-from
-storing
-IRIs
-as
-keys,
-which
-also
-prevents
-storage
-of
-the
-data
-in
-normalized
-form.
-While
-this
-issue
-can
-be
-avoided
-by
-using
-CURIEs
-for
-key
-values,
-it
-is
-not
-known
-if
-this
-mechanism
-is
-enough
-to
-allow
-JSON-LD
-to
-be
-used
-in
-MongoDB
-in
-a
-way
-that
-is
-useful
-to
-developers.
-</del>
-</div>
-</div>
-<div id="experimental-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">9.
-</del>
-<ins class="diff-chg">6.
-</ins>
-</span>
-<del class="diff-old">Advanced
-</del>
-<ins class="diff-chg">Experimental
-</ins>
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-considered
-as
-discussion
-points;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<del class="diff-old">9.1
-Vocabulary
-Profiles
-One
-of
-the
-more
-powerful
-features
-of
-RDFa
-1.1
-Core
-is
-the
-ability
-to
-specify
-a
-collection
-of
-prefixes
-and
-terms
-that
-can
-be
-re-used
-by
-a
-processor
-to
-simplfy
-markup.
-JSON-LD
-provides
-a
-similar
-mechanism
-called
-Vocabulary
-Profiles,
-which
-is
-the
-inclusion
-of
-a
-context
-external
-to
-the
-JSON-LD
-document.
-The
-example
-below
-demonstrates
-how
-one
-may
-specify
-an
-external
-Vocabulary
-Profile.
-Assume
-the
-following
-profile
-exists
-at
-this
-imaginary
-URL:
-http://example.org/profiles/contacts
-.
-{
-  "@context": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}
-The
-profile
-listed
-above
-can
-be
-used
-in
-the
-following
-way:
-{
-  "@profile": "http://example.org/profiles/contacts",
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}
-The
-example
-above
-would
-generate
-the
-following
-triples:
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</del>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.2
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-array
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<del class="diff-old">&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-</del>
-<pre class="example">&lt;http://example.org/people#john&gt; 
-<ins class="diff-chg">   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-</ins>
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-JSON-LD
-associative
-array.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<del class="diff-old">{
-  "@": 
-  [
-    {
-      "@": "http://example.org/people#john",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "http://example.org/people#jane",
-      "a": "foaf:Person"
-    }
-  ]
-</del>
-<pre class="example">{
-<ins class="diff-chg">  "@": 
-  [
-    {
-      "@": "http://example.org/people#john",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "http://example.org/people#jane",
-      "a": "foaf:Person"
-    }
-  ]
-</ins>
-}
-</pre>
-<p>
-A
-disjoint
-graph
-could
-also
-be
-expressed
-like
-so:
-</p>
-<del class="diff-old">[
-  {
-    "@": "http://example.org/people#john",
-    "a": "foaf:Person"
-  },
-  {
-    "@": "http://example.org/people#jane",
-    "a": "foaf:Person"
-  }
-</del>
-<pre class="example">[
-<ins class="diff-chg">  {
-    "@": "http://example.org/people#john",
-    "a": "foaf:Person"
-  },
-  {
-    "@": "http://example.org/people#jane",
-    "a": "foaf:Person"
-  }
-</ins>
-]
-</pre>
-</div>
-<div id="the-json-ld-api" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.3
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-The
-JSON-LD
-API
-</h3>
-<p>
-This
-API
-provides
-a
-clean
-mechanism
-that
-enables
-developers
-to
-convert
-JSON-LD
-data
-into
-a
-format
-that
-is
-easier
-to
-work
-with
-in
-various
-programming
-languages.
-</p>
-<del class="diff-old">]
-interface  {
-};
-</del>
-<pre class="idl"><span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDProcessor</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
<ins class="diff-chg">
-};</span>
-</ins>
-</pre>
-<div id="methods" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">9.3.1
-</del>
-<ins class="diff-chg">6.2.1
-</ins>
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">
-<code>
-toGraph
-</code>
-</dt>
-<dd>
-Parses
-JSON-LD
-and
-transforms
-the
-data
-into
-an
-Graph,
-which
-is
-compatible
-with
-the
-RDF
-Interfaces
-API
-specification
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">
-RDF-INTERFACES
-</a>
-</cite>
-].
-This
-method
-will
-return
-<code>
-null
-</code>
-if
-there
-are
-any
-errors,
-or
-if
-the
-RDF
-Interfaces
-API
-is
-not
-available
-for
-use.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-jsonld
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-RDFGraph.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-callback
-</td>
-<td class="prmType">
-<code>
-<a>
-JSONLDParserCallback
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">&#10004;
-</ins>
-</td>
-<td class="prmOptTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">&#10004;
-</ins>
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-Graph
-</a>
-</code>
-</div>
-</dd>
-<dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">
-<code>
-toProjection
-</code>
-</dt>
-<dd>
-Parses
-JSON-LD
-text
-into
-an
-RDF
-API
-Projection
-object
-as
-specified
-by
-the
-RDF
-API
-specification
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-API">
-RDF-API
-</a>
-</cite>
-].
-If
-there
-are
-any
-errors,
-<code>
-null
-</code>
-is
-returned.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-jsonld
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-string
-to
-parse
-into
-the
-Projection.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-template
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">&#10004;
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmDesc">
-The
-Projection
-template
-to
-use
-when
-building
-the
-Projection.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-subject
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">&#10004;
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmDesc">
-The
-subject
-to
-use
-when
-building
-the
-Projection.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-callback
-</td>
-<td class="prmType">
-<code>
-<a>
-JSONLDParserCallback
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">&#10004;
-</ins>
-</td>
-<td class="prmOptTrue">
-<del class="diff-old">✔
-</del>
-<ins class="diff-chg">&#10004;
-</ins>
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-object
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<p>
-The
-JSONLDParserCallback
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-input
-data.
-</p>
-<del class="diff-old">]
-interface  {
-};
-</del>
-<pre class="idl"><span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
<ins class="diff-chg">
-};</span>
-</ins>
-</pre>
-<div id="methods-1" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">9.3.2
-</del>
-<ins class="diff-chg">6.2.2
-</ins>
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error">
-<code>
-error
-</code>
-</dt>
-<dd>
-This
-callback
-is
-invoked
-whenever
-an
-error
-occurs
-during
-processing.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-error
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmDesc">
-A
-descriptive
-error
-string
-returned
-by
-the
-processor.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-void
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<p>
-The
-following
-example
-demonstrates
-how
-to
-convert
-JSON-LD
-to
-a
-projection
-that
-is
-directly
-usable
-in
-a
-programming
-environment:
-</p>
-<del class="diff-old">// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-// Map the JSON-LD to a language-native object
-var person = jsonld.toProjection(jsonldString, myTemplate);
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-</del>
-<pre class="example">// retrieve JSON-LD from a Web Service
-<ins class="diff-chg">var jsonldString = fetchPerson();
-
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-
-// Map the JSON-LD to a language-native object
-var person = jsonld.toProjection(jsonldString, myTemplate);
-
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-</ins>
-"Their
-homepage
-is:
-"
-+
-person.homepage);
-</pre>
-<p>
-A
-JSON-LD
-Serializer
-is
-also
-available
-to
-map
-a
-language-native
-object
-to
-JSON-LD.
-<del class="diff-old">]
-interface  {
-};
-</del>
-</p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
<ins class="diff-chg">
-};</span>
-</ins>
-</pre>
-<div id="methods-2" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">9.3.3
-</del>
-<ins class="diff-chg">6.2.3
-</ins>
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj">
-<code>
-normalize
-</code>
-</dt>
-<dd>
-Serializes
-a
-language-native
-object
-into
-a
-normalized
-JSON-LD
-string.
-Normalization
-is
-important
-when
-performing
-things
-like
-equality
-comparison
-and
-digital
-signature
-creation
-and
-verification.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-obj
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmOptFalse">
-<del class="diff-old">✘
-</del>
-<ins class="diff-chg">&#10008;
-</ins>
-</td>
-<td class="prmDesc">
-An
-associative
-array
-of
-key-value
-pairs
-that
-should
-be
-converted
-to
-a
-JSON-LD
-string.
-It
-is
-assumed
-that
-a
-map
-already
-exists
-for
-the
-data.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-DOMString
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-<h3 id="the-normalization-algorithm">
-The
-Normalization
-Algorithm
-</h3>
-<p class="issue">
-This
-algorithm
-is
-very
-rough,
-untested,
-and
-probably
-contains
-many
-bugs.
-Use
-at
-your
-own
-risk.
-It
-will
-change
-in
-the
-coming
-months.
-</p>
-<p>
-The
-JSON-LD
-normalization
-algorithm
-is
-as
-follows:
-</p>
-<ol class="algorithm">
-<li>
-Remove
-the
-<code>
-@context
-</code>
-key
-and
-preserve
-it
-as
-the
-<dfn title="transformation_map" id="dfn-transformation_map">
-transformation
-map
-</dfn>
-while
-running
-this
-algorithm.
-</li>
-<li>
-For
-each
-key
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-</ol>
-</li>
-<li>
-For
-each
-value
-<ol class="algorithm">
-<li>
-If
-the
-value
-should
-be
-type
-coerced
-per
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>,
-ensure
-that
-it
-is
-transformed
-to
-the
-new
-value.
-</li>
-<li>
-If
-the
-value
-is
-a
-CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-and
-the
-type
-is
-a
-CURIE,
-expand
-it
-to
-an
-IRI
-using
-the
-<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
-transformation
-map
-</a>.
-</li>
-<li>
-When
-generating
-the
-final
-value,
-use
-expanded
-object
-value
-form
-to
-store
-all
-IRIs,
-typed
-literals
-and
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-s
-with
-language
-information.
-</li>
-</ol>
-</li>
-<li>
-Output
-each
-sorted
-key-value
-pair
-without
-any
-extraneous
-whitespace.
-If
-the
-value
-is
-an
-associative
-array,
-perform
-this
-algorithm,
-starting
-at
-step
-#1,
-recursively
-on
-the
-sub-tree.
-There
-should
-be
-no
-nesting
-in
-the
-outputted
-JSON
-data.
-That
-is,
-the
-top-most
-element
-should
-be
-an
-array.
-Each
-item
-in
-the
-array
-contains
-a
-single
-subject
-with
-a
-corresponding
-array
-of
-properties
-in
-UTF-8
-sort
-order.
-Any
-related
-objects
-that
-are
-complex
-objects
-themselves
-should
-be
-given
-a
-top-level
-object
-in
-the
-top-level
-array.
-</li>
-</ol>
-<p class="issue">
-Note
-that
-normalizing
-named
-blank
-nodes
-is
-impossible
-at
-present
-since
-one
-would
-have
-to
-specify
-a
-blank
-node
-naming
-algorithm.
-For
-the
-time
-being,
-you
-cannot
-normalize
-graphs
-that
-contain
-named
-blank
-nodes.
-However,
-normalizing
-graphs
-that
-contain
-non-named
-blank
-nodes
-is
-supported.
-</p>
-<del class="diff-old">var myObj = { "@context" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "age",
-                   "xsd:anyURI": "homepage"
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : "42",
-              "homepage" : "http://example.org/people/joe" };
-// Map the language-native object to JSON-LD
-</del>
-<pre class="example">var myObj = { "@context" : { 
-<ins class="diff-chg">                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "age",
-                   "xsd:anyURI": "homepage"
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : "42",
-              "homepage" : "http://example.org/people/joe" };
-
-// Map the language-native object to JSON-LD
-</ins>
-var
-jsonldText
-=
-jsonld.normalize(myObj);
-</pre>
-<p>
-After
-the
-code
-in
-the
-example
-above
-has
-executed,
-the
-<strong>
-jsonldText
-</strong>
-value
-will
-be
-(line-breaks
-added
-for
-readability):
-</p>
-<del class="diff-old">[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
-"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
-</del>
-<pre class="example">[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
-<ins class="diff-chg">"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
-</ins>
-"http://xmlns.com/foaf/0.1/name":"Joe
-Jackson"}]
-</pre>
-<p>
-When
-normalizing
-<strong>
-xsd:double
-</strong>
-values,
-implementers
-<em class="rfc2119" title="must">
-must
-</em>
-ensure
-that
-the
-normalized
-value
-is
-a
-string.
-In
-order
-to
-generate
-the
-string
-from
-a
-<strong>
-double
-</strong>
-value,
-output
-equivalent
-to
-the
-<code>
-printf("%1.6e",
-value)
-</code>
-function
-in
-C
-<em class="rfc2119" title="must">
-must
-</em>
-be
-used
-where
-<strong>
-"%1.6e"
-</strong>
-is
-the
-string
-formatter
-and
-<strong>
-value
-</strong>
-is
-the
-value
-to
-be
-converted.
-</p>
-<p>
-To
-convert
-the
-a
-double
-value
-in
-JavaScript,
-implementers
-can
-use
-the
-following
-snippet
-of
-code:
-</p>
-<del class="diff-old">// the variable 'value' below is the JavaScript native double value that is to be converted
-</del>
-<pre class="example">// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
-'$10$2')
-</pre>
-<p class="note">
-When
-data
-needs
-to
-be
-normalized,
-JSON-LD
-authors
-should
-not
-use
-values
-that
-are
-going
-to
-undergo
-automatic
-conversion.
-This
-is
-due
-to
-the
-lossy
-nature
-of
-<strong>
-xsd:double
-</strong>
-values.
-</p>
-<p class="issue">
-Round-tripping
-data
-can
-be
-problematic
-if
-we
-mix
-and
-match
-@coerce
-rules
-with
-JSON-native
-datatypes,
-like
-integers.
-Consider
-the
-following
-code
-example:
-</p>
-<del class="diff-old">var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-// Convert the normalized object back to a JavaScript object
-</del>
-<pre class="example">var myObj = { "@context" : { 
-<ins class="diff-chg">                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-
-// Convert the normalized object back to a JavaScript object
-</ins>
-var
-myObj2
-=
-jsonld.parse(jsonldText);
-</pre>
-<p class="issue">
-At
-this
-point,
-myObj2
-and
-myObj
-will
-have
-different
-values
-for
-the
-"number"
-value.
-myObj
-will
-be
-the
-number
-42,
-while
-myObj2
-will
-be
-the
-string
-"42".
-This
-type
-of
-data
-round-tripping
-error
-can
-bite
-developers.
-We
-are
-currently
-wondering
-if
-having
-a
-"coerce
-validation"
-phase
-in
-the
-parsing/normalization
-phases
-would
-be
-a
-good
-idea.
-It
-would
-prevent
-data
-round-tripping
-issues
-like
-the
-one
-mentioned
-above.
-</p>
-</div>
-</div>
-<div class="appendix section" id="markup-examples">
-<h2>
-<span class="secno">
-A.
-</span>
-<del class="diff-old">The
-Default
-Context
-</del>
-<ins class="diff-chg">Markup
-Examples
-</ins>
-</h2>
-<p>
-The
-<del class="diff-old">default
-context
-is
-provided
-</del>
-<ins class="diff-chg">JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-</ins>
-to
-<del class="diff-old">ensure
-</del>
-<ins class="diff-chg">express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-</ins>
-that
-<ins class="diff-new">JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</ins></p><div id="rdfa" class="section"><h3><span class="secno"><ins class="diff-new">
-A.1
-</ins></span><ins class="diff-new">
-RDFa
-</ins></h3><p><ins class="diff-new">
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</ins></p><pre class="example">&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
<ins class="diff-new">
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</ins></pre><p><ins class="diff-new">
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-</ins>
-there
-are
-<ins class="diff-new">other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</ins></p><pre class="example">[
<ins class="diff-new">
- {
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/bob/",
-   "foaf:name": "Bob"
- },
- {
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/eve/",
-   "foaf:name": "Eve"
- },
- {
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/manu/",
-   "foaf:name": "Manu"
- }
-]
-</ins></pre></div><div id="microformats" class="section"><h3><span class="secno"><ins class="diff-new">
-A.2
-</ins></span><ins class="diff-new">
-Microformats
-</ins></h3><p><ins class="diff-new">
-The
-following
-example
-uses
-</ins>
-a
-<del class="diff-old">reasonable
-set
-</del>
-<ins class="diff-chg">simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</ins></p><pre class="example">&lt;div class="vcard"&gt;
<ins class="diff-chg">
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-</ins></pre><p><ins class="diff-chg">
-The
-representation
-</ins>
-of
-<del class="diff-old">prefixes
-and
-</del>
-<ins class="diff-chg">the
-hCard
-expresses
-the
-Microformat
-</ins>
-terms
-<del class="diff-old">available
-to
-all
-JSON-LD
-developers.
-Mappings
-specified
-by
-</del>
-<ins class="diff-chg">in
-</ins>
-the
-<del class="diff-old">default
-</del>
-context
-<del class="diff-old">should
-not
-be
-overwritten
-by
-</del>
-<ins class="diff-chg">and
-uses
-them
-directly
-for
-the
-</ins><code><ins class="diff-chg">
-url
-</ins></code><ins class="diff-chg">
-and
-</ins><code><ins class="diff-chg">
-fn
-</ins></code><ins class="diff-chg">
-properties.
-Also
-note
-that
-the
-Microformat
-to
-</ins>
-JSON-LD
-<del class="diff-old">authors.
-All
-</del>
-<ins class="diff-chg">processor
-has
-generated
-the
-proper
-URL
-type
-for
-</ins><code><ins class="diff-chg">
-http://tantek.com
-</ins></code>.</p><pre class="example">{
<ins class="diff-chg">
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}
-</ins></pre></div><div id="microdata" class="section"><h3><span class="secno"><ins class="diff-chg">
-A.3
-</ins></span><ins class="diff-chg">
-Microdata
-</ins></h3><p><ins class="diff-chg">
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</ins></p><pre class="example">&lt;dl itemscope
<ins class="diff-chg">
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</ins></pre><p><ins class="diff-chg">
-Note
-that
-the
-</ins>
-JSON-LD
-<del class="diff-old">processors
-must
-load
-</del>
-<ins class="diff-chg">representation
-of
-</ins>
-the
-<del class="diff-old">following
-context
-</del>
-<ins class="diff-chg">Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</ins></p><pre class="example">[
<ins class="diff-chg">
-  {
-    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]
-</ins></pre></div><div class="appendix section" id="mashing-up-vocabularies"><h3><span class="secno"><ins class="diff-chg">
-A.4
-</ins></span><ins class="diff-chg">
-Mashing
-Up
-Vocabularies
-</ins></h3><p><ins class="diff-chg">
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</ins></p><ul><li><ins class="diff-chg">
-RDF
--
-for
-describing
-information
-about
-objects
-on
-the
-semantic
-web.
-</ins></li><li><ins class="diff-chg">
-RDFS
--
-for
-expressing
-things
-like
-labels
-and
-comments.
-</ins></li><li><ins class="diff-chg">
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</ins></li><li><ins class="diff-chg">
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</ins></li><li><ins class="diff-chg">
-FOAF
--
-for
-describing
-social
-networks.
-</ins></li><li><ins class="diff-chg">
-Calendar
--
-for
-specifying
-events.
-</ins></li><li><ins class="diff-chg">
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</ins></li><li><ins class="diff-chg">
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</ins></li><li><ins class="diff-chg">
-GEO
--
-for
-describing
-geographic
-location.
-</ins></li><li><ins class="diff-chg">
-VCard
--
-for
-describing
-organizations
-and
-people.
-</ins></li><li><ins class="diff-chg">
-DOAP
--
-for
-describing
-projects.
-</ins></li></ul><p><ins class="diff-chg">
-You
-can
-use
-these
-vocabularies
-</ins>
-in
-<del class="diff-old">as
-</del>
-<ins class="diff-chg">combination,
-like
-so:
-</ins></p><pre class="example">{
<ins class="diff-chg">
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}
-</ins></pre><p><ins class="diff-chg">
-Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-</ins>
-the
-<del class="diff-old">intial
-</del>
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-<ins class="diff-chg">active
-</ins>
-context
-<del class="diff-old">before
-processing
-JSON-LD
-text.
-</del>
-</a>
-<ins class="diff-chg">in-line
-using
-the
-</ins><code><ins class="diff-chg">
-@context
-</ins></code><ins class="diff-chg">
-keyword,
-like
-so:
-</ins>
-</p>
-<del class="diff-old">{
-  "@context":
-  {
-    "@vocab": "",
-    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
-    "owl": "http://www.w3.org/2002/07/owl#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dcterms": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "vcard": "http://www.w3.org/2006/vcard/ns# ",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "cc": "http://creativecommons.org/ns#",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "com": "http://purl.org/commerce#",
-    "ps": "http://purl.org/payswarm#",
-    "gr": "http://purl.org/goodrelations/v1#",
-    "sig": "http://purl.org/signature#",
-    "ccard": "http://purl.org/commerce/creditcard#"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-</del>
-<pre class="example">{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-<ins class="diff-chg">  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-</ins>
-}
-</pre>
-<p>
-<ins class="diff-new">The
-</ins><code><ins class="diff-new">
-@context
-</ins></code><ins class="diff-new">
-keyword
-is
-used
-to
-change
-how
-the
-JSON-LD
-processor
-evaluates
-key-value
-pairs.
-In
-this
-case,
-it
-was
-used
-to
-map
-one
-string
-('myvocab')
-to
-another
-string,
-which
-is
-interpreted
-as
-a
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a>.<ins class="diff-new">
-In
-the
-example
-above,
-the
-</ins><code><ins class="diff-new">
-myvocab
-</ins></code><ins class="diff-new">
-string
-is
-replaced
-with
-"
-</ins><code><ins class="diff-new">
-http://example.org/myvocab#
-</ins></code><ins class="diff-new">
-"
-when
-it
-is
-detected.
-In
-the
-example
-above,
-"
-</ins><code><ins class="diff-new">
-myvocab:personality
-</ins></code><ins class="diff-new">
-"
-would
-expand
-to
-"
-</ins><code><ins class="diff-new">
-http://example.org/myvocab#personality
-</ins></code><ins class="diff-new">
-".
-</ins></p><p><ins class="diff-new">
-This
-mechanism
-is
-a
-short-hand
-for
-RDF,
-called
-a
-CURIE,
-and
-provides
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</ins></p><p></p>
-</div>
-<div class="appendix section" id="acknowledgements">
-<h3>
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">A.5
-</ins>
-</span>
-Acknowledgements
-</h3>
-<p>
-The
-<del class="diff-old">editor
-</del>
-<ins class="diff-chg">editors
-</ins>
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-<del class="diff-old">rationale
-and
-reasoning
-</del>
-<ins class="diff-chg">initial
-push
-</ins>
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-<del class="diff-old">Longley
-</del>
-<ins class="diff-chg">Longley,
-Dave
-Lehn
-and
-Mike
-Johnson
-</ins>
-who
-reviewed,
-provided
-feedback,
-and
-performed
-several
-<del class="diff-old">implementation
-on
-</del>
-<ins class="diff-chg">implementations
-of
-</ins>
-the
-specification,
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-Thanks
-also
-to
-Nathan
-Rixham,
-Bradley
-P.
-<del class="diff-old">Allen
-</del>
-<ins class="diff-chg">Allen,
-Kingsley
-Idehen,
-Glenn
-McDonald,
-Alexandre
-Passant,
-Danny
-Ayers,
-Ted
-Thibodeau
-Jr.,
-Olivier
-Grisel,
-Niklas
-Lindström,
-Markus
-Lanthaler,
-</ins>
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-</p>
-</div>
-</div>
-<div id="respec-err" style="position: fixed; width: 350px; top: 10px; right: 10px; border: 3px double #f00; background: #fff" class="removeOnSave">
-<ul>
-<li style="color: #c00">
-<ins class="diff-new">There
-appears
-to
-have
-been
-a
-problem
-fetching
-the
-style
-sheet;
-status=0
-</ins></li></ul></div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-<del class="diff-old">C.
-</del>
-<ins class="diff-chg">B.
-</ins>
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">C.1
-</del>
-<ins class="diff-chg">B.1
-</ins>
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<dt id="bib-RDF-API">
-[RDF-API]
-</dt>
-<dd>
-Manu
-Sporny,
-Benjamin
-Adrian,
-Nathan
-Rixham;
-et
-al.
-<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">
-<cite>
-RDF
-API
-</cite>
-</a>
-Latest.
-W3C
-Editor's
-Draft.
-URL:
-<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">
-http://www.w3.org/2010/02/rdfa/sources/rdf-api/
-</a>
-</dd>
-<dt id="bib-RDF-CONCEPTS">
-[RDF-CONCEPTS]
-</dt>
-<dd>
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-<cite>
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</a>
-</dd>
-<dt id="bib-RDF-INTERFACES">
-[RDF-INTERFACES]
-</dt>
-<dd>
-Nathan
-Rixham,
-Manu
-Sporny,
-Benjamin
-Adrian;
-et
-al.
-<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">
-<cite>
-RDF
-Interfaces
-</cite>
-</a>
-Latest.
-W3C
-Editor's
-Draft.
-URL:
-<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">
-http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/
-</a>
-</dd>
-<dt id="bib-RFC3987">
-[RFC3987]
-</dt>
-<dd>
-M.
-<del class="diff-old">Dürst;
-</del>
-<ins class="diff-chg">Dürst;
-</ins>
-M.
-Suignard.
-<a href="http://www.ietf.org/rfc/rfc3987.txt">
-<cite>
-Internationalized
-Resource
-Identifiers
-(IRIs).
-</cite>
-</a>
-January
-2005.
-Internet
-RFC
-3987.
-URL:
-<a href="http://www.ietf.org/rfc/rfc3987.txt">
-http://www.ietf.org/rfc/rfc3987.txt
-</a>
-</dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford.
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-<cite>
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</cite>
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-<dt id="bib-WEBIDL">
-<ins class="diff-new">[WEBIDL]
-</ins></dt><dd><ins class="diff-new">
-Cameron
-McCormack.
-</ins><a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite><ins class="diff-new">
-Web
-IDL.
-</ins></cite></a><ins class="diff-new">
-19
-December
-2008.
-W3C
-Working
-Draft.
-(Work
-in
-progress.)
-URL:
-</ins><a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><ins class="diff-new">
-http://www.w3.org/TR/2008/WD-WebIDL-20081219
-</ins></a></dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">C.2
-</del>
-<ins class="diff-chg">B.2
-</ins>
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-ECMA-262">
-<ins class="diff-new">[ECMA-262]
-</ins></dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite><ins class="diff-new">
-ECMAScript
-Language
-Specification,
-Third
-Edition.
-</ins></cite></a><ins class="diff-new">
-December
-1999.
-URL:
-</ins><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><ins class="diff-new">
-http://www.ecma-international.org/publications/standards/Ecma-262.htm
-</ins></a></dd>
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-31
-March
-2011.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-http://www.w3.org/TR/2011/WD-rdfa-core-20110331
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20110803/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2594 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  1px dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-03-august-2011">Unofficial Draft 03 August 2011</h2><dl><dt>Editors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
-<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
-</dl><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and 
-messaging format. In an attempt to harmonize the representation of Linked Data 
-in JSON, this specification outlines a common JSON representation format for 
-expressing directed graphs; mixing both Linked Data and non-Linked Data in 
-a single document. 
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design" class="tocxref"><span class="secno">2. </span>Design</a><ul class="toc"><li class="tocline"><a href="#goals-and-rationale" class="tocxref"><span class="secno">2.1 </span>Goals and Rationale</a></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">2.2 </span>Linked Data</a></li><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">2.3 </span>Linking Data</a></li><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">2.4 </span>The Context</a><ul class="toc"><li class="tocline"><a href="#inside-a-context" class="tocxref"><span class="secno">2.4.1 </span>Inside a Context</a></li></ul></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">2.5 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno">3.4 </span>Strings</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">3.6 </span>Datatypes</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">3.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.9 </span>Compaction</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.10 </span>Expansion</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">4.1 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.2 </span>Type Coercion</a></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">4.3 </span>Chaining</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.4 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#overriding-keywords" class="tocxref"><span class="secno">4.5 </span>Overriding Keywords</a></li><li class="tocline"><a href="#normalization" class="tocxref"><span class="secno">4.6 </span>Normalization</a></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">5. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#compaction-1" class="tocxref"><span class="secno">5.1 </span>Compaction</a></li><li class="tocline"><a href="#expansion-1" class="tocxref"><span class="secno">5.2 </span>Expansion</a></li><li class="tocline"><a href="#framing-1" class="tocxref"><span class="secno">5.3 </span>Framing</a></li><li class="tocline"><a href="#normalization-1" class="tocxref"><span class="secno">5.4 </span>Normalization</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">5.5 </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">5.5.1 </span>Overview</a></li><li class="tocline"><a href="#processing-algorithm-terms" class="tocxref"><span class="secno">5.5.2 </span>Processing Algorithm Terms</a></li><li class="tocline"><a href="#processing-tokens-and-keywords" class="tocxref"><span class="secno">5.5.3 </span>Processing Tokens and Keywords</a></li><li class="tocline"><a href="#context-1" class="tocxref"><span class="secno">5.5.4 </span>Context</a></li><li class="tocline"><a href="#iri-processing" class="tocxref"><span class="secno">5.5.5 </span>IRI Processing</a></li><li class="tocline"><a href="#sequence" class="tocxref"><span class="secno">5.5.6 </span>Sequence</a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno">6. </span>Experimental Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">6.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">6.2 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">6.2.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">6.2.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">6.2.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">A. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">A.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">A.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">A.3 </span>Microdata</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">A.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A.5 </span>Acknowledgements</a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-<p>
-JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing 
-data on the Web. Linked Data is a technique for describing content across 
-different 
-documents or Web sites. Web resources are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s, 
-and typically are dereferencable entities that may be used to find more 
-information, creating a "Web of Knowledge". JSON-LD is intended to be a simple 
-publishing method for expressing not only Linked Data in JSON, but for adding
-semantics to existing JSON.
-</p>
-
-<p>
-JSON-LD is designed as a light-weight syntax that can be used to express 
-Linked Data. It is primarily intended to be a way to express Linked Data 
-in Javascript and other Web-based programming environments. It is also 
-useful when building interoperable Web Services and when storing Linked 
-Data in JSON-based document storage engines. It is practical and designed 
-to be as simple as possible, utilizing the large number of JSON parsers 
-and existing code that is in use today. It is designed to be able to 
-express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats 
-[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports 
-every major Web-based structured data model in use today. 
-</p>
-
-<p>
-The syntax does not require many applications to change their JSON, but 
-easily add meaning by adding context in a way that is either in-band or 
-out-of-band. The syntax is designed to not disturb already deployed systems 
-running on JSON, but provide a smooth migration path from JSON to JSON with 
-added semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a very small memory footprint in order to operate.
-</p>
-
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and 
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to implement processors and APIs for 
-  JSON-LD.</li>
-</ul>
-
-<p>
-To understand the basics in this specification you must first be familiar with 
-JSON, which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. To understand the API and how it is
-intended to operate  in a programming environment, it is useful to have working 
-knowledge of the JavaScript programming language [<cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and 
-WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be 
-familiar with the basic RDF concepts [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>Technical discussion typically occurs on the public mailing list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
-</li>
-
-<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held 
-on Tuesdays at 1500UTC on the second and fourth week of each month.
-</li>
-
-<li>Specification bugs and issues should be reported in the 
-<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
-
-<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the 
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design</h2>
-
-<p>The following section outlines the design goals and rationale behind the 
-JSON-LD markup language.
-</p>
-
-<div id="goals-and-rationale" class="section">
-<h3><span class="secno">2.1 </span>Goals and Rationale</h3>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers need only know JSON and three keywords to use the basic 
- functionality in JSON-LD. No extra processors or software libraries are
- necessary to use JSON-LD in its most basic form. The language attempts to
- ensure that developers have an easy learning curve.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
- all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
- <dt>Expressiveness</dt>
- <dd>The syntax must be able to express directed graphs, which have been proven
- to be able to simply express almost every real world data model.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable, requiring as
- little as possible from the developer.</dd>
- <dt>Pragmatism</dt>
- <dd>Mixing the expression of pure Linked Data with data that is not
- linked was an approach that was driven by pragmatism. JSON-LD attempts to be
- more practical than theoretical in its approach to Linked Data.</dd>
- <dt>Zero Edits, most of the time</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers. At times, mapping JSON to 
- a graph representation can become difficult. In these instances, rather than 
- having JSON-LD support esoteric markup, we chose not to support the use case 
- and support a simplified syntax instead. So, while Zero Edits was a goal,
- it was not always possible without adding great complexity to the language.
- </dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="linked-data" class="section">
-<h3><span class="secno">2.2 </span>Linked Data</h3>
-<p>
-The following definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> is the one that will 
-be used for this specification.
-</p>
-<ol>
- <li><dfn title="Linked_Data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a 
-   representation of a linked data graph.</li>
- <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is a labeled directed graph, where nodes 
-   are <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are 
-   properties.</li>
- <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> 
-   with at least one outgoing edge.</li>
- <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> <em class="rfc2119" title="should">should</em> be labeled with a IRI.</li>
- <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>
-   .</li>
- <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <em class="rfc2119" title="must">must</em> be labeled with an IRI.</li>
- <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with 
-   at least one incoming edge.</li>
- <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an IRI.</li>
- <li>An IRI that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be 
-   dereferencable to a <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> document describing the 
-   labeled <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>
-   .</li>
- <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not 
- an IRI</li>
-</ol>
-
-<p>
-Note that the definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> above is silent on the 
-topic of unlabeled nodes. Unlabeled nodes are not considered 
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
-of unlabled nodes, as most graph-based data sets on the Web contain a number 
-of associated nodes that are not named and thus are not directly 
-de-referenceable.
-</p>
-</div>
-
-<div id="linking-data" class="section">
-<h3><span class="secno">2.3 </span>Linking Data</h3>
-
-<p>
-An Internationalized Resource Identifier 
-(<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
-as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique 
-identifiers on the web. In <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, an IRI is commonly 
-used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an 
-<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
-</p>
-
-<p>JSON-LD defines a mechanism to map JSON values to IRIs. This does not mean 
-that JSON-LD requires every key or value to be an IRI, but rather ensures that
-keys and values can be mapped to IRIs if the developer so desires to transform
-their data into Linked Data. There are a few techniques that can ensure 
-that developers will generate good Linked Data for the Web. JSON-LD 
-formalizes those techniques.
-</p>
-
-<p>We will be using the following JSON markup as the example for the
-rest of this section:
-</p>
-
-<pre class="example">
-{
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-</div>
-
-<div id="the-context" class="section">
-<h3><span class="secno">2.4 </span>The Context</h3>
-
-<p>In JSON-LD, a context is used to allow developers to map <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s 
-to <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that <em class="rfc2119" title="may">may</em> be expanded
-to an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The semantic web, just like the document-based 
-web, uses IRIs for unambiguous identification. The idea is that these 
-<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s mean something that may be of use to other developers.
-For example, the term <code>name</code> may map directly to the IRI 
-<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to 
-be constructed using the common JSON practice of simple name/value pairs while
-ensuring that the data is useful outside of the database or page in which it
-resides.
-</p>
-
-<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a context and
-then used by adding a single line to the JSON markup above:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/"
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>The addition above transforms the previous JSON document into a JSON document
-with added semantics because the <code>@context</code> specifies how the
-<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong> 
-terms map to IRIs. 
-Mapping those keys to IRIs gives the data global context. If two 
-developers use the same IRI to describe a property, they are more than likely
-expressing the same concept. This allows both developers to re-use each others
-data without having to agree to how their data will inter-operate on a 
-site-by-site basis.</p>
-
-<p>
-The semantic web uses a special type of document called a 
-<em>Web Vocabulary</em> to define <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s. A context is a type of
-Web vocabulary.
-Typically, these Web Vocabulary documents have <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es associated
-with them and contain a number of <a class="tref internalDFN" title="term" href="#dfn-term">term</a> declarations. A
-<dfn title="prefix" id="dfn-prefix">prefix</dfn>, like a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, is a short word that expands
-to a Web Vocabulary IRI. <a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are helpful when a developer
-wants to mix multiple vocabularies together in a context, but does not want
-to go to the trouble of defining every single term in every single vocabulary.
-Some Web Vocabularies may have 10-20 terms defined. If a developer wants to use 
-3-4 different vocabularies, the number of terms that 
-would have to be declared in a single context would become quite large. To 
-reduce the number of different terms that must be defined, JSON-LD also allows 
-prefixes to be used to compact IRIs.
-</p><p>
-
-</p><p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code> 
-specifies a Web Vocabulary which may be represented using the
-<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>. The <code>foaf</code> Web Vocabulary
-contains a term called <strong>name</strong>. If you join the 
-<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> with the <strong>name</strong> suffix, 
-you can build a compact IRI that will expand out into an absolute IRI for the
-<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
-That is, the compact IRI, or short-form, is <code>foaf:name</code> and the 
-expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary 
-term is used to specify a person's name.
-</p>
-
-<p>Developers, and machines, are able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much like we can use WordNet today to 
-see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Developers and machines need the same sort of 
-dictionary of terms. IRIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>The context provides a collection of vocabulary <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and 
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es that can be used to expand JSON keys and values into
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s.</p>
-
-<div id="inside-a-context" class="section">
-<h4><span class="secno">2.4.1 </span>Inside a Context</h4>
-
-<p>In the previous section, the developer used the <code>@context</code>
-keyword to pull in an external context. That context document, if 
-de-referenced, would look something like this:</p>
-
-<pre class="example">
-{
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-}</pre>
-
-<p>A JSON-LD context document is a simple mapping from <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es to IRIs. Contexts may also contain datatype information
-for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
-the JSON-LD processor.
-</p>
-
-<p>Contexts may be specified in-line. This ensures that JSON-LD documents
-can be processed when a JSON-LD processor does not have access to the Web.</p>
-
-<p>
-JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. This means
-that developers can also specify a context for JSON data in an out-of-band
-fashion via the API. The API is described later in this document. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> also define a context that will be pre-loaded for all
-calls to the service. This allows services that have previously been publishing
-and receiving JSON data to accept JSON-LD data without requiring client 
-software to change.
-</p>
-
-</div>
-
-</div>
-
-<div id="from-json-to-json-ld" class="section">
-<h3><span class="secno">2.5 </span>From JSON to JSON-LD</h3>
-
-<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>, 
-and <strong>avatar</strong>,
-are defined in a context, and that context is used to resolve the
-names in JSON objects, machines are able to automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Doing this allows JSON to be unambiguously machine-readable without
-requiring developers that use JSON to drastically change their workflow.</p>
-</div>
-
-</div>
-
-
-
-<div id="basic-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Basic Concepts</h2>
-
-<p>JSON-LD is designed to ensure that Linked Data concepts can be marked 
-up in a way that is simple to understand and author by Web developers. In many
-cases, regular JSON markup can become Linked Data with the simple addition
-of a context. As more JSON-LD features are used, more semantics are added
-to the JSON markup.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">3.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most 
-<a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a> are named. IRIs can be 
-expressed in a variety of different ways in JSON-LD.</p>
-
-<ol>
-  <li>In general, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in the key position in 
-    an associative array that have a mapping to an IRI in the context are
-    expanded to an IRI by JSON-LD processors. There are special rules for 
-    processing keys in <code>@context</code> and when dealing with keys that 
-    start with the <code>@</code> character.</li>
-  <li>An IRI is generated for the value specified using <code>@subject</code>, 
-    if it is a string.</li>
-  <li>An IRI is generated for the value specified using <code>@type</code>.</li>
-  <li>An IRI is generated for the value specified using the <code>@iri</code> 
-    keyword.</li>
-  <li>An IRI is generated when there are <code>@coerce</code> rules in 
-    effect for a key named <code>@iri</code>.</li>
-</ol>
-
-<p>IRIs can be expressed directly in the key position like so:
-</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p>In the example above, the key 
-<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
-opposed to being interpreted as a string..</p>
-
-<p>Term expansion occurs for IRIs if a term is defined within the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are expanded when used in keys:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
-...
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><code>foaf:name</code> above will automatically expand out to the IRI
-<code>http://xmlns.com/foaf/0.1/name</code>.</p>
-
-<p>An IRI is generated when a value is associated with a key using 
-the <code>@iri</code> keyword:</p>
-
-<pre class="example">
-{
-...
-  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}</pre>
-
-<p>If type coercion rules are specified in the <code>@context</code> for
-a particular vocabulary term, an IRI is generated:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  { 
-    "@coerce": 
-    {
-      "@iri": "foaf:homepage"
-    }
-  }</span>
-...
-  "foaf:homepage": "http://manu.sporny.org/",
-...
-}</pre>
-
-<p>Even though the value <code>http://manu.sporny.org/</code> is a string,
-the type coercion rules will transform the value into an IRI when processed
-by a JSON-LD Processor</p>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">3.2 </span>Identifying the Subject</h3>
-
-<p>A subject is declared using the <code>@subject</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, property, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to the IRI 
-<code>http://example.org/people#joebob</code>.
-</p>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">3.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the 
-<code>@type</code> key. Specifying the type in this way will generate a 
-triple of the form (subject, type, type-url).</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple if the JSON-LD 
-document is mapped to RDF (in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-</div>
-
-<div id="strings" class="section">
-<h3><span class="secno">3.4 </span>Strings</h3>
-
-<p>Regular text strings, also refered to as <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn>s, are 
-easily expressed using regular JSON strings.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="string-internationalization" class="section">
-<h3><span class="secno">3.5 </span>String Internationalization</h3>
-
-<p>JSON-LD makes an assumption that strings with associated language encoding 
-information are not very common when used in JavaScript and Web Services. 
-Thus, it takes a little more effort to express strings with associated 
-language information.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}</pre>
-
-<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for 
-<em>花澄</em> and associate the <code>ja</code> language code with the triple 
-that is generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="datatypes" class="section">
-<h3><span class="secno">3.6 </span>Datatypes</h3>
-
-<p>
-  A value with an associated datatype, also known as a 
-  <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn>, is indicated by associating a literal with
-  an IRI which indicates the typed literal's datatype. Typed literals may be 
-  expressed in JSON-LD in three ways:
-</p>
-
-<ol>
-  <li>By utilizing the <code>@coerce</code> keyword.</li>
-  <li>By utilizing the expanded form for specifying objects.</li>
-  <li>By using a native JSON datatype.</li>
-</ol>
-
-<p>The first example uses the <code>@coerce</code> keyword to express a
-typed literal:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  { 
-    "xsd": "http://www.w3.org/2001/XMLSchema#"
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }</span>
-...
-  "dc:modified": "2010-05-29T14:17:39+02:00",
-...
-}</pre>
-
-<p>The second example uses the expanded form for specifying objects:</p>
-
-<pre class="example">
-{
-...
-  "dc:modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }</span>
-...
-}</pre>
-
-<p>Both examples above would generate an object with the literal value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-<p>The third example uses a built-in native JSON type, a number, to 
-express a datatype:</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:age": <span class="diff">31</span>
-...
-}</pre>
-d
-<p>The example above would generate the following triple:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/age&gt; 
-      "31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .</pre>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">3.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-arrays. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an array.</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "jaybee" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
-form for objects:</p>
-
-<pre class="example">
-{
-...
-  "@": "http://example.org/articles/8",
-  "dcterms:modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]</span>
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="compaction" class="section">
-<h3><span class="secno">3.9 </span>Compaction</h3>
-
-<p>Compaction is the process of taking a JSON-LD document and applying a 
-context such that the most compact form of the document is generated. JSON
-is typically expressed in a very compact, key-value format. That is, full
-IRIs are rarely used as keys. At times, a JSON-LD document may be received
-that is not in its most compact form. JSON-LD, via the API, provides a way
-to compact a JSON-LD document.
-</p>
-
-<p>For example, assume the following JSON-LD input document:</p>
-
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}</pre>
-
-<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
-
-<pre class="example">
-{
-   "name": "http://xmlns.com/foaf/0.1/name",
-   "homepage": "http://xmlns.com/foaf/0.1/homepage",
-   "@coerce": 
-   {
-      "@iri": ["homepage"]
-   }
-}</pre>
-
-<p>Running the JSON-LD Compaction algorithm given the context supplied above 
-against the JSON-LD input document provided above would result in the following
-output:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}</pre>
-
-<p>The compaction algorithm also enables the developer to map any expanded
-format into an application-specific compacted format. While the context 
-provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
-<strong>name</strong>, it could have also mapped it to any arbitrary string
-provided by the developer.
-</p>
-
-</div>
-
-<div id="expansion" class="section">
-<h3><span class="secno">3.10 </span>Expansion</h3>
-
-<p>Expansion is the process of taking a JSON-LD document and applying a 
-context such that all IRI, datatypes, and literal values are expanded so
-that the context is no longer necessary. JSON-LD document expansion 
-is typically used when re-mapping JSON-LD documents to application-specific
-JSON documents or as a part of the <a href="#normalization">Normalization</a>
-process.</p>
-
-<p>For example, assume the following JSON-LD input document:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}</pre>
-
-<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document 
-provided above would result in the following output:</p>
-
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}</pre>
-
-</div>
-
-<div id="framing" class="section">
-<h3><span class="secno">3.11 </span>Framing</h3>
-
-<p>A JSON-LD document is a representation of a directed graph. A single
-directed graph can have many different serializations, each expressing
-exactly the same information. Developers typically work with trees, also
-called associative arrays, when dealing with JSON. While mapping a graph to 
-a tree can be done, the layout of the end result must be specified in advance. 
-A <dfn title="Frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to 
-specify a deterministic layout for a graph.
-</p>
-
-<p>Framing is the process of taking a JSON-LD document, which expresses a
-graph of information, and applying a specific graph layout 
-(called a <a class="tref internalDFN" title="Frame" href="#dfn-frame">Frame</a>).
-</p>
-
-<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
-
-<pre class="example">
-{
-   "@subject": 
-   [{
-      "@subject": "http://example.org/library",
-      "@type": "ex:Library",
-      "ex:contains": "http://example.org/library/the-republic"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": "http://example.org/library/the-republic#introduction"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": "ex:Chapter",
-      "dc:description": "An introductory chapter on The Republic.",
-      "dc:title": "The Introduction"
-   }],
-   "@context": 
-   {
-      "@coerce": 
-      {
-         "@iri": "ex:contains"
-      },
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   }
-}</pre>
-
-<p>Developers typically like to operate on items in a hierarchical, tree-based
-fashion. Ideally, a developer would want the data above sorted into top-level
-libraries, then the books that are contained in each library, and then the
-chapters contained in each book. To achieve that layout, the developer can
-define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
-
-<pre class="example">
-{
-   "@context": {
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   },
-   "@type": "ex:Library",
-   "ex:contains": {
-      "@type": "ex:Book",
-      "ex:contains": {
-         "@type": "ex:Chapter"
-      }
-   }
-}</pre>
-
-<p>When the framing algorithm is run against the previously defined 
-JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
-JSON-LD document is the end result:</p>
-
-<pre class="example">
-{
-   "@context": 
-   {
-      "ex": "http://example.org/vocab#",
-      "dc": "http://purl.org/dc/elements/1.1/"
-   }
-   "@subject": "http://example.org/library",
-   "@type": "ex:Library",
-   "ex:contains": 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": 
-      {
-         "@subject": "http://example.org/library/the-republic#introduction",
-         "@type": "ex:Chapter",
-         "dc:description": "An introductory chapter on The Republic.",
-         "dc:title": "The Introduction"
-      },
-   },
-}</pre>
-
-<p>The JSON-LD framing algorithm allows developers to query by example and
-force a specific tree layout to a JSON-LD document.
-</p>
-
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>Advanced Concepts</h2>
-
-<p>JSON-LD has a number of features that provide functionality above and beyond
-the core functionality described above. The following sections outline the
-features that are specific to JSON-LD.
-</p>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">4.1 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as doubles, 
-integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
-information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
-
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-<p class="note">When dealing with a number of modern programming languages,
-including JavaScript ECMA-262, there is no distinction between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
-the number <code>5.3</code> and the number 
-<code>5.3e0</code> are treated as if they were the same. When converting from 
-JSON-LD to a language-native format and back, datatype information is lost in a 
-number of these languages. Thus, one could say that <code>5.3</code> is a 
-<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
-<strong>xsd:double</strong> in JSON-LD, but when both values are 
-converted to a language-native format the datatype difference between the two 
-is lost because the machine-level representation will almost always be a 
-<strong>double</strong>. 
-Implementers should be aware of this potential round-tripping issue between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
-objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
-to a language native type.
-</p>
-
-</div>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">4.2 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of values to particular data types. 
-Type coercion allows someone deploying JSON-LD to coerce the incoming or 
-outgoing types to the proper data type based on a mapping of data type IRIs to 
-property types. Using type coercion, one may convert simple JSON data to 
-properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to 
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-        "@iri": "homepage",
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="chaining" class="section">
-  <h3><span class="secno">4.3 </span>Chaining</h3>
-  <p>
-    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to 
-    use the definition of JSON-LD objects as <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This 
-    is a commonly used mechanism for creating a parent-child relationship 
-    between two <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s.
-  </p>
-  <p>The example shows an two subjects related by a property from the first 
-  subject:</p>
-
-  <pre class="example">
-{
-...
-  "foaf:name": "Manu Sporny",
-  "<span class="diff">foaf:knows</span>": {
-    "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}</pre>
-  
-  <p>
-    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a 
-    JSON value at any point in JSON-LD.
-  </p>
-</div>
-
-<div id="identifying-unlabeled-nodes" class="section">
-<h3><span class="secno">4.4 </span>Identifying Unlabeled Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this type of node is called
-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) CURIE 
-prefix.</p>
-
-<pre class="example">
-{
-...
-  "@subject": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-unlabeled node. This practice, however, is usually frowned upon when
-generating Linked Data. If a developer finds that they refer to the unlabeled
-node more than once, they should consider naming the node using a resolve-able
-IRI.
-</p>
-
-</div>
-
-<div id="overriding-keywords" class="section">
-<h3><span class="secno">4.5 </span>Overriding Keywords</h3>
-
-<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
-to be overridden. This feature allows more legacy JSON content to be supported 
-by JSON-LD. It also allows developers to design domain-specific implementations 
-using only the JSON-LD context.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {  
-     <span class="diff">"url": "@subject"</span>,
-     <span class="diff">"a": "@type"</span>,
-     "name": "http://schema.org/name"
-  },
-  "url": "http://example.com/about#gregg",
-  "a": "http://schema.org/Person",
-  "name": "Gregg Kellogg"
-}</pre>
-
-<p>In the example above, the <code>@subject</code> and <code>@type</code> 
-keywords have been overridden by <strong>url</strong> and 
-<strong>a</strong>, respectively.
-</p>
-
-</div>
-
-<div id="normalization" class="section">
-<h3><span class="secno">4.6 </span>Normalization</h3>
-
-<p>Normalization is the process of taking a JSON-LD document and performing a 
-deterministic transformation on that document that results in a final document
-that any conforming JSON-LD processor would have generated given the same
-input document. The problem is a fairly difficult technical problem to solve
-because it requires a directed graph to be ordered into a set of nodes and
-edges in a deterministic way. This is easy to do when all of the nodes have
-unique names, but very difficult to do when some of the nodes are unlabeled.
-</p>
-
-<p>Normalization is useful when comparing two graphs against one another,
-when generating a detailed list of differences between two graphs, and
-when generating a cryptographic digital signature for information contained 
-in a graph or when generating a hash of the information contained in a graph.
-</p>
-
-<p>The example below is an un-normalized JSON-LD document:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-      "@coerce": 
-      {
-         "@iri": ["homepage"]
-      }
-   }
-}</pre>
-
-<p>The example below is the normalized form of the JSON-LD document above:</p>
-
-<p class="note">Whitespace is used below to aid readability. The normalization
-algorithm for JSON-LD remove all unnecessary whitespace in the fully 
-normalized form.</p>
-
-<pre class="example">
-[{
-    "@subject": 
-    {
-        "@iri": "_:c14n0"
-    },
-    "http://xmlns.com/foaf/0.1/homepage": 
-    {
-        "@iri": "http://manu.sporny.org/"
-    },
-    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
-}]</pre>
-
-<p>Notice how all of the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s have been expanded and sorted in
-alphabetical order. Also, notice how the <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> has been 
-labeled with a blank node identifier. Normalization ensures that any arbitrary
-graph containing exactly the same information would be normalized to exactly
-the same form shown above.</p>
-
-</div>
-
-</div>
-
-<div id="algorithms" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Algorithms</h2>
-
-<div id="compaction-1" class="section">
-<h3><span class="secno">5.1 </span>Compaction</h3>
-<p class="issue">TBD: Explain compaction algorithm.</p>
-</div>
-
-<div id="expansion-1" class="section">
-<h3><span class="secno">5.2 </span>Expansion</h3>
-<p class="issue">TBD: Explain expansion algorithm.</p>
-</div>
-
-<div id="framing-1" class="section">
-<h3><span class="secno">5.3 </span>Framing</h3>
-<p class="issue">TBD: Explain framing algorithm.</p>
-</div>
-
-<div id="normalization-1" class="section">
-<h3><span class="secno">5.4 </span>Normalization</h3>
-<p class="issue">TBD: Explain normalization algorithm.</p>
-</div>
-
-<div id="rdf-conversion" class="section">
-<h3><span class="secno">5.5 </span>RDF Conversion</h3>
-
-<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted to any other RDF-compatible document
-format using the algorithm specified in this section.</p>
-
-<p>
-  The JSON-LD Processing Model describes processing rules for extracting RDF
-  from a JSON-LD document. Note that many uses of JSON-LD may not require 
-  generation of RDF.
-</p>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD to RDF processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The RDF Conversion Algorithm is a work in progress.</p>
-
-<div class="informative section" id="overview">
-  <h4><span class="secno">5.5.1 </span>Overview</h4><p><em>This section is non-normative.</em></p>
-  <p>
-    JSON-LD is intended to have an easy to parse grammar that closely models existing
-    practice in using JSON for describing object representations. This allows the use
-    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
-    for stream-based parsing similar to SAX.
-  </p>
-  <p>
-    As with other grammars used for describing <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
-    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
-    externally named entities, <em>BNodes</em>, resources for which an external name does not
-    exist, or is not known, and Literals, which describe terminal entities such as strings,
-    dates and other representations having a lexical representation possibly including
-    an explicit language or datatype.
-  </p>
-  <p>
-    Data described with JSON-LD may be considered to be the representation of a graph made
-    up of <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> resources related via a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> resource.
-    However, specific implementations may choose to operate on the document as a normal
-    JSON description of objects having attributes.
-  </p>
-</div>
-
-<div id="processing-algorithm-terms" class="section">
-  <h4><span class="secno">5.5.2 </span>Processing Algorithm Terms</h4>
-  <dl>
-    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
-    <dd>
-      a context that is specified to the JSON-LD processing algorithm
-      before processing begins.
-    </dd>
-    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
-    <dd>
-      the destination graph for all triples generated by JSON-LD markup.
-    </dd>
-    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
-    <dd>
-      the currently active subject that the processor should use when
-      generating triples.
-    </dd>
-    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
-    <dd>
-      the currently active property that the processor should use when
-      generating triples.
-    </dd>
-    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
-    <dd>
-      the currently active object that the processor should use when
-      generating triples.
-    </dd>
-    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
-    <dd>
-      a context that is used to resolve CURIEs while the processing
-      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context contained within the
-      <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-    </dd>
-    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
-    <dd>
-      a context that is specified at the JSON associative-array level,
-      specified via the <code>@context</code> keyword.
-    </dd>
-    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
-    <dd>
-      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
-      context</a>, <a class="tref" title="current_subject">current subject</a>, and <a class="tref" title="current_property">current property</a>. The <a class="tref" title="processor__state">processor
-      state</a> is managed as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
-      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new associative array.
-    </dd>
-  </dl>
-</div>
-
-<div id="processing-tokens-and-keywords" class="section">
-  <h4><span class="secno">5.5.3 </span>Processing Tokens and Keywords</h4>
-  <dl>
-  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
-  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
-  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
-  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
-  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
-  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
-  <dt><code>:</code></dt><dd>The separator for CURIEs when used in JSON keys or JSON values.</dd>
-  <dt><code>@subject</code></dt><dd>Sets the active subjects.</dd>
-  <dt><code>@type</code></dt><dd>Used to set the rdf:type of the active subjects. This token may be conferred as syntactic sugar for rdf:type.</dd>
-  </dl>
-</div>
-
-<div id="context-1" class="section">
-  <h4 id="context"><span class="secno">5.5.4 </span>Context</h4>
-  <p>
-    Processing of JSON-LD is managed recursively using a process described in <a href="sequence">Sequence</a>.
-    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
-    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
-    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-  </p>
-  <p class="issue">Should the document URL be used as the default for <code>@base</code> in the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>?</p>
-  <p>
-    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of an associative array (or elements
-    of a list (see <span a="#list-processing">List Processing</span>)).
-  </p>
-  <p>
-    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within an associative array having a key of <code>@context</code> with an associative
-    array value. When processing a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, special rules apply:
-  </p>
-  <ul>
-    <li>The key <code>@base</code> <em class="rfc2119" title="must">must</em> have a value of a simple string with the lexical
-    form of IRI and is saved in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to perform term mapping as described in <a href="#iri-processing">IRI Processing</a>.</li>
-    <li>The key <code>@vocab</code> <em class="rfc2119" title="must">must</em> have a value of a simple string with the lexical
-    form of IRI and is saved in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to perform term mapping as described in <a href="#iri-processing">IRI Processing</a>.</li>
-    <li>The key <code>@coerce</code> <em class="rfc2119" title="must">must</em> have a value of an associative array. Processing
-      of the associative array is described <a href="#coerce">below</a></li>
-    <li>Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of
-      <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite>
-      and <em class="rfc2119" title="must">must</em> have the value of a simple string with the lexical form of IRI.
-      Merge each key-value pair into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
-      any duplicate values.
-    </li>
-  </ul>
-  <div class="section">
-    <h5 id="coerce">Coerce</h5>
-    <p>
-      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
-      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
-      <code>@coerce</code> mapping, overwriting any duplicate values in 
-      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
-      The <code>@coerce</code> mapping has either a single CURIE or an
-      array of CURIEs. When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-      map all CURIE values to array form and replace with the union of the value from
-      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an array
-      with a single CURIE, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
-    </p>
-  </div>
-</div>
-
-<div id="iri-processing" class="section">
-  <h4><span class="secno">5.5.5 </span>IRI Processing</h4>
-  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
-    transforming a value representing an IRI into an actual IRI.</p>
-  <p>IRIs may be represented as an explicit string, or as a CURIE, as a value relative to <code>@base</code>
-    or <code>@vocab</code>.</p>
-  <p>
-    CURIEs are defined more formally in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">section 6 "CURIE Syntax Definition"</a></cite>.
-    Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em> separated by a ':'. In
-    JSON-LD, either the prefix may be the empty string, denoting the <dfn title="default_prefix" id="dfn-default_prefix">default prefix</dfn>.
-  </p>
-  <p>The procedure for generating an IRI is:
-    </p><ol class="algorithm">
-      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
-      <li>If the prefix is a '_', generate a named BNode using the suffix as the name.</li>
-      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
-        by prepending the mapped prefix to the (possibly empty) suffix. Note that an empty
-        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
-      <li>If the IRI being processed is for a property (i.e., a key value in an associative array, or a
-        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
-        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>].</li>
-      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
-        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>].</li>
-      <li>Otherwise, use the value directly as an IRI.</li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="sequence" class="section">
-  <h4><span class="secno">5.5.6 </span>Sequence</h4>
-
-  <p>
-    The algorithm below is designed for in-memory implementations with random access to associative
-    array elements.
-  </p>
-  <p>
-    A conforming JSON-LD processor <em class="rfc2119" title="must">must</em> implement a
-    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
-    algorithm generates:
-  </p>
-
-  <ol class="algorithm">
-    <li id="processing-step-default-context">
-      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
-      <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      initialized to NULL.
-    </li>
-
-    <li id="processing-step-associative">
-      If an associative array is detected, perform the following steps:
-      <ol class="algorithm">
-        <li>
-          If the associative array has a <code>@context</code> key, process the local context as
-          described in <a href="#context">Context</a>.
-        </li>
-        <li>
-          If the associative array has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
-          performing <a href="#iri-processing">IRI Processing</a> on the associated value. Generate a
-          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-        <li>
-          If the associative array has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-          to a literal value as follows:
-          <ul>
-            <li>
-              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the associative array contains a <code>@datatype</code> key
-              after performing <a href="#iri-processing">IRI Processing</a> on the specified<code>@datatype</code>.
-            </li>
-            <li>
-              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the associative array contains
-              a <code>@language</code> key, use it's value to set the language of the plain literal.
-            </li>
-          </ul>
-          Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref" title="active__property">active
-          property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-        <li>If the associative array has a <code>@</code> key:
-          <ol class="algorithm">
-            <li>
-              If the value is a string, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
-              <a href="#iri-processing">IRI Processing</a>. Generate a
-              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
-            </li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
-              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          If the associative array does not have a <code>@</code> key, set the <a class="tref" title="active__object">active
-          object</a> to newly generated <a class="tref" title="blank_node_identifier">blank node identifier</a>. Generate a triple
-          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
-          object</a>.
-        </li>
-        <li>
-          For each key in the associative array that has not already been processed, perform
-          the following steps:
-          <ol class="algorithm">
-            <li>If the key is <code>a</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-            to <code>rdf:type</code>.
-            </li>
-            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
-            <a href="#iri-processing">IRI Processing</a> on the key.</li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
-              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-      </ol>
-    </li>
-
-    <li>
-      If a regular array is detected, process each value in the array by doing the following
-      returning the result of processing the last value in the array:
-
-      <ol class="algorithm">
-        <li>
-          If the value is a regular array, generate an RDF List by linking
-          each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
-          using the following sequence:
-          <ol>
-            <li>
-              If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-              and <code>rdf:nil</code>.
-            </li>
-            <li>
-              Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-              and a newly generated BNode identified as <em>first bnode</em>.
-            </li>
-            <li>
-              For each element other than the last element in the list:
-              <ol>
-                <li>Create a processor state using the active context, <em>first bnode</em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
-                <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest bnode</em>, otherwise use <code>rdf:nil</code>.</li>
-                <li>Generate a new triple using <em>first bnode</em>, <code>rdf:rest</code> and <em>rest bnode</em>.</li>
-                <li>Set <em>first bnode</em> to <em>rest bnode</em>.</li>
-              </ol>
-            </li>
-          </ol>
-        </li>
-        <li>
-          Otherwise, create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-          <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-          starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
-          previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-        </li>
-      </ol>
-    </li>
-    
-    <li>
-      If a string is detected, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-      and a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from the string.
-    </li>
-    
-    <li>
-      If a number is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
-      the value with datatype set to either <code>xsd:integer</code> or
-      <code>xsd:double</code>, depending on if the value contains a
-      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
-      subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and the generated typed literal.
-    </li>
-    
-    <li>
-      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
-      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
-      value with datatype set to <code>xsd:boolean</code>.
-    </li>
-  </ol>
-</div>
-
-
-<!--  THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT 
-
-<section>
-<h1>Best Practices</h1>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be 
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<section>
-<h2>JavaScript</h2>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in 
-JavaScript environments, however, features like the expanded form for
-object values mean that using JSON-LD directly in JavaScript may be 
-annoying without a middleware layer such as a simple library that 
-converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDF API, which enables a variety of RDF-based
-Web Applications, but some don't want to require that level of functionality 
-just to use JSON-LD. The group is still discussing the best way to proceed, 
-so input on how JSON-LD could more easily be utilized in JavaScript 
-environments would be very much appreciated.
-</p>
-</section>
-
-<section>
-<h2>Schema-less Databases</h2>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from 
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-
-<p class="issue">MongoDB does not allow the '.' character to be used in
-key names. This prevents developers from storing IRIs as keys, which also
-prevents storage of the data in normalized form. While this issue can
-be avoided by using CURIEs for key values, it is not known if this
-mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
-is useful to developers.
-</p>
-
- -->
-
-</div>
-
-</div>
-
-<div id="experimental-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>Experimental Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear 
-whether or not the JSON-LD specification is going to support the complexity 
-necessary to support each concept. The entire section on Advanced Concepts 
-should be considered as discussion points; it is merely a list of 
-possibilities where all of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">6.1 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an array to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single JSON-LD associative
-array.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "@": 
-  [
-    {
-      "@": "http://example.org/people#john",
-      "a": "foaf:Person"
-    },
-    {
-      "@": "http://example.org/people#jane",
-      "a": "foaf:Person"
-    }
-  ]
-}</pre>
-
-<p>A disjoint graph could also be expressed like so:</p>
-
-<pre class="example">
-[
-  {
-    "@": "http://example.org/people#john",
-    "a": "foaf:Person"
-  },
-  {
-    "@": "http://example.org/people#jane",
-    "a": "foaf:Person"
-  }
-]</pre>
-
-</div>
-
-<div id="the-json-ld-api" class="section">
-<h3><span class="secno">6.2 </span>The JSON-LD API</h3>
-
-<p>This API provides a clean mechanism that enables developers to convert 
-JSON-LD data into a format that is easier to work with in various programming
-languages.
-</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDProcessor</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
-};</span>
-</pre><div id="methods" class="section"><h4><span class="secno">6.2.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback"><code>toGraph</code></dt><dd>Parses JSON-LD and transforms the data into an Graph, which is 
-  compatible with the RDF Interfaces API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">RDF-INTERFACES</a></cite>]. 
-  This method will 
-  return <code>null</code> if there are any errors, or if the RDF Interfaces 
-  API is not available for use.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>Graph</a></code></div></dd><dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback"><code>toProjection</code></dt><dd>Parses JSON-LD text into an RDF API Projection object as specified
-    by the RDF API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-API">RDF-API</a></cite>].
-    If there are any errors, <code>null</code> is returned.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the Projection.</td></tr><tr><td class="prmName">template</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The Projection template to use when building the Projection.</td></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject to use when building the Projection.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
-
-<p>The JSONLDParserCallback is called whenever a processing error occurs on
-input data.</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre><div id="methods-1" class="section"><h4><span class="secno">6.2.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
-
-<p>The following example demonstrates how to convert JSON-LD to a projection
-that is directly usable in a programming environment:
-</p>
-
-<pre class="example">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-
-// Map the JSON-LD to a language-native object
-var person = jsonld.toProjection(jsonldString, myTemplate);
-
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-      "Their homepage is: " + person.homepage);</pre>
-
-<p>A JSON-LD Serializer is also available to map a language-native object
-to JSON-LD.
-
-</p><pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDSerializer</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
-};</span>
-</pre><div id="methods-2" class="section"><h4><span class="secno">6.2.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
-  Normalization is important when performing things like equality comparison
-  and digital signature creation and verification.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An associative array of key-value pairs that should be converted
-     to a JSON-LD string. It is assumed that a map already exists for the
-     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
-
-<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
-
-<p class="issue">This algorithm is very rough, untested, and probably contains
-many bugs. Use at your own risk. It will change in the coming months.</p>
-
-<p>The JSON-LD normalization algorithm is as follows:</p>
-
-<ol class="algorithm">
-  <li>Remove the <code>@context</code> key and preserve it as the 
-  <dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
-  <li>For each key
-   <ol class="algorithm">
-    <li>If the key is a CURIE, expand the CURIE to an IRI using the
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-   </ol>
-  </li>
-  <li>For each value
-   <ol class="algorithm">
-    <li>If the value should be type coerced per the 
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
-        new value.</li>
-    <li>If the value is a CURIE, expand the CURIE to an IRI using the
-        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-    <li>If the value is a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> and the type is a CURIE,
-        expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
-    <li>When generating the final value, use expanded object value form to
-      store all IRIs, typed literals and <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s with language
-      information.</li>
-   </ol>
-  </li>
-  <li>Output each sorted key-value pair without any extraneous whitespace. If 
-  the value is an associative array, perform this algorithm, starting
-  at step #1, recursively on the sub-tree. There should be no nesting in
-  the outputted JSON data. That is, the top-most element should be an
-  array. Each item in the array contains a single subject with a 
-  corresponding array of properties in UTF-8 sort order. Any related 
-  objects that are complex objects themselves should be given a top-level 
-  object in the top-level array.</li>
-  
-</ol>
-
-<p class="issue">Note that normalizing named blank nodes is impossible at
-present since one would have to specify a blank node naming algorithm. For
-the time being, you cannot normalize graphs that contain named blank
-nodes. However, normalizing graphs that contain non-named blank nodes 
-is supported.</p>
-
-<pre class="example">
-var myObj = { "@context" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "age",
-                   "xsd:anyURI": "homepage"
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : "42",
-              "homepage" : "http://example.org/people/joe" };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);</pre>
-
-<p>After the code in the example above has executed, the 
-<strong>jsonldText</strong> value will be (line-breaks added for 
-readability):</p>
-
-<pre class="example">
-[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
-"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
-"http://xmlns.com/foaf/0.1/name":"Joe Jackson"}]</pre>
-
-<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
-ensure that the normalized value is a string. In order to generate the
-string from a <strong>double</strong> value, output equivalent to the
-<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
-<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
-is the value to be converted.</p>
-
-<p>To convert the a double value in JavaScript, implementers can use the 
-following snippet of code:</p>
-
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
-
-<p class="note">When data needs to be normalized, JSON-LD authors should
-not use values that are going to undergo automatic conversion. This is due
-to the lossy nature of <strong>xsd:double</strong> values.</p>
-
-<p class="issue">Round-tripping data can be problematic if we mix and
-match @coerce rules with JSON-native datatypes, like integers. Consider the 
-following code example:</p>
-
-<pre class="example">
-var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-
-// Convert the normalized object back to a JavaScript object
-var myObj2 = jsonld.parse(jsonldText);</pre>
-
-<p class="issue">At this point, myObj2 and myObj will have different
-values for the "number" value. myObj will be the number 42, while
-myObj2 will be the string "42". This type of data round-tripping
-error can bite developers. We are currently wondering if having a
-"coerce validation" phase in the parsing/normalization phases would be a 
-good idea. It would prevent data round-tripping issues like the
-one mentioned above.</p>
-
-</div>
-
-</div>
-
-
-
-<div class="appendix section" id="markup-examples">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">A.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-[
- {
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/bob/",
-   "foaf:name": "Bob"
- },
- {
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/eve/",
-   "foaf:name": "Eve"
- },
- {
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/manu/",
-   "foaf:name": "Manu"
- }
-]</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">A.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">A.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]</pre>
-</div>
-
-<div class="appendix section" id="mashing-up-vocabularies">
-<h3><span class="secno">A.4 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>RDF - for describing information about objects on the semantic web.</li>
-   <li>RDFS - for expressing things like labels and comments.</li>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>You can use these vocabularies in combination, like so:</p>
-
-<pre class="example">
-{
-  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword, 
-like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}</pre>
-
-<p>The <code>@context</code> keyword is used to change how the JSON-LD
-processor evaluates key-value pairs. In this case, it was used to
-map one string ('myvocab') to another string, which is interpreted as
-a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced 
-with "<code>http://example.org/myvocab#</code>" when it
-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 for RDF, called a CURIE, and provides
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div class="appendix section" id="acknowledgements">
-<h3><span class="secno">A.5 </span>Acknowledgements</h3>
-
-<p>The editors would like to thank Mark Birbeck, who provided a great deal of 
-the initial push behind the JSON-LD work via his work on RDFj, 
-Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and 
-performed several implementations of the specification, and Ian Davis, who 
-created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
-Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
-Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard 
-Cyganiak for their input on the specification.</p>
-</div>
-
-
-
-
-</div><div id="respec-err" style="position: fixed; width: 350px; top: 10px; right: 10px; border: 3px double #f00; background: #fff" class="removeOnSave"><ul><li style="color: #c00">There appears to have been a problem fetching the style sheet; status=0</li></ul></div><div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-API">[RDF-API]</dt><dd>Manu Sporny, Benjamin Adrian, Nathan Rixham; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><cite>RDF API</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">http://www.w3.org/2010/02/rdfa/sources/rdf-api/</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RDF-INTERFACES">[RDF-INTERFACES]</dt><dd>Nathan Rixham, Manu Sporny, Benjamin Adrian; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><cite>RDF Interfaces</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/</a>
-</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a> 
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification, Third Edition.</cite></a> December 1999. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 
-</dd><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
-</dd></dl></div></div></body></html>
\ No newline at end of file
--- a/spec/ED/20110803/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20110808/diff-20110615.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20618 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-ol.algorithm.update { margin-left: 2em; }
-ol.algorithm.update>li { list-style-type: none; }
-ol.algorithm.update>li>span.list-number {
-  display:block;
-  float: left; 
-  margin-left: -3.5em;
-}
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  1px dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-
-
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
-<del class="diff-old">-
-Linked
-Data
-Expression
-in
-JSON
-</del>
-<ins class="diff-chg">1.0
-</ins>
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-<del class="diff-old">Linked
-</del>
-<ins class="diff-chg">Linking
-</ins>
-Data
-</h2>
-<h2 id="unofficial-draft-08-august-2011">
-Unofficial
-Draft
-<del class="diff-old">15
-June
-</del>
-<ins class="diff-chg">08
-August
-</ins>
-2011
-</h2>
-<dl>
-<dt>
-Editors:
-</dt>
-<dd>
-<a href="http://manu.sporny.org/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-<del class="diff-old">Bazaar,
-Inc.
-</del>
-<ins class="diff-chg">Bazaar
-</ins>
-</a>
-</dd>
-<dd>
-<a href="http://greggkellogg.net/">
-Gregg
-Kellogg
-</a>,
-Kellogg
-Associates
-</dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<del class="diff-old">Mark
-Birbeck
-</del>
-<a href="http://digitalbazaar.com/">
-<ins class="diff-chg">Manu
-Sporny
-</ins>
-</a>,
-<del class="diff-old">Backplane
-Ltd.
-</del>
-<a href="http://digitalbazaar.com/">
-<ins class="diff-chg">Digital
-Bazaar
-</ins>
-</a>
-</dd>
-<dd>
-<a href="http://greggkellogg.net/">
-<ins class="diff-new">Gregg
-Kellogg
-</ins></a>,<ins class="diff-new">
-Kellogg
-Associates
-</ins></dd><dd>
-<a href="http://digitalbazaar.com/">
-<del class="diff-old">Manu
-Sporny
-</del>
-<ins class="diff-chg">Dave
-Longley
-</ins>
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-<del class="diff-old">Bazaar,
-Inc.
-</del>
-<ins class="diff-chg">Bazaar
-</ins></a></dd><dd><a href="http://webbackplane.com/"><ins class="diff-chg">
-Mark
-Birbeck
-</ins></a>,<a href="http://webbackplane.com/"><ins class="diff-chg">
-Backplane
-Ltd.
-</ins>
-</a>
-</dd>
-</dl>
-<p>
-This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-<a href="diff-20110615.html">
-diff
-to
-previous
-version
-</a>.
-</p>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-<del class="diff-old">Developers
-that
-embed
-structured
-data
-in
-their
-Web
-pages
-can
-choose
-among
-a
-number
-of
-languages
-such
-as
-RDFa
-[
-RDFA-CORE
-],
-Microformats
-</del>
-<ins class="diff-chg">JSON
-</ins>
-[
-<cite>
-<del class="diff-old">MICROFORMATS
-</del>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-<ins class="diff-chg">RFC4627
-</ins>
-</a>
-</cite>
-]
-<del class="diff-old">and
-Microdata
-[
-MICRODATA
-].
-Each
-of
-these
-structured
-data
-languages,
-while
-incompatible
-at
-the
-syntax
-level,
-can
-be
-easily
-mapped
-to
-RDF.
-JSON
-</del>
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-format.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-<ins class="diff-new">expressing
-directed
-graphs;
-mixing
-both
-</ins>
-Linked
-Data
-<del class="diff-old">that
-can
-be
-used
-to
-represent
-objects
-specified
-via
-RDFa,
-Microformats
-</del>
-and
-<del class="diff-old">Microdata.
-</del>
-<ins class="diff-chg">non-Linked
-Data
-in
-a
-single
-document.
-</ins>
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-Introduction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-1.2
-</span>
-Contributing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design" class="tocxref">
-<span class="secno">
-2.
-</span>
-Design
-<del class="diff-old">Goals
-and
-Rationale
-</del>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals-and-rationale" class="tocxref">
-<span class="secno">
-2.1
-</span>
-Goals
-<ins class="diff-new">and
-Rationale
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#linked-data" class="tocxref">
-<span class="secno">
-2.2
-</span>
-<del class="diff-old">Map
-Terms
-to
-IRIs
-</del>
-<ins class="diff-chg">Linked
-Data
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#linking-data" class="tocxref">
-<span class="secno">
-2.3
-</span>
-<del class="diff-old">The
-JSON-LD
-Context
-</del>
-<ins class="diff-chg">Linking
-Data
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#the-context" class="tocxref">
-<span class="secno">
-2.4
-</span>
-<del class="diff-old">Unambiguous
-Identifiers
-for
-JSON
-</del>
-<ins class="diff-chg">The
-Context
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#inside-a-context" class="tocxref">
-<span class="secno">
-<del class="diff-old">2.5
-</del>
-<ins class="diff-chg">2.4.1
-</ins>
-</span>
-<del class="diff-old">Mashing
-Up
-Vocabularies
-</del>
-<ins class="diff-chg">Inside
-a
-Context
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#from-json-to-json-ld" class="tocxref">
-<span class="secno">
-<del class="diff-old">2.6
-</del>
-<ins class="diff-chg">2.5
-</ins>
-</span>
-<del class="diff-old">An
-Example
-of
-a
-Context
-</del>
-<ins class="diff-chg">From
-JSON
-to
-JSON-LD
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#basic-concepts" class="tocxref">
-<span class="secno">
-3.
-</span>
-<del class="diff-old">Markup
-Examples
-</del>
-<ins class="diff-chg">Basic
-Concepts
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-3.1
-</span>
-<del class="diff-old">RDFa
-</del>
-<ins class="diff-chg">IRIs
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-3.2
-</span>
-<del class="diff-old">Microformats
-</del>
-<ins class="diff-chg">Identifying
-the
-Subject
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-3.3
-</span>
-<del class="diff-old">Microdata
-</del>
-<ins class="diff-chg">Specifying
-the
-Type
-</ins></a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.4
-</ins></span><ins class="diff-chg">
-Strings
-</ins></a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.5
-</ins></span><ins class="diff-chg">
-String
-Internationalization
-</ins></a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.6
-</ins></span><ins class="diff-chg">
-Datatypes
-</ins></a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.7
-</ins></span><ins class="diff-chg">
-Multiple
-Objects
-for
-a
-Single
-Property
-</ins></a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.8
-</ins></span><ins class="diff-chg">
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</ins></a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.9
-</ins></span><ins class="diff-chg">
-Expansion
-</ins></a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.10
-</ins></span><ins class="diff-chg">
-Compaction
-</ins></a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno"><ins class="diff-chg">
-3.11
-</ins></span><ins class="diff-chg">
-Framing
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-4.
-</span>
-<del class="diff-old">Markup
-of
-RDF
-</del>
-<ins class="diff-chg">Advanced
-</ins>
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-4.1
-</span>
-<del class="diff-old">IRIs
-</del>
-<ins class="diff-chg">Automatic
-Typing
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-4.2
-</span>
-<del class="diff-old">Identifying
-the
-Subject
-</del>
-<ins class="diff-chg">Type
-Coercion
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#chaining" class="tocxref">
-<span class="secno">
-4.3
-</span>
-<del class="diff-old">Specifying
-the
-Type
-</del>
-<ins class="diff-chg">Chaining
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-unlabeled-nodes" class="tocxref">
-<span class="secno">
-4.4
-</span>
-<del class="diff-old">Plain
-Literals
-</del>
-<ins class="diff-chg">Identifying
-Unlabeled
-Nodes
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#overriding-keywords" class="tocxref">
-<span class="secno">
-4.5
-</span>
-<del class="diff-old">Language
-Specification
-in
-Plain
-Literals
-</del>
-<ins class="diff-chg">Overriding
-Keywords
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization" class="tocxref">
-<span class="secno">
-4.6
-</span>
-<del class="diff-old">Typed
-Literals
-</del>
-<ins class="diff-chg">Normalization
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#algorithms" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.7
-</del>
-<ins class="diff-chg">5.
-</ins>
-</span>
-<del class="diff-old">Multiple
-Objects
-for
-a
-Single
-Property
-</del>
-<ins class="diff-chg">Algorithms
-</ins></a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno"><ins class="diff-chg">
-5.1
-</ins></span><ins class="diff-chg">
-Syntax
-Tokens
-and
-Keywords
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#algorithm-terms" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.8
-</del>
-<ins class="diff-chg">5.2
-</ins>
-</span>
-<del class="diff-old">Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</del>
-<ins class="diff-chg">Algorithm
-Terms
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#context-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.9
-</del>
-<ins class="diff-chg">5.3
-</ins>
-</span>
-<del class="diff-old">Blank
-Nodes
-</del>
-<ins class="diff-chg">Context
-</ins></a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno"><ins class="diff-chg">
-5.3.1
-</ins></span><ins class="diff-chg">
-Coerce
-</ins></a></li><li class="tocline"><a href="#initial-context" class="tocxref"><span class="secno"><ins class="diff-chg">
-5.3.2
-</ins></span><ins class="diff-chg">
-Initial
-Context
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#iri-expansion" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">5.4
-</ins>
-</span>
-<del class="diff-old">Advanced
-Features
-</del>
-<ins class="diff-chg">IRI
-Expansion
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#iri-compaction" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">5.5
-</ins>
-</span>
-<del class="diff-old">Automatic
-Typing
-</del>
-<ins class="diff-chg">IRI
-Compaction
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#value-expansion" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">5.6
-</ins>
-</span>
-<del class="diff-old">Type
-Coercion
-</del>
-<ins class="diff-chg">Value
-Expansion
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#value-compaction" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">5.7
-</ins></span><ins class="diff-chg">
-Value
-Compaction
-</ins></a>
-</li>
-<li class="tocline">
-<a href="#expansion-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">5.8
-</ins>
-</span>
-<del class="diff-old">The
-JSON-LD
-Processing
-</del>
-<ins class="diff-chg">Expansion
-</ins></a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno"><ins class="diff-chg">
-5.8.1
-</ins></span><ins class="diff-chg">
-Expansion
-</ins>
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#compaction-1" class="tocxref">
-<span class="secno">
-<ins class="diff-new">5.9
-</ins></span><ins class="diff-new">
-Compaction
-</ins></a>
-<ul class="toc">
-<li class="tocline">
-<a href="#compaction-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">5.9.1
-</ins>
-</span>
-<del class="diff-old">Overview
-</del>
-<ins class="diff-chg">Compaction
-Algorithm
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#framing-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">5.10
-</ins>
-</span>
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">Framing
-</ins></a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno"><ins class="diff-chg">
-5.10.1
-</ins></span><ins class="diff-chg">
-Framing
-</ins>
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#framing-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.3
-</del>
-<ins class="diff-chg">5.10.2
-</ins>
-</span>
-<del class="diff-old">Processing
-Tokens
-and
-Keywords
-</del>
-<ins class="diff-chg">Framing
-Algorithm
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#normalization-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.4
-</del>
-<ins class="diff-chg">5.11
-</ins>
-</span>
-<del class="diff-old">Context
-</del>
-<ins class="diff-chg">Normalization
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normalization-algorithm-terms" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.4.1
-</del>
-<ins class="diff-chg">5.11.1
-</ins>
-</span>
-<del class="diff-old">Coerce
-</del>
-<ins class="diff-chg">Normalization
-Algorithm
-Terms
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization-algorithm" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">5.11.2
-</ins></span><ins class="diff-chg">
-Normalization
-Algorithm
-</ins></a>
-</li>
-<li class="tocline">
-<a href="#node-labeling-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.5
-</del>
-<ins class="diff-chg">5.11.3
-</ins>
-</span>
-<del class="diff-old">Chaining
-</del>
-<ins class="diff-chg">Node
-Labeling
-Algorithm
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#shallow-comparison-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.6
-</del>
-<ins class="diff-chg">5.11.4
-</ins>
-</span>
-<del class="diff-old">IRI
-Processing
-</del>
-<ins class="diff-chg">Shallow
-Comparison
-Algorithm
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#object-comparison-algorithm" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">5.11.5
-</ins></span><ins class="diff-chg">
-Object
-Comparison
-Algorithm
-</ins></a>
-</li>
-<li class="tocline">
-<a href="#deep-comparison-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">5.11.6
-</ins>
-</span>
-<del class="diff-old">Sequence
-</del>
-<ins class="diff-chg">Deep
-Comparison
-Algorithm
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#node-serialization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.
-</del>
-<ins class="diff-chg">5.11.7
-</ins>
-</span>
-<del class="diff-old">Best
-Practices
-</del>
-<ins class="diff-chg">Node
-Serialization
-Algorithm
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#combinatorial-serialization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.1
-</del>
-<ins class="diff-chg">5.11.8
-</ins>
-</span>
-<del class="diff-old">JavaScript
-</del>
-<ins class="diff-chg">Combinatorial
-Serialization
-Algorithm
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#mapping-serialization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">8.2
-</del>
-<ins class="diff-chg">5.11.9
-</ins>
-</span>
-<del class="diff-old">Schema-less
-Databases
-</del>
-<ins class="diff-chg">Mapping
-Serialization
-Algorithm
-</ins></a></li><li class="tocline"><a href="#label-generation-algorithm" class="tocxref"><span class="secno"><ins class="diff-chg">
-5.11.10
-</ins></span><ins class="diff-chg">
-Label
-Generation
-Algorithm
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#data-round-tripping" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.
-</del>
-<ins class="diff-chg">5.12
-</ins>
-</span>
-<del class="diff-old">Advanced
-Concepts
-</del>
-<ins class="diff-chg">Data
-Round
-Tripping
-</ins></a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno"><ins class="diff-chg">
-5.13
-</ins></span><ins class="diff-chg">
-RDF
-Conversion
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#overview" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.1
-</del>
-<ins class="diff-chg">5.13.1
-</ins>
-</span>
-<del class="diff-old">Vocabulary
-Profiles
-</del>
-<ins class="diff-chg">Overview
-</ins></a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno"><ins class="diff-chg">
-5.13.2
-</ins></span><ins class="diff-chg">
-RDF
-Conversion
-Algorithm
-Terms
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion-algorithm" class="tocxref">
-<span class="secno">
-<ins class="diff-new">5.13.3
-</ins></span><ins class="diff-new">
-RDF
-Conversion
-Algorithm
-</ins></a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno"><ins class="diff-new">
-6.
-</ins></span><ins class="diff-new">
-Experimental
-Concepts
-</ins></a><ul class="toc"><li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.2
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Disjoint
-Graphs
-</a>
-</li>
-<li class="tocline">
-<a href="#lists" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-<del class="diff-old">The
-JSON-LD
-API
-</del>
-<ins class="diff-chg">Lists
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#expansion-2" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3.1
-</del>
-<ins class="diff-chg">6.2.1
-</ins>
-</span>
-<del class="diff-old">Methods
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization-2" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3.2
-</del>
-<ins class="diff-chg">6.2.2
-</ins>
-</span>
-<del class="diff-old">Methods
-</del>
-<ins class="diff-chg">Normalization
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">9.3.3
-</del>
-<ins class="diff-chg">6.2.3
-</ins>
-</span>
-<del class="diff-old">Methods
-</del>
-<ins class="diff-chg">RDF
-Conversion
-</ins>
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-A.
-</span>
-<del class="diff-old">The
-Default
-Context
-</del>
-<ins class="diff-chg">Markup
-Examples
-</ins></a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno"><ins class="diff-chg">
-A.1
-</ins></span><ins class="diff-chg">
-RDFa
-</ins></a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno"><ins class="diff-chg">
-A.2
-</ins></span><ins class="diff-chg">
-Microformats
-</ins></a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno"><ins class="diff-chg">
-A.3
-</ins></span><ins class="diff-chg">
-Microdata
-</ins></a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno"><ins class="diff-chg">
-A.4
-</ins></span><ins class="diff-chg">
-Mashing
-Up
-Vocabularies
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">A.5
-</ins>
-</span>
-Acknowledgements
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-<del class="diff-old">C.
-</del>
-<ins class="diff-chg">B.
-</ins>
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">C.1
-</del>
-<ins class="diff-chg">B.1
-</ins>
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">C.2
-</del>
-<ins class="diff-chg">B.2
-</ins>
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<p>
-<ins class="diff-new">JSON,
-as
-specified
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
-RFC4627
-</ins></a></cite><ins class="diff-new">
-],
-is
-a
-simple
-language
-for
-representing
-data
-on
-the
-Web.
-Linked
-Data
-is
-a
-technique
-for
-describing
-content
-across
-different
-documents
-or
-Web
-sites.
-Web
-resources
-are
-described
-using
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a><ins class="diff-new">
-s,
-and
-typically
-are
-dereferencable
-entities
-that
-may
-be
-used
-to
-find
-more
-information,
-creating
-a
-"Web
-of
-Knowledge".
-JSON-LD
-is
-intended
-to
-be
-a
-simple
-publishing
-method
-for
-expressing
-not
-only
-Linked
-Data
-in
-JSON,
-but
-for
-adding
-semantics
-to
-existing
-JSON.
-</ins></p><p>
-JSON-LD
-is
-designed
-as
-a
-light-weight
-syntax
-that
-can
-be
-used
-to
-express
-Linked
-Data.
-It
-is
-primarily
-intended
-to
-be
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-and
-other
-Web-based
-programming
-environments.
-It
-is
-also
-useful
-when
-building
-interoperable
-Web
-Services
-and
-when
-storing
-Linked
-Data
-in
-JSON-based
-document
-storage
-engines.
-It
-is
-practical
-and
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-and
-existing
-code
-that
-is
-in
-use
-today.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-<ins class="diff-new">RDFa
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-new">
-RDFA-CORE
-</ins></a></cite><ins class="diff-new">
-]
-data,
-</ins>
-Microformats
-<ins class="diff-new">[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS"><ins class="diff-new">
-MICROFORMATS
-</ins></a></cite><ins class="diff-new">
-]
-</ins>
-data,
-and
-<del class="diff-old">Microdata.
-</del>
-<ins class="diff-chg">Microdata
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA"><ins class="diff-chg">
-MICRODATA
-</ins></a></cite><ins class="diff-chg">
-].
-</ins>
-That
-is,
-it
-supports
-every
-major
-Web-based
-structured
-data
-model
-in
-use
-today.
-<del class="diff-old">It
-</del>
-</p>
-<p>
-<ins class="diff-chg">The
-syntax
-</ins>
-does
-not
-require
-<del class="diff-old">anyone
-</del>
-<ins class="diff-chg">many
-applications
-</ins>
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-<ins class="diff-new">either
-in-band
-or
-</ins>
-out-of-band.
-The
-syntax
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-very
-small
-memory
-footprint
-in
-order
-to
-operate.
-</p>
-<del class="diff-old">JSON,
-as
-specified
-in
-[
-RFC4627
-],
-is
-a
-simple
-language
-for
-representing
-objects
-on
-the
-web.
-Linked
-Data
-is
-a
-way
-of
-describing
-content
-across
-different
-documents,
-or
-web
-resources.
-Web
-resources
-are
-described
-using
-IRI
-s,
-and
-typically
-are
-dereferencable
-entities
-that
-may
-be
-used
-to
-find
-more
-information,
-creating
-a
-"web
-of
-knowledge".
-JSON-LD
-is
-intended
-to
-be
-a
-simple
-publishing
-method
-for
-expressing
-linked
-data
-in
-JSON.
-</del>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</h3>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-<del class="diff-old">write
-</del>
-<ins class="diff-chg">implement
-</ins>
-processors
-<ins class="diff-new">and
-APIs
-</ins>
-for
-JSON-LD.
-</li>
-</ul>
-<p>
-To
-understand
-<ins class="diff-new">the
-basics
-in
-</ins>
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-<ins class="diff-new">].
-To
-understand
-the
-API
-and
-how
-it
-is
-intended
-to
-operate
-in
-a
-programming
-environment,
-it
-is
-useful
-to
-have
-working
-knowledge
-of
-the
-JavaScript
-programming
-language
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262"><ins class="diff-new">
-ECMA-262
-</ins></a></cite>
-]
-and
-<ins class="diff-new">WebIDL
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL"><ins class="diff-new">
-WEBIDL
-</ins></a></cite><ins class="diff-new">
-].
-To
-understand
-how
-JSON-LD
-maps
-to
-RDF,
-it
-is
-helpful
-to
-be
-familiar
-with
-the
-basic
-</ins>
-RDF
-<del class="diff-old">as
-described
-in
-</del>
-<ins class="diff-chg">concepts
-</ins>
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
-RDF-CONCEPTS
-</a>
-</cite>
-].
-</p>
-<p>
-<ins class="diff-new">Examples
-may
-contain
-references
-to
-existing
-vocabularies
-and
-use
-abbreviations
-in
-CURIEs
-and
-source
-code.
-The
-following
-is
-a
-list
-of
-all
-vocabularies
-and
-their
-abbreviations,
-as
-used
-in
-this
-document:
-</ins></p><ul><li><ins class="diff-new">
-The
-</ins><a href="http://purl.org/dc/terms/"><ins class="diff-new">
-Dublin
-Core
-</ins></a><ins class="diff-new">
-vocabulary
-(abbreviation:
-</ins><code><ins class="diff-new">
-dc
-</ins></code>,<ins class="diff-new">
-e.g.,
-</ins><code><ins class="diff-new">
-dc:title
-</ins></code><ins class="diff-new">
-)
-</ins></li><li><ins class="diff-new">
-The
-</ins><a href="http://xmlns.com/foaf/0.1/"><ins class="diff-new">
-Friend
-of
-a
-Friend
-</ins></a><ins class="diff-new">
-vocabulary
-(abbreviation:
-</ins><code><ins class="diff-new">
-foaf
-</ins></code>,<ins class="diff-new">
-e.g.,
-</ins><code><ins class="diff-new">
-foaf:knows
-</ins></code><ins class="diff-new">
-)
-</ins></li><li><ins class="diff-new">
-The
-</ins><a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><ins class="diff-new">
-RDF
-</ins></a><ins class="diff-new">
-vocabulary
-(abbreviation:
-</ins><code><ins class="diff-new">
-rdf
-</ins></code>,<ins class="diff-new">
-e.g.,
-</ins><code><ins class="diff-new">
-rdf:type
-</ins></code><ins class="diff-new">
-)
-</ins></li><li><ins class="diff-new">
-The
-</ins><a href="http://www.w3.org/2001/XMLSchema#"><ins class="diff-new">
-XSD
-</ins></a><ins class="diff-new">
-vocabulary
-(abbreviation:
-</ins><code><ins class="diff-new">
-xsd
-</ins></code>,<ins class="diff-new">
-e.g.,
-</ins><code><ins class="diff-new">
-xsd:integer
-</ins></code><ins class="diff-new">
-)
-</ins></li></ul>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-1.2
-</span>
-Contributing
-</h3>
-<p>
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</p>
-<ul>
-<li>
-<del class="diff-old">All
-comments
-and
-</del>
-<ins class="diff-chg">Technical
-</ins>
-discussion
-<del class="diff-old">takes
-place
-</del>
-<ins class="diff-chg">typically
-occurs
-</ins>
-on
-the
-public
-mailing
-list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
-public-linked-json@w3.org
-</a>
-</li>
-<li>
-<a href="http://json-ld.org/minutes/">
-<ins class="diff-new">Public
-teleconferences
-</ins></a><ins class="diff-new">
-are
-held
-on
-Tuesdays
-at
-1500UTC
-on
-the
-second
-and
-fourth
-week
-of
-each
-month.
-</ins></li><li>
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-<a href="https://github.com/json-ld/json-ld.org/issues">
-issue
-tracker
-</a>.
-</li>
-<li>
-<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
-Source
-code
-</a>
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</li>
-<li>
-The
-<a href="http://webchat.freenode.net/?channels=#json-ld">
-#json-ld
-</a>
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</li>
-</ul>
-</div>
-</div>
-<div id="design" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Design
-<del class="diff-old">Goals
-and
-Rationale
-</del>
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="goals-and-rationale" class="section">
-<h3>
-<span class="secno">
-2.1
-</span>
-Goals
-<ins class="diff-new">and
-Rationale
-</ins>
-</h3>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-<del class="diff-old">don't
-</del>
-need
-<del class="diff-old">to
-</del>
-<ins class="diff-chg">only
-</ins>
-know
-<del class="diff-old">RDF
-in
-order
-</del>
-<ins class="diff-chg">JSON
-and
-three
-keywords
-</ins>
-to
-use
-the
-basic
-functionality
-<del class="diff-old">provided
-by
-</del>
-<ins class="diff-chg">in
-</ins>
-JSON-LD.
-<ins class="diff-new">No
-extra
-processors
-or
-software
-libraries
-are
-necessary
-to
-use
-JSON-LD
-in
-its
-most
-basic
-form.
-The
-language
-attempts
-to
-ensure
-that
-developers
-have
-an
-easy
-learning
-curve.
-</ins>
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-<del class="diff-old">should
-</del>
-<ins class="diff-chg">must
-</ins>
-be
-100%
-compatible
-with
-JSON.
-<ins class="diff-new">This
-ensures
-that
-all
-of
-the
-standard
-JSON
-libraries
-work
-seamlessly
-with
-JSON-LD
-documents.
-</ins>
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-<del class="diff-old">All
-major
-RDF
-concepts
-</del>
-<ins class="diff-chg">The
-syntax
-</ins>
-must
-be
-<del class="diff-old">expressible
-via
-the
-JSON-LD
-syntax.
-</del>
-<ins class="diff-chg">able
-to
-express
-directed
-graphs,
-which
-have
-been
-proven
-to
-be
-able
-to
-simply
-express
-almost
-every
-real
-world
-data
-model.
-</ins>
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-<del class="diff-old">readable.
-</del>
-<ins class="diff-chg">readable,
-requiring
-as
-little
-as
-possible
-from
-the
-developer.
-</ins></dd><dt><ins class="diff-chg">
-Pragmatism
-</ins></dt><dd><ins class="diff-chg">
-Mixing
-the
-expression
-of
-pure
-Linked
-Data
-with
-data
-that
-is
-not
-linked
-was
-an
-approach
-that
-was
-driven
-by
-pragmatism.
-JSON-LD
-attempts
-to
-be
-more
-practical
-than
-theoretical
-in
-its
-approach
-to
-Linked
-Data.
-</ins>
-</dd>
-<dt>
-Zero
-Edits,
-most
-of
-the
-time
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-At
-times,
-mapping
-JSON
-to
-<del class="diff-old">RDF
-</del>
-<ins class="diff-chg">a
-graph
-representation
-</ins>
-can
-become
-<del class="diff-old">difficult
--
-in
-</del>
-<ins class="diff-chg">difficult.
-In
-</ins>
-these
-instances,
-rather
-than
-having
-JSON-LD
-support
-esoteric
-markup,
-we
-chose
-not
-to
-support
-the
-use
-case
-and
-support
-a
-simplified
-syntax
-instead.
-So,
-while
-<del class="diff-old">we
-strive
-for
-</del>
-Zero
-<del class="diff-old">Edits,
-</del>
-<ins class="diff-chg">Edits
-was
-a
-goal,
-</ins>
-it
-was
-not
-always
-possible
-without
-adding
-great
-complexity
-to
-the
-language.
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<div id="linked-data" class="section">
-<h3>
-<span class="secno">
-2.2
-</span>
-<del class="diff-old">Map
-Terms
-</del>
-<ins class="diff-chg">Linked
-Data
-</ins></h3><p><ins class="diff-chg">
-The
-following
-definition
-for
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a><ins class="diff-chg">
-is
-the
-one
-that
-will
-be
-used
-for
-this
-specification.
-</ins></p><ol><li><dfn title="Linked_Data" id="dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></dfn><ins class="diff-chg">
-is
-a
-set
-of
-documents,
-each
-containing
-a
-representation
-of
-a
-linked
-data
-graph.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="linked_data_graph" id="dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></dfn><ins class="diff-chg">
-is
-a
-labeled
-directed
-graph,
-where
-nodes
-are
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a><ins class="diff-chg">
-s
-or
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><ins class="diff-chg">
-s,
-and
-edges
-are
-properties.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="subject" id="dfn-subject"><ins class="diff-chg">
-subject
-</ins></dfn><ins class="diff-chg">
-is
-any
-node
-in
-a
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a><ins class="diff-chg">
-with
-at
-least
-one
-outgoing
-edge.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
-should
-</ins></em><ins class="diff-chg">
-be
-labeled
-with
-a
-IRI.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="property" id="dfn-property"><ins class="diff-chg">
-property
-</ins></dfn><ins class="diff-chg">
-is
-an
-edge
-of
-the
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a><ins class="diff-chg">
-.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-be
-labeled
-with
-an
-IRI.
-</ins></li><li><ins class="diff-chg">
-An
-</ins><dfn title="object" id="dfn-object"><ins class="diff-chg">
-object
-</ins></dfn><ins class="diff-chg">
-is
-a
-node
-in
-a
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a><ins class="diff-chg">
-with
-at
-least
-one
-incoming
-edge.
-</ins></li><li><ins class="diff-chg">
-An
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><em class="rfc2119" title="may"><ins class="diff-chg">
-may
-</ins></em><ins class="diff-chg">
-be
-labeled
-with
-an
-IRI.
-</ins></li><li><ins class="diff-chg">
-An
-IRI
-that
-is
-a
-label
-in
-a
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
-should
-</ins></em><ins class="diff-chg">
-be
-dereferencable
-</ins>
-to
-<del class="diff-old">IRIs
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a><ins class="diff-chg">
-document
-describing
-the
-labeled
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a>,<a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><ins class="diff-chg">
-or
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><ins class="diff-chg">
-.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="literal" id="dfn-literal"><ins class="diff-chg">
-literal
-</ins></dfn><ins class="diff-chg">
-is
-an
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><ins class="diff-chg">
-with
-a
-label
-that
-is
-not
-an
-IRI
-</ins></li></ol><p><ins class="diff-chg">
-Note
-that
-the
-definition
-for
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a><ins class="diff-chg">
-above
-is
-silent
-on
-the
-topic
-of
-unlabeled
-nodes.
-Unlabeled
-nodes
-are
-not
-considered
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a>.<ins class="diff-chg">
-However,
-this
-specification
-allows
-for
-the
-expression
-of
-unlabled
-nodes,
-as
-most
-graph-based
-data
-sets
-on
-the
-Web
-contain
-a
-number
-of
-associated
-nodes
-that
-are
-not
-named
-and
-thus
-are
-not
-directly
-de-referenceable.
-</ins></p></div><div id="linking-data" class="section"><h3><span class="secno"><ins class="diff-chg">
-2.3
-</ins></span><ins class="diff-chg">
-Linking
-Data
-</ins>
-</h3>
-<p>
-An
-Internationalized
-Resource
-Identifier
-(
-<dfn title="IRI" id="dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>
-<del class="diff-old">)
-</del>
-<ins class="diff-chg">),
-</ins>
-as
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-],
-is
-a
-mechanism
-for
-representing
-unique
-identifiers
-on
-the
-web.
-In
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-<del class="diff-old">Data,
-IRIs
-(or
-URI
-references)
-are
-</del>
-<ins class="diff-chg">Data
-</ins></a>,<ins class="diff-chg">
-an
-IRI
-is
-</ins>
-commonly
-used
-for
-<del class="diff-old">describing
-entities
-and
-properties.
-</del>
-<ins class="diff-chg">expressing
-a
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a>,<ins class="diff-chg">
-a
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><ins class="diff-chg">
-or
-an
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a>.
-</p>
-<p>
-<del class="diff-old">Establishing
-</del>
-<ins class="diff-chg">JSON-LD
-defines
-</ins>
-a
-mechanism
-to
-map
-JSON
-values
-to
-<del class="diff-old">IRIs
-will
-help
-in
-the
-mapping
-of
-JSON
-objects
-to
-RDF.
-</del>
-<ins class="diff-chg">IRIs.
-</ins>
-This
-does
-not
-mean
-that
-JSON-LD
-<del class="diff-old">must
-</del>
-<ins class="diff-chg">requires
-every
-key
-or
-value
-to
-</ins>
-be
-<del class="diff-old">restrictive
-in
-declaring
-a
-set
-of
-terms,
-rather,
-experimentation
-</del>
-<ins class="diff-chg">an
-IRI,
-but
-rather
-ensures
-that
-keys
-</ins>
-and
-<del class="diff-old">innovation
-should
-</del>
-<ins class="diff-chg">values
-can
-</ins>
-be
-<del class="diff-old">supported
-as
-part
-of
-</del>
-<ins class="diff-chg">mapped
-to
-IRIs
-if
-</ins>
-the
-<del class="diff-old">core
-design
-of
-JSON-LD.
-</del>
-<ins class="diff-chg">developer
-so
-desires
-to
-transform
-their
-data
-into
-Linked
-Data.
-</ins>
-There
-<del class="diff-old">are,
-however,
-</del>
-<ins class="diff-chg">are
-</ins>
-a
-<del class="diff-old">number
-of
-very
-small
-design
-criteria
-</del>
-<ins class="diff-chg">few
-techniques
-</ins>
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-<del class="diff-old">RDF
-data
-that
-will
-create
-value
-</del>
-<ins class="diff-chg">Linked
-Data
-</ins>
-for
-the
-<del class="diff-old">greater
-semantic
-web
-community
-and
-JSON/REST-based
-Web
-Services
-community.
-</del>
-<ins class="diff-chg">Web.
-JSON-LD
-formalizes
-those
-techniques.
-</ins>
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-<del class="diff-old">object
-</del>
-<ins class="diff-chg">markup
-</ins>
-as
-the
-example
-for
-<ins class="diff-new">the
-rest
-of
-</ins>
-this
-section:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "a": "Person",
-</del>
-  "name": "Manu Sporny",
-<del class="diff-old">  "homepage": "http://manu.sporny.org/"
-</del>
-<ins class="diff-chg">  "homepage": "http://manu.sporny.org/",
-</ins>
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-</div>
-<div id="the-context" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">2.3
-</del>
-<ins class="diff-chg">2.4
-</ins>
-</span>
-The
-<del class="diff-old">JSON-LD
-</del>
-Context
-</h3>
-<p>
-<del class="diff-old">A
-</del>
-<ins class="diff-chg">In
-JSON-LD,
-a
-</ins>
-context
-is
-used
-to
-allow
-developers
-to
-<del class="diff-old">use
-aliases
-for
-</del>
-<ins class="diff-chg">map
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s
-to
-</ins>
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s.
-<ins class="diff-new">A
-</ins><dfn title="term" id="dfn-term"><ins class="diff-new">
-term
-</ins></dfn><ins class="diff-new">
-is
-a
-short
-word
-that
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-be
-expanded
-to
-an
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a>.
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-<del class="diff-old">terms
-</del>
-<a class="tref internalDFN" title="term" href="#dfn-term">
-<ins class="diff-chg">term
-</ins></a><ins class="diff-chg">
-s
-</ins>
-mean
-<del class="diff-old">something,
-which
-you
-will
-eventually
-want
-to
-query.
-A
-context
-allows
-the
-expression
-of
-a
-number
-</del>
-<ins class="diff-chg">something
-that
-may
-be
-</ins>
-of
-<del class="diff-old">terms
-which
-map
-directly
-</del>
-<ins class="diff-chg">use
-</ins>
-to
-<del class="diff-old">IRI
-s.
-</del>
-<ins class="diff-chg">other
-developers.
-</ins>
-For
-example,
-the
-term
-<code>
-name
-</code>
-may
-map
-directly
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-allows
-JSON-LD
-documents
-to
-be
-constructed
-using
-<ins class="diff-new">the
-</ins>
-common
-JSON
-<del class="diff-old">syntax
-</del>
-<ins class="diff-chg">practice
-</ins>
-of
-<del class="diff-old">using
-</del>
-simple
-name/value
-<del class="diff-old">pairs.
-</del>
-<ins class="diff-chg">pairs
-while
-ensuring
-that
-the
-data
-is
-useful
-outside
-of
-the
-database
-or
-page
-in
-which
-it
-resides.
-</ins>
-</p>
-<p>
-<del class="diff-old">To
-reduce
-</del>
-<ins class="diff-chg">These
-Linked
-Data
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s
-are
-typically
-collected
-in
-a
-context
-and
-then
-used
-by
-adding
-a
-single
-line
-to
-</ins>
-the
-<del class="diff-old">number
-of
-different
-</del>
-<ins class="diff-chg">JSON
-markup
-above:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-</ins>  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span><ins class="diff-chg">
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</ins></pre><p><ins class="diff-chg">
-The
-addition
-above
-transforms
-the
-previous
-JSON
-document
-into
-a
-JSON
-document
-with
-added
-semantics
-because
-the
-</ins><code><ins class="diff-chg">
-@context
-</ins></code><ins class="diff-chg">
-specifies
-how
-the
-</ins><strong><ins class="diff-chg">
-name
-</ins></strong>,<strong><ins class="diff-chg">
-homepage
-</ins></strong>,<ins class="diff-chg">
-and
-</ins><strong><ins class="diff-chg">
-avatar
-</ins></strong>
-terms
-<del class="diff-old">that
-must
-be
-defined,
-JSON-LD
-also
-</del>
-<ins class="diff-chg">map
-to
-IRIs.
-Mapping
-those
-keys
-to
-IRIs
-gives
-the
-data
-global
-context.
-If
-two
-developers
-use
-the
-same
-IRI
-to
-describe
-a
-property,
-they
-are
-more
-than
-likely
-expressing
-the
-same
-concept.
-This
-</ins>
-allows
-<del class="diff-old">terms
-</del>
-<ins class="diff-chg">both
-developers
-</ins>
-to
-<del class="diff-old">be
-used
-</del>
-<ins class="diff-chg">re-use
-each
-others
-data
-without
-having
-</ins>
-to
-<del class="diff-old">expand
-Compact
-URIs
-(
-CURIE
-).
-</del>
-<ins class="diff-chg">agree
-to
-how
-their
-data
-will
-inter-operate
-on
-a
-site-by-site
-basis.
-</ins></p><p>
-The
-semantic
-web
-<del class="diff-old">specifies
-this
-via
-</del>
-<ins class="diff-chg">uses
-a
-special
-type
-of
-document
-called
-a
-</ins>
-<em>
-<ins class="diff-new">Web
-</ins>
-Vocabulary
-<del class="diff-old">Documents
-,
-in
-which
-</del>
-</em>
-<ins class="diff-chg">to
-define
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s.
-A
-context
-is
-</ins>
-a
-<ins class="diff-new">type
-of
-Web
-vocabulary.
-Typically,
-these
-Web
-Vocabulary
-documents
-have
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-<del class="diff-old">is
-</del>
-</a>
-<ins class="diff-chg">es
-</ins>
-associated
-with
-<del class="diff-old">a
-document,
-</del>
-<ins class="diff-chg">them
-</ins>
-and
-<ins class="diff-new">contain
-</ins>
-a
-<del class="diff-old">suffix
-</del>
-<ins class="diff-chg">number
-of
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-declarations.
-A
-</ins><dfn title="prefix" id="dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></dfn>,<ins class="diff-chg">
-like
-a
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a>,
-is
-<del class="diff-old">used
-</del>
-<ins class="diff-chg">a
-short
-word
-that
-expands
-</ins>
-to
-<del class="diff-old">create
-an
-IRI
-based
-on
-this
-</del>
-<ins class="diff-chg">a
-Web
-Vocabulary
-IRI.
-</ins><a class="tref internalDFN" title="Prefix" href="#dfn-prefix"><ins class="diff-chg">
-Prefix
-</ins></a><ins class="diff-chg">
-es
-are
-helpful
-when
-a
-developer
-wants
-to
-mix
-multiple
-vocabularies
-together
-in
-a
-context,
-but
-does
-not
-want
-to
-go
-to
-the
-trouble
-of
-defining
-every
-single
-term
-in
-every
-single
-</ins>
-vocabulary.
-<ins class="diff-new">Some
-Web
-Vocabularies
-may
-have
-10-20
-terms
-defined.
-If
-a
-developer
-wants
-to
-use
-3-4
-different
-vocabularies,
-the
-number
-of
-terms
-that
-would
-have
-to
-be
-declared
-in
-a
-single
-context
-would
-become
-quite
-large.
-To
-reduce
-the
-number
-of
-different
-terms
-that
-must
-be
-defined,
-JSON-LD
-also
-allows
-prefixes
-to
-be
-used
-to
-compact
-IRIs.
-</ins></p><p></p><p>
-For
-example,
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/
-</code>
-specifies
-a
-<ins class="diff-new">Web
-</ins>
-Vocabulary
-<del class="diff-old">Document,
-and
-</del>
-<ins class="diff-chg">which
-may
-be
-represented
-using
-the
-</ins><code><ins class="diff-chg">
-foaf
-</ins></code><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></a>.<ins class="diff-chg">
-The
-</ins><code><ins class="diff-chg">
-foaf
-</ins></code><ins class="diff-chg">
-Web
-Vocabulary
-contains
-a
-term
-called
-</ins><strong><ins class="diff-chg">
-name
-</ins></strong>.<ins class="diff-chg">
-If
-you
-join
-the
-</ins><code><ins class="diff-chg">
-foaf
-</ins></code><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></a><ins class="diff-chg">
-with
-the
-</ins>
-<strong>
-name
-</strong>
-<del class="diff-old">is
-</del>
-<ins class="diff-chg">suffix,
-you
-can
-build
-</ins>
-a
-<del class="diff-old">term
-in
-</del>
-<ins class="diff-chg">compact
-IRI
-</ins>
-that
-<del class="diff-old">vocabulary.
-Join
-the
-two
-items
-together
-and
-you
-have
-</del>
-<ins class="diff-chg">will
-expand
-out
-into
-</ins>
-an
-<del class="diff-old">unambiguous
-identifier
-</del>
-<ins class="diff-chg">absolute
-IRI
-</ins>
-for
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">the
-</ins><code><ins class="diff-chg">
-http://xmlns.com/foaf/0.1/name
-</ins></code>
-vocabulary
-term.
-<del class="diff-old">The
-Compact
-URI
-Expression,
-</del>
-<ins class="diff-chg">That
-is,
-the
-compact
-IRI,
-</ins>
-or
-short-form,
-is
-<code>
-foaf:name
-</code>
-and
-the
-expanded-form
-is
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-vocabulary
-term
-<del class="diff-old">identifies
-the
-given
-name
-for
-something,
-for
-example
--
-</del>
-<ins class="diff-chg">is
-used
-to
-specify
-</ins>
-a
-person's
-name.
-</p>
-<p>
-Developers,
-and
-machines,
-<del class="diff-old">would
-be
-</del>
-<ins class="diff-chg">are
-</ins>
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-<del class="diff-old">Machines
-</del>
-<ins class="diff-chg">Developers
-and
-machines
-</ins>
-need
-the
-same
-sort
-of
-dictionary
-of
-<del class="diff-old">terms,
-and
-URIs
-</del>
-<ins class="diff-chg">terms.
-IRIs
-</ins>
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-The
-context
-provides
-a
-collection
-of
-vocabulary
-<del class="diff-old">terms
-</del>
-<a class="tref internalDFN" title="term" href="#dfn-term">
-<ins class="diff-chg">term
-</ins></a><ins class="diff-chg">
-s
-and
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></a><ins class="diff-chg">
-es
-</ins>
-that
-can
-be
-used
-<del class="diff-old">for
-a
-</del>
-<ins class="diff-chg">to
-expand
-</ins>
-JSON
-<del class="diff-old">object.
-</del>
-<ins class="diff-chg">keys
-and
-values
-into
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
-IRI
-</ins></a><ins class="diff-chg">
-s.
-</ins>
-</p>
-<div id="inside-a-context" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">2.4
-</del>
-<ins class="diff-chg">2.4.1
-</ins>
-</span>
-<del class="diff-old">Unambiguous
-Identifiers
-for
-JSON
-If
-a
-set
-of
-terms,
-like
-Person
-,
-name
-,
-and
-homepage
-,
-are
-defined
-in
-</del>
-<ins class="diff-chg">Inside
-</ins>
-a
-<del class="diff-old">context,
-and
-that
-context
-is
-used
-to
-resolve
-</del>
-<ins class="diff-chg">Context
-</ins></h4><p><ins class="diff-chg">
-In
-</ins>
-the
-<del class="diff-old">names
-in
-JSON
-objects,
-machines
-could
-automatically
-expand
-</del>
-<ins class="diff-chg">previous
-section,
-</ins>
-the
-<del class="diff-old">terms
-</del>
-<ins class="diff-chg">developer
-used
-the
-</ins><code><ins class="diff-chg">
-@context
-</ins></code><ins class="diff-chg">
-keyword
-</ins>
-to
-<ins class="diff-new">pull
-in
-an
-external
-context.
-That
-context
-document,
-if
-de-referenced,
-would
-look
-</ins>
-something
-<del class="diff-old">meaningful
-and
-unambiguous,
-</del>
-like
-this:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "",
-  "": "Manu Sporny",
-  "": "http://manu.sporny.org"
-  "": "http://twitter.com/account/profile_image/manusporny"
-</del>
-<ins class="diff-chg">    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-</ins>
-}
-</pre>
-<p>
-<del class="diff-old">Doing
-this
-would
-mean
-that
-JSON
-would
-start
-to
-become
-unambiguously
-machine-readable,
-play
-well
-with
-the
-semantic
-web,
-and
-basic
-markup
-wouldn't
-be
-that
-much
-more
-complex
-than
-basic
-JSON
-markup.
-</del>
-A
-<del class="diff-old">win,
-all
-around.
-2.5
-Mashing
-Up
-Vocabularies
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-RDF
--
-for
-describing
-information
-about
-objects
-on
-the
-semantic
-web.
-RDFS
--
-for
-expressing
-things
-like
-labels
-and
-comments.
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-Dublin
-Core
--
-for
-describing
-creative
-works.
-FOAF
--
-for
-describing
-social
-networks.
-Calendar
--
-for
-specifying
-events.
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-GEO
--
-for
-describing
-geographic
-location.
-VCard
--
-for
-describing
-organizations
-and
-people.
-DOAP
--
-for
-describing
-projects.
-Since
-these
-vocabularies
-are
-very
-popular,
-they
-are
-pre-defined
-in
-something
-called
-the
-default
-</del>
-<ins class="diff-chg">JSON-LD
-</ins>
-context
-<del class="diff-old">,
-which
-</del>
-<ins class="diff-chg">document
-</ins>
-is
-a
-<del class="diff-old">set
-of
-vocabulary
-prefixes
-that
-are
-pre-loaded
-in
-all
-JSON-LD
-processors.
-The
-contents
-of
-the
-default
-context
-</del>
-<ins class="diff-chg">simple
-mapping
-from
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins>
-</a>
-<del class="diff-old">are
-provided
-later
-in
-this
-document.
-Using
-the
-default
-context
-</del>
-<ins class="diff-chg">s
-and
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins>
-</a>
-<del class="diff-old">allows
-developers
-</del>
-<ins class="diff-chg">es
-</ins>
-to
-<del class="diff-old">express
-data
-unambiguously,
-like
-so:
-{
-  "",
-  "": "Manu Sporny",
-  "": "http://manu.sporny.org/",
-  "": "http://twitter.com/account/profile_image/manusporny"
-}
-Developers
-can
-</del>
-<ins class="diff-chg">expanded
-values
-such
-as
-IRIs
-or
-keywords.
-Contexts
-may
-</ins>
-also
-<del class="diff-old">specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-active
-context
-</del>
-<ins class="diff-chg">contain
-datatype
-information
-for
-certain
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins>
-</a>
-<del class="diff-old">in-line
-using
-the
-@context
-keyword,
-like
-so:
-{
-  ,
-  "a": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny",
-  "myvocab:personality": "friendly"
-}
-The
-@context
-keyword
-is
-used
-to
-change
-how
-the
-JSON-LD
-processor
-evaluates
-key-value
-pairs.
-In
-this
-case,
-it
-was
-used
-to
-map
-one
-string
-('myvocab')
-to
-another
-string,
-which
-is
-interpreted
-</del>
-<ins class="diff-chg">s
-</ins>
-as
-<del class="diff-old">a
-IRI
-.
-In
-the
-example
-above,
-the
-myvocab
-string
-is
-replaced
-with
-"
-http://example.org/myvocab#
-"
-when
-it
-is
-detected.
-In
-</del>
-<ins class="diff-chg">well
-as
-other
-processing
-instructions
-for
-</ins>
-the
-<del class="diff-old">example
-above,
-"
-myvocab:personality
-"
-would
-expand
-to
-"
-http://example.org/myvocab#personality
-".
-</del>
-<ins class="diff-chg">JSON-LD
-processor.
-</ins>
-</p>
-<p>
-<ins class="diff-new">Contexts
-may
-be
-specified
-in-line.
-</ins>
-This
-<del class="diff-old">mechanism
-is
-a
-short-hand
-for
-RDF,
-called
-</del>
-<ins class="diff-chg">ensures
-that
-JSON-LD
-documents
-can
-be
-processed
-when
-</ins>
-a
-<del class="diff-old">CURIE,
-and
-provides
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-</del>
-<ins class="diff-chg">JSON-LD
-processor
-does
-not
-have
-access
-</ins>
-to
-<del class="diff-old">RDF.
-</del>
-<ins class="diff-chg">the
-Web.
-</ins>
-</p>
-<del class="diff-old">2.6
-An
-Example
-of
-a
-Context
-</del>
-<p>
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-<ins class="diff-new">This
-means
-that
-developers
-can
-also
-specify
-a
-context
-for
-JSON
-data
-in
-an
-out-of-band
-fashion
-via
-the
-API.
-The
-API
-is
-described
-later
-in
-this
-document.
-</ins>
-A
-JSON-LD
-aware
-Web
-Service
-<em class="rfc2119" title="may">
-may
-</em>
-<ins class="diff-new">also
-</ins>
-define
-a
-<del class="diff-old">known
-context.
-For
-example,
-the
-following
-default
-</del>
-context
-<del class="diff-old">could
-apply
-to
-all
-incoming
-Web
-Service
-calls
-previously
-accepting
-only
-JSON
-data:
-{
-  "@context": 
-  {
-    "@vocab": "http://example.org/default-vocab#",
-    "@base": "http://example.org/baseurl/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dc": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "cc": "http://creativecommons.org/ns#",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "vcard": "http://www.w3.org/2006/vcard/ns#",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "Person": "http://xmlns.com/foaf/0.1/Person",
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-}
-The
-@vocab
-string
-is
-a
-special
-keyword
-that
-states
-</del>
-that
-<del class="diff-old">any
-term
-that
-doesn't
-resolve
-to
-a
-term
-or
-a
-prefix
-should
-</del>
-<ins class="diff-chg">will
-</ins>
-be
-<del class="diff-old">appended
-</del>
-<ins class="diff-chg">pre-loaded
-for
-all
-calls
-</ins>
-to
-the
-<del class="diff-old">@vocab
-IRI.
-</del>
-<ins class="diff-chg">service.
-</ins>
-This
-<del class="diff-old">is
-done
-to
-ensure
-that
-terms
-can
-be
-transformed
-to
-an
-IRI
-at
-all
-times.
-The
-@base
-string
-is
-a
-special
-keyword
-that
-states
-</del>
-<ins class="diff-chg">allows
-services
-</ins>
-that
-<del class="diff-old">any
-relative
-IRI
-must
-be
-appended
-to
-the
-string
-specified
-by
-@base
-.
-The
-@coerce
-keyword
-is
-used
-to
-specify
-type
-coercion
-rules
-for
-the
-data.
-For
-each
-key
-in
-the
-map,
-the
-key
-is
-the
-type
-to
-be
-coerced
-to
-</del>
-<ins class="diff-chg">have
-previously
-been
-publishing
-</ins>
-and
-<del class="diff-old">the
-value
-is
-the
-vocabulary
-term
-</del>
-<ins class="diff-chg">receiving
-JSON
-data
-</ins>
-to
-<del class="diff-old">be
-coerced.
-Type
-coercion
-for
-the
-key
-xsd:anyURI
-asserts
-that
-all
-vocabulary
-terms
-listed
-should
-undergo
-coercion
-</del>
-<ins class="diff-chg">accept
-JSON-LD
-data
-without
-requiring
-client
-software
-</ins>
-to
-<del class="diff-old">an
-IRI,
-including
-@base
-processing
-for
-relative
-IRIs
-and
-CURIE
-processing
-for
-compact
-URI
-Expressions
-such
-as
-foaf:homepage
-.
-</del>
-<ins class="diff-chg">change.
-</ins>
-</p>
-</div>
-</div>
-<div id="from-json-to-json-ld" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">3.
-</del>
-<ins class="diff-chg">2.5
-</ins>
-</span>
-<del class="diff-old">Markup
-Examples
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-</del>
-<ins class="diff-chg">From
-JSON
-</ins>
-to
-<del class="diff-old">express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-</del>
-JSON-LD
-<del class="diff-old">is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-3.1
-RDFa
-</del>
-</h3>
-<p>
-<del class="diff-old">The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-</del>
-<ins class="diff-chg">If
-a
-set
-of
-terms
-such
-as,
-</ins><strong><ins class="diff-chg">
-name
-</ins></strong>,<strong><ins class="diff-chg">
-homepage
-</ins></strong>,
-and
-<del class="diff-old">homepages.
-&lt;div &gt;
-   &lt;ul&gt;
-      &lt;li &gt;
-        &lt;a &gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li &gt;
-        &lt;a &gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li &gt;
-        &lt;a &gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-</del>
-<strong>
-<ins class="diff-chg">avatar
-</ins></strong>,
-are
-<del class="diff-old">other
-ways
-to
-mark-up
-this
-information
-such
-</del>
-<ins class="diff-chg">defined
-in
-a
-context,
-and
-</ins>
-that
-<del class="diff-old">the
-</del>
-context
-is
-<del class="diff-old">not
-repeated.
-[
- {
-   "@": "_:bnode1",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/bob/",
-   "foaf:name": "Bob"
- },
- {
-   "@": "_:bnode2",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/eve/",
-   "foaf:name": "Eve"
- },
- {
-   "@": "_:bnode3",
-   "a": "foaf:Person",
-   "foaf:homepage": "http://example.com/manu/",
-   "foaf:name": "Manu"
- }
-]
-3.2
-Microformats
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-</del>
-<ins class="diff-chg">used
-</ins>
-to
-<del class="diff-old">express
-how
-</del>
-<ins class="diff-chg">resolve
-</ins>
-the
-<del class="diff-old">Microformat
-is
-represented
-</del>
-<ins class="diff-chg">names
-</ins>
-in
-<del class="diff-old">JSON-LD.
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-The
-representation
-of
-the
-hCard
-expresses
-</del>
-<ins class="diff-chg">JSON
-objects,
-machines
-are
-able
-to
-automatically
-expand
-</ins>
-the
-<del class="diff-old">Microformat
-</del>
-terms
-<del class="diff-old">in
-the
-context
-and
-uses
-them
-directly
-for
-the
-url
-and
-fn
-properties.
-Also
-note
-that
-the
-Microformat
-</del>
-to
-<del class="diff-old">JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-http://tantek.com
-.
-</del>
-<ins class="diff-chg">something
-meaningful
-and
-unambiguous,
-like
-this:
-</ins>
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@": "_:bnode1",
-  "a": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-</del>
-<ins class="diff-chg">  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-</ins>
-}
-</pre>
-<del class="diff-old">3.3
-Microdata
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</del>
-<p>
-<del class="diff-old">Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-</del>
-<ins class="diff-chg">Doing
-this
-allows
-JSON
-</ins>
-to
-<del class="diff-old">avoid
-contexts
-and
-instead
-refer
-</del>
-<ins class="diff-chg">be
-unambiguously
-machine-readable
-without
-requiring
-developers
-that
-use
-JSON
-</ins>
-to
-<del class="diff-old">items
-by
-</del>
-<ins class="diff-chg">drastically
-change
-</ins>
-their
-<del class="diff-old">full
-IRI.
-</del>
-<ins class="diff-chg">workflow.
-</ins>
-</p>
-<del class="diff-old">[
-  {
-    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "a": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "a": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]
-</del>
-</div>
-</div>
-<div id="basic-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">4.
-</del>
-<ins class="diff-chg">3.
-</ins>
-</span>
-<del class="diff-old">Markup
-of
-RDF
-</del>
-<ins class="diff-chg">Basic
-</ins>
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-<del class="diff-old">most
-</del>
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-<del class="diff-old">Javascript
-objects
-</del>
-<ins class="diff-chg">regular
-JSON
-markup
-</ins>
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-<del class="diff-old">Since
-RDF
-is
-also
-an
-important
-sub-community
-of
-the
-Linked
-Data
-movement,
-it
-is
-important
-that
-all
-RDF
-concepts
-</del>
-<ins class="diff-chg">As
-more
-JSON-LD
-features
-</ins>
-are
-<del class="diff-old">well-represented
-in
-this
-specification.
-This
-section
-details
-how
-each
-RDF
-concept
-can
-be
-expressed
-in
-JSON-LD.
-</del>
-<ins class="diff-chg">used,
-more
-semantics
-are
-added
-to
-the
-JSON
-markup.
-</ins>
-</p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.1
-</del>
-<ins class="diff-chg">3.1
-</ins>
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-<del class="diff-old">subjects
-</del>
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-<ins class="diff-chg">subject
-</ins></a><ins class="diff-chg">
-s
-</ins>
-and
-many
-<del class="diff-old">objects
-</del>
-<a class="tref internalDFN" title="object" href="#dfn-object">
-<ins class="diff-chg">object
-</ins></a>
-are
-<del class="diff-old">identified.
-</del>
-<ins class="diff-chg">named.
-</ins>
-IRIs
-can
-be
-expressed
-in
-a
-variety
-of
-different
-ways
-in
-JSON-LD.
-</p>
-<ol>
-<li>
-In
-general,
-<del class="diff-old">an
-IRI
-is
-generated
-if
-it
-is
-</del>
-<a class="tref internalDFN" title="term" href="#dfn-term">
-<ins class="diff-chg">term
-</ins></a><ins class="diff-chg">
-s
-</ins>
-in
-the
-key
-position
-in
-an
-associative
-<del class="diff-old">array.
-</del>
-<ins class="diff-chg">array
-that
-have
-a
-mapping
-to
-an
-IRI
-or
-another
-key
-in
-the
-context
-are
-expanded
-to
-an
-IRI
-by
-JSON-LD
-processors.
-</ins>
-There
-are
-special
-rules
-for
-processing
-keys
-in
-<code>
-@context
-</code>
-and
-when
-dealing
-with
-keys
-that
-start
-with
-the
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>
-character.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>,
-if
-it
-is
-a
-string.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">@type
-</ins>
-</code>.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-the
-<code>
-@iri
-</code>
-keyword.
-</li>
-<li>
-An
-IRI
-is
-generated
-when
-there
-are
-<code>
-@coerce
-</code>
-rules
-in
-effect
-for
-<del class="diff-old">xsd:anyURI
-for
-</del>
-a
-<del class="diff-old">particular
-vocabulary
-term.
-</del>
-<ins class="diff-chg">key
-named
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code>.
-</li>
-</ol>
-<p>
-<del class="diff-old">An
-example
-of
-IRI
-generation
-for
-a
-</del>
-<ins class="diff-chg">IRIs
-can
-be
-expressed
-directly
-in
-the
-</ins>
-key
-<del class="diff-old">outside
-of
-a
-@context
-:
-</del>
-<ins class="diff-chg">position
-like
-so:
-</ins>
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-In
-the
-example
-above,
-the
-key
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-is
-interpreted
-as
-an
-IRI,
-as
-opposed
-to
-being
-interpreted
-as
-a
-string..
-</p>
-<p>
-Term
-expansion
-occurs
-for
-IRIs
-if
-a
-term
-is
-defined
-within
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>:
-</p>
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-<del class="diff-old">CURIE
-expansion
-also
-occurs
-for
-keys
-</del>
-<a class="tref internalDFN" title="Prefix" href="#dfn-prefix">
-<ins class="diff-chg">Prefix
-</ins></a><ins class="diff-chg">
-es
-are
-expanded
-when
-used
-</ins>
-in
-<del class="diff-old">JSON-LD:
-</del>
-<ins class="diff-chg">keys:
-</ins>
-</p>
-<pre class="example">
-{
-<ins class="diff-new">  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
-</ins>
-...
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-<code>
-foaf:name
-</code>
-above
-will
-automatically
-expand
-out
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-</p>
-<p>
-An
-IRI
-is
-generated
-when
-a
-value
-is
-associated
-with
-a
-key
-using
-the
-<code>
-@iri
-</code>
-keyword:
-</p>
-<pre class="example">
-{
-...
-  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}
-</pre>
-<p>
-If
-type
-coercion
-rules
-are
-specified
-in
-the
-<code>
-@context
-</code>
-for
-a
-particular
-vocabulary
-term,
-an
-IRI
-is
-generated:
-</p>
-<pre class="example">
-{<span class="diff">
-  "@context": 
-<del class="diff-old">  { 
-</del>
-<ins class="diff-chg">  {
-    ...
-</ins>
-    "@coerce": 
-    {
-<del class="diff-old">      "xsd:anyURI": "foaf:homepage"
-    } 
-</del>
-<ins class="diff-chg">      "@iri": "foaf:homepage"
-    }
-</ins>
-  }</span>
-...
-<del class="diff-old">  "foaf:homepage": "http://manu.sporny.org",
-</del>
-<ins class="diff-chg">  "foaf:homepage": "http://manu.sporny.org/",
-</ins>
-...
-}
-</pre>
-<p>
-<ins class="diff-new">Even
-though
-the
-value
-</ins><code><ins class="diff-new">
-http://manu.sporny.org/
-</ins></code><ins class="diff-new">
-is
-a
-string,
-the
-type
-coercion
-rules
-will
-transform
-the
-value
-into
-an
-IRI
-when
-processed
-by
-a
-JSON-LD
-Processor
-</ins></p>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.2
-</del>
-<ins class="diff-chg">3.2
-</ins>
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-A
-subject
-is
-declared
-using
-the
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-property,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "",
-</del>
-<ins class="diff-chg">  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
-</ins>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-the
-IRI
-<code>
-http://example.org/people#joebob
-</code>.
-</p>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.3
-</del>
-<ins class="diff-chg">3.3
-</ins>
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">@type
-</ins>
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-type-url).
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "@": "http://example.org/people#joebob",
-  "",
-</del>
-<ins class="diff-chg">  "@subject": "http://example.org/people#joebob",
-  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-</ins>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-<ins class="diff-new">if
-the
-JSON-LD
-document
-is
-mapped
-to
-RDF
-</ins>
-(in
-N-Triples
-notation):
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-</div>
-<div id="strings" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.4
-</del>
-<ins class="diff-chg">3.4
-</ins>
-</span>
-<del class="diff-old">Plain
-Literals
-</del>
-<ins class="diff-chg">Strings
-</ins>
-</h3>
-<p>
-Regular
-text
-<del class="diff-old">strings
-are
-called
-a
-</del>
-<ins class="diff-chg">strings,
-also
-refered
-to
-as
-</ins>
-<dfn title="plain_literal" id="dfn-plain_literal">
-plain
-literal
-</dfn>
-<del class="diff-old">in
-RDF
-and
-</del>
-<ins class="diff-chg">s,
-</ins>
-are
-easily
-expressed
-using
-regular
-JSON
-strings.
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}
-</pre>
-</div>
-<div id="string-internationalization" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.5
-</del>
-<ins class="diff-chg">3.5
-</ins>
-</span>
-<del class="diff-old">Language
-Specification
-in
-Plain
-Literals
-</del>
-<ins class="diff-chg">String
-Internationalization
-</ins>
-</h3>
-<p>
-JSON-LD
-makes
-an
-assumption
-that
-<del class="diff-old">plain
-literal
-s
-</del>
-<ins class="diff-chg">strings
-</ins>
-with
-associated
-language
-encoding
-information
-<del class="diff-old">is
-</del>
-<ins class="diff-chg">are
-</ins>
-not
-very
-common
-when
-used
-in
-JavaScript
-and
-Web
-Services.
-Thus,
-it
-takes
-a
-little
-more
-effort
-to
-express
-<del class="diff-old">plain
-literals
-in
-a
-specified
-language.
-</del>
-<ins class="diff-chg">strings
-with
-associated
-language
-information.
-</ins>
-</p>
-<pre class="example">
-{
-...
-  "foaf:name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-for
-<em>
-花澄
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-<del class="diff-old">tag
-</del>
-<ins class="diff-chg">code
-</ins>
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="datatypes" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.6
-</del>
-<ins class="diff-chg">3.6
-</ins>
-</span>
-<del class="diff-old">Typed
-Literals
-</del>
-<ins class="diff-chg">Datatypes
-</ins>
-</h3>
-<p>
-A
-<ins class="diff-new">value
-with
-an
-associated
-datatype,
-also
-known
-as
-a
-</ins>
-<dfn title="typed_literal" id="dfn-typed_literal">
-typed
-literal
-</dfn>,
-is
-indicated
-by
-<del class="diff-old">attaching
-a
-IRI
-to
-the
-end
-of
-</del>
-<ins class="diff-chg">associating
-</ins>
-a
-<del class="diff-old">plain
-</del>
-literal
-<del class="diff-old">,
-and
-this
-</del>
-<ins class="diff-chg">with
-an
-</ins>
-IRI
-<ins class="diff-new">which
-</ins>
-indicates
-the
-<ins class="diff-new">typed
-</ins>
-literal's
-datatype.
-<del class="diff-old">Literals
-</del>
-<ins class="diff-chg">Typed
-literals
-</ins>
-may
-be
-<del class="diff-old">typed
-</del>
-<ins class="diff-chg">expressed
-</ins>
-in
-JSON-LD
-in
-three
-ways:
-</p>
-<ol>
-<li>
-By
-utilizing
-the
-<code>
-@coerce
-</code>
-keyword.
-</li>
-<li>
-By
-utilizing
-the
-expanded
-form
-for
-specifying
-objects.
-</li>
-<li>
-By
-using
-a
-native
-JSON
-datatype.
-</li>
-</ol>
-<p>
-The
-first
-example
-uses
-the
-<code>
-@coerce
-</code>
-keyword
-to
-express
-a
-typed
-literal:
-</p>
-<pre class="example">
-{<span class="diff">
-  "@context": 
-<del class="diff-old">  { 
-</del>
-<ins class="diff-chg">  {
-    "dc":  "http://purl.org/dc/terms/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#"
-</ins>
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }</span>
-...
-  "dc:modified": "2010-05-29T14:17:39+02:00",
-...
-}
-</pre>
-<p>
-The
-second
-example
-uses
-the
-expanded
-form
-for
-specifying
-objects:
-</p>
-<pre class="example">
-{
-...
-  "dc:modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }</span>
-...
-}
-</pre>
-<p>
-Both
-examples
-above
-would
-generate
-an
-object
-with
-the
-literal
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-<p>
-<ins class="diff-new">The
-third
-example
-uses
-a
-built-in
-native
-JSON
-type,
-a
-number,
-to
-express
-a
-datatype:
-</ins></p><pre class="example"><ins class="diff-new">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:age": <span class="diff">31</span>
-...
-}
-</ins></pre><p><ins class="diff-new">
-The
-example
-above
-would
-generate
-the
-following
-triple:
-</ins></p><pre class="example"><ins class="diff-new">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/age&gt; 
-"31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
-.
-</ins></pre>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.7
-</del>
-<ins class="diff-chg">3.7
-</ins>
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-arrays.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-array.
-</p>
-<p class="note">
-<ins class="diff-new">In
-JSON-LD,
-Multiple
-objects
-on
-a
-property
-are
-not
-ordered.
-This
-is
-because
-typically
-graphs
-are
-not
-inherently
-ordered
-data
-structures.
-To
-see
-more
-on
-creating
-ordered
-collections
-in
-JSON-LD,
-see
-</ins><a href="#lists"><ins class="diff-new">
-Lists
-</ins></a>.</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "@": "http://example.org/people#joebob",
-</del>
-<ins class="diff-chg">  "@subject": "http://example.org/people#joebob",
-</ins>
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-"jaybee"
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.8
-</del>
-<ins class="diff-chg">3.8
-</ins>
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s
-may
-also
-be
-expressed
-using
-the
-expanded
-form
-for
-objects:
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "@": "http://example.org/articles/8",
-</del>
-<ins class="diff-chg">  "@subject": "http://example.org/articles/8",
-</ins>
-  "dcterms:modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]</span>
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="expansion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.9
-</del>
-<ins class="diff-chg">3.9
-</ins>
-</span>
-<del class="diff-old">Blank
-Nodes
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</h3>
-<p>
-<del class="diff-old">At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-</del>
-<ins class="diff-chg">Expansion
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document
-and
-applying
-a
-context
-such
-that
-all
-IRI,
-datatypes,
-and
-literal
-values
-are
-expanded
-so
-that
-the
-context
-is
-no
-longer
-necessary.
-JSON-LD
-document
-expansion
-is
-typically
-used
-when
-re-mapping
-JSON-LD
-documents
-</ins>
-to
-<del class="diff-old">specify
-</del>
-<ins class="diff-chg">application-specific
-JSON
-documents
-or
-as
-a
-part
-of
-</ins>
-the
-<del class="diff-old">subject.
-Typically,
-this
-</del>
-<a href="#normalization">
-<ins class="diff-chg">Normalization
-</ins></a><ins class="diff-chg">
-process.
-</ins></p><p><ins class="diff-chg">
-For
-example,
-assume
-the
-following
-JSON-LD
-input
-document:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}
-</ins></pre><p><ins class="diff-chg">
-Running
-the
-JSON-LD
-Expansion
-algorithm
-against
-the
-JSON-LD
-input
-document
-provided
-above
-would
-result
-in
-the
-following
-output:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}
-</ins></pre></div><div id="compaction" class="section"><h3><span class="secno"><ins class="diff-chg">
-3.10
-</ins></span><ins class="diff-chg">
-Compaction
-</ins></h3><p><ins class="diff-chg">
-Compaction
-</ins>
-is
-<del class="diff-old">where
-blank
-nodes
-come
-into
-play.
-In
-JSON-LD,
-blank
-node
-identifiers
-</del>
-<ins class="diff-chg">the
-process
-of
-taking
-a
-JSON-LD
-document
-and
-applying
-a
-context
-such
-that
-the
-most
-compact
-form
-of
-the
-document
-is
-generated.
-JSON
-is
-typically
-expressed
-in
-a
-very
-compact,
-key-value
-format.
-That
-is,
-full
-IRIs
-</ins>
-are
-<del class="diff-old">automatically
-created
-if
-</del>
-<ins class="diff-chg">rarely
-used
-as
-keys.
-At
-times,
-</ins>
-a
-<del class="diff-old">subject
-</del>
-<ins class="diff-chg">JSON-LD
-document
-may
-be
-received
-that
-</ins>
-is
-not
-<del class="diff-old">specified
-using
-</del>
-<ins class="diff-chg">in
-its
-most
-compact
-form.
-JSON-LD,
-via
-</ins>
-the
-<del class="diff-old">@
-keyword.
-However,
-authors
-may
-name
-blank
-nodes
-by
-using
-</del>
-<ins class="diff-chg">API,
-provides
-a
-way
-to
-compact
-a
-JSON-LD
-document.
-</ins></p><p><ins class="diff-chg">
-For
-example,
-assume
-</ins>
-the
-<del class="diff-old">special
-_
-CURIE
-prefix.
-</del>
-<ins class="diff-chg">following
-JSON-LD
-input
-document:
-</ins>
-</p>
-<pre class="example">
-{
-<del class="diff-old">...
-  "@": "",
-...
-</del>
-<ins class="diff-chg">   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-</ins>
-}
-</pre>
-<p>
-<del class="diff-old">The
-example
-</del>
-<ins class="diff-chg">Additionally,
-assume
-the
-following
-developer-supplied
-JSON-LD
-context:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-   "name": "http://xmlns.com/foaf/0.1/name",
-   "homepage": "http://xmlns.com/foaf/0.1/homepage",
-   "@coerce": 
-   {
-      "@iri": ["homepage"]
-   }
-}
-</ins></pre><p><ins class="diff-chg">
-Running
-the
-JSON-LD
-Compaction
-algorithm
-given
-the
-context
-supplied
-above
-against
-the
-JSON-LD
-input
-document
-provided
-</ins>
-above
-would
-<del class="diff-old">set
-</del>
-<ins class="diff-chg">result
-in
-</ins>
-the
-<del class="diff-old">subject
-</del>
-<ins class="diff-chg">following
-output:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}
-</ins></pre><p><ins class="diff-chg">
-The
-compaction
-algorithm
-also
-enables
-the
-developer
-</ins>
-to
-<ins class="diff-new">map
-any
-expanded
-format
-into
-an
-application-specific
-compacted
-format.
-While
-the
-context
-provided
-above
-mapped
-</ins>
-<code>
-<del class="diff-old">_:foo
-,
-which
-</del>
-<ins class="diff-chg">http://xmlns.com/foaf/0.1/name
-</ins></code><ins class="diff-chg">
-to
-</ins><strong><ins class="diff-chg">
-name
-</ins></strong>,<ins class="diff-chg">
-it
-could
-have
-also
-mapped
-it
-to
-any
-arbitrary
-string
-provided
-by
-the
-developer.
-</ins></p></div><div id="framing" class="section"><h3><span class="secno"><ins class="diff-chg">
-3.11
-</ins></span><ins class="diff-chg">
-Framing
-</ins></h3><p><ins class="diff-chg">
-A
-JSON-LD
-document
-is
-a
-representation
-of
-a
-directed
-graph.
-A
-single
-directed
-graph
-can
-have
-many
-different
-serializations,
-each
-expressing
-exactly
-the
-same
-information.
-Developers
-typically
-work
-with
-trees,
-also
-called
-associative
-arrays,
-when
-dealing
-with
-JSON.
-While
-mapping
-a
-graph
-to
-a
-tree
-can
-be
-done,
-the
-layout
-of
-the
-end
-result
-must
-be
-specified
-in
-advance.
-A
-</ins><dfn title="Frame" id="dfn-frame"><ins class="diff-chg">
-Frame
-</ins></dfn>
-can
-<del class="diff-old">then
-</del>
-be
-used
-<del class="diff-old">later
-</del>
-<ins class="diff-chg">by
-a
-developer
-</ins>
-on
-<ins class="diff-new">a
-JSON-LD
-document
-to
-specify
-a
-deterministic
-layout
-for
-a
-graph.
-</ins></p><p><ins class="diff-new">
-Framing
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document,
-which
-expresses
-a
-graph
-of
-information,
-and
-applying
-a
-specific
-graph
-layout
-(called
-a
-</ins><a class="tref internalDFN" title="Frame" href="#dfn-frame"><ins class="diff-new">
-Frame
-</ins></a><ins class="diff-new">
-).
-</ins></p><p><ins class="diff-new">
-The
-JSON-LD
-document
-below
-expresses
-a
-library,
-a
-book
-and
-a
-chapter:
-</ins></p><pre class="example"><ins class="diff-new">
-{
-   "@coerce": {
-    "dc":  "http://purl.org/dc/terms/",
-    "ex":  "http://example.org/"
-   },
-   "@subject": 
-   [{
-      "@subject": "http://example.org/library",
-      "@type": "ex:Library",
-      "ex:contains": "http://example.org/library/the-republic"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": "http://example.org/library/the-republic#introduction"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": "ex:Chapter",
-      "dc:description": "An introductory chapter on The Republic.",
-      "dc:title": "The Introduction"
-   }],
-   "@context": 
-   {
-      "@coerce": 
-      {
-         "@iri": "ex:contains"
-      },
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   }
-}
-</ins></pre><p><ins class="diff-new">
-Developers
-typically
-like
-to
-operate
-on
-items
-in
-a
-hierarchical,
-tree-based
-fashion.
-Ideally,
-a
-developer
-would
-want
-the
-data
-above
-sorted
-into
-top-level
-libraries,
-then
-the
-books
-that
-are
-contained
-in
-each
-library,
-and
-then
-the
-chapters
-contained
-</ins>
-in
-<ins class="diff-new">each
-book.
-To
-achieve
-that
-layout,
-the
-developer
-can
-define
-the
-following
-</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-new">
-frame
-</ins></a>:</p><pre class="example"><ins class="diff-new">
-{
-   "@context": {
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   },
-   "@type": "ex:Library",
-   "ex:contains": {
-      "@type": "ex:Book",
-      "ex:contains": {
-         "@type": "ex:Chapter"
-      }
-   }
-}
-</ins></pre><p><ins class="diff-new">
-When
-the
-framing
-algorithm
-is
-run
-against
-</ins>
-the
-<ins class="diff-new">previously
-defined
-</ins>
-JSON-LD
-<del class="diff-old">markup
-</del>
-<ins class="diff-chg">document,
-paired
-with
-the
-</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
-frame
-</ins></a><ins class="diff-chg">
-above,
-the
-following
-JSON-LD
-document
-is
-the
-end
-result:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-   "@context": 
-   {
-      "ex": "http://example.org/vocab#",
-      "dc":  "http://purl.org/dc/terms/",
-   }
-   "@subject": "http://example.org/library",
-   "@type": "ex:Library",
-   "ex:contains": 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": 
-      {
-         "@subject": "http://example.org/library/the-republic#introduction",
-         "@type": "ex:Chapter",
-         "dc:description": "An introductory chapter on The Republic.",
-         "dc:title": "The Introduction"
-      },
-   },
-}
-</ins></pre><p><ins class="diff-chg">
-The
-JSON-LD
-framing
-algorithm
-allows
-developers
-</ins>
-to
-<del class="diff-old">refer
-back
-</del>
-<ins class="diff-chg">query
-by
-example
-and
-force
-a
-specific
-tree
-layout
-</ins>
-to
-<del class="diff-old">the
-named
-blank
-node.
-</del>
-<ins class="diff-chg">a
-JSON-LD
-document.
-</ins>
-</p>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">5.
-</del>
-<ins class="diff-chg">4.
-</ins>
-</span>
-Advanced
-<del class="diff-old">Features
-</del>
-<ins class="diff-chg">Concepts
-</ins>
-</h2>
-<p>
-JSON-LD
-has
-a
-number
-of
-features
-that
-provide
-functionality
-above
-and
-beyond
-the
-core
-functionality
-<del class="diff-old">provided
-by
-RDF.
-</del>
-<ins class="diff-chg">described
-above.
-</ins>
-The
-following
-sections
-outline
-the
-features
-that
-are
-specific
-to
-JSON-LD.
-</p>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">4.1
-</ins>
-</span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-doubles,
-integers,
-and
-boolean
-values.
-As
-demonstrated
-below,
-JSON-LD
-utilizes
-that
-information
-to
-create
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s:
-</p>
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}
-</pre>
-<p class="note">
-When
-dealing
-with
-a
-number
-of
-modern
-programming
-languages,
-including
-JavaScript
-ECMA-262,
-there
-is
-no
-distinction
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>
-values.
-That
-is,
-the
-number
-<code>
-5.3
-</code>
-and
-the
-number
-<code>
-5.3e0
-</code>
-are
-treated
-as
-if
-they
-were
-the
-same.
-When
-converting
-from
-JSON-LD
-to
-a
-language-native
-format
-and
-back,
-datatype
-information
-is
-lost
-in
-a
-number
-of
-these
-languages.
-Thus,
-one
-could
-say
-that
-<code>
-5.3
-</code>
-is
-a
-<strong>
-xsd:decimal
-</strong>
-and
-<code>
-5.3e0
-</code>
-is
-an
-<strong>
-xsd:double
-</strong>
-in
-JSON-LD,
-but
-when
-both
-values
-are
-converted
-to
-a
-language-native
-format
-the
-datatype
-difference
-between
-the
-two
-is
-lost
-because
-the
-machine-level
-representation
-will
-almost
-always
-be
-a
-<strong>
-double
-</strong>.
-Implementers
-should
-be
-aware
-of
-this
-potential
-round-tripping
-issue
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>.
-Specifically
-objects
-with
-a
-datatype
-of
-<strong>
-xsd:decimal
-</strong>
-<em class="rfc2119" title="must not">
-must
-not
-</em>
-be
-converted
-to
-a
-language
-native
-type.
-</p>
-</div>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">4.2
-</ins>
-</span>
-Type
-Coercion
-</h3>
-<p>
-JSON-LD
-supports
-the
-coercion
-of
-<del class="diff-old">types
-</del>
-<ins class="diff-chg">values
-</ins>
-to
-<del class="diff-old">ensure
-that
-the
-zero-edit
-goal
-of
-JSON-LD
-can
-be
-accomplished.
-</del>
-<ins class="diff-chg">particular
-data
-types.
-</ins>
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-<del class="diff-old">and
-</del>
-<ins class="diff-chg">the
-</ins>
-incoming
-or
-outgoing
-types
-to
-the
-proper
-<del class="diff-old">RDF
-</del>
-<ins class="diff-chg">data
-</ins>
-type
-based
-on
-a
-mapping
-of
-<ins class="diff-new">data
-</ins>
-type
-IRIs
-to
-<del class="diff-old">RDF
-</del>
-<ins class="diff-chg">property
-</ins>
-types.
-Using
-type
-<del class="diff-old">conversion,
-</del>
-<ins class="diff-chg">coercion,
-</ins>
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-s,
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s
-and
-IRIs.
-</p>
-<pre class="example">
-{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-<del class="diff-old">        "xsd:anyURI": "homepage",
-</del>
-<ins class="diff-chg">        "@iri": "homepage"
-</ins>
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-<div id="chaining" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">4.3
-</ins>
-</span>
-<del class="diff-old">The
-JSON-LD
-Processing
-Algorithm
-</del>
-<ins class="diff-chg">Chaining
-</ins></h3>
-<p>
-<del class="diff-old">The
-JSON-LD
-Processing
-Model
-describes
-processing
-rules
-for
-extracting
-RDF
-from
-</del>
-<ins class="diff-chg">Object
-</ins><dfn title="chaining" id="dfn-chaining"><ins class="diff-chg">
-chaining
-</ins></dfn><ins class="diff-chg">
-is
-</ins>
-a
-JSON-LD
-<del class="diff-old">document.
-Note
-</del>
-<ins class="diff-chg">feature
-</ins>
-that
-<del class="diff-old">many
-uses
-</del>
-<ins class="diff-chg">allows
-an
-author
-to
-use
-the
-definition
-</ins>
-of
-JSON-LD
-<del class="diff-old">may
-not
-require
-generation
-of
-RDF.
-</del>
-<ins class="diff-chg">objects
-as
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><ins class="diff-chg">
-values.
-This
-is
-a
-commonly
-used
-mechanism
-for
-creating
-a
-parent-child
-relationship
-between
-two
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a><ins class="diff-chg">
-s.
-</ins>
-</p>
-<p>
-The
-<del class="diff-old">processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-</del>
-<ins class="diff-chg">example
-shows
-an
-two
-subjects
-related
-by
-</ins>
-a
-<del class="diff-old">JSON-LD
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-</del>
-<ins class="diff-chg">property
-from
-</ins>
-the
-<del class="diff-old">output
-process
-and
-are
-not
-required
-to
-implement
-</del>
-<ins class="diff-chg">first
-subject:
-</ins></p>  <pre class="example"><ins class="diff-chg">
-{
-...
-  "foaf:name": "Manu Sporny",
-  "<span class="diff">foaf:knows</span>": {
-    "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}
-</ins></pre><p><ins class="diff-chg">
-An
-object
-definition,
-like
-</ins>
-the
-<del class="diff-old">algorithm
-exactly
-</del>
-<ins class="diff-chg">one
-used
-above,
-</ins><em class="rfc2119" title="may"><ins class="diff-chg">
-may
-</ins></em><ins class="diff-chg">
-be
-used
-</ins>
-as
-<del class="diff-old">described.
-The
-Processing
-Algorithm
-is
-</del>
-a
-<del class="diff-old">work
-</del>
-<ins class="diff-chg">JSON
-value
-at
-any
-point
-</ins>
-in
-<del class="diff-old">progress.
-</del>
-<ins class="diff-chg">JSON-LD.
-</ins>
-</p>
-</div>
-<div id="identifying-unlabeled-nodes" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">4.4
-</ins>
-</span>
-<del class="diff-old">Overview
-</del>
-<ins class="diff-chg">Identifying
-Unlabeled
-Nodes
-</ins>
-</h3>
-<p>
-<del class="diff-old">This
-section
-is
-non-normative.
-JSON-LD
-is
-intended
-</del>
-<ins class="diff-chg">At
-times,
-it
-becomes
-necessary
-</ins>
-to
-<del class="diff-old">have
-an
-easy
-</del>
-<ins class="diff-chg">be
-able
-</ins>
-to
-<del class="diff-old">parse
-grammar
-that
-closely
-models
-existing
-practice
-in
-using
-JSON
-for
-describing
-object
-representations.
-This
-allows
-</del>
-<ins class="diff-chg">express
-information
-without
-being
-able
-to
-specify
-</ins>
-the
-<del class="diff-old">use
-</del>
-<ins class="diff-chg">subject.
-Typically,
-this
-type
-</ins>
-of
-<del class="diff-old">existing
-libraries
-for
-parsing
-JSON
-in
-a
-document-oriented
-fashion,
-</del>
-<ins class="diff-chg">node
-is
-called
-an
-unlabeled
-node
-</ins>
-or
-<del class="diff-old">can
-allow
-for
-stream-based
-parsing
-similar
-to
-SAX.
-As
-with
-other
-grammars
-used
-for
-describing
-linked
-data,
-</del>
-a
-<del class="diff-old">key
-concept
-is
-that
-of
-</del>
-<ins class="diff-chg">blank
-node.
-In
-JSON-LD,
-unlabeled
-node
-identifiers
-are
-automatically
-created
-if
-</ins>
-a
-<del class="diff-old">resource
-.
-Resources
-</del>
-<ins class="diff-chg">subject
-is
-not
-specified
-using
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-keyword.
-However,
-authors
-</ins>
-may
-<del class="diff-old">be
-of
-three
-basic
-types:
-IRI
-s,
-for
-describing
-externally
-named
-entities,
-BNodes
-,
-resources
-</del>
-<ins class="diff-chg">provide
-identifiers
-</ins>
-for
-<ins class="diff-new">unlabeled
-nodes
-by
-using
-the
-special
-</ins><code><ins class="diff-new">
-_
-</ins></code><ins class="diff-new">
-(underscore)
-CURIE
-prefix.
-</ins></p><pre class="example"><ins class="diff-new">
-{
-...
-  "@subject": "<span class="diff">_:foo</span>",
-...
-}
-</ins></pre><p><ins class="diff-new">
-The
-example
-above
-would
-set
-the
-subject
-to
-</ins><code><ins class="diff-new">
-_:foo
-</ins></code>,
-which
-<del class="diff-old">an
-external
-name
-does
-not
-exist,
-or
-</del>
-<ins class="diff-chg">can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-unlabeled
-node.
-This
-practice,
-however,
-</ins>
-is
-<del class="diff-old">not
-known,
-and
-Literals,
-which
-describe
-terminal
-entities
-such
-as
-strings,
-dates
-and
-other
-representations
-having
-</del>
-<ins class="diff-chg">usually
-frowned
-upon
-when
-generating
-Linked
-Data.
-If
-</ins>
-a
-<del class="diff-old">lexical
-representation
-possibly
-including
-an
-explicit
-language
-or
-datatype.
-</del>
-<ins class="diff-chg">developer
-finds
-that
-they
-refer
-to
-the
-unlabeled
-node
-more
-than
-once,
-they
-should
-consider
-naming
-the
-node
-using
-a
-resolve-able
-IRI.
-</ins>
-</p>
-</div>
-<div id="overriding-keywords" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">4.5
-</ins></span><ins class="diff-new">
-Overriding
-Keywords
-</ins></h3>
-<p>
-<del class="diff-old">Data
-described
-with
-</del>
-JSON-LD
-<del class="diff-old">may
-</del>
-<ins class="diff-chg">allows
-all
-of
-the
-syntax
-keywords,
-except
-for
-</ins><code><ins class="diff-chg">
-@context
-</ins></code>,<ins class="diff-chg">
-to
-</ins>
-be
-<del class="diff-old">considered
-</del>
-<ins class="diff-chg">overridden.
-This
-feature
-allows
-more
-legacy
-JSON
-content
-</ins>
-to
-be
-<del class="diff-old">the
-representation
-of
-a
-graph
-made
-up
-of
-subject
-and
-object
-resources
-related
-via
-a
-predicate
-resource.
-However,
-specific
-implementations
-may
-choose
-</del>
-<ins class="diff-chg">supported
-by
-JSON-LD.
-It
-also
-allows
-developers
-</ins>
-to
-<del class="diff-old">operate
-on
-</del>
-<ins class="diff-chg">design
-domain-specific
-implementations
-using
-only
-</ins>
-the
-<del class="diff-old">document
-as
-</del>
-<ins class="diff-chg">JSON-LD
-context.
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-  "@context": 
-  {  
-</ins>     <span class="diff">"url": "@subject"</span>,     <span class="diff">"a": "@type"</span>,<ins class="diff-chg">
-     "name": "http://schema.org/name"
-  },
-  "url": "http://example.com/about#gregg",
-  "a": "http://schema.org/Person",
-  "name": "Gregg Kellogg"
-}
-</ins></pre><p><ins class="diff-chg">
-In
-the
-example
-above,
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-and
-</ins><code><ins class="diff-chg">
-@type
-</ins></code><ins class="diff-chg">
-keywords
-have
-been
-overridden
-by
-</ins><strong><ins class="diff-chg">
-url
-</ins></strong><ins class="diff-chg">
-and
-</ins><strong>
-a
-<del class="diff-old">normal
-JSON
-description
-of
-objects
-having
-attributes.
-</del>
-</strong>,
-<ins class="diff-chg">respectively.
-</ins>
-</p>
-</div>
-<div id="normalization" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">4.6
-</ins>
-</span>
-<del class="diff-old">Processing
-Algorithm
-Terms
-</del>
-<ins class="diff-chg">Normalization
-</ins>
-</h3>
-<del class="diff-old">default
-context
-a
-context
-that
-</del>
-<p>
-<ins class="diff-chg">Normalization
-</ins>
-is
-<del class="diff-old">specified
-to
-</del>
-the
-<ins class="diff-new">process
-of
-taking
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-<del class="diff-old">processing
-algorithm
-before
-processing
-begins.
-default
-graph
-</del>
-<ins class="diff-chg">input
-</ins></a><ins class="diff-chg">
-and
-performing
-a
-deterministic
-transformation
-on
-that
-input
-that
-results
-in
-a
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a><ins class="diff-chg">
-that
-any
-conforming
-JSON-LD
-processor
-would
-have
-generated
-given
-</ins>
-the
-<del class="diff-old">destination
-</del>
-<ins class="diff-chg">same
-input.
-The
-problem
-is
-a
-fairly
-difficult
-technical
-problem
-to
-solve
-because
-it
-requires
-a
-directed
-</ins>
-graph
-<del class="diff-old">for
-</del>
-<ins class="diff-chg">to
-be
-ordered
-into
-a
-set
-of
-nodes
-and
-edges
-in
-a
-deterministic
-way.
-This
-is
-easy
-to
-do
-when
-</ins>
-all
-<del class="diff-old">triples
-generated
-by
-JSON-LD
-markup.
-active
-subject
-</del>
-<ins class="diff-chg">of
-</ins>
-the
-<del class="diff-old">currently
-active
-subject
-that
-</del>
-<ins class="diff-chg">nodes
-have
-unique
-names,
-but
-very
-difficult
-to
-do
-when
-some
-of
-</ins>
-the
-<del class="diff-old">processor
-should
-use
-</del>
-<ins class="diff-chg">nodes
-are
-not
-labeled.
-</ins></p><p><ins class="diff-chg">
-Normalization
-is
-useful
-when
-comparing
-two
-graphs
-against
-one
-another,
-</ins>
-when
-generating
-<del class="diff-old">triples.
-active
-property
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-</del>
-<ins class="diff-chg">a
-detailed
-list
-of
-differences
-between
-two
-graphs,
-and
-</ins>
-when
-generating
-<del class="diff-old">triples.
-active
-object
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-</del>
-<ins class="diff-chg">a
-cryptographic
-digital
-signature
-for
-information
-contained
-in
-a
-graph
-or
-</ins>
-when
-generating
-<del class="diff-old">triples.
-active
-context
-</del>
-a
-<del class="diff-old">context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-</del>
-<ins class="diff-chg">hash
-of
-</ins>
-the
-<del class="diff-old">processing
-algorithm
-</del>
-<ins class="diff-chg">information
-contained
-in
-a
-graph.
-</ins></p><p><ins class="diff-chg">
-The
-example
-below
-</ins>
-is
-<del class="diff-old">running.
-</del>
-<ins class="diff-chg">an
-un-normalized
-JSON-LD
-document:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-      "@coerce": 
-      {
-         "@iri": ["homepage"]
-      }
-   }
-}
-</ins></pre><p>
-The
-<del class="diff-old">active
-context
-</del>
-<ins class="diff-chg">example
-below
-</ins>
-is
-the
-<del class="diff-old">context
-contained
-within
-</del>
-<ins class="diff-chg">normalized
-form
-of
-</ins>
-the
-<del class="diff-old">processor
-state
-.
-local
-context
-a
-context
-that
-</del>
-<ins class="diff-chg">JSON-LD
-document
-above:
-</ins></p><p class="note"><ins class="diff-chg">
-Whitespace
-</ins>
-is
-<del class="diff-old">specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-</del>
-<ins class="diff-chg">used
-below
-to
-aid
-readability.
-The
-normalization
-algorithm
-for
-JSON-LD
-remove
-all
-unnecessary
-whitespace
-in
-</ins>
-the
-<del class="diff-old">@context
-keyword.
-processor
-state
-</del>
-<ins class="diff-chg">fully
-normalized
-form.
-</ins></p><pre class="example"><ins class="diff-chg">
-[{
-    "@subject": 
-    {
-        "@iri": "_:c14n0"
-    },
-    "http://xmlns.com/foaf/0.1/homepage": 
-    {
-        "@iri": "http://manu.sporny.org/"
-    },
-    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
-}]
-</ins></pre><p><ins class="diff-chg">
-Notice
-how
-all
-of
-</ins>
-the
-<del class="diff-old">processor
-state
-,
-which
-includes
-</del>
-<a class="tref internalDFN" title="term" href="#dfn-term">
-<ins class="diff-chg">term
-</ins></a><ins class="diff-chg">
-s
-have
-been
-expanded
-and
-sorted
-in
-alphabetical
-order.
-Also,
-notice
-how
-</ins>
-the
-<del class="diff-old">active
-context
-,
-current
-</del>
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-<del class="diff-old">,
-and
-current
-property
-.
-The
-processor
-state
-</del>
-</a>
-<del class="diff-old">is
-managed
-as
-a
-stack
-</del>
-<ins class="diff-chg">has
-been
-labeled
-</ins>
-with
-<del class="diff-old">elements
-from
-the
-previous
-processor
-state
-copied
-into
-</del>
-a
-<del class="diff-old">new
-processor
-state
-when
-entering
-a
-new
-associative
-array.
-</del>
-<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">
-<ins class="diff-chg">blank
-node
-identifier
-</ins></a>.<ins class="diff-chg">
-Normalization
-ensures
-that
-any
-arbitrary
-graph
-containing
-exactly
-the
-same
-information
-would
-be
-normalized
-to
-exactly
-the
-same
-form
-shown
-above.
-</ins></p>
-</div>
-</div>
-<div id="algorithms" class="section">
-<h2>
-<span class="secno">
-<ins class="diff-chg">5.
-</ins></span><ins class="diff-chg">
-Algorithms
-</ins></h2><p><ins class="diff-chg">
-All
-algorithms
-described
-in
-this
-section
-are
-intended
-to
-operate
-on
-language-native
-data
-structures.
-That
-is,
-the
-serialization
-to
-a
-text-based
-JSON
-document
-isn't
-required
-as
-input
-or
-output
-to
-any
-of
-these
-algorithms
-and
-language-native
-data
-structures
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-be
-used
-where
-applicable.
-</ins></p><div id="syntax-tokens-and-keywords" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.3
-</del>
-<ins class="diff-chg">5.1
-</ins>
-</span>
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">Syntax
-</ins>
-Tokens
-and
-Keywords
-</h3>
-<p>
-<ins class="diff-new">JSON-LD
-specifies
-a
-number
-of
-syntax
-tokens
-and
-keywords
-that
-are
-using
-in
-all
-algorithms
-described
-in
-this
-section:
-</ins></p>
-<dl>
-<dt>
-<code>
-@context
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</dd>
-<dt>
-<code>
-@base
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</dd>
-<dt>
-<code>
-<del class="diff-old">@profile
-A
-reference
-to
-a
-remote
-context
-description
-used
-to
-set
-the
-local
-context
-.
-</del>
-@vocab
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</dd>
-<dt>
-<code>
-@coerce
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-type
-coercion
-rules.
-</dd>
-<dt>
-<code>
-@literal
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-a
-literal
-value.
-</dd>
-<dt>
-<code>
-@iri
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-an
-IRI
-value.
-</dd>
-<dt>
-<code>
-@language
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-the
-language
-for
-a
-literal.
-</dd>
-<dt>
-<code>
-@datatype
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-the
-datatype
-for
-a
-literal.
-</dd>
-<dt>
-<code>:
-</code>
-</dt>
-<dd>
-The
-separator
-for
-CURIEs
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-</dd>
-<dt>
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>
-</dt>
-<dd>
-Sets
-the
-active
-subjects.
-</dd>
-<dt>
-<code>
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">@type
-</ins>
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-<del class="diff-old">rdf:type
-</del>
-<ins class="diff-chg">type
-</ins>
-of
-the
-active
-subjects.
-<del class="diff-old">This
-token
-may
-be
-conferred
-as
-syntactic
-sugar
-for
-rdf:type.
-</del>
-</dd>
-</dl>
-<del class="diff-old">Use
-@source
-instead
-of
-@
-?
-Use
-</del>
-</div>
-<div id="algorithm-terms" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-chg">5.2
-</ins></span><ins class="diff-chg">
-Algorithm
-Terms
-</ins></h3><dl><dt><dfn title="initial_context" id="dfn-initial_context"><ins class="diff-chg">
-initial
-context
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-context
-that
-is
-specified
-to
-the
-algorithm
-before
-processing
-begins.
-</ins></dd><dt><dfn title="active_subject" id="dfn-active_subject"><ins class="diff-chg">
-active
-subject
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-processing.
-</ins></dd><dt><dfn title="active_property" id="dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-processing.
-</ins></dd><dt><dfn title="active_object" id="dfn-active_object"><ins class="diff-chg">
-active
-object
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-processing.
-</ins></dd><dt><dfn title="active_context" id="dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-context
-that
-is
-used
-to
-resolve
-CURIEs
-while
-the
-processing
-algorithm
-is
-running.
-The
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-is
-the
-context
-contained
-within
-the
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a>.</dd><dt><dfn title="local_context" id="dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-context
-that
-is
-specified
-at
-the
-JSON
-associative-array
-level,
-specified
-via
-the
-</ins>
-<code>
-<del class="diff-old">@type
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>
-<del class="diff-old">instead
-of
-</del>
-<ins class="diff-chg">keyword.
-</ins></dd><dt><dfn title="processor_state" id="dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a>,<ins class="diff-chg">
-which
-includes
-the
-</ins><a class="tref" title="active__context"><ins class="diff-chg">
-active
-context
-</ins></a>,<a class="tref" title="current_subject"><ins class="diff-chg">
-current
-subject
-</ins></a>,<ins class="diff-chg">
-and
-</ins><a class="tref" title="current_property"><ins class="diff-chg">
-current
-property
-</ins></a>.<ins class="diff-chg">
-The
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-is
-managed
-as
-</ins>
-a
-<del class="diff-old">?
-Note
-</del>
-<ins class="diff-chg">stack
-with
-elements
-from
-the
-previous
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-copied
-into
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-when
-entering
-a
-new
-associative
-array.
-</ins></dd><dt><dfn title="JSON-LD_input" id="dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></dfn></dt><dd><ins class="diff-chg">
-The
-JSON-LD
-data
-structure
-</ins>
-that
-<del class="diff-old">both
-are
-just
-semantic
-sugar
-for
-rdf:type
-.
-</del>
-<ins class="diff-chg">is
-provided
-as
-input
-to
-the
-algorithm.
-</ins></dd><dt><dfn title="JSON-LD_output" id="dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></dfn></dt><dd><ins class="diff-chg">
-The
-JSON-LD
-data
-structure
-that
-is
-produced
-as
-output
-by
-the
-algorithm.
-</ins></dd></dl>
-</div>
-<div id="context-1" class="section">
-<h3 id="context">
-<span class="secno">
-<del class="diff-old">6.4
-</del>
-<ins class="diff-chg">5.3
-</ins>
-</span>
-Context
-</h3>
-<p>
-Processing
-of
-JSON-LD
-<ins class="diff-new">data
-structure
-</ins>
-is
-managed
-<del class="diff-old">recursively
-using
-a
-process
-described
-in
-Sequence
-.
-</del>
-<ins class="diff-chg">recursively.
-</ins>
-During
-processing,
-each
-rule
-is
-applied
-using
-information
-provided
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-Processing
-begins
-by
-pushing
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-onto
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-stack
-and
-initializing
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-with
-the
-<del class="diff-old">default
-</del>
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-<ins class="diff-chg">initial
-</ins>
-context
-</a>.
-If
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-encountered,
-information
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-merged
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</p>
-<del class="diff-old">Should
-the
-document
-URL
-be
-used
-as
-the
-default
-for
-@base
-in
-the
-default
-context
-?
-</del>
-<p>
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-used
-for
-expanding
-keys
-and
-values
-of
-an
-associative
-array
-(or
-elements
-of
-a
-list
-(see
-<span a="#list-processing">
-List
-Processing
-</span>
-)).
-</p>
-<p>
-A
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-identified
-within
-an
-associative
-array
-having
-a
-key
-of
-<code>
-@context
-</code>
-with
-<ins class="diff-new">string
-or
-</ins>
-an
-associative
-array
-value.
-When
-processing
-a
-<a class="tref" title="local__context">
-local
-context
-</a>,
-special
-<ins class="diff-new">processing
-</ins>
-rules
-apply:
-</p>
-<ol class="algorithm">
-<li>
-<del class="diff-old">The
-key
-</del>
-<ins class="diff-chg">Create
-a
-new,
-empty
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a>.</li><li><ins class="diff-chg">
-If
-the
-value
-is
-a
-simple
-string,
-it
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-have
-a
-lexical
-form
-of
-IRI
-and
-used
-to
-initialize
-a
-new
-JSON
-document
-which
-replaces
-the
-value
-for
-subsequent
-processing.
-</ins></li><li><ins class="diff-chg">
-If
-the
-value
-is
-an
-associative
-array,
-perform
-the
-following
-steps:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-associative
-array
-has
-a
-</ins>
-<code>
-@base
-</code>
-<ins class="diff-new">key,
-it
-</ins>
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-<del class="diff-old">IRI
-and
-is
-saved
-in
-</del>
-<ins class="diff-chg">an
-absolute
-IRI.
-Add
-</ins>
-the
-<del class="diff-old">active
-</del>
-<ins class="diff-chg">base
-mapping
-to
-the
-</ins><a class="tref" title="local__context"><ins class="diff-chg">
-local
-</ins>
-context
-</a>.
-<p class="issue">
-<ins class="diff-chg">Turtle
-allows
-@base
-</ins>
-to
-<del class="diff-old">perform
-term
-mapping
-as
-described
-in
-</del>
-<ins class="diff-chg">be
-relative.
-If
-we
-did
-this,
-we
-would
-have
-to
-add
-</ins><a href="#iri-expansion">
-IRI
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</a>.
-</p>
-</li>
-<li>
-<del class="diff-old">The
-key
-</del>
-<ins class="diff-chg">If
-the
-associative
-array
-has
-a
-</ins>
-<code>
-@vocab
-</code>
-<ins class="diff-new">key,
-it
-</ins>
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-<del class="diff-old">IRI
-and
-is
-saved
-in
-</del>
-<ins class="diff-chg">an
-absolute
-IRI.
-Add
-</ins>
-the
-<del class="diff-old">active
-</del>
-<ins class="diff-chg">vocabulary
-mapping
-to
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-</ins>
-context
-</a>
-<del class="diff-old">to
-perform
-term
-mapping
-as
-described
-in
-</del>
-<ins class="diff-chg">after
-performing
-</ins><a href="#iri-expansion">
-IRI
-<del class="diff-old">Processing
-.
-</del>
-<ins class="diff-chg">Expansion
-</ins></a><ins class="diff-chg">
-on
-the
-associated
-value.
-</ins>
-</li>
-<li>
-<del class="diff-old">The
-key
-</del>
-<ins class="diff-chg">If
-the
-associative
-array
-has
-a
-</ins>
-<code>
-@coerce
-</code>
-<ins class="diff-new">key,
-it
-</ins>
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-an
-associative
-array.
-<del class="diff-old">Processing
-of
-</del>
-<ins class="diff-chg">Add
-</ins>
-the
-<del class="diff-old">associative
-array
-is
-described
-below
-</del>
-<code>
-<ins class="diff-chg">@coerce
-</ins></code><ins class="diff-chg">
-mapping
-to
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins>
-</a>
-<ins class="diff-chg">performing
-</ins><a href="#iri-expansion"><ins class="diff-chg">
-IRI
-Expansion
-</ins></a><ins class="diff-chg">
-on
-the
-associated
-value(s).
-</ins>
-</li>
-<li>
-Otherwise,
-the
-key
-<em class="rfc2119" title="must">
-must
-</em>
-have
-the
-lexical
-form
-of
-<cite>
-<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">
-NCName
-</a>
-</cite>
-and
-<em class="rfc2119" title="must">
-must
-</em>
-have
-the
-value
-of
-a
-simple
-string
-with
-the
-lexical
-form
-of
-IRI.
-Merge
-<del class="diff-old">each
-</del>
-<ins class="diff-chg">the
-</ins>
-key-value
-pair
-into
-the
-<del class="diff-old">active
-</del>
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-<ins class="diff-chg">local
-</ins>
-context
-<del class="diff-old">,
-overwriting
-any
-duplicate
-values.
-</del>
-</a>.
-</li>
-<del class="diff-old">A
-</del>
-</ol>
-</li>
-<li>
-<ins class="diff-chg">Merge
-the
-of
-</ins>
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-<del class="diff-old">may
-also
-be
-loaded
-from
-an
-external
-document
-using
-</del>
-<ins class="diff-chg">'s
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-mapping
-into
-</ins>
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-<ins class="diff-new">active
-context
-</ins></a><ins class="diff-new">
-'s
-</ins>
-<code>
-<del class="diff-old">@profile
-</del>
-<ins class="diff-chg">@coerce
-</ins>
-</code>
-<del class="diff-old">key
-</del>
-<ins class="diff-chg">mapping
-</ins>
-as
-described
-<del class="diff-old">in
-Vocabulary
-Profiles
-</del>
-<a href="#coerce">
-<ins class="diff-chg">below
-</ins>
-</a>.
-</li>
-<li>
-<ins class="diff-chg">Merge
-all
-entries
-other
-than
-the
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-mapping
-from
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a><ins class="diff-chg">
-overwriting
-any
-duplicate
-values.
-</ins></li></ol>
-<div id="coerce" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">6.4.1
-</del>
-<ins class="diff-chg">5.3.1
-</ins>
-</span>
-Coerce
-</h4>
-<p>
-Map
-each
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping,
-overwriting
-any
-duplicate
-values
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping.
-The
-<code>
-@coerce
-</code>
-mapping
-has
-<del class="diff-old">a
-</del>
-either
-<del class="diff-old">of
-</del>
-a
-single
-CURIE
-or
-<del class="diff-old">of
-</del>
-an
-array
-of
-CURIEs.
-When
-merging
-with
-an
-existing
-mapping
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-map
-all
-CURIE
-values
-to
-array
-form
-and
-replace
-with
-the
-union
-of
-the
-value
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-and
-the
-value
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-If
-the
-result
-is
-an
-array
-with
-a
-single
-CURIE,
-the
-processor
-<em class="rfc2119" title="may">
-may
-</em>
-represent
-this
-as
-a
-string
-value.
-</p>
-</div>
-<div id="initial-context" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">6.5
-</del>
-<ins class="diff-chg">5.3.2
-</ins>
-</span>
-<del class="diff-old">Chaining
-</del>
-<ins class="diff-chg">Initial
-Context
-</ins></h4>
-<p>
-<del class="diff-old">Object
-chaining
-</del>
-<ins class="diff-chg">The
-</ins><a class="tref internalDFN" title="initial_context" href="#dfn-initial_context"><ins class="diff-chg">
-initial
-context
-</ins></a>
-is
-<del class="diff-old">a
-JSON-LD
-feature
-that
-allows
-an
-author
-to
-use
-the
-definition
-of
-JSON-LD
-objects
-</del>
-<ins class="diff-chg">initialized
-</ins>
-as
-<del class="diff-old">property
-values.
-This
-</del>
-<ins class="diff-chg">follows:
-</ins></p><ul><li><code><ins class="diff-chg">
-@base
-</ins></code>
-is
-<ins class="diff-new">set
-using
-</ins><cite><href="http: www.ietf.org="" rfc="" rfc2396.txt"=""><ins class="diff-new">
-section
-5.1
-Establishing
-</ins>
-a
-<del class="diff-old">commonly
-used
-mechanism
-for
-creating
-</del>
-<ins class="diff-chg">Base
-URI
-</ins></href="http:></cite><ins class="diff-chg">
-of
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986"><ins class="diff-chg">
-RFC3986
-</ins></a></cite><ins class="diff-chg">
-].
-Processors
-</ins><em class="rfc2119" title="may"><ins class="diff-chg">
-may
-</ins></em><ins class="diff-chg">
-provide
-</ins>
-a
-<del class="diff-old">parent-child
-relationship
-between
-objects.
-The
-example
-shows
-an
-two
-objects
-related
-by
-</del>
-<ins class="diff-chg">means
-of
-setting
-the
-base
-IRI
-programatically.
-</ins></li><li><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-is
-set
-with
-</ins>
-a
-<del class="diff-old">property
-</del>
-<ins class="diff-chg">single
-mapping
-</ins>
-from
-<del class="diff-old">the
-first
-object:
-  
-</del>
-<code>
-<ins class="diff-chg">@iri
-</ins></code><ins class="diff-chg">
-to
-</ins><code><ins class="diff-chg">
-@type
-</ins></code>.</li></ul>    <pre class="example">
-{
-<del class="diff-old">...
-  "foaf:name": "Manu Sporny",
-  "": {
-    "",
-    "",
-  }
-...
-</del>
-<ins class="diff-chg">    "@base": <span class="diff">document-location</span>,
-    "@context": {
-      "@iri": "@type"
-    }
-</ins>
-}
-</pre>
-<del class="diff-old">An
-object
-definition
-may
-be
-used
-anyplace
-a
-value
-is
-legal
-in
-JSON-LD.
-</del>
-</div>
-</div>
-<div id="iri-expansion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.6
-</del>
-<ins class="diff-chg">5.4
-</ins>
-</span>
-IRI
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</h3>
-<p>
-Keys
-and
-some
-values
-are
-evaluated
-to
-produce
-an
-IRI.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-a
-value
-representing
-an
-IRI
-into
-an
-actual
-IRI.
-</p>
-<p>
-IRIs
-may
-be
-represented
-as
-an
-explicit
-string,
-or
-as
-a
-CURIE,
-as
-a
-value
-relative
-to
-<code>
-@base
-</code>
-or
-<code>
-@vocab
-</code>.
-</p>
-<p>
-CURIEs
-are
-defined
-more
-formally
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-]
-<cite>
-<a href="http://www.w3.org/TR/rdfa-core/#s_curies">
-section
-6
-"CURIE
-Syntax
-Definition"
-</a>
-</cite>.
-Generally,
-a
-CURIE
-is
-composed
-of
-a
-<em>
-prefix
-</em>
-and
-a
-<em>
-suffix
-</em>
-separated
-by
-a
-':'.
-In
-JSON-LD,
-either
-the
-prefix
-may
-be
-the
-empty
-string,
-denoting
-the
-<dfn title="default_prefix" id="dfn-default_prefix">
-default
-prefix
-</dfn>.
-</p>
-<p>
-The
-<del class="diff-old">procedure
-</del>
-<ins class="diff-chg">algorithm
-</ins>
-for
-generating
-an
-IRI
-is:
-</p>
-<ol class="algorithm">
-<li>
-Split
-the
-value
-into
-a
-<em>
-prefix
-</em>
-and
-<em>
-suffix
-</em>
-from
-the
-first
-occurrence
-of
-':'.
-</li>
-<li>
-If
-the
-prefix
-is
-a
-<del class="diff-old">'_',
-generate
-a
-named
-BNode
-using
-the
-suffix
-as
-</del>
-<ins class="diff-chg">'_'
-(underscore),
-</ins>
-the
-<del class="diff-old">name.
-</del>
-<ins class="diff-chg">IRI
-is
-unchanged.
-</ins>
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-contains
-a
-mapping
-for
-<em>
-prefix
-</em>,
-generate
-an
-IRI
-by
-prepending
-the
-mapped
-prefix
-to
-the
-(possibly
-empty)
-<del class="diff-old">suffix.
-</del>
-<ins class="diff-chg">suffix
-using
-textual
-concatenation.
-</ins>
-Note
-that
-an
-empty
-suffix
-and
-no
-suffix
-(meaning
-the
-value
-contains
-no
-':'
-string
-at
-all)
-are
-treated
-equivalently.
-</li>
-<li>
-If
-the
-IRI
-being
-processed
-is
-for
-a
-property
-(i.e.,
-a
-key
-value
-in
-an
-associative
-array,
-or
-a
-value
-in
-a
-<code>
-@coerce
-</code>
-mapping)
-and
-the
-active
-context
-has
-a
-<code>
-@vocab
-</code>
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-<del class="diff-old">the
-method
-described
-in
-[
-RFC3987
-].
-</del>
-<ins class="diff-chg">textual
-concatenation.
-</ins>
-</li>
-<li>
-If
-the
-IRI
-being
-processed
-is
-for
-a
-subject
-or
-object
-(i.e.,
-not
-a
-property)
-and
-the
-active
-context
-has
-a
-<code>
-@base
-</code>
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-the
-method
-described
-in
-[
-<cite>
-<del class="diff-old">RFC3987
-</del>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
-<ins class="diff-chg">RFC3986
-</ins>
-</a>
-</cite>
-].
-</li>
-<li>
-Otherwise,
-use
-the
-value
-directly
-as
-an
-IRI.
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="iri-compaction" class="section">
-<h3>
-<span class="secno">
-<ins class="diff-new">5.5
-</ins></span><ins class="diff-new">
-IRI
-Compaction
-</ins></h3><p><ins class="diff-new">
-Some
-keys
-and
-values
-are
-expressed
-using
-IRIs.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-an
-IRI
-to
-a
-compact
-IRI
-using
-the
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
-term
-</ins></a><ins class="diff-new">
-s
-and
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-new">
-prefix
-</ins></a><ins class="diff-new">
-es
-specified
-in
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
-local
-context
-</ins></a>.</p><p><ins class="diff-new">
-The
-algorithm
-for
-generating
-a
-compacted
-IRI
-is:
-</ins></p><ol class="algorithm"><li><ins class="diff-new">
-Search
-every
-key-value
-pair
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-for
-a
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
-term
-</ins></a><ins class="diff-new">
-that
-is
-a
-complete
-match
-against
-the
-IRI.
-If
-a
-complete
-match
-is
-found,
-the
-resulting
-compacted
-IRI
-is
-the
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
-term
-</ins></a><ins class="diff-new">
-associated
-with
-the
-IRI
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a>.</li><li><ins class="diff-new">
-If
-a
-complete
-match
-is
-not
-found,
-search
-for
-a
-partial
-match
-from
-the
-beginning
-of
-the
-IRI.
-For
-all
-matches
-that
-are
-found,
-the
-resulting
-compacted
-IRI
-is
-the
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-new">
-prefix
-</ins></a><ins class="diff-new">
-associated
-with
-the
-partially
-matched
-IRI
-in
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-concatenated
-with
-a
-colon
-(:)
-character
-and
-the
-unmatched
-part
-of
-the
-string.
-If
-there
-is
-more
-than
-one
-compacted
-IRI
-produced,
-the
-final
-value
-is
-the
-lexicographically
-least
-value
-of
-the
-entire
-set
-of
-compacted
-IRIs.
-</ins></li></ol><p></p>
-</div>
-<div id="value-expansion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">5.6
-</ins>
-</span>
-<del class="diff-old">Sequence
-</del>
-<ins class="diff-chg">Value
-Expansion
-</ins></h3><p><ins class="diff-chg">
-Some
-values
-in
-JSON-LD
-can
-be
-expressed
-in
-a
-compact
-form.
-These
-values
-are
-required
-to
-be
-expanded
-at
-times
-when
-processing
-JSON-LD
-documents.
-</ins></p><p><ins class="diff-chg">
-The
-algorithm
-for
-expanding
-a
-value
-is:
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-key
-that
-is
-associated
-with
-the
-value
-has
-an
-associated
-coercion
-entry
-in
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a>,<ins class="diff-chg">
-the
-resulting
-expansion
-is
-an
-object
-populated
-according
-to
-the
-following
-steps:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-coercion
-target
-is
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code>,<ins class="diff-chg">
-expand
-the
-value
-by
-adding
-a
-new
-key-value
-pair
-where
-the
-key
-is
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code><ins class="diff-chg">
-and
-the
-value
-is
-the
-expanded
-IRI
-according
-to
-the
-</ins><a href="#iri-expansion"><ins class="diff-chg">
-IRI
-Expansion
-</ins></a><ins class="diff-chg">
-rules.
-</ins></li><li><ins class="diff-chg">
-If
-the
-coercion
-target
-is
-a
-typed
-literal,
-expand
-the
-value
-by
-adding
-two
-new
-key-value
-pairs.
-The
-first
-key-value
-pair
-will
-be
-</ins><code><ins class="diff-chg">
-@literal
-</ins></code><ins class="diff-chg">
-and
-the
-unexpanded
-value.
-The
-second
-key-value
-pair
-will
-be
-</ins><code><ins class="diff-chg">
-@datatype
-</ins></code><ins class="diff-chg">
-and
-the
-associated
-coercion
-datatype
-expanded
-according
-to
-the
-</ins><a href="#iri-expansion"><ins class="diff-chg">
-IRI
-Expansion
-</ins></a><ins class="diff-chg">
-rules.
-</ins></li></ol></li></ol><p></p></div><div id="value-compaction" class="section"><h3><span class="secno"><ins class="diff-chg">
-5.7
-</ins></span><ins class="diff-chg">
-Value
-Compaction
-</ins></h3><p><ins class="diff-chg">
-Some
-values,
-such
-as
-IRIs
-and
-typed
-literals,
-may
-be
-expressed
-in
-an
-expanded
-form
-in
-JSON-LD.
-These
-values
-are
-required
-to
-be
-compacted
-at
-times
-when
-processing
-JSON-LD
-documents.
-</ins></p><p><ins class="diff-chg">
-The
-algorithm
-for
-compacting
-a
-value
-is:
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-contains
-a
-coercion
-target
-for
-the
-key
-that
-is
-associated
-with
-the
-value,
-compact
-the
-value
-using
-the
-following
-steps:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-coercion
-target
-is
-an
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code>,<ins class="diff-chg">
-the
-compacted
-value
-is
-the
-value
-associated
-with
-the
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code><ins class="diff-chg">
-key,
-processed
-according
-to
-the
-</ins><a href="#iri-compaction"><ins class="diff-chg">
-IRI
-Compaction
-</ins></a><ins class="diff-chg">
-steps.
-</ins></li><li><ins class="diff-chg">
-If
-the
-coercion
-target
-is
-a
-typed
-literal,
-the
-compacted
-value
-is
-the
-value
-associated
-with
-the
-</ins><code><ins class="diff-chg">
-@literal
-</ins></code><ins class="diff-chg">
-key.
-</ins></li><li><ins class="diff-chg">
-Otherwise,
-the
-value
-is
-not
-modified.
-</ins></li></ol></li></ol><p></p></div><div id="expansion-1" class="section"><h3><span class="secno"><ins class="diff-chg">
-5.8
-</ins></span><ins class="diff-chg">
-Expansion
-</ins></h3><p class="issue"><ins class="diff-chg">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</ins></p><p><ins class="diff-chg">
-As
-stated
-previously,
-expansion
-is
-the
-process
-of
-taking
-a
-JSON-LD
-input
-and
-expanding
-all
-IRIs
-and
-typed
-literals
-to
-their
-fully-expanded
-form.
-The
-output
-will
-not
-contain
-a
-single
-context
-declaration
-and
-will
-have
-all
-IRIs
-and
-typed
-literals
-fully
-expanded.
-</ins></p><div id="expansion-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.8.1
-</ins></span><ins class="diff-chg">
-Expansion
-Algorithm
-</ins></h4><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-top-level
-item
-in
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-is
-an
-array,
-process
-each
-item
-in
-the
-array
-recursively
-using
-this
-algorithm.
-</ins></li><li><ins class="diff-chg">
-If
-the
-top-level
-item
-in
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-is
-an
-object,
-update
-the
-</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
-local
-context
-</ins></a><ins class="diff-chg">
-according
-to
-the
-steps
-outlined
-in
-the
-</ins><a href="#context"><ins class="diff-chg">
-context
-</ins></a><ins class="diff-chg">
-section.
-Process
-each
-key,
-expanding
-the
-key
-according
-to
-the
-</ins><a href="#iri-expansion"><ins class="diff-chg">
-IRI
-Expansion
-</ins></a><ins class="diff-chg">
-rules.
-</ins></li><ol class="algorithm"><li><ins class="diff-chg">
-Process
-each
-value
-associated
-with
-each
-key
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-value
-is
-an
-array,
-process
-each
-item
-in
-the
-array
-recursively
-using
-this
-algorithm.
-</ins></li><li><ins class="diff-chg">
-If
-the
-value
-is
-an
-object,
-process
-the
-object
-recursively
-using
-this
-algorithm.
-</ins></li><li><ins class="diff-chg">
-Otherwise,
-check
-to
-see
-the
-associated
-key
-has
-an
-associated
-coercion
-rule.
-If
-the
-value
-should
-be
-coerced,
-expand
-the
-value
-according
-to
-the
-</ins><a href="#value-expansion"><ins class="diff-chg">
-Value
-Expansion
-</ins></a><ins class="diff-chg">
-rules.
-If
-the
-value
-does
-not
-need
-to
-be
-coerced,
-leave
-the
-value
-as-is.
-</ins></li></ol></li><li><ins class="diff-chg">
-Remove
-the
-context
-from
-the
-object
-</ins></li></ol></ol></div></div><div id="compaction-1" class="section"><h3><span class="secno"><ins class="diff-chg">
-5.9
-</ins></span><ins class="diff-chg">
-Compaction
-</ins></h3><p class="issue"><ins class="diff-chg">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</ins></p><p><ins class="diff-chg">
-As
-stated
-previously,
-compaction
-is
-the
-process
-of
-taking
-a
-JSON-LD
-input
-and
-compacting
-all
-IRIs
-using
-a
-given
-context.
-The
-output
-will
-contain
-a
-single
-top-level
-context
-declaration
-and
-will
-only
-use
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s
-and
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
-prefix
-</ins></a><ins class="diff-chg">
-es
-and
-will
-ensure
-that
-all
-typed
-literals
-are
-fully
-compacted.
-</ins></p><div id="compaction-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.9.1
-</ins></span><ins class="diff-chg">
-Compaction
-Algorithm
-</ins></h4><ol class="algorithm"><li><ins class="diff-chg">
-Perform
-the
-</ins><a href="#expansion-algorithm"><ins class="diff-chg">
-Expansion
-Algorithm
-</ins></a><ins class="diff-chg">
-on
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a>.</li><li><ins class="diff-chg">
-If
-the
-top-level
-item
-is
-an
-array,
-process
-each
-item
-in
-the
-array
-recursively,
-starting
-at
-this
-step.
-</ins></li><li><ins class="diff-chg">
-If
-the
-top-level
-item
-is
-an
-object,
-compress
-each
-key
-using
-the
-steps
-defined
-in
-</ins><a href="#iri-compaction"><ins class="diff-chg">
-IRI
-Compaction
-</ins></a><ins class="diff-chg">
-and
-compress
-each
-value
-using
-the
-steps
-defined
-in
-</ins><a href="#value-compaction"><ins class="diff-chg">
-Value
-Compaction
-</ins></a></li></ol></div></div><div id="framing-1" class="section"><h3><span class="secno"><ins class="diff-chg">
-5.10
-</ins></span><ins class="diff-chg">
-Framing
-</ins></h3><p class="issue"><ins class="diff-chg">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</ins></p><p><ins class="diff-chg">
-A
-JSON-LD
-document
-is
-a
-representation
-of
-a
-directed
-graph.
-A
-single
-directed
-graph
-can
-have
-many
-different
-serializations,
-each
-expressing
-exactly
-the
-same
-information.
-Developers
-typically
-don't
-work
-directly
-with
-graphs,
-but
-rather,
-prefer
-trees
-when
-dealing
-with
-JSON.
-While
-mapping
-a
-graph
-to
-a
-tree
-can
-be
-done,
-the
-layout
-of
-the
-end
-result
-must
-be
-specified
-in
-advance.
-This
-section
-defines
-an
-algorithm
-for
-mapping
-a
-graph
-to
-a
-tree
-given
-a
-</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
-frame
-</ins></a>.</p><div id="framing-algorithm-terms" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.10.1
-</ins></span><ins class="diff-chg">
-Framing
-Algorithm
-Terms
-</ins></h4><dl><dt><dfn title="input_frame" id="dfn-input_frame"><ins class="diff-chg">
-input
-frame
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-initial
-</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
-frame
-</ins></a><ins class="diff-chg">
-provided
-to
-the
-framing
-algorithm.
-</ins></dd><dt><dfn title="framing_context" id="dfn-framing_context"><ins class="diff-chg">
-framing
-context
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-context
-containing
-the
-</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
-object
-embed
-flag
-</ins></a>,<ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
-explicit
-inclusion
-flag
-</ins></a><ins class="diff-chg">
-and
-the
-</ins><a class="tref" title="omit_default_flag"><ins class="diff-chg">
-omit
-default
-flag
-</ins></a>.</dd><dt><dfn title="object_embed_flag" id="dfn-object_embed_flag"><ins class="diff-chg">
-object
-embed
-flag
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-flag
-specifying
-that
-objects
-should
-be
-directly
-embedded
-in
-the
-output,
-instead
-of
-being
-referred
-to
-by
-their
-IRI.
-</ins></dd><dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag"><ins class="diff-chg">
-explicit
-inclusion
-flag
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-flag
-specifying
-that
-for
-properties
-to
-be
-included
-in
-the
-output,
-they
-must
-be
-explicitly
-declared
-in
-the
-</ins><a class="tref internalDFN" title="framing_context" href="#dfn-framing_context"><ins class="diff-chg">
-framing
-context
-</ins></a>.</dd><dt><dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag"><ins class="diff-chg">
-omit
-missing
-properties
-flag
-</ins></dfn></dt><dd><ins class="diff-chg">
-a
-flag
-specifying
-that
-properties
-that
-are
-missing
-from
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-should
-be
-omitted
-from
-the
-output.
-</ins></dd><dt><dfn title="match_limit" id="dfn-match_limit"><ins class="diff-chg">
-match
-limit
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-value
-specifying
-the
-maximum
-number
-of
-matches
-to
-accept
-when
-building
-arrays
-of
-values
-during
-the
-framing
-algorithm.
-A
-value
-of
--1
-specifies
-that
-there
-is
-no
-match
-limit.
-</ins></dd><dt><dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects"><ins class="diff-chg">
-map
-of
-embedded
-subjects
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-map
-that
-tracks
-if
-a
-subject
-has
-been
-embedded
-in
-the
-output
-of
-the
-</ins><a href="#framing-algorithm"><ins class="diff-chg">
-Framing
-Algorithm
-</ins></a>.</dd></dl></div><div id="framing-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.10.2
-</ins></span><ins class="diff-chg">
-Framing
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-The
-framing
-algorithm
-takes
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-that
-has
-been
-normalized
-according
-to
-the
-</ins><a href="#normalization-algorithm"><ins class="diff-chg">
-Normalization
-Algorithm
-</ins></a><ins class="diff-chg">
-(
-</ins><strong><ins class="diff-chg">
-normalized
-input
-</ins></strong><ins class="diff-chg">
-),
-an
-</ins><a class="tref internalDFN" title="input_frame" href="#dfn-input_frame"><ins class="diff-chg">
-input
-frame
-</ins></a><ins class="diff-chg">
-that
-has
-been
-expanded
-according
-to
-the
-</ins><a href="#expansion-algorithm"><ins class="diff-chg">
-Expansion
-Algorithm
-</ins></a><ins class="diff-chg">
-(
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-),
-and
-a
-number
-of
-options
-and
-produces
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a>.<ins class="diff-chg">
-The
-following
-series
-of
-steps
-is
-the
-recursive
-portion
-of
-the
-framing
-algorithm:
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Initialize
-the
-</ins><a class="tref internalDFN" title="framing_context" href="#dfn-framing_context"><ins class="diff-chg">
-framing
-context
-</ins></a><ins class="diff-chg">
-by
-setting
-the
-</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
-object
-embed
-flag
-</ins></a>,<ins class="diff-chg">
-clearing
-the
-</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
-explicit
-inclusion
-flag
-</ins></a>,<ins class="diff-chg">
-and
-clearing
-the
-</ins><a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag"><ins class="diff-chg">
-omit
-missing
-properties
-flag
-</ins></a>.<ins class="diff-chg">
-Override
-these
-values
-based
-on
-input
-options
-provided
-to
-the
-algorithm
-by
-the
-application.
-</ins></li><li><ins class="diff-chg">
-Generate
-a
-</ins><dfn title="list_of_frames" id="dfn-list_of_frames"><ins class="diff-chg">
-list
-of
-frames
-</ins></dfn><ins class="diff-chg">
-by
-processing
-the
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong>:<ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-is
-not
-an
-array,
-set
-</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
-match
-limit
-</ins></a><ins class="diff-chg">
-to
-1,
-place
-the
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-into
-the
-</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
-list
-of
-frames
-</ins></a>,<ins class="diff-chg">
-and
-set
-the
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a><ins class="diff-chg">
-to
-</ins><code><ins class="diff-chg">
-null
-</ins></code>.</li><li><ins class="diff-chg">
-If
-the
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-is
-an
-empty
-array,
-place
-an
-empty
-object
-into
-the
-</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
-list
-of
-frames
-</ins></a>,<ins class="diff-chg">
-set
-the
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a><ins class="diff-chg">
-to
-an
-array,
-and
-set
-</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
-match
-limit
-</ins></a><ins class="diff-chg">
-to
--1.
-</ins></li><li><ins class="diff-chg">
-If
-the
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-is
-a
-non-empty
-array,
-add
-each
-item
-in
-the
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-into
-the
-</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
-list
-of
-frames
-</ins></a>,<ins class="diff-chg">
-set
-the
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a><ins class="diff-chg">
-to
-an
-array,
-and
-set
-</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
-match
-limit
-</ins></a><ins class="diff-chg">
-to
--1.
-</ins></li></ol></li><li><ins class="diff-chg">
-Create
-a
-</ins><dfn title="match_array" id="dfn-match_array"><ins class="diff-chg">
-match
-array
-</ins></dfn><ins class="diff-chg">
-for
-each
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-in
-the
-</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
-list
-of
-frames
-</ins></a><ins class="diff-chg">
-halting
-when
-either
-the
-</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
-match
-limit
-</ins></a><ins class="diff-chg">
-is
-zero
-or
-the
-end
-of
-the
-</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
-list
-of
-frames
-</ins></a><ins class="diff-chg">
-is
-reached.
-If
-an
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-is
-not
-an
-object,
-the
-processor
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-throw
-a
-</ins><code><ins class="diff-chg">
-Invalid
-Frame
-Format
-</ins></code><ins class="diff-chg">
-exception.
-Add
-each
-matching
-item
-from
-the
-</ins><strong><ins class="diff-chg">
-normalized
-input
-</ins></strong><ins class="diff-chg">
-to
-the
-</ins><a class="tref" title="matches_array"><ins class="diff-chg">
-matches
-array
-</ins></a><ins class="diff-chg">
-and
-decrement
-the
-</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
-match
-limit
-</ins></a><ins class="diff-chg">
-by
-1
-if:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-The
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-has
-an
-</ins><code><ins class="diff-chg">
-rdf:type
-</ins></code><ins class="diff-chg">
-that
-exists
-in
-the
-item's
-list
-of
-</ins><code><ins class="diff-chg">
-rdf:type
-</ins></code><ins class="diff-chg">
-s.
-Note:
-the
-</ins><code><ins class="diff-chg">
-rdf:type
-</ins></code><ins class="diff-chg">
-can
-be
-an
-array,
-but
-only
-one
-value
-needs
-to
-be
-in
-common
-between
-the
-item
-and
-the
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-for
-a
-match.
-</ins></li><li><ins class="diff-chg">
-The
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-does
-not
-have
-an
-</ins><code><ins class="diff-chg">
-rdf:type
-</ins></code><ins class="diff-chg">
-property,
-but
-every
-property
-in
-the
-</ins><strong><ins class="diff-chg">
-expanded
-frame
-</ins></strong><ins class="diff-chg">
-exists
-in
-the
-item.
-</ins></li></ol></li><li><ins class="diff-chg">
-Process
-each
-item
-in
-the
-</ins><a class="tref internalDFN" title="match_array" href="#dfn-match_array"><ins class="diff-chg">
-match
-array
-</ins></a><ins class="diff-chg">
-with
-its
-associated
-</ins><dfn title="match_frame" id="dfn-match_frame"><ins class="diff-chg">
-match
-frame
-</ins></dfn>:<ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
-match
-frame
-</ins></a><ins class="diff-chg">
-contains
-an
-</ins><code><ins class="diff-chg">
-@embed
-</ins></code><ins class="diff-chg">
-keyword,
-set
-the
-</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
-object
-embed
-flag
-</ins></a><ins class="diff-chg">
-to
-its
-value.
-If
-the
-</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
-match
-frame
-</ins></a><ins class="diff-chg">
-contains
-an
-</ins><code><ins class="diff-chg">
-@explicit
-</ins></code><ins class="diff-chg">
-keyword,
-set
-the
-</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
-explicit
-inclusion
-flag
-</ins></a><ins class="diff-chg">
-to
-its
-value.
-Note:
-if
-the
-keyword
-exists,
-but
-the
-value
-is
-neither
-</ins><code><ins class="diff-chg">
-true
-</ins></code><ins class="diff-chg">
-or
-</ins><code><ins class="diff-chg">
-false
-</ins></code>,<ins class="diff-chg">
-set
-the
-associated
-flag
-to
-</ins><code><ins class="diff-chg">
-true
-</ins></code>.</li><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
-object
-embed
-flag
-</ins></a><ins class="diff-chg">
-is
-cleared
-and
-the
-item
-has
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-property,
-replace
-the
-item
-with
-the
-value
-of
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-property.
-</ins></li><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
-object
-embed
-flag
-</ins></a><ins class="diff-chg">
-is
-set
-and
-the
-item
-has
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-property,
-and
-its
-IRI
-is
-in
-the
-</ins><a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects"><ins class="diff-chg">
-map
-of
-embedded
-subjects
-</ins></a>,<ins class="diff-chg">
-throw
-a
-</ins><code><ins class="diff-chg">
-Duplicate
-Embed
-</ins></code><ins class="diff-chg">
-exception.
-</ins></li><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
-object
-embed
-flag
-</ins></a><ins class="diff-chg">
-is
-set
-and
-the
-item
-has
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-property
-and
-its
-IRI
-is
-not
-in
-the
-</ins><a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects"><ins class="diff-chg">
-map
-of
-embedded
-subjects
-</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
-explicit
-inclusion
-flag
-</ins></a><ins class="diff-chg">
-is
-set,
-then
-delete
-any
-key
-from
-the
-item
-that
-does
-not
-exist
-in
-the
-</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
-match
-frame
-</ins></a>,<ins class="diff-chg">
-except
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code>.</li><li><ins class="diff-chg">
-For
-each
-key
-in
-the
-</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
-match
-frame
-</ins></a>,<ins class="diff-chg">
-except
-for
-keywords
-and
-</ins><code><ins class="diff-chg">
-rdf:type
-</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-key
-is
-in
-the
-item,
-then
-build
-a
-new
-</ins><dfn title="recursion_input_list" id="dfn-recursion_input_list"><ins class="diff-chg">
-recursion
-input
-list
-</ins></dfn><ins class="diff-chg">
-using
-the
-object
-or
-objects
-associated
-with
-the
-key.
-If
-any
-object
-contains
-an
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code><ins class="diff-chg">
-value
-that
-exists
-in
-the
-</ins><a class="tref" title="normalized_input"><ins class="diff-chg">
-normalized
-input
-</ins></a>,<ins class="diff-chg">
-replace
-the
-object
-in
-the
-</ins><a class="tref" title="recusion_input_list"><ins class="diff-chg">
-recusion
-input
-list
-</ins></a><ins class="diff-chg">
-with
-a
-new
-object
-containing
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-key
-where
-the
-value
-is
-the
-value
-of
-the
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code>,<ins class="diff-chg">
-and
-all
-of
-the
-other
-key-value
-pairs
-for
-that
-subject.
-Set
-the
-</ins><dfn title="recursion_match_frame" id="dfn-recursion_match_frame"><ins class="diff-chg">
-recursion
-match
-frame
-</ins></dfn><ins class="diff-chg">
-to
-the
-value
-associated
-with
-the
-</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
-match
-frame
-</ins></a><ins class="diff-chg">
-'s
-key.
-Replace
-the
-value
-associated
-with
-the
-key
-by
-recursively
-calling
-this
-algorithm
-using
-</ins><a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list"><ins class="diff-chg">
-recursion
-input
-list
-</ins></a>,<a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame"><ins class="diff-chg">
-recursion
-match
-frame
-</ins></a><ins class="diff-chg">
-as
-input.
-</ins></li><li><ins class="diff-chg">
-If
-the
-key
-is
-not
-in
-the
-item,
-add
-the
-key
-to
-the
-item
-and
-set
-the
-associated
-value
-to
-an
-empty
-array
-if
-the
-</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
-match
-frame
-</ins></a><ins class="diff-chg">
-key's
-value
-is
-an
-array
-or
-</ins><code><ins class="diff-chg">
-null
-</ins></code><ins class="diff-chg">
-otherwise.
-</ins></li><li><ins class="diff-chg">
-If
-value
-associated
-with
-the
-item's
-key
-is
-</ins><code><ins class="diff-chg">
-null
-</ins></code>,<ins class="diff-chg">
-process
-the
-</ins><a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag"><ins class="diff-chg">
-omit
-missing
-properties
-flag
-</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-value
-associated
-with
-the
-key
-in
-the
-</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
-match
-frame
-</ins></a><ins class="diff-chg">
-is
-an
-array,
-use
-the
-first
-frame
-from
-the
-array
-as
-the
-</ins><dfn title="property_frame" id="dfn-property_frame"><ins class="diff-chg">
-property
-frame
-</ins></dfn>,<ins class="diff-chg">
-otherwise
-set
-the
-</ins><a class="tref internalDFN" title="property_frame" href="#dfn-property_frame"><ins class="diff-chg">
-property
-frame
-</ins></a><ins class="diff-chg">
-to
-an
-empty
-object.
-</ins></li><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="property_frame" href="#dfn-property_frame"><ins class="diff-chg">
-property
-frame
-</ins></a><ins class="diff-chg">
-contains
-an
-</ins><code><ins class="diff-chg">
-@omitDefault
-</ins></code><ins class="diff-chg">
-keyword,
-set
-the
-</ins><a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag"><ins class="diff-chg">
-omit
-missing
-properties
-flag
-</ins></a><ins class="diff-chg">
-to
-its
-value.
-Note:
-if
-the
-keyword
-exists,
-but
-the
-value
-is
-neither
-</ins><code><ins class="diff-chg">
-true
-</ins></code><ins class="diff-chg">
-or
-</ins><code><ins class="diff-chg">
-false
-</ins></code>,<ins class="diff-chg">
-set
-the
-associated
-flag
-to
-</ins><code><ins class="diff-chg">
-true
-</ins></code>.</li><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag"><ins class="diff-chg">
-omit
-missing
-properties
-flag
-</ins></a><ins class="diff-chg">
-is
-set,
-delete
-the
-key
-in
-the
-item.
-Otherwise,
-if
-the
-</ins><code><ins class="diff-chg">
-@default
-</ins></code><ins class="diff-chg">
-keyword
-is
-set
-in
-the
-</ins><a class="tref internalDFN" title="property_frame" href="#dfn-property_frame"><ins class="diff-chg">
-property
-frame
-</ins></a><ins class="diff-chg">
-set
-the
-item's
-value
-to
-the
-value
-of
-</ins><code><ins class="diff-chg">
-@default
-</ins></code>.</li></ol></li></ol></li></ol></li><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a><ins class="diff-chg">
-is
-</ins><code><ins class="diff-chg">
-null
-</ins></code><ins class="diff-chg">
-set
-it
-to
-the
-item,
-otherwise,
-append
-the
-item
-to
-the
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a>.</li></ol></li><li><ins class="diff-chg">
-Return
-the
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a>.</li></ol><ins class="diff-chg">
-The
-final,
-non-recursive
-step
-of
-the
-framing
-algorithm
-requires
-the
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a><ins class="diff-chg">
-to
-be
-compacted
-according
-to
-the
-</ins><a href="#compaction-algorithm"><ins class="diff-chg">
-Compaction
-Algorithm
-</ins></a><ins class="diff-chg">
-by
-using
-the
-context
-provided
-in
-the
-</ins><a class="tref internalDFN" title="input_frame" href="#dfn-input_frame"><ins class="diff-chg">
-input
-frame
-</ins></a>.<ins class="diff-chg">
-The
-resulting
-value
-is
-the
-final
-output
-of
-the
-compaction
-algorithm
-and
-is
-what
-should
-be
-returned
-to
-the
-application.
-</ins></div></div><div id="normalization-1" class="section"><h3><span class="secno"><ins class="diff-chg">
-5.11
-</ins></span><ins class="diff-chg">
-Normalization
-</ins></h3><p class="issue"><ins class="diff-chg">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</ins></p><p><ins class="diff-chg">
-Normalization
-is
-the
-process
-of
-taking
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-and
-performing
-a
-deterministic
-transformation
-on
-that
-input
-that
-results
-in
-all
-aspects
-of
-the
-graph
-being
-fully
-expanded
-and
-named
-in
-the
-</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
-JSON-LD
-output
-</ins></a>.<ins class="diff-chg">
-The
-normalized
-output
-is
-generated
-in
-such
-a
-way
-that
-any
-conforming
-JSON-LD
-processor
-will
-generate
-identical
-output
-given
-the
-same
-input.
-The
-problem
-is
-a
-fairly
-difficult
-technical
-problem
-to
-solve
-because
-it
-requires
-a
-directed
-graph
-to
-be
-ordered
-into
-a
-set
-of
-nodes
-and
-edges
-in
-a
-deterministic
-way.
-This
-is
-easy
-to
-do
-when
-all
-of
-the
-nodes
-have
-unique
-names,
-but
-very
-difficult
-to
-do
-when
-some
-of
-the
-nodes
-are
-not
-labeled.
-</ins></p><p><ins class="diff-chg">
-In
-time,
-there
-may
-be
-more
-than
-one
-normalization
-algorithm
-that
-will
-need
-to
-be
-identified.
-For
-identification
-purposes,
-this
-algorithm
-is
-named
-</ins><abbr title="Universal Graph Normalization Algorithm 2011"><ins class="diff-chg">
-UGNA2011
-</ins></abbr>.</p><div id="normalization-algorithm-terms" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.1
-</ins></span><ins class="diff-chg">
-Normalization
-Algorithm
-Terms
-</ins></h4><dl><dt><dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes"><ins class="diff-chg">
-list
-of
-expanded
-nodes
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-list
-of
-all
-nodes
-in
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-graph
-containing
-no
-embedded
-objects
-and
-having
-all
-keys
-and
-values
-expanded
-according
-to
-the
-steps
-in
-the
-</ins><a href="#expansion-algorithm"><ins class="diff-chg">
-Expansion
-Algorithm
-</ins></a>.</dd><dt><dfn title="naming_base_string" id="dfn-naming_base_string"><ins class="diff-chg">
-naming
-base
-string
-</ins></dfn></dt><dd><ins class="diff-chg">
-An
-unlabeled
-node
-naming
-prefix
-that
-is
-not
-used
-by
-any
-other
-node
-in
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-and
-does
-not
-start
-with
-the
-characters
-</ins><code><ins class="diff-chg">
-c14n
-</ins></code>.<ins class="diff-chg">
-The
-prefix
-is
-used
-to
-temporarily
-name
-nodes
-during
-the
-normalization
-algorithm
-in
-a
-way
-that
-doesn't
-collide
-with
-the
-names
-that
-already
-exist
-as
-well
-as
-the
-names
-that
-will
-be
-generated
-by
-the
-normalization
-algorithm.
-</ins></dd><dt><dfn title="alpha" id="dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></dfn><ins class="diff-chg">
-and
-</ins><dfn title="beta" id="dfn-beta"><ins class="diff-chg">
-beta
-</ins></dfn><ins class="diff-chg">
-values
-</ins></dt><dd><ins class="diff-chg">
-The
-words
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-refer
-to
-the
-first
-and
-second
-nodes
-or
-values
-being
-examined
-in
-an
-algorithm.
-The
-names
-are
-merely
-used
-to
-refer
-to
-each
-input
-value
-to
-a
-comparison
-algorithm.
-</ins></dd><dt><dfn title="naming_base_string" id="dfn-naming_base_string-1"><ins class="diff-chg">
-naming
-base
-string
-</ins></dfn></dt><dd><ins class="diff-chg">
-An
-unlabeled
-node
-naming
-prefix
-that
-is
-not
-used
-by
-any
-other
-node
-in
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-and
-does
-not
-start
-with
-the
-characters
-</ins><code><ins class="diff-chg">
-c14n
-</ins></code>.<ins class="diff-chg">
-The
-prefix
-is
-used
-to
-temporarily
-name
-nodes
-during
-the
-normalization
-algorithm
-in
-a
-way
-that
-doesn't
-collide
-with
-the
-names
-that
-already
-exist
-as
-well
-as
-the
-names
-that
-will
-be
-generated
-by
-the
-normalization
-algorithm.
-</ins></dd></dl></div><div id="normalization-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.2
-</ins></span><ins class="diff-chg">
-Normalization
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-The
-normalization
-algorithm
-expands
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a>,<ins class="diff-chg">
-flattens
-the
-data
-structure,
-and
-creates
-an
-initial
-set
-of
-names
-for
-all
-nodes
-in
-the
-graph.
-The
-flattened
-data
-structure
-is
-then
-processed
-by
-the
-node
-labeling
-algorithm
-in
-order
-to
-get
-a
-fully
-expanded
-and
-named
-list
-of
-nodes.
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Expand
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
-JSON-LD
-input
-</ins></a><ins class="diff-chg">
-according
-to
-the
-steps
-in
-the
-</ins><a href="#expansion-algorithm"><ins class="diff-chg">
-Expansion
-Algorithm
-</ins></a><ins class="diff-chg">
-and
-store
-the
-result
-as
-the
-</ins><strong><ins class="diff-chg">
-expanded
-input
-</ins></strong>.</li><li><ins class="diff-chg">
-Process
-every
-object
-in
-the
-</ins><strong><ins class="diff-chg">
-expanded
-input
-</ins></strong><ins class="diff-chg">
-searching
-for
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-values
-that
-start
-with
-the
-text
-string
-</ins><code><ins class="diff-chg">
-_:c14n
-</ins></code>.<ins class="diff-chg">
-If
-a
-match
-is
-found,
-rename
-the
-subject
-and
-all
-references
-to
-the
-subject
-by
-concatenating
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-with
-the
-</ins><a class="tref internalDFN" title="naming_base_string" href="#dfn-naming_base_string-1"><ins class="diff-chg">
-naming
-base
-string
-</ins></a><ins class="diff-chg">
-and
-a
-unique
-identifier,
-such
-as
-an
-incremented
-counter
-value.
-</ins></li><li><ins class="diff-chg">
-Create
-an
-empty
-</ins><a class="tref internalDFN" title="list_of_expanded_nodes" href="#dfn-list_of_expanded_nodes"><ins class="diff-chg">
-list
-of
-expanded
-nodes
-</ins></a><ins class="diff-chg">
-and
-recursively
-process
-every
-object
-in
-the
-</ins><strong><ins class="diff-chg">
-expanded
-input
-</ins></strong><ins class="diff-chg">
-that
-is
-not
-an
-expanded
-IRI,
-typed
-literal
-or
-language
-literal,
-in
-depth-first
-order:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-an
-object
-does
-not
-contain
-a
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code>,<ins class="diff-chg">
-name
-it
-by
-concatenating
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-with
-the
-</ins><a class="tref internalDFN" title="naming_base_string" href="#dfn-naming_base_string-1"><ins class="diff-chg">
-naming
-base
-string
-</ins></a><ins class="diff-chg">
-and
-a
-unique
-identifier,
-such
-as
-an
-incremented
-counter
-value.
-</ins></li><li><ins class="diff-chg">
-Add
-the
-object
-to
-the
-</ins><a class="tref" title="list_of_expanded_nodes."><ins class="diff-chg">
-list
-of
-expanded
-nodes
-</ins><tref>.</tref></a></li><li><ins class="diff-chg">
-Replace
-the
-reference
-to
-the
-object
-with
-the
-value
-of
-the
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-in
-the
-object.
-</ins></li><li><ins class="diff-chg">
-???duplicate
-objects
-for
-predicates???
-</ins></li></ol></li><li><ins class="diff-chg">
-Label
-all
-of
-the
-nodes
-that
-contain
-a
-</ins><code><ins class="diff-chg">
-@subject
-</ins></code><ins class="diff-chg">
-key
-associated
-with
-a
-value
-starting
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-according
-to
-the
-steps
-in
-the
-</ins><a href="#node-labeling-algorithm"><ins class="diff-chg">
-Node
-Labeling
-Algorithm
-</ins></a>.</li></ol></div><div id="node-labeling-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.3
-</ins></span><ins class="diff-chg">
-Node
-Labeling
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-The
-node
-labeling
-algorithm
-takes
-the
-</ins><a class="tref internalDFN" title="list_of_expanded_nodes" href="#dfn-list_of_expanded_nodes"><ins class="diff-chg">
-list
-of
-expanded
-nodes
-</ins></a><ins class="diff-chg">
-and
-sorts
-the
-list,
-deterministically
-naming
-all
-of
-the
-unlabeled
-nodes
-in
-the
-graph.
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Create
-a
-</ins><dfn title="forward_mapping" id="dfn-forward_mapping"><ins class="diff-chg">
-forward
-mapping
-</ins></dfn><ins class="diff-chg">
-that
-relates
-graph
-nodes
-to
-the
-IRIs
-of
-the
-targets
-nodes
-that
-they
-reference.
-For
-example,
-if
-a
-node
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-refers
-to
-a
-node
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-via
-a
-property,
-the
-key
-in
-the
-</ins><a class="tref internalDFN" title="forward_mapping" href="#dfn-forward_mapping"><ins class="diff-chg">
-forward
-mapping
-</ins></a><ins class="diff-chg">
-is
-the
-subject
-IRI
-of
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-and
-the
-value
-is
-an
-array
-containing
-at
-least
-the
-subject
-IRI
-of
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a>.<ol class="algorithm"><li><ins class="diff-chg">
-Add
-all
-forward
-mappings
-for
-every
-node
-in
-the
-graph.
-</ins></li></ol></li><li><ins class="diff-chg">
-Create
-a
-</ins><dfn title="reverse_mapping" id="dfn-reverse_mapping"><ins class="diff-chg">
-reverse
-mapping
-</ins></dfn><ins class="diff-chg">
-that
-relates
-graph
-nodes
-to
-every
-other
-node
-that
-refers
-to
-them
-in
-the
-graph.
-For
-example,
-if
-a
-node
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-refers
-to
-a
-node
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-via
-a
-property,
-the
-key
-in
-the
-</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
-reverse
-mapping
-</ins></a><ins class="diff-chg">
-is
-the
-subject
-IRI
-for
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-and
-the
-value
-is
-an
-array
-containing
-at
-least
-the
-IRI
-for
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a>.<ol class="algorithm"><li><ins class="diff-chg">
-Add
-all
-reverse
-mappings
-for
-every
-node
-in
-the
-graph.
-</ins></li></ol></li><li><ins class="diff-chg">
-Label
-every
-unlabeled
-node
-according
-to
-the
-</ins><a href="#label-generation-algorithm"><ins class="diff-chg">
-Label
-Generation
-Algorithm
-</ins></a><ins class="diff-chg">
-in
-descending
-order
-using
-the
-</ins><a href="#deep-comparison-algorithm"><ins class="diff-chg">
-Deep
-Comparison
-Algorithm
-</ins></a><ins class="diff-chg">
-to
-determine
-the
-sort
-order.
-</ins></li></ol></div><div id="shallow-comparison-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.4
-</ins></span><ins class="diff-chg">
-Shallow
-Comparison
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-The
-shallow
-comparison
-algorithm
-takes
-two
-unlabeled
-nodes,
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a>,<ins class="diff-chg">
-as
-input
-and
-determines
-which
-one
-should
-come
-first
-in
-a
-sorted
-list.
-The
-following
-algorithm
-determines
-the
-steps
-that
-are
-executed
-in
-order
-to
-determine
-the
-node
-that
-should
-come
-first
-in
-a
-list:
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Compare
-the
-total
-number
-of
-node
-properties.
-The
-node
-with
-fewer
-properties
-is
-first.
-</ins></li><li><ins class="diff-chg">
-Lexicographically
-sort
-the
-property
-IRIs
-for
-each
-node
-and
-compare
-the
-sorted
-lists.
-If
-an
-IRI
-is
-found
-to
-be
-lexicographically
-smaller,
-the
-node
-containing
-that
-IRI
-is
-first.
-</ins></li><li><ins class="diff-chg">
-Compare
-the
-property
-values
-against
-one
-another:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-Create
-an
-</ins><dfn title="alpha_list" id="dfn-alpha_list"><ins class="diff-chg">
-alpha
-list
-</ins></dfn><ins class="diff-chg">
-by
-adding
-all
-values
-associated
-with
-the
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-property
-that
-is
-not
-an
-unlabeled
-node.
-Track
-the
-number
-of
-unlabeled
-nodes
-not
-added
-to
-the
-list
-using
-an
-</ins><dfn title="alpha_unlabeled_counter" id="dfn-alpha_unlabeled_counter"><ins class="diff-chg">
-alpha
-unlabeled
-counter
-</ins></dfn>.</li><li><ins class="diff-chg">
-Create
-a
-</ins><dfn title="beta_list" id="dfn-beta_list"><ins class="diff-chg">
-beta
-list
-</ins></dfn><ins class="diff-chg">
-by
-adding
-all
-values
-associated
-with
-the
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-property
-that
-is
-not
-an
-unlabeled
-node.
-Track
-the
-number
-of
-unlabeled
-nodes
-not
-added
-to
-the
-list
-using
-an
-</ins><dfn title="beta_unlabeled_counter" id="dfn-beta_unlabeled_counter"><ins class="diff-chg">
-beta
-unlabeled
-counter
-</ins></dfn>.</li><li><ins class="diff-chg">
-Compare
-the
-length
-of
-</ins><a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list"><ins class="diff-chg">
-alpha
-list
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta_list" href="#dfn-beta_list"><ins class="diff-chg">
-beta
-list
-</ins></a>.<ins class="diff-chg">
-The
-node
-associated
-with
-the
-list
-containing
-the
-lesser
-number
-of
-items
-is
-first.
-</ins></li><li><ins class="diff-chg">
-Compare
-the
-</ins><a class="tref internalDFN" title="alpha_unlabeled_counter" href="#dfn-alpha_unlabeled_counter"><ins class="diff-chg">
-alpha
-unlabeled
-counter
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="beta_unlabeled_counter" href="#dfn-beta_unlabeled_counter"><ins class="diff-chg">
-beta
-unlabeled
-counter
-</ins></a>,<ins class="diff-chg">
-the
-node
-associated
-with
-the
-lesser
-value
-is
-first.
-</ins></li><li><ins class="diff-chg">
-Sort
-</ins><a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list"><ins class="diff-chg">
-alpha
-list
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta_list" href="#dfn-beta_list"><ins class="diff-chg">
-beta
-list
-</ins></a><ins class="diff-chg">
-using
-the
-</ins><a href="#object-comparison-algorithm"><ins class="diff-chg">
-Object
-Comparison
-Algorithm
-</ins></a><ins class="diff-chg">
-as
-the
-sorting
-comparator.
-For
-each
-offset
-into
-the
-</ins><a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list"><ins class="diff-chg">
-alpha
-list
-</ins></a>,<ins class="diff-chg">
-compare
-the
-item
-at
-the
-offset
-against
-the
-item
-at
-the
-same
-offset
-in
-the
-</ins><a class="tref internalDFN" title="beta_list" href="#dfn-beta_list"><ins class="diff-chg">
-beta
-list
-</ins></a><ins class="diff-chg">
-using
-the
-</ins><a href="#object-comparison-algorithm"><ins class="diff-chg">
-Object
-Comparison
-Algorithm
-</ins></a>.<ins class="diff-chg">
-The
-node
-associated
-with
-the
-lesser
-item
-is
-first.
-</ins></li></ol></li><li><ins class="diff-chg">
-Process
-the
-</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
-reverse
-mapping
-</ins></a><ins class="diff-chg">
-to
-determine
-order:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-The
-node
-with
-fewer
-entries
-in
-the
-</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
-reverse
-mapping
-</ins></a><ins class="diff-chg">
-is
-first.
-</ins></li><li><ins class="diff-chg">
-Sort
-the
-</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
-reverse
-mapping
-</ins></a><ins class="diff-chg">
-entry
-for
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-into
-a
-</ins><dfn title="list_of_sorted_alpha_mappings" id="dfn-list_of_sorted_alpha_mappings"><ins class="diff-chg">
-list
-of
-sorted
-alpha
-mappings
-</ins></dfn>.<ins class="diff-chg">
-Sort
-the
-</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
-reverse
-mapping
-</ins></a><ins class="diff-chg">
-entry
-for
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-into
-a
-</ins><dfn title="list_of_sorted_beta_mappings" id="dfn-list_of_sorted_beta_mappings"><ins class="diff-chg">
-list
-of
-sorted
-beta
-mappings
-</ins></dfn>.</li><li><ins class="diff-chg">
-The
-node
-associated
-with
-the
-list
-of
-sorted
-mappings
-with
-the
-least
-number
-of
-unlabeled
-nodes
-is
-first.
-</ins></li><li><ins class="diff-chg">
-For
-each
-offset
-into
-the
-</ins><a class="tref internalDFN" title="list_of_sorted_alpha_mappings" href="#dfn-list_of_sorted_alpha_mappings"><ins class="diff-chg">
-list
-of
-sorted
-alpha
-mappings
-</ins></a>,<ins class="diff-chg">
-compare
-the
-IRI
-at
-the
-offset
-against
-the
-IRI
-at
-the
-same
-offset
-in
-the
-</ins><a class="tref internalDFN" title="list_of_sorted_beta_mappings" href="#dfn-list_of_sorted_beta_mappings"><ins class="diff-chg">
-list
-of
-sorted
-beta
-mappings
-</ins></a>.<ins class="diff-chg">
-The
-node
-associated
-with
-the
-lexicographically
-lesser
-IRI
-is
-first.
-</ins></li></ol></li><li><ins class="diff-chg">
-Otherwise,
-the
-nodes
-are
-equal.
-</ins></li></ol></div><div id="object-comparison-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.5
-</ins></span><ins class="diff-chg">
-Object
-Comparison
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-The
-object
-comparison
-algorithm
-is
-designed
-to
-compare
-two
-graph
-node
-property
-values,
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a>,<ins class="diff-chg">
-against
-the
-other.
-The
-algorithm
-is
-useful
-when
-sorting
-two
-lists
-of
-graph
-node
-properties.
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-If
-one
-of
-the
-values
-is
-a
-string
-and
-the
-other
-is
-not,
-the
-value
-that
-is
-a
-string
-is
-first.
-</ins></li><li><ins class="diff-chg">
-If
-both
-values
-are
-strings,
-the
-lexicographically
-lesser
-string
-is
-first.
-</ins></li><li><ins class="diff-chg">
-If
-one
-of
-the
-values
-is
-a
-literal
-and
-the
-other
-is
-not,
-the
-value
-that
-is
-a
-literal
-is
-first.
-</ins></li><li><ins class="diff-chg">
-If
-both
-values
-are
-literals
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-The
-lexicographically
-lesser
-string
-associated
-with
-</ins><code><ins class="diff-chg">
-@literal
-</ins></code><ins class="diff-chg">
-is
-first.
-</ins></li><li><ins class="diff-chg">
-The
-lexicographically
-lesser
-string
-associated
-with
-</ins><code><ins class="diff-chg">
-@datatype
-</ins></code><ins class="diff-chg">
-is
-first.
-</ins></li><li><ins class="diff-chg">
-The
-lexicographically
-lesser
-string
-associated
-with
-</ins><code><ins class="diff-chg">
-@language
-</ins></code><ins class="diff-chg">
-is
-first.
-</ins></li></ol></li><li><ins class="diff-chg">
-If
-both
-values
-are
-expanded
-IRIs,
-the
-lexicographically
-lesser
-string
-associated
-with
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code><ins class="diff-chg">
-is
-first.
-</ins></li><li><ins class="diff-chg">
-Otherwise,
-the
-two
-values
-are
-equivalent.
-</ins></li></ol></div><div id="deep-comparison-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.6
-</ins></span><ins class="diff-chg">
-Deep
-Comparison
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-DeepCompare(bnodeA,
-bnodeB):
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Return
-the
-value
-of
-ShallowCompare
-if
-it
-is
-non-zero.
-</ins></li><li><ins class="diff-chg">
-Compare
-property
-serializations
-and
-then
-reference
-serializations,
-recycling
-the
-mapping
-from
-property
-serializations
-for
-reference
-serializations.
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-serialization
-for
-bnodeA
-is
-null,
-do
-SerializeNode(bnodeA,
-new
-Mapping).
-</ins></li><li><ins class="diff-chg">
-If
-the
-serialization
-for
-bnodeB
-is
-null,
-do
-SerializeNode(bnodeA,
-new
-Mapping).
-</ins></li><li><ins class="diff-chg">
-Return
-the
-result
-of
-a
-lexicographical
-comparison
-of
-the
-two
-serializations.
-</ins></li></ol></li></ol></div><div id="node-serialization-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.7
-</ins></span><ins class="diff-chg">
-Node
-Serialization
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-SerializeNode(bnode,
-mapping,
-dir):
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-bnode's
-label
-is
-already
-marked
-as
-mapped,
-return.
-</ins></li><li><ins class="diff-chg">
-Mark
-the
-bnode's
-label
-as
-mapped.
-</ins></li><li><ins class="diff-chg">
-Assign
-the
-next
-serialization
-name
-to
-the
-bnode's
-label
-and
-store
-it
-in
-"top".
-</ins></li><li><ins class="diff-chg">
-Split
-the
-bnode's
-adjacent
-bnodes
-into
-a
-map
-and
-a
-list.
-The
-map
-contains
-a
-reverse
-mapping
-of
-serialization
-names
-to
-bnode
-labels
-for
-all
-labels
-in
-the
-mapping,
-the
-list
-(notMapped)
-contains
-all
-labels
-not
-in
-the
-mapping
-yet.
-</ins></li><li><ins class="diff-chg">
-Save
-a
-copy
-of
-the
-mapping.
-</ins></li><li><ins class="diff-chg">
-Do
-SerializeCombos
-for
-max(1,
-notMapped.length)
-using
-the
-original
-mapping
-for
-the
-first
-call
-and
-a
-copy
-of
-the
-mapping
-for
-each
-subsequent
-call.
-</ins></li></ol></div><div id="combinatorial-serialization-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.8
-</ins></span><ins class="diff-chg">
-Combinatorial
-Serialization
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-SerializeCombos(top,
-mapping,
-mapped,
-notMapped,
-dir):
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-If
-notMapped
-is
-non-empty,
-copy
-mapped
-and
-assign
-the
-next
-serialization
-name
-to
-its
-first
-bnode,
-remove
-it
-from
-the
-list,
-and
-update
-mapped.
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-For
-max(1,
-notMapped.length)
-recurse
-into
-SerializeCombos
-with
-the
-original
-mapping
-for
-the
-first
-call
-and
-a
-copy
-of
-the
-mapping
-for
-each
-subsequent
-call.
-Rotate
-notMapped
-on
-each
-iteration.
-</ins></li></ol></li><li><ins class="diff-chg">
-If
-notMapped
-is
-empty,
-save
-an
-entry
-mapping
-from
-the
-bnode's
-serialization
-name
-to
-the
-reverse
-mapping
-(mapped)
-and
-its
-sorted
-keys
-then
-do
-SerializeMapping.
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-serialization
-is
-lexicographically
-less
-than
-the
-current
-serialization
-or
-the
-current
-serialization
-is
-null,
-then
-iterate
-over
-the
-sorted
-keys,
-get
-the
-reverse-mapped
-adjacent
-bnode
-and
-recursively
-call
-SerializeNode
-on
-each
-iteration.
-</ins></li><li><ins class="diff-chg">
-Do
-SerializeMapping
-then
-if
-the
-serialization
-is
-lexicographically
-less
-than
-the
-current
-serialization
-or
-the
-current
-serialization
-is
-null,
-then
-set
-it
-as
-the
-least
-serialization
-for
-the
-bnode
-in
-the
-given
-edge
-direction
-('property'
-or
-'reference').
-</ins></li></ol></li></ol></div><div id="mapping-serialization-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.9
-</ins></span><ins class="diff-chg">
-Mapping
-Serialization
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-SerializeMapping(mapping):
-(This
-function
-incrementally
-updates
-the
-relation
-serialization
-for
-a
-mapping)
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-If
-there
-is
-an
-entry
-on
-the
-mapping's
-key
-stack,
-pop
-it
-and
-iterate
-over
-every
-key.
-</ins></li><li><ins class="diff-chg">
-For
-each
-key,
-if
-an
-entry
-for
-the
-key
-hasn't
-been
-added
-to
-the
-mapping
-yet,
-break
-out
-of
-the
-loop.
-</ins></li><li><ins class="diff-chg">
-Update
-the
-key
-stack
-entry's
-index.
-</ins></li><li><ins class="diff-chg">
-If
-the
-key
-has
-already
-been
-serialized,
-output
-"'_'
-+
-key"
-and
-continue.
-</ins></li><li><ins class="diff-chg">
-For
-each
-key,
-serialize
-the
-key
-then
-its
-associated
-bnode
-properties,
-then
-its
-bnode
-references.
-The
-entire
-property
-list
-is
-surrounded
-by
-'['
-and
-']'
-and
-so
-is
-the
-reference
-list.
-Individual
-properties/references
-are
-seperated
-by
-'|'.
-If
-a
-property
-is
-an
-array,
-all
-of
-the
-serializations
-are
-concatenated
-together
-with
-no
-joining
-delimiter.
-The
-'@subject'
-property
-is
-skipped.
-The
-property
-IRI
-is
-turtle-serialized.
-If
-a
-property
-or
-reference
-object
-is
-a
-bnode,
-it
-is
-serialized
-to
-'_:',
-otherwise
-the
-turtle
-serialization
-is
-used.
-</ins></li><li><ins class="diff-chg">
-Join
-all
-of
-the
-adjacent
-keys
-and
-add
-them
-to
-the
-serialization.
-</ins></li><li><ins class="diff-chg">
-Push
-the
-adjacent
-keys
-onto
-the
-key
-stack.
-</ins></li><li><ins class="diff-chg">
-Do
-SerializeMapping.
-</ins></li></ol></div><div id="label-generation-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.11.10
-</ins></span><ins class="diff-chg">
-Label
-Generation
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-NameNode(bnode):
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Remove
-the
-first
-blank
-node
-from
-the
-list
-of
-sorted
-blank
-nodes.
-</ins></li><li><ins class="diff-chg">
-Give
-it
-the
-next
-canonical
-name.
-</ins></li><li><ins class="diff-chg">
-Give
-canonical
-names
-to
-each
-blank
-node
-key
-in
-its
-property
-serialization
-mapping
-in
-lexicographical
-order.
-</ins></li><li><ins class="diff-chg">
-Give
-canonical
-names
-to
-each
-blank
-node
-key
-in
-its
-reference
-serialization
-mapping
-in
-lexicographical
-order.
-</ins></li><li><ins class="diff-chg">
-Set
-all
-serializations
-containing
-newly-named
-blank
-nodes
-to
-null.
-</ins></li></ol></div></div><div id="data-round-tripping" class="section"><h3><span class="secno"><ins class="diff-chg">
-5.12
-</ins></span><ins class="diff-chg">
-Data
-Round
-Tripping
-</ins></h3><p><ins class="diff-chg">
-When
-normalizing
-</ins><strong><ins class="diff-chg">
-xsd:double
-</ins></strong><ins class="diff-chg">
-values,
-implementers
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-ensure
-that
-the
-normalized
-value
-is
-a
-string.
-In
-order
-to
-generate
-the
-string
-from
-a
-</ins><strong><ins class="diff-chg">
-double
-</ins></strong><ins class="diff-chg">
-value,
-output
-equivalent
-to
-the
-</ins><code><ins class="diff-chg">
-printf("%1.6e",
-value)
-</ins></code><ins class="diff-chg">
-function
-in
-C
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-be
-used
-where
-</ins><strong><ins class="diff-chg">
-"%1.6e"
-</ins></strong><ins class="diff-chg">
-is
-the
-string
-formatter
-and
-</ins><strong><ins class="diff-chg">
-value
-</ins></strong><ins class="diff-chg">
-is
-the
-value
-to
-be
-converted.
-</ins></p><p><ins class="diff-chg">
-To
-convert
-the
-a
-double
-value
-in
-JavaScript,
-implementers
-can
-use
-the
-following
-snippet
-of
-code:
-</ins></p><pre class="example"><ins class="diff-chg">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
-'$10$2')
-</ins></pre><p class="note"><ins class="diff-chg">
-When
-data
-needs
-to
-be
-normalized,
-JSON-LD
-authors
-should
-not
-use
-values
-that
-are
-going
-to
-undergo
-automatic
-conversion.
-This
-is
-due
-to
-the
-lossy
-nature
-of
-</ins><strong><ins class="diff-chg">
-xsd:double
-</ins></strong><ins class="diff-chg">
-values.
-</ins></p><p class="issue"><ins class="diff-chg">
-Round-tripping
-data
-can
-be
-problematic
-if
-we
-mix
-and
-match
-@coerce
-rules
-with
-JSON-native
-datatypes,
-like
-integers.
-Consider
-the
-following
-code
-example:
-</ins></p><pre class="example"><ins class="diff-chg">
-var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-// Convert the normalized object back to a JavaScript object
-var
-myObj2
-=
-jsonld.parse(jsonldText);
-</ins></pre><p class="issue"><ins class="diff-chg">
-At
-this
-point,
-myObj2
-and
-myObj
-will
-have
-different
-values
-for
-the
-"number"
-value.
-myObj
-will
-be
-the
-number
-42,
-while
-myObj2
-will
-be
-the
-string
-"42".
-This
-type
-of
-data
-round-tripping
-error
-can
-bite
-developers.
-We
-are
-currently
-wondering
-if
-having
-a
-"coerce
-validation"
-phase
-in
-the
-parsing/normalization
-phases
-would
-be
-a
-good
-idea.
-It
-would
-prevent
-data
-round-tripping
-issues
-like
-the
-one
-mentioned
-above.
-</ins></p></div><div id="rdf-conversion" class="section"><h3><span class="secno"><ins class="diff-chg">
-5.13
-</ins></span><ins class="diff-chg">
-RDF
-Conversion
-</ins></h3><p><ins class="diff-chg">
-A
-JSON-LD
-document
-</ins><em class="rfc2119" title="may"><ins class="diff-chg">
-may
-</ins></em><ins class="diff-chg">
-be
-converted
-to
-any
-other
-RDF-compatible
-document
-format
-using
-the
-algorithm
-specified
-in
-this
-section.
-</ins></p><p><ins class="diff-chg">
-The
-JSON-LD
-Processing
-Model
-describes
-processing
-rules
-for
-extracting
-RDF
-from
-a
-JSON-LD
-document.
-Note
-that
-many
-uses
-of
-JSON-LD
-may
-not
-require
-generation
-of
-RDF.
-</ins></p><p><ins class="diff-chg">
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-to
-RDF
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</ins></p><p class="issue"><ins class="diff-chg">
-The
-RDF
-Conversion
-Algorithm
-is
-a
-work
-in
-progress.
-</ins></p><div class="informative section" id="overview"><h4><span class="secno"><ins class="diff-chg">
-5.13.1
-</ins></span><ins class="diff-chg">
-Overview
-</ins></h4><p><em><ins class="diff-chg">
-This
-section
-is
-non-normative.
-</ins></em></p><p><ins class="diff-chg">
-JSON-LD
-is
-intended
-to
-have
-an
-easy
-to
-parse
-grammar
-that
-closely
-models
-existing
-practice
-in
-using
-JSON
-for
-describing
-object
-representations.
-This
-allows
-the
-use
-of
-existing
-libraries
-for
-parsing
-JSON
-in
-a
-document-oriented
-fashion,
-or
-can
-allow
-for
-stream-based
-parsing
-similar
-to
-SAX.
-</ins></p><p><ins class="diff-chg">
-As
-with
-other
-grammars
-used
-for
-describing
-</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
-Linked
-Data
-</ins></a>,<ins class="diff-chg">
-a
-key
-concept
-is
-that
-of
-a
-</ins><em><ins class="diff-chg">
-resource
-</ins></em>.<ins class="diff-chg">
-Resources
-may
-be
-of
-three
-basic
-types:
-</ins><em><ins class="diff-chg">
-IRI
-</ins></em><ins class="diff-chg">
-s,
-for
-describing
-externally
-named
-entities,
-</ins><em><ins class="diff-chg">
-BNodes
-</ins></em>,<ins class="diff-chg">
-resources
-for
-which
-an
-external
-name
-does
-not
-exist,
-or
-is
-not
-known,
-and
-Literals,
-which
-describe
-terminal
-entities
-such
-as
-strings,
-dates
-and
-other
-representations
-having
-a
-lexical
-representation
-possibly
-including
-an
-explicit
-language
-or
-datatype.
-</ins></p><p><ins class="diff-chg">
-Data
-described
-with
-JSON-LD
-may
-be
-considered
-to
-be
-the
-representation
-of
-a
-graph
-made
-up
-of
-</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
-subject
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><ins class="diff-chg">
-resources
-related
-via
-a
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><ins class="diff-chg">
-resource.
-However,
-specific
-implementations
-may
-choose
-to
-operate
-on
-the
-document
-as
-a
-normal
-JSON
-description
-of
-objects
-having
-attributes.
-</ins></p></div><div id="rdf-conversion-algorithm-terms" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.13.2
-</ins></span><ins class="diff-chg">
-RDF
-Conversion
-Algorithm
-Terms
-</ins></h4><dl><dt><dfn title="default_graph" id="dfn-default_graph"><ins class="diff-chg">
-default
-graph
-</ins></dfn></dt><dd><ins class="diff-chg">
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</ins></dd></dl></div><div id="rdf-conversion-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-5.13.3
-</ins></span><ins class="diff-chg">
-RDF
-Conversion
-Algorithm
-</ins></h4>
-<p>
-The
-algorithm
-below
-is
-designed
-for
-in-memory
-implementations
-with
-random
-access
-to
-associative
-array
-elements.
-<del class="diff-old">For
-a
-description
-of
-a
-streaming
-implementation,
-see
-Appendix
-B
-.
-</del>
-</p>
-<p>
-A
-conforming
-JSON-LD
-processor
-<ins class="diff-new">implementing
-RDF
-conversion
-</ins>
-<em class="rfc2119" title="must">
-must
-</em>
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>
-that
-the
-following
-algorithm
-generates:
-</p>
-<ol class="algorithm">
-<li id="processing-step-default-context">
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-with
-with
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-set
-to
-the
-<del class="diff-old">default
-</del>
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-<ins class="diff-chg">initial
-</ins>
-context
-</a>
-and
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-initialized
-to
-NULL.
-</li>
-<li id="processing-step-associative">
-If
-an
-associative
-array
-is
-detected,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-associative
-array
-has
-a
-<code>
-@context
-</code>
-key,
-process
-the
-local
-context
-as
-described
-in
-<a href="#context">
-Context
-</a>.
-</li>
-<li>
-<ins class="diff-new">Create
-a
-new
-associative
-array
-by
-mapping
-the
-keys
-from
-the
-current
-associative
-array
-using
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-to
-new
-keys
-using
-the
-associated
-value
-from
-the
-current
-associative
-array.
-Repeat
-the
-mapping
-until
-no
-entry
-is
-found
-within
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-for
-the
-key.
-Use
-the
-new
-associative
-array
-in
-subsequent
-steps.
-</ins></li><li>
-If
-the
-associative
-array
-has
-an
-<code>
-@iri
-</code>
-key,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#iri-expansion">
-IRI
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</a>
-on
-the
-associated
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-<p class="issue">
-<code>
-<ins class="diff-new">@iri
-</ins></code><ins class="diff-new">
-really
-just
-behaves
-the
-same
-as
-</ins><code><ins class="diff-new">
-@subject
-</ins></code>,<ins class="diff-new">
-consider
-consolidating
-them.
-</ins></p>
-</li>
-<li>
-If
-the
-associative
-array
-has
-a
-<code>
-@literal
-</code>
-key,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-a
-literal
-value
-as
-follows:
-<ol class="algorithm">
-<li>
-as
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-if
-the
-associative
-array
-contains
-a
-<code>
-@datatype
-</code>
-key
-after
-performing
-<a href="#iri-expansion">
-IRI
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</a>
-on
-the
-specified
-<code>
-@datatype
-</code>.
-</li>
-<li>
-otherwise,
-as
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>.
-If
-the
-associative
-array
-contains
-a
-<code>
-@language
-</code>
-key,
-use
-it's
-value
-to
-set
-the
-language
-of
-the
-plain
-literal.
-</li>
-<li>
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-</ol>
-</li>
-<li id="processing-step-subject">
-If
-the
-associative
-array
-has
-a
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>
-key:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-a
-string,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-result
-of
-performing
-<a href="#iri-expansion">
-IRI
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</a>.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Set
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-using
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>,
-set
-the
-<a class="tref" title="active__subject">
-active
-subject
-</a>
-to
-the
-result
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-the
-associative
-array
-does
-not
-have
-a
-<code>
-<del class="diff-old">@
-</del>
-<ins class="diff-chg">@subject
-</ins>
-</code>
-key,
-set
-the
-<a class="tref" title="active__object">
-active
-object
-</a>
-to
-newly
-generated
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier">
-blank
-node
-identifier
-<del class="diff-old">.
-</del>
-</dfn>.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Set
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-<a class="tref" title="active__object">
-active
-object
-</a>.
-</li>
-<li>
-For
-each
-key
-in
-the
-associative
-array
-that
-has
-not
-already
-been
-processed,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-<code>
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">@type
-</ins>
-</code>,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-<code>
-rdf:type
-</code>.
-</li>
-<li>
-Otherwise,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-the
-result
-of
-performing
-<a href="#iri-expansion">
-IRI
-<del class="diff-old">Processing
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</a>
-on
-the
-key.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-</ol>
-</li>
-<li>
-If
-a
-regular
-array
-is
-detected,
-process
-each
-value
-in
-the
-array
-by
-doing
-the
-following
-returning
-the
-result
-of
-processing
-the
-last
-value
-in
-the
-array:
-<ol class="algorithm">
-<li>
-<del class="diff-old">If
-the
-value
-is
-a
-regular
-array,
-generate
-an
-RDF
-List
-by
-linking
-each
-element
-of
-the
-list
-using
-rdf:first
-and
-rdf:next
-,
-terminating
-the
-list
-with
-rdf:nil
-using
-the
-following
-sequence:
-If
-the
-list
-has
-no
-element,
-generate
-a
-triple
-using
-the
-active
-subject
-,
-active
-property
-and
-rdf:nil
-.
-Otherwise,
-generate
-a
-triple
-using
-using
-the
-active
-subject
-,
-active
-property
-and
-a
-newly
-generated
-BNode
-identified
-as
-first
-bnode
-.
-For
-each
-element
-other
-than
-the
-last
-element
-in
-the
-list:
-</del>
-Create
-a
-<del class="diff-old">processor
-state
-using
-the
-active
-context,
-first
-bnode
-as
-the
-active
-subject
-,
-and
-rdf:first
-as
-the
-active
-property
-.
-Unless
-this
-is
-the
-last
-element
-in
-the
-list,
-generate
-a
-new
-BNode
-identified
-as
-rest
-bnode
-,
-otherwise
-use
-rdf:nil
-.
-Generate
-a
-new
-triple
-using
-first
-bnode
-,
-rdf:rest
-and
-rest
-bnode
-.
-Set
-first
-bnode
-to
-rest
-bnode
-.
-Otherwise,
-create
-a
-</del>
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-<ins class="diff-new">using
-</ins>
-copies
-of
-the
-<a class="tref" title="active__context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>
-<del class="diff-old">and
-</del>
-<ins class="diff-chg">then
-</ins>
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-a
-string
-is
-<del class="diff-old">detected,
-generate
-</del>
-<ins class="diff-chg">detected:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins></a><ins class="diff-chg">
-is
-the
-target
-of
-</ins>
-a
-<del class="diff-old">triple
-using
-</del>
-<code>
-<ins class="diff-chg">@iri
-</ins></code><ins class="diff-chg">
-coercion,
-set
-</ins>
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-<del class="diff-old">subject
-,
-</del>
-<ins class="diff-chg">object
-</ins></a><ins class="diff-chg">
-by
-performing
-</ins><a href="#iri-expansion"><ins class="diff-chg">
-IRI
-Expansion
-</ins></a><ins class="diff-chg">
-on
-the
-string.
-</ins></li><li><ins class="diff-chg">
-Otherwise,
-if
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins></a><ins class="diff-chg">
-is
-the
-target
-of
-coercion,
-set
-the
-</ins>
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-<ins class="diff-new">by
-creating
-a
-</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"><ins class="diff-new">
-typed
-literal
-</ins></a><ins class="diff-new">
-using
-the
-string
-</ins>
-and
-<ins class="diff-new">the
-coercion
-key
-as
-the
-datatype
-IRI.
-</ins></li><li><ins class="diff-new">
-Otherwise,
-set
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a><ins class="diff-new">
-to
-</ins>
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-value
-created
-from
-the
-string.
-</li>
-</ol>
-<ins class="diff-new">Generate
-a
-triple
-representing
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
-active
-subject
-</ins></a>,<ins class="diff-new">
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
-active
-property
-</ins></a><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
-active
-object
-</ins></a>.</li>
-<li>
-If
-a
-number
-is
-detected,
-generate
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-using
-a
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-either
-<code>
-xsd:integer
-</code>
-or
-<code>
-xsd:double
-</code>,
-depending
-on
-if
-the
-value
-contains
-a
-fractional
-and/or
-an
-exponential
-component.
-Generate
-a
-triple
-using
-the
-<a class="tref" title="active__subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-<del class="diff-old">object
-</del>
-<ins class="diff-chg">property
-</ins>
-</a>
-and
-the
-generated
-typed
-literal.
-</li>
-<li>
-Otherwise,
-if
-<strong>
-true
-</strong>
-or
-<strong>
-false
-</strong>
-is
-detected,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-<del class="diff-old">object
-</del>
-<ins class="diff-chg">property
-</ins>
-</a>
-and
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-value
-created
-from
-the
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-<code>
-xsd:boolean
-</code>.
-</li>
-</ol>
-</div>
-<del class="diff-old">8.
-Best
-Practices
-The
-nature
-of
-Web
-programming
-allows
-one
-to
-use
-basic
-technologies,
-such
-as
-JSON-LD,
-across
-a
-variety
-of
-systems
-and
-environments.
-This
-section
-attempts
-to
-describe
-some
-of
-those
-environments
-and
-the
-way
-in
-which
-JSON-LD
-can
-be
-integrated
-in
-order
-to
-help
-alleviate
-certain
-development
-headaches.
-8.1
-JavaScript
-It
-is
-expected
-that
-JSON-LD
-will
-be
-used
-quite
-a
-bit
-in
-JavaScript
-environments,
-however,
-features
-like
-the
-expanded
-form
-for
-object
-values
-mean
-that
-using
-JSON-LD
-directly
-in
-JavaScript
-may
-be
-annoying
-without
-a
-middleware
-layer
-such
-as
-a
-simple
-library
-that
-converts
-JSON-LD
-markup
-before
-JavaScript
-uses
-it.
-One
-could
-say
-that
-JSON-LD
-is
-a
-good
-fit
-for
-the
-RDF
-API,
-which
-enables
-a
-variety
-of
-RDF-based
-Web
-Applications,
-but
-some
-don't
-want
-to
-require
-that
-level
-of
-functionality
-just
-to
-use
-JSON-LD.
-The
-group
-is
-still
-discussing
-the
-best
-way
-to
-proceed,
-so
-input
-on
-how
-JSON-LD
-could
-more
-easily
-be
-utilized
-in
-JavaScript
-environments
-would
-be
-very
-much
-appreciated.
-8.2
-Schema-less
-Databases
-Databases
-such
-as
-CouchDB
-and
-MongoDB
-allow
-the
-creation
-of
-schema-less
-data
-stores.
-RDF
-is
-a
-type
-of
-schema-less
-data
-model
-and
-thus
-lends
-itself
-to
-databases
-such
-as
-CouchDB
-and
-MongoDB.
-Both
-of
-these
-databases
-can
-use
-JSON-LD
-as
-their
-storage
-format.
-The
-group
-needs
-feedback
-from
-CouchDB
-and
-MongoDB
-experts
-regarding
-the
-usefulness
-of
-JSON-LD
-in
-those
-environments.
-MongoDB
-does
-not
-allow
-the
-'.'
-character
-to
-be
-used
-in
-key
-names.
-This
-prevents
-developers
-from
-storing
-IRIs
-as
-keys,
-which
-also
-prevents
-storage
-of
-the
-data
-in
-normalized
-form.
-While
-this
-issue
-can
-be
-avoided
-by
-using
-CURIEs
-for
-key
-values,
-it
-is
-not
-known
-if
-this
-mechanism
-is
-enough
-to
-allow
-JSON-LD
-to
-be
-used
-in
-MongoDB
-in
-a
-way
-that
-is
-useful
-to
-developers.
-</del>
-</div>
-</div>
-<div id="experimental-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">9.
-</del>
-<ins class="diff-chg">6.
-</ins>
-</span>
-<del class="diff-old">Advanced
-</del>
-<ins class="diff-chg">Experimental
-</ins>
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-considered
-as
-discussion
-points;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<del class="diff-old">9.1
-Vocabulary
-Profiles
-One
-of
-the
-more
-powerful
-features
-of
-RDFa
-1.1
-Core
-is
-the
-ability
-to
-specify
-a
-collection
-of
-prefixes
-and
-terms
-that
-can
-be
-re-used
-by
-a
-processor
-to
-simplfy
-markup.
-JSON-LD
-provides
-a
-similar
-mechanism
-called
-Vocabulary
-Profiles,
-which
-is
-the
-inclusion
-of
-a
-context
-external
-to
-the
-JSON-LD
-document.
-The
-example
-below
-demonstrates
-how
-one
-may
-specify
-an
-external
-Vocabulary
-Profile.
-Assume
-the
-following
-profile
-exists
-at
-this
-imaginary
-URL:
-http://example.org/profiles/contacts
-.
-{
-  "@context": 
-  {
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-     "#types":
-     {
-        "age": "xsd:integer",
-        "homepage": "xsd:anyURI",
-     }
-  }
-}
-The
-profile
-listed
-above
-can
-be
-used
-in
-the
-following
-way:
-{
-  "@profile": "http://example.org/profiles/contacts",
-  "name": "John Smith",
-  "age": "41",
-  "homepage": "http://example.org/home/"
-}
-The
-example
-above
-would
-generate
-the
-following
-triples:
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</del>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.2
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-array
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-JSON-LD
-associative
-array.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "@": 
-</del>
-<ins class="diff-chg">  "@coerce": {
-    "foaf": "http://xmlns.com/foaf/0.1/"
-  },
-  "@subject": 
-</ins>
-  [
-    {
-<del class="diff-old">      "@": "http://example.org/people#john",
-      "a": "foaf:Person"
-</del>
-<ins class="diff-chg">      "@subject": "http://example.org/people#john",
-      "@type": "foaf:Person"
-</ins>
-    },
-    {
-<del class="diff-old">      "@": "http://example.org/people#jane",
-      "a": "foaf:Person"
-</del>
-<ins class="diff-chg">      "@subject": "http://example.org/people#jane",
-      "@type": "foaf:Person"
-</ins>
-    }
-  ]
-}
-</pre>
-<p>
-A
-disjoint
-graph
-could
-also
-be
-expressed
-like
-so:
-</p>
-<pre class="example">
-[
-  {
-<del class="diff-old">    "@": "http://example.org/people#john",
-    "a": "foaf:Person"
-</del>
-<ins class="diff-chg">    "@subject": "http://example.org/people#john",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-</ins>
-  },
-  {
-<del class="diff-old">    "@": "http://example.org/people#jane",
-    "a": "foaf:Person"
-</del>
-<ins class="diff-chg">    "@subject": "http://example.org/people#jane",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-</ins>
-  }
-]
-</pre>
-</div>
-<div id="lists" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">9.3
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-<del class="diff-old">The
-JSON-LD
-API
-</del>
-<ins class="diff-chg">Lists
-</ins>
-</h3>
-<p>
-<del class="diff-old">This
-API
-provides
-a
-clean
-mechanism
-that
-enables
-developers
-to
-convert
-JSON-LD
-data
-into
-a
-format
-that
-is
-easier
-to
-work
-with
-</del>
-<ins class="diff-chg">Because
-graphs
-do
-not
-describe
-ordering
-for
-links
-between
-nodes,
-multi-valued
-properties
-</ins>
-in
-<del class="diff-old">various
-programming
-languages.
-</del>
-<ins class="diff-chg">JSON
-do
-not
-provide
-an
-ordering
-of
-the
-listed
-objects.
-For
-example,
-consider
-the
-following
-simple
-document:
-</ins>
-</p>
-<del class="diff-old">]
-interface  {
-};
-</del>
-  <pre class="example">
-<ins class="diff-chg">{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}
-</ins>
-</pre>
-<del class="diff-old">9.3.1
-Methods
-toGraph
-Parses
-JSON-LD
-and
-transforms
-</del>
-<p>
-<ins class="diff-chg">This
-results
-in
-three
-triples
-being
-generated,
-each
-relating
-</ins>
-the
-<del class="diff-old">data
-into
-</del>
-<ins class="diff-chg">subject
-to
-</ins>
-an
-<del class="diff-old">Graph,
-which
-is
-compatible
-</del>
-<ins class="diff-chg">individual
-object,
-</ins>
-with
-<del class="diff-old">the
-RDF
-Interfaces
-API
-specification
-</del>
-<ins class="diff-chg">no
-inherent
-order.
-To
-address
-this
-issue,
-RDF-based
-languages,
-such
-as
-</ins>
-[
-<cite>
-<del class="diff-old">RDF-INTERFACES
-</del>
-<a class="bibref" rel="biblioentry" href="#bib-TURTLE">
-<ins class="diff-chg">TURTLE
-</ins>
-</a>
-</cite>
-<del class="diff-old">].
-This
-method
-will
-return
-null
-if
-there
-are
-any
-errors,
-or
-if
-</del>
-<ins class="diff-chg">]
-use
-</ins>
-the
-<del class="diff-old">RDF
-Interfaces
-API
-is
-not
-available
-for
-use.
-Parameter
-Type
-Nullable
-Optional
-Description
-jsonld
-</del>
-<ins class="diff-chg">concept
-of
-an
-</ins>
-<code>
-<del class="diff-old">DOMString
-</del>
-<ins class="diff-chg">rdf:List
-</ins>
-</code>
-<ins class="diff-new">(as
-described
-in
-[
-</ins><cite>
-<del class="diff-old">✘
-✘
-The
-JSON-LD
-string
-to
-parse
-into
-the
-RDFGraph.
-callback
-JSONLDParserCallback
-</del>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">
-<ins class="diff-chg">RDF-SCHEMA
-</ins>
-</a>
-<del class="diff-old">✔
-✔
-A
-callback
-that
-is
-called
-whenever
-</del>
-</cite>
-<ins class="diff-chg">]).
-This
-uses
-</ins>
-a
-<del class="diff-old">processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-No
-exceptions.
-Return
-type:
-Graph
-toProjection
-Parses
-</del>
-<ins class="diff-chg">sequence
-of
-unlabeled
-nodes
-with
-properties
-describing
-a
-value,
-a
-null-terminated
-next
-property.
-Without
-specific
-syntactical
-support,
-this
-could
-be
-represented
-in
-</ins>
-JSON-LD
-<del class="diff-old">text
-into
-an
-RDF
-API
-Projection
-object
-</del>
-as
-<del class="diff-old">specified
-by
-</del>
-<ins class="diff-chg">follows:
-</ins></p>  <pre class="example"><ins class="diff-chg">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">{</span>,
-</ins>    <span class="diff">"@first": "joe"</span>,    <span class="diff">"@rest": {</span>      <span class="diff">"@first": "bob"</span>,      <span class="diff">"@rest": {</span>        <span class="diff">"@first": "jaybee"</span>,        <span class="diff">"@rest": "@nil"</span>        <span class="diff">}</span>      <span class="diff">}</span>    <span class="diff">}</span>  <span class="diff">}</span>,<ins class="diff-chg">
-...
-}
-</ins></pre><p><ins class="diff-chg">
-As
-this
-notation
-is
-rather
-unwieldy
-and
-</ins>
-the
-<del class="diff-old">RDF
-API
-specification
-[
-RDF-API
-].
-If
-there
-are
-any
-errors,
-null
-</del>
-<ins class="diff-chg">notion
-of
-ordered
-collections
-</ins>
-is
-<del class="diff-old">returned.
-Parameter
-Type
-Nullable
-Optional
-Description
-jsonld
-DOMString
-✘
-✘
-The
-JSON-LD
-string
-</del>
-<ins class="diff-chg">rather
-important
-in
-data
-modeling,
-it
-is
-useful
-</ins>
-to
-<del class="diff-old">parse
-into
-</del>
-<ins class="diff-chg">have
-specific
-language
-support.
-In
-JSON-LD,
-a
-list
-may
-be
-represented
-using
-</ins>
-the
-<del class="diff-old">Projection.
-template
-</del>
-<code>
-<del class="diff-old">object
-</del>
-<ins class="diff-chg">@list
-</ins>
-</code>
-<del class="diff-old">✔
-✘
-The
-Projection
-template
-to
-use
-when
-building
-</del>
-<ins class="diff-chg">keyword
-as
-follows:
-</ins></p>  <pre class="example"><ins class="diff-chg">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
-...
-}
-</ins></pre><p><ins class="diff-chg">
-This
-describes
-</ins>
-the
-<del class="diff-old">Projection.
-subject
-DOMString
-✔
-✘
-The
-subject
-to
-</del>
-use
-<del class="diff-old">when
-building
-the
-Projection.
-callback
-JSONLDParserCallback
-✔
-✔
-A
-callback
-that
-</del>
-<ins class="diff-chg">of
-this
-array
-as
-being
-ordered,
-and
-order
-</ins>
-is
-<del class="diff-old">called
-whenever
-</del>
-<ins class="diff-chg">maintained
-through
-normalization
-and
-RDF
-conversion.
-If
-every
-use
-of
-</ins>
-a
-<del class="diff-old">processing
-error
-occurs
-on
-the
-</del>
-given
-<del class="diff-old">JSON-LD
-string.
-No
-exceptions.
-Return
-type:
-object
-The
-JSONLDParserCallback
-</del>
-<ins class="diff-chg">multi-valued
-property
-</ins>
-is
-<del class="diff-old">called
-whenever
-</del>
-a
-<del class="diff-old">processing
-error
-occurs
-on
-input
-data.
-</del>
-<ins class="diff-chg">list,
-this
-may
-be
-abbreviated
-by
-adding
-an
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-term:
-</ins>
-</p>
-<del class="diff-old">]
-interface  {
-};
-</del>
-  <pre class="example">
-<ins class="diff-chg">{
-</ins>  <span class="diff">"@context": {</span><ins class="diff-chg">
-    ...
-</ins>    <span class="diff">"@context": {</span>      <span class="diff">"@list": ["foaf:nick"]</span>    <span class="diff">}</span>  <span class="diff">}</span>,<ins class="diff-chg">
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}
-</ins>
-</pre>
-<div id="expansion-2" class="section">
-<h4 id="list-expansion">
-<span class="secno">
-<del class="diff-old">9.3.2
-</del>
-<ins class="diff-chg">6.2.1
-</ins>
-</span>
-<del class="diff-old">Methods
-</del>
-<ins class="diff-chg">Expansion
-</ins>
-</h4>
-<del class="diff-old">error
-This
-callback
-is
-invoked
-whenever
-an
-error
-occurs
-during
-processing.
-Parameter
-Type
-Nullable
-Optional
-Description
-error
-DOMString
-✘
-✘
-A
-descriptive
-error
-string
-returned
-by
-the
-processor.
-No
-exceptions.
-Return
-type:
-void
-</del>
-<p class="issue">
-<ins class="diff-chg">TBD.
-</ins></p>
-</div>
-<div id="normalization-2" class="section">
-<h4 id="list-normalization">
-<del class="diff-old">The
-following
-example
-demonstrates
-how
-to
-convert
-JSON-LD
-to
-a
-projection
-that
-is
-directly
-usable
-in
-a
-programming
-environment:
-</del>
-<span class="secno">
-<ins class="diff-chg">6.2.2
-</ins></span><ins class="diff-chg">
-Normalization
-</ins></h4><p class="issue"><ins class="diff-chg">
-TBD.
-</ins>
-</p>
-<del class="diff-old">// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-// Map the JSON-LD to a language-native object
-var person = jsonld.toProjection(jsonldString, myTemplate);
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-"Their
-homepage
-is:
-"
-+
-person.homepage);
-A
-JSON-LD
-Serializer
-is
-also
-available
-to
-map
-a
-language-native
-object
-to
-JSON-LD.
-]
-interface  {
-};
-</del>
-</div>
-<div id="rdf-conversion-1" class="section">
-<h4 id="list-rdf">
-<span class="secno">
-<del class="diff-old">9.3.3
-</del>
-<ins class="diff-chg">6.2.3
-</ins>
-</span>
-<del class="diff-old">Methods
-</del>
-<ins class="diff-chg">RDF
-Conversion
-</ins>
-</h4>
-<del class="diff-old">normalize
-Serializes
-a
-language-native
-object
-into
-a
-normalized
-JSON-LD
-string.
-Normalization
-is
-important
-when
-performing
-things
-like
-equality
-comparison
-and
-digital
-signature
-creation
-and
-verification.
-Parameter
-Type
-Nullable
-Optional
-Description
-obj
-object
-✘
-✘
-An
-associative
-array
-</del>
-<p>
-<ins class="diff-chg">To
-support
-RDF
-Conversion
-</ins>
-of
-<del class="diff-old">key-value
-pairs
-that
-should
-be
-converted
-to
-a
-JSON-LD
-string.
-It
-is
-assumed
-that
-a
-map
-already
-exists
-for
-the
-data.
-No
-exceptions.
-Return
-type:
-DOMString
-The
-Normalization
-</del>
-<ins class="diff-chg">lists,
-</ins><a href="#rdf-conversion-algorithm"><ins class="diff-chg">
-RDF
-Conversion
-</ins>
-Algorithm
-<del class="diff-old">This
-algorithm
-is
-very
-rough,
-untested,
-and
-probably
-contains
-many
-bugs.
-Use
-at
-your
-own
-risk.
-It
-will
-change
-in
-the
-coming
-months.
-The
-JSON-LD
-normalization
-algorithm
-</del>
-</a>
-is
-<ins class="diff-new">updated
-</ins>
-as
-follows:
-</p>
-<ol class="algorithm update">
-<li>
-<del class="diff-old">Remove
-</del>
-<span class="list-number">
-<ins class="diff-chg">2.4a.
-</ins></span><ins class="diff-chg">
-If
-</ins>
-the
-<ins class="diff-new">associative
-array
-has
-a
-</ins>
-<code>
-<del class="diff-old">@context
-</del>
-<ins class="diff-chg">@list
-</ins>
-</code>
-key
-and
-<del class="diff-old">preserve
-it
-as
-</del>
-the
-<del class="diff-old">transformation
-map
-while
-running
-this
-algorithm.
-</del>
-<ins class="diff-chg">value
-is
-an
-array
-process
-the
-value
-as
-a
-list
-starting
-at
-</ins><a href="#processing-step-list"><ins class="diff-chg">
-Step
-3a
-</ins></a>.
-</li>
-<li>
-<del class="diff-old">For
-each
-key
-</del>
-<span class="list-number">
-<ins class="diff-chg">2.7.3.
-</ins></span><ins class="diff-chg">
-Create
-a
-new
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins></a><ins class="diff-chg">
-copies
-of
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
-active
-context
-</ins></a>,<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
-active
-subject
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins></a>.
-<ol class="algorithm">
-<li>
-If
-the
-<del class="diff-old">key
-</del>
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-<ins class="diff-chg">active
-property
-</ins></a>
-is
-<ins class="diff-new">the
-target
-of
-</ins>
-a
-<del class="diff-old">CURIE,
-expand
-</del>
-<code>
-<ins class="diff-chg">@list
-</ins></code><ins class="diff-chg">
-coercion,
-and
-</ins>
-the
-<del class="diff-old">CURIE
-to
-</del>
-<ins class="diff-chg">value
-is
-</ins>
-an
-<del class="diff-old">IRI
-</del>
-<ins class="diff-chg">array,
-process
-the
-value
-as
-a
-list
-starting
-at
-</ins><a href="#processing-step-list"><ins class="diff-chg">
-Step
-3a
-</ins></a>.</li><li><ins class="diff-chg">
-Otherwise,
-process
-the
-value
-starting
-at
-</ins><a href="#processing-step-associative"><ins class="diff-chg">
-Step
-2
-</ins></a>.</li><li><ins class="diff-chg">
-Proceed
-</ins>
-using
-the
-<del class="diff-old">transformation
-map
-</del>
-<ins class="diff-chg">previous
-</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
-processor
-state
-</ins>
-</a>.
-</li>
-</ol>
-</li>
-<del class="diff-old">For
-</del>
-<li id="processing-step-list">
-<span class="list-number">
-<ins class="diff-chg">3a.
-</ins></span><ins class="diff-chg">
-Generate
-an
-RDF
-List
-by
-linking
-</ins>
-each
-<del class="diff-old">value
-If
-</del>
-<ins class="diff-chg">element
-of
-</ins>
-the
-<del class="diff-old">value
-should
-be
-type
-coerced
-per
-</del>
-<ins class="diff-chg">list
-using
-</ins><code><ins class="diff-chg">
-rdf:first
-</ins></code><ins class="diff-chg">
-and
-</ins><code><ins class="diff-chg">
-rdf:next
-</ins></code>,<ins class="diff-chg">
-terminating
-</ins>
-the
-<del class="diff-old">transformation
-map
-,
-ensure
-that
-it
-is
-transformed
-to
-</del>
-<ins class="diff-chg">list
-with
-</ins><code><ins class="diff-chg">
-rdf:nil
-</ins></code><ins class="diff-chg">
-using
-</ins>
-the
-<del class="diff-old">new
-value.
-</del>
-<ins class="diff-chg">following
-sequence:
-</ins><ol class="algorithm">
-<li>
-If
-the
-<del class="diff-old">value
-is
-</del>
-<ins class="diff-chg">list
-has
-no
-element,
-generate
-</ins>
-a
-<del class="diff-old">CURIE,
-expand
-the
-CURIE
-to
-an
-IRI
-</del>
-<ins class="diff-chg">triple
-</ins>
-using
-the
-<del class="diff-old">transformation
-map
-.
-</del>
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-<ins class="diff-chg">active
-subject
-</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins></a><ins class="diff-chg">
-and
-</ins><code><ins class="diff-chg">
-rdf:nil
-</ins></code>.
-</li>
-<li>
-<del class="diff-old">If
-the
-value
-is
-</del>
-<ins class="diff-chg">Otherwise,
-generate
-</ins>
-a
-<del class="diff-old">typed
-literal
-</del>
-<ins class="diff-chg">triple
-using
-using
-the
-</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
-active
-subject
-</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins>
-</a>
-and
-<ins class="diff-new">a
-newly
-generated
-BNode
-identified
-as
-</ins><em><ins class="diff-new">
-first
-</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1"><ins class="diff-new">
-blank
-node
-identifier
-</ins></dfn></em>.</li><li><ins class="diff-new">
-For
-each
-element
-other
-than
-</ins>
-the
-<del class="diff-old">type
-is
-</del>
-<ins class="diff-chg">last
-element
-in
-the
-list:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-Create
-</ins>
-a
-<del class="diff-old">CURIE,
-expand
-it
-to
-an
-IRI
-</del>
-<ins class="diff-chg">processor
-state
-</ins>
-using
-the
-<del class="diff-old">transformation
-map
-.
-When
-generating
-</del>
-<ins class="diff-chg">active
-context,
-</ins><em><ins class="diff-chg">
-first
-</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2"><ins class="diff-chg">
-blank
-node
-identifier
-</ins></dfn></em><ins class="diff-chg">
-as
-</ins>
-the
-<del class="diff-old">final
-value,
-use
-expanded
-object
-value
-form
-to
-store
-all
-IRIs,
-typed
-literals
-</del>
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-<ins class="diff-chg">active
-subject
-</ins></a>,
-and
-<del class="diff-old">plain
-literal
-s
-with
-language
-information.
-</del>
-<code>
-<ins class="diff-chg">rdf:first
-</ins></code><ins class="diff-chg">
-as
-the
-</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
-active
-property
-</ins></a>.
-</li>
-<li>
-<del class="diff-old">Output
-each
-sorted
-key-value
-pair
-without
-any
-extraneous
-whitespace.
-If
-the
-value
-is
-an
-associative
-array,
-perform
-</del>
-<ins class="diff-chg">Unless
-</ins>
-this
-<del class="diff-old">algorithm,
-starting
-at
-step
-#1,
-recursively
-on
-the
-sub-tree.
-There
-should
-be
-no
-nesting
-in
-the
-outputted
-JSON
-data.
-That
-is,
-</del>
-<ins class="diff-chg">is
-</ins>
-the
-<del class="diff-old">top-most
-</del>
-<ins class="diff-chg">last
-</ins>
-element
-<del class="diff-old">should
-be
-an
-array.
-Each
-item
-</del>
-in
-the
-<del class="diff-old">array
-contains
-a
-single
-subject
-with
-</del>
-<ins class="diff-chg">list,
-generate
-</ins>
-a
-<del class="diff-old">corresponding
-array
-of
-properties
-in
-UTF-8
-sort
-order.
-Any
-related
-objects
-that
-are
-complex
-objects
-themselves
-should
-be
-given
-</del>
-<ins class="diff-chg">new
-BNode
-identified
-as
-</ins><em><ins class="diff-chg">
-rest
-</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3"><ins class="diff-chg">
-blank
-node
-identifier
-</ins></dfn></em>,<ins class="diff-chg">
-otherwise
-use
-</ins><code><ins class="diff-chg">
-rdf:nil
-</ins></code>.</li><li><ins class="diff-chg">
-Generate
-</ins>
-a
-<del class="diff-old">top-level
-object
-in
-the
-top-level
-array.
-</del>
-<ins class="diff-chg">new
-triple
-using
-</ins><em><ins class="diff-chg">
-first
-</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4"><ins class="diff-chg">
-blank
-node
-identifier
-</ins></dfn></em>,<code><ins class="diff-chg">
-rdf:rest
-</ins></code><ins class="diff-chg">
-and
-</ins><em><ins class="diff-chg">
-rest
-</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5"><ins class="diff-chg">
-blank
-node
-identifier
-</ins></dfn></em>.
-</li>
-<del class="diff-old">Note
-that
-normalizing
-named
-</del>
-<li>
-<ins class="diff-chg">Set
-</ins><em><ins class="diff-chg">
-first
-</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">
-blank
-<del class="diff-old">nodes
-is
-impossible
-at
-present
-since
-one
-would
-have
-</del>
-<ins class="diff-chg">node
-identifier
-</ins></dfn></em>
-to
-<del class="diff-old">specify
-a
-</del>
-<em>
-<ins class="diff-chg">rest
-</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">
-blank
-node
-<del class="diff-old">naming
-algorithm.
-For
-the
-time
-being,
-you
-cannot
-normalize
-graphs
-that
-contain
-named
-blank
-nodes.
-However,
-normalizing
-graphs
-</del>
-<ins class="diff-chg">identifier
-</ins></dfn></em>.</li></ol></li></ol></li></ol></div></div></div><div class="appendix section" id="markup-examples"><h2><span class="secno"><ins class="diff-chg">
-A.
-</ins></span><ins class="diff-chg">
-Markup
-Examples
-</ins></h2><p><ins class="diff-chg">
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-</ins>
-that
-<del class="diff-old">contain
-non-named
-blank
-nodes
-</del>
-<ins class="diff-chg">JSON-LD
-</ins>
-is
-<del class="diff-old">supported.
-</del>
-<ins class="diff-chg">very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</ins>
-</p>
-<del class="diff-old">var myObj = { "@context" : { 
-                "xsd" : "http://www.w3.org/2001/XMLSchema#",
-                "name" : "http://xmlns.com/foaf/0.1/name",
-                "age" : "http://xmlns.com/foaf/0.1/age",
-                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "age",
-                   "xsd:anyURI": "homepage"
-                }
-              },
-              "name" : "Joe Jackson",
-              "age" : "42",
-              "homepage" : "http://example.org/people/joe" };
-</del>
-<div id="rdfa" class="section">
-<h3>
-<del class="diff-old">// Map the language-native object to JSON-LD
-var
-jsonldText
-=
-jsonld.normalize(myObj);
-</del>
-<span class="secno">
-<ins class="diff-chg">A.1
-</ins></span><ins class="diff-chg">
-RDFa
-</ins></h3>
-<p>
-<del class="diff-old">After
-the
-code
-in
-the
-</del>
-<ins class="diff-chg">The
-following
-</ins>
-example
-<del class="diff-old">above
-has
-executed,
-the
-jsonldText
-value
-will
-be
-(line-breaks
-added
-for
-readability):
-</del>
-<ins class="diff-chg">describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</ins>
-</p>
-<pre class="example">
-<del class="diff-old">[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
-"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
-"http://xmlns.com/foaf/0.1/name":"Joe
-Jackson"}]
-</del>
-<ins class="diff-chg">&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</ins>
-</pre>
-<p>
-<del class="diff-old">When
-normalizing
-xsd:double
-values,
-implementers
-must
-ensure
-</del>
-<ins class="diff-chg">An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-</ins>
-that
-the
-<del class="diff-old">normalized
-value
-</del>
-<ins class="diff-chg">context
-</ins>
-is
-<ins class="diff-new">not
-repeated.
-</ins></p><pre class="example"><ins class="diff-new">
-{
-  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
-  "@subject": [
-   {
-     "@subject": "_:bnode1",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/bob/",
-     "foaf:name": "Bob"
-   },
-   {
-     "@subject": "_:bnode2",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/eve/",
-     "foaf:name": "Eve"
-   },
-   {
-     "@subject": "_:bnode3",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/manu/",
-     "foaf:name": "Manu"
-   }
-  ]
-}
-</ins></pre></div><div id="microformats" class="section"><h3><span class="secno"><ins class="diff-new">
-A.2
-</ins></span><ins class="diff-new">
-Microformats
-</ins></h3><p><ins class="diff-new">
-The
-following
-example
-uses
-</ins>
-a
-<del class="diff-old">string.
-In
-order
-</del>
-<ins class="diff-chg">simple
-Microformats
-hCard
-example
-</ins>
-to
-<del class="diff-old">generate
-</del>
-<ins class="diff-chg">express
-how
-</ins>
-the
-<del class="diff-old">string
-from
-a
-double
-value,
-output
-equivalent
-to
-</del>
-<ins class="diff-chg">Microformat
-is
-represented
-in
-JSON-LD.
-</ins></p><pre class="example"><ins class="diff-chg">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-</ins></pre><p><ins class="diff-chg">
-The
-representation
-of
-</ins>
-the
-<del class="diff-old">printf("%1.6e",
-value)
-function
-</del>
-<ins class="diff-chg">hCard
-expresses
-the
-Microformat
-terms
-</ins>
-in
-<del class="diff-old">C
-must
-be
-used
-where
-"%1.6e"
-is
-</del>
-the
-<del class="diff-old">string
-formatter
-</del>
-<ins class="diff-chg">context
-</ins>
-and
-<del class="diff-old">value
-is
-</del>
-<ins class="diff-chg">uses
-them
-directly
-for
-</ins>
-the
-<del class="diff-old">value
-</del>
-<code>
-<ins class="diff-chg">url
-</ins></code><ins class="diff-chg">
-and
-</ins><code><ins class="diff-chg">
-fn
-</ins></code><ins class="diff-chg">
-properties.
-Also
-note
-that
-the
-Microformat
-</ins>
-to
-<del class="diff-old">be
-converted.
-</del>
-<ins class="diff-chg">JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-</ins><code><ins class="diff-chg">
-http://tantek.com
-</ins></code>.
-</p>
-<pre class="example">
-<ins class="diff-new">{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@subject": "_:bnode1",
-  "@type": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}
-</ins></pre></div><div id="microdata" class="section"><h3><span class="secno"><ins class="diff-new">
-A.3
-</ins></span><ins class="diff-new">
-Microdata
-</ins></h3>
-<p>
-<del class="diff-old">To
-convert
-the
-</del>
-<ins class="diff-chg">The
-Microdata
-example
-below
-expresses
-book
-information
-as
-</ins>
-a
-<del class="diff-old">double
-value
-in
-JavaScript,
-implementers
-can
-use
-</del>
-<ins class="diff-chg">Microdata
-Work
-item.
-</ins></p><pre class="example"><ins class="diff-chg">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</ins></pre><p><ins class="diff-chg">
-Note
-that
-</ins>
-the
-<del class="diff-old">following
-snippet
-</del>
-<ins class="diff-chg">JSON-LD
-representation
-</ins>
-of
-<del class="diff-old">code:
-</del>
-<ins class="diff-chg">the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</ins>
-</p>
-<pre class="example">
-<del class="diff-old">// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
-'$10$2')
-</del>
-<ins class="diff-chg">[
-  {
-    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "@type": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]
-</ins>
-</pre>
-<del class="diff-old">When
-data
-needs
-</del>
-</div>
-<div class="appendix section" id="mashing-up-vocabularies">
-<h3>
-<span class="secno">
-<ins class="diff-chg">A.4
-</ins></span><ins class="diff-chg">
-Mashing
-Up
-Vocabularies
-</ins></h3><p><ins class="diff-chg">
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-</ins>
-to
-be
-<del class="diff-old">normalized,
-JSON-LD
-authors
-should
-not
-use
-values
-</del>
-<ins class="diff-chg">used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-</ins>
-that
-are
-<del class="diff-old">going
-to
-undergo
-automatic
-conversion.
-This
-is
-due
-to
-</del>
-<ins class="diff-chg">available
-for
-use
-on
-</ins>
-the
-<del class="diff-old">lossy
-nature
-</del>
-<ins class="diff-chg">Web
-today.
-Some
-</ins>
-of
-<del class="diff-old">xsd:double
-values.
-</del>
-<ins class="diff-chg">these
-vocabularies
-are:
-</ins>
-</p>
-<del class="diff-old">Round-tripping
-data
-can
-be
-problematic
-if
-we
-mix
-</del>
-<ul>
-<li>
-<ins class="diff-chg">RDF
--
-for
-describing
-information
-about
-objects
-on
-the
-semantic
-web.
-</ins></li><li><ins class="diff-chg">
-RDFS
--
-for
-expressing
-things
-like
-labels
-</ins>
-and
-<del class="diff-old">match
-@coerce
-rules
-with
-JSON-native
-datatypes,
-</del>
-<ins class="diff-chg">comments.
-</ins></li><li><ins class="diff-chg">
-XSD
--
-for
-specifying
-basic
-types
-</ins>
-like
-<del class="diff-old">integers.
-Consider
-the
-following
-code
-example:
-var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-// Convert the normalized object back to a JavaScript object
-var
-myObj2
-=
-jsonld.parse(jsonldText);
-At
-this
-point,
-myObj2
-</del>
-<ins class="diff-chg">strings,
-integers,
-dates
-</ins>
-and
-<del class="diff-old">myObj
-will
-have
-different
-values
-</del>
-<ins class="diff-chg">times.
-</ins></li><li><ins class="diff-chg">
-Dublin
-Core
--
-</ins>
-for
-<del class="diff-old">the
-"number"
-value.
-myObj
-will
-be
-the
-number
-42,
-while
-myObj2
-will
-be
-the
-string
-"42".
-This
-type
-</del>
-<ins class="diff-chg">describing
-creative
-works.
-</ins></li><li><ins class="diff-chg">
-FOAF
--
-for
-describing
-social
-networks.
-</ins></li><li><ins class="diff-chg">
-Calendar
--
-for
-specifying
-events.
-</ins></li><li><ins class="diff-chg">
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</ins></li><li><ins class="diff-chg">
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-</ins>
-of
-<del class="diff-old">data
-round-tripping
-error
-</del>
-<ins class="diff-chg">licenses.
-</ins></li><li><ins class="diff-chg">
-GEO
--
-for
-describing
-geographic
-location.
-</ins></li><li><ins class="diff-chg">
-VCard
--
-for
-describing
-organizations
-and
-people.
-</ins></li><li><ins class="diff-chg">
-DOAP
--
-for
-describing
-projects.
-</ins></li></ul><p><ins class="diff-chg">
-You
-</ins>
-can
-<del class="diff-old">bite
-developers.
-We
-are
-currently
-wondering
-if
-having
-a
-"coerce
-validation"
-phase
-</del>
-<ins class="diff-chg">use
-these
-vocabularies
-</ins>
-in
-<del class="diff-old">the
-parsing/normalization
-phases
-would
-be
-a
-good
-idea.
-It
-would
-prevent
-data
-round-tripping
-issues
-</del>
-<ins class="diff-chg">combination,
-</ins>
-like
-<del class="diff-old">the
-one
-mentioned
-above.
-</del>
-<ins class="diff-chg">so:
-</ins>
-</p>
-<del class="diff-old">A.
-The
-Default
-Context
-</del>
-<pre class="example">
-<ins class="diff-chg">{
-  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}
-</ins></pre>
-<p>
-<del class="diff-old">The
-default
-context
-is
-provided
-to
-ensure
-that
-there
-are
-a
-reasonable
-set
-of
-prefixes
-and
-terms
-available
-to
-all
-JSON-LD
-developers.
-Mappings
-specified
-</del>
-<ins class="diff-chg">Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-</ins>
-by
-<ins class="diff-new">modifying
-</ins>
-the
-<del class="diff-old">default
-</del>
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-<ins class="diff-chg">active
-</ins>
-context
-</a>
-<del class="diff-old">should
-not
-be
-overwritten
-by
-JSON-LD
-authors.
-All
-JSON-LD
-processors
-must
-load
-the
-following
-context
-in
-as
-</del>
-<ins class="diff-chg">in-line
-using
-</ins>
-the
-<del class="diff-old">intial
-context
-before
-processing
-JSON-LD
-text.
-</del>
-<code>
-<ins class="diff-chg">@context
-</ins></code><ins class="diff-chg">
-keyword,
-like
-so:
-</ins>
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "@context":
-  {
-    "@vocab": "",
-    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
-    "owl": "http://www.w3.org/2002/07/owl#",
-    "xsd": "http://www.w3.org/2001/XMLSchema#",
-    "dcterms": "http://purl.org/dc/terms/",
-    "foaf": "http://xmlns.com/foaf/0.1/",
-    "cal": "http://www.w3.org/2002/12/cal/ical#",
-    "vcard": "http://www.w3.org/2006/vcard/ns# ",
-    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
-    "cc": "http://creativecommons.org/ns#",
-    "sioc": "http://rdfs.org/sioc/ns#",
-    "doap": "http://usefulinc.com/ns/doap#",
-    "com": "http://purl.org/commerce#",
-    "ps": "http://purl.org/payswarm#",
-    "gr": "http://purl.org/goodrelations/v1#",
-    "sig": "http://purl.org/signature#",
-    "ccard": "http://purl.org/commerce/creditcard#"
-    "@coerce": 
-    {
-      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
-      "xsd:integer": "foaf:age"
-    }
-  }
-</del>
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-<ins class="diff-chg">  "@type": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-</ins>
-}
-</pre>
-<p>
-<ins class="diff-new">The
-</ins><code><ins class="diff-new">
-@context
-</ins></code><ins class="diff-new">
-keyword
-is
-used
-to
-change
-how
-the
-JSON-LD
-processor
-evaluates
-key-value
-pairs.
-In
-this
-case,
-it
-was
-used
-to
-map
-one
-string
-('myvocab')
-to
-another
-string,
-which
-is
-interpreted
-as
-a
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a>.<ins class="diff-new">
-In
-the
-example
-above,
-the
-</ins><code><ins class="diff-new">
-myvocab
-</ins></code><ins class="diff-new">
-string
-is
-replaced
-with
-"
-</ins><code><ins class="diff-new">
-http://example.org/myvocab#
-</ins></code><ins class="diff-new">
-"
-when
-it
-is
-detected.
-In
-the
-example
-above,
-"
-</ins><code><ins class="diff-new">
-myvocab:personality
-</ins></code><ins class="diff-new">
-"
-would
-expand
-to
-"
-</ins><code><ins class="diff-new">
-http://example.org/myvocab#personality
-</ins></code><ins class="diff-new">
-".
-</ins></p><p><ins class="diff-new">
-This
-mechanism
-is
-a
-short-hand
-for
-RDF,
-called
-a
-CURIE,
-and
-provides
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</ins></p><p></p>
-</div>
-<div class="appendix section" id="acknowledgements">
-<h3>
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">A.5
-</ins>
-</span>
-Acknowledgements
-</h3>
-<p>
-The
-<del class="diff-old">editor
-</del>
-<ins class="diff-chg">editors
-</ins>
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-<del class="diff-old">rationale
-and
-reasoning
-</del>
-<ins class="diff-chg">initial
-push
-</ins>
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-<del class="diff-old">Longley
-</del>
-<ins class="diff-chg">Longley,
-Dave
-Lehn
-and
-Mike
-Johnson
-</ins>
-who
-reviewed,
-provided
-feedback,
-and
-performed
-several
-<del class="diff-old">implementation
-on
-</del>
-<ins class="diff-chg">implementations
-of
-</ins>
-the
-specification,
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-Thanks
-also
-to
-Nathan
-Rixham,
-Bradley
-P.
-<del class="diff-old">Allen
-</del>
-<ins class="diff-chg">Allen,
-Kingsley
-Idehen,
-Glenn
-McDonald,
-Alexandre
-Passant,
-Danny
-Ayers,
-Ted
-Thibodeau
-Jr.,
-Olivier
-Grisel,
-Niklas
-Lindström,
-Markus
-Lanthaler,
-</ins>
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-<ins class="diff-new">Another
-huge
-thank
-you
-goes
-out
-to
-Dave
-Longley
-who
-designed
-many
-of
-the
-algorithms
-used
-in
-this
-specification,
-including
-the
-normalization
-algorithm
-which
-was
-a
-monumentally
-difficult
-design
-challenge.
-</ins>
-</p>
-</div>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-<del class="diff-old">C.
-</del>
-<ins class="diff-chg">B.
-</ins>
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">C.1
-</del>
-<ins class="diff-chg">B.1
-</ins>
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<del class="diff-old">[RDF-API]
-Manu
-Sporny,
-Benjamin
-Adrian,
-Nathan
-Rixham;
-et
-al.
-RDF
-API
-Latest.
-W3C
-Editor's
-Draft.
-URL:
-http://www.w3.org/2010/02/rdfa/sources/rdf-api/
-</del>
-<dt id="bib-RDF-CONCEPTS">
-[RDF-CONCEPTS]
-</dt>
-<dd>
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-<cite>
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</a>
-</dd>
-<del class="diff-old">[RDF-INTERFACES]
-</del>
-<dt id="bib-RFC3986">
-<ins class="diff-chg">[RFC3986]
-</ins>
-</dt>
-<dd>
-<del class="diff-old">Nathan
-Rixham,
-Manu
-Sporny,
-Benjamin
-Adrian;
-et
-al.
-</del>
-<ins class="diff-chg">T.
-Berners-Lee;
-R.
-Fielding;
-L.
-Masinter.
-</ins><a href="http://www.ietf.org/rfc/rfc3986.txt">
-<cite>
-<del class="diff-old">RDF
-Interfaces
-</del>
-<ins class="diff-chg">Uniform
-Resource
-Identifier
-(URI):
-Generic
-Syntax.
-</ins>
-</cite>
-</a>
-<del class="diff-old">Latest.
-W3C
-Editor's
-Draft.
-</del>
-<ins class="diff-chg">January
-2005.
-Internet
-RFC
-3986.
-</ins>
-URL:
-<del class="diff-old">http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/
-</del>
-<a href="http://www.ietf.org/rfc/rfc3986.txt">
-<ins class="diff-chg">http://www.ietf.org/rfc/rfc3986.txt
-</ins>
-</a>
-</dd>
-<dt id="bib-RFC3987">
-[RFC3987]
-</dt>
-<dd>
-M.
-Dürst;
-M.
-Suignard.
-<a href="http://www.ietf.org/rfc/rfc3987.txt">
-<cite>
-Internationalized
-Resource
-Identifiers
-(IRIs).
-</cite>
-</a>
-January
-2005.
-Internet
-RFC
-3987.
-URL:
-<a href="http://www.ietf.org/rfc/rfc3987.txt">
-http://www.ietf.org/rfc/rfc3987.txt
-</a>
-</dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford.
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-<cite>
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</cite>
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-<dt id="bib-WEBIDL">
-<ins class="diff-new">[WEBIDL]
-</ins></dt><dd><ins class="diff-new">
-Cameron
-McCormack.
-</ins><a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite><ins class="diff-new">
-Web
-IDL.
-</ins></cite></a><ins class="diff-new">
-19
-December
-2008.
-W3C
-Working
-Draft.
-(Work
-in
-progress.)
-URL:
-</ins><a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><ins class="diff-new">
-http://www.w3.org/TR/2008/WD-WebIDL-20081219
-</ins></a></dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">C.2
-</del>
-<ins class="diff-chg">B.2
-</ins>
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-ECMA-262">
-<ins class="diff-new">[ECMA-262]
-</ins></dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite><ins class="diff-new">
-ECMAScript
-Language
-Specification,
-Third
-Edition.
-</ins></cite></a><ins class="diff-new">
-December
-1999.
-URL:
-</ins><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><ins class="diff-new">
-http://www.ecma-international.org/publications/standards/Ecma-262.htm
-</ins></a></dd>
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDF-SCHEMA">
-<ins class="diff-new">[RDF-SCHEMA]
-</ins></dt><dd><ins class="diff-new">
-Dan
-Brickley;
-Ramanathan
-V.
-Guha.
-</ins><a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite><ins class="diff-new">
-RDF
-Vocabulary
-Description
-Language
-1.0:
-RDF
-Schema.
-</ins></cite></a><ins class="diff-new">
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-</ins><a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><ins class="diff-new">
-http://www.w3.org/TR/2004/REC-rdf-schema-20040210
-</ins></a></dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-31
-March
-2011.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-http://www.w3.org/TR/2011/WD-rdfa-core-20110331
-</a>
-</dd>
-<dt id="bib-TURTLE">
-<ins class="diff-new">[TURTLE]
-</ins></dt><dd><ins class="diff-new">
-David
-Beckett,
-Tim
-Berners-Lee.
-</ins><a href="http://www.w3.org/TeamSubmission/turtle/"><cite><ins class="diff-new">
-Turtle:
-Terse
-RDF
-Triple
-Language.
-</ins></cite></a><ins class="diff-new">
-January
-2008.
-W3C
-Team
-Submission.
-URL:
-</ins><a href="http://www.w3.org/TeamSubmission/turtle/"><ins class="diff-new">
-http://www.w3.org/TeamSubmission/turtle/
-</ins>
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20110808/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3463 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-ol.algorithm.update { margin-left: 2em; }
-ol.algorithm.update>li { list-style-type: none; }
-ol.algorithm.update>li>span.list-number {
-  display:block;
-  float: left; 
-  margin-left: -3.5em;
-}
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  1px dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-08-august-2011">Unofficial Draft 08 August 2011</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
-<dt>Authors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
-<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-</dl><p>This document is also available in this non-normative format: <a href="diff-20110615.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and 
-messaging format. In an attempt to harmonize the representation of Linked Data 
-in JSON, this specification outlines a common JSON representation format for 
-expressing directed graphs; mixing both Linked Data and non-Linked Data in 
-a single document. 
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design" class="tocxref"><span class="secno">2. </span>Design</a><ul class="toc"><li class="tocline"><a href="#goals-and-rationale" class="tocxref"><span class="secno">2.1 </span>Goals and Rationale</a></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">2.2 </span>Linked Data</a></li><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">2.3 </span>Linking Data</a></li><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">2.4 </span>The Context</a><ul class="toc"><li class="tocline"><a href="#inside-a-context" class="tocxref"><span class="secno">2.4.1 </span>Inside a Context</a></li></ul></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">2.5 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno">3.4 </span>Strings</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">3.6 </span>Datatypes</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">3.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.9 </span>Expansion</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.10 </span>Compaction</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">4.1 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.2 </span>Type Coercion</a></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">4.3 </span>Chaining</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.4 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#overriding-keywords" class="tocxref"><span class="secno">4.5 </span>Overriding Keywords</a></li><li class="tocline"><a href="#normalization" class="tocxref"><span class="secno">4.6 </span>Normalization</a></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">5. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">5.1 </span>Syntax Tokens and Keywords</a></li><li class="tocline"><a href="#algorithm-terms" class="tocxref"><span class="secno">5.2 </span>Algorithm Terms</a></li><li class="tocline"><a href="#context-1" class="tocxref"><span class="secno">5.3 </span>Context</a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno">5.3.1 </span>Coerce</a></li><li class="tocline"><a href="#initial-context" class="tocxref"><span class="secno">5.3.2 </span>Initial Context</a></li></ul></li><li class="tocline"><a href="#iri-expansion" class="tocxref"><span class="secno">5.4 </span>IRI Expansion</a></li><li class="tocline"><a href="#iri-compaction" class="tocxref"><span class="secno">5.5 </span>IRI Compaction</a></li><li class="tocline"><a href="#value-expansion" class="tocxref"><span class="secno">5.6 </span>Value Expansion</a></li><li class="tocline"><a href="#value-compaction" class="tocxref"><span class="secno">5.7 </span>Value Compaction</a></li><li class="tocline"><a href="#expansion-1" class="tocxref"><span class="secno">5.8 </span>Expansion</a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno">5.8.1 </span>Expansion Algorithm</a></li></ul></li><li class="tocline"><a href="#compaction-1" class="tocxref"><span class="secno">5.9 </span>Compaction</a><ul class="toc"><li class="tocline"><a href="#compaction-algorithm" class="tocxref"><span class="secno">5.9.1 </span>Compaction Algorithm</a></li></ul></li><li class="tocline"><a href="#framing-1" class="tocxref"><span class="secno">5.10 </span>Framing</a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno">5.10.1 </span>Framing Algorithm Terms</a></li><li class="tocline"><a href="#framing-algorithm" class="tocxref"><span class="secno">5.10.2 </span>Framing Algorithm</a></li></ul></li><li class="tocline"><a href="#normalization-1" class="tocxref"><span class="secno">5.11 </span>Normalization</a><ul class="toc"><li class="tocline"><a href="#normalization-algorithm-terms" class="tocxref"><span class="secno">5.11.1 </span>Normalization Algorithm Terms</a></li><li class="tocline"><a href="#normalization-algorithm" class="tocxref"><span class="secno">5.11.2 </span>Normalization Algorithm</a></li><li class="tocline"><a href="#node-labeling-algorithm" class="tocxref"><span class="secno">5.11.3 </span>Node Labeling Algorithm</a></li><li class="tocline"><a href="#shallow-comparison-algorithm" class="tocxref"><span class="secno">5.11.4 </span>Shallow Comparison Algorithm</a></li><li class="tocline"><a href="#object-comparison-algorithm" class="tocxref"><span class="secno">5.11.5 </span>Object Comparison Algorithm</a></li><li class="tocline"><a href="#deep-comparison-algorithm" class="tocxref"><span class="secno">5.11.6 </span>Deep Comparison Algorithm</a></li><li class="tocline"><a href="#node-serialization-algorithm" class="tocxref"><span class="secno">5.11.7 </span>Node Serialization Algorithm</a></li><li class="tocline"><a href="#combinatorial-serialization-algorithm" class="tocxref"><span class="secno">5.11.8 </span>Combinatorial Serialization Algorithm</a></li><li class="tocline"><a href="#mapping-serialization-algorithm" class="tocxref"><span class="secno">5.11.9 </span>Mapping Serialization Algorithm</a></li><li class="tocline"><a href="#label-generation-algorithm" class="tocxref"><span class="secno">5.11.10 </span>Label Generation Algorithm</a></li></ul></li><li class="tocline"><a href="#data-round-tripping" class="tocxref"><span class="secno">5.12 </span>Data Round Tripping</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">5.13 </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">5.13.1 </span>Overview</a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno">5.13.2 </span>RDF Conversion Algorithm Terms</a></li><li class="tocline"><a href="#rdf-conversion-algorithm" class="tocxref"><span class="secno">5.13.3 </span>RDF Conversion Algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno">6. </span>Experimental Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">6.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#lists" class="tocxref"><span class="secno">6.2 </span>Lists</a><ul class="toc"><li class="tocline"><a href="#expansion-2" class="tocxref"><span class="secno">6.2.1 </span>Expansion</a></li><li class="tocline"><a href="#normalization-2" class="tocxref"><span class="secno">6.2.2 </span>Normalization</a></li><li class="tocline"><a href="#rdf-conversion-1" class="tocxref"><span class="secno">6.2.3 </span>RDF Conversion</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">A. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">A.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">A.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">A.3 </span>Microdata</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">A.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A.5 </span>Acknowledgements</a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-<p>
-JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing 
-data on the Web. Linked Data is a technique for describing content across 
-different 
-documents or Web sites. Web resources are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s, 
-and typically are dereferencable entities that may be used to find more 
-information, creating a "Web of Knowledge". JSON-LD is intended to be a simple 
-publishing method for expressing not only Linked Data in JSON, but for adding
-semantics to existing JSON.
-</p>
-
-<p>
-JSON-LD is designed as a light-weight syntax that can be used to express 
-Linked Data. It is primarily intended to be a way to express Linked Data 
-in Javascript and other Web-based programming environments. It is also 
-useful when building interoperable Web Services and when storing Linked 
-Data in JSON-based document storage engines. It is practical and designed 
-to be as simple as possible, utilizing the large number of JSON parsers 
-and existing code that is in use today. It is designed to be able to 
-express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats 
-[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports 
-every major Web-based structured data model in use today. 
-</p>
-
-<p>
-The syntax does not require many applications to change their JSON, but 
-easily add meaning by adding context in a way that is either in-band or 
-out-of-band. The syntax is designed to not disturb already deployed systems 
-running on JSON, but provide a smooth migration path from JSON to JSON with 
-added semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a very small memory footprint in order to operate.
-</p>
-
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and 
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to implement processors and APIs for 
-  JSON-LD.</li>
-</ul>
-
-<p>
-To understand the basics in this specification you must first be familiar with 
-JSON, which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. To understand the API and how it is
-intended to operate  in a programming environment, it is useful to have working 
-knowledge of the JavaScript programming language [<cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and 
-WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be 
-familiar with the basic RDF concepts [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-
-<p>
-  Examples may contain references to existing vocabularies and use abbreviations in CURIEs and source code. The following is a list of all vocabularies and their abbreviations, as used in this document:
-</p>
-<ul>
-  <li>The <a href="http://purl.org/dc/terms/">Dublin Core</a>
-  vocabulary (abbreviation: <code>dc</code>, e.g., <code>dc:title</code>)</li>
-  <li>The <a href="http://xmlns.com/foaf/0.1/">Friend of a Friend</a>
-  vocabulary (abbreviation: <code>foaf</code>, e.g., <code>foaf:knows</code>)</li>
-  <li>The <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">RDF</a>
-  vocabulary (abbreviation: <code>rdf</code>, e.g., <code>rdf:type</code>)</li>
-  <li>The <a href="http://www.w3.org/2001/XMLSchema#">XSD</a>
-  vocabulary (abbreviation: <code>xsd</code>, e.g., <code>xsd:integer</code>)</li>
-</ul>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>Technical discussion typically occurs on the public mailing list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
-</li>
-
-<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held 
-on Tuesdays at 1500UTC on the second and fourth week of each month.
-</li>
-
-<li>Specification bugs and issues should be reported in the 
-<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
-
-<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the 
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design</h2>
-
-<p>The following section outlines the design goals and rationale behind the 
-JSON-LD markup language.
-</p>
-
-<div id="goals-and-rationale" class="section">
-<h3><span class="secno">2.1 </span>Goals and Rationale</h3>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers need only know JSON and three keywords to use the basic 
- functionality in JSON-LD. No extra processors or software libraries are
- necessary to use JSON-LD in its most basic form. The language attempts to
- ensure that developers have an easy learning curve.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
- all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
- <dt>Expressiveness</dt>
- <dd>The syntax must be able to express directed graphs, which have been proven
- to be able to simply express almost every real world data model.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable, requiring as
- little as possible from the developer.</dd>
- <dt>Pragmatism</dt>
- <dd>Mixing the expression of pure Linked Data with data that is not
- linked was an approach that was driven by pragmatism. JSON-LD attempts to be
- more practical than theoretical in its approach to Linked Data.</dd>
- <dt>Zero Edits, most of the time</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers. At times, mapping JSON to 
- a graph representation can become difficult. In these instances, rather than 
- having JSON-LD support esoteric markup, we chose not to support the use case 
- and support a simplified syntax instead. So, while Zero Edits was a goal,
- it was not always possible without adding great complexity to the language.
- </dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="linked-data" class="section">
-<h3><span class="secno">2.2 </span>Linked Data</h3>
-<p>
-The following definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> is the one that will 
-be used for this specification.
-</p>
-<ol>
- <li><dfn title="Linked_Data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a 
-   representation of a linked data graph.</li>
- <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is a labeled directed graph, where nodes 
-   are <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are 
-   properties.</li>
- <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> 
-   with at least one outgoing edge.</li>
- <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> <em class="rfc2119" title="should">should</em> be labeled with a IRI.</li>
- <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>
-   .</li>
- <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <em class="rfc2119" title="must">must</em> be labeled with an IRI.</li>
- <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with 
-   at least one incoming edge.</li>
- <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an IRI.</li>
- <li>An IRI that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be 
-   dereferencable to a <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> document describing the 
-   labeled <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>
-   .</li>
- <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not 
- an IRI</li>
-</ol>
-
-<p>
-Note that the definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> above is silent on the 
-topic of unlabeled nodes. Unlabeled nodes are not considered 
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
-of unlabled nodes, as most graph-based data sets on the Web contain a number 
-of associated nodes that are not named and thus are not directly 
-de-referenceable.
-</p>
-</div>
-
-<div id="linking-data" class="section">
-<h3><span class="secno">2.3 </span>Linking Data</h3>
-
-<p>
-An Internationalized Resource Identifier 
-(<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
-as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique 
-identifiers on the web. In <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, an IRI is commonly 
-used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an 
-<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
-</p>
-
-<p>JSON-LD defines a mechanism to map JSON values to IRIs. This does not mean 
-that JSON-LD requires every key or value to be an IRI, but rather ensures that
-keys and values can be mapped to IRIs if the developer so desires to transform
-their data into Linked Data. There are a few techniques that can ensure 
-that developers will generate good Linked Data for the Web. JSON-LD 
-formalizes those techniques.
-</p>
-
-<p>We will be using the following JSON markup as the example for the
-rest of this section:
-</p>
-
-<pre class="example">
-{
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-</div>
-
-<div id="the-context" class="section">
-<h3><span class="secno">2.4 </span>The Context</h3>
-
-<p>In JSON-LD, a context is used to allow developers to map <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s 
-to <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that <em class="rfc2119" title="may">may</em> be expanded
-to an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The semantic web, just like the document-based 
-web, uses IRIs for unambiguous identification. The idea is that these 
-<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s mean something that may be of use to other developers.
-For example, the term <code>name</code> may map directly to the IRI 
-<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to 
-be constructed using the common JSON practice of simple name/value pairs while
-ensuring that the data is useful outside of the database or page in which it
-resides.
-</p>
-
-<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a context and
-then used by adding a single line to the JSON markup above:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>The addition above transforms the previous JSON document into a JSON document
-with added semantics because the <code>@context</code> specifies how the
-<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong> 
-terms map to IRIs. 
-Mapping those keys to IRIs gives the data global context. If two 
-developers use the same IRI to describe a property, they are more than likely
-expressing the same concept. This allows both developers to re-use each others
-data without having to agree to how their data will inter-operate on a 
-site-by-site basis.</p>
-
-<p>
-The semantic web uses a special type of document called a 
-<em>Web Vocabulary</em> to define <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s. A context is a type of
-Web vocabulary.
-Typically, these Web Vocabulary documents have <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es associated
-with them and contain a number of <a class="tref internalDFN" title="term" href="#dfn-term">term</a> declarations. A
-<dfn title="prefix" id="dfn-prefix">prefix</dfn>, like a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, is a short word that expands
-to a Web Vocabulary IRI. <a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are helpful when a developer
-wants to mix multiple vocabularies together in a context, but does not want
-to go to the trouble of defining every single term in every single vocabulary.
-Some Web Vocabularies may have 10-20 terms defined. If a developer wants to use 
-3-4 different vocabularies, the number of terms that 
-would have to be declared in a single context would become quite large. To 
-reduce the number of different terms that must be defined, JSON-LD also allows 
-prefixes to be used to compact IRIs.
-</p><p>
-
-</p><p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code> 
-specifies a Web Vocabulary which may be represented using the
-<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>. The <code>foaf</code> Web Vocabulary
-contains a term called <strong>name</strong>. If you join the 
-<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> with the <strong>name</strong> suffix, 
-you can build a compact IRI that will expand out into an absolute IRI for the
-<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
-That is, the compact IRI, or short-form, is <code>foaf:name</code> and the 
-expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary 
-term is used to specify a person's name.
-</p>
-
-<p>Developers, and machines, are able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much like we can use WordNet today to 
-see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Developers and machines need the same sort of 
-dictionary of terms. IRIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>The context provides a collection of vocabulary <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and 
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es that can be used to expand JSON keys and values into
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s.</p>
-
-<div id="inside-a-context" class="section">
-<h4><span class="secno">2.4.1 </span>Inside a Context</h4>
-
-<p>In the previous section, the developer used the <code>@context</code>
-keyword to pull in an external context. That context document, if 
-de-referenced, would look something like this:</p>
-
-<pre class="example">
-{
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-}</pre>
-
-<p>A JSON-LD context document is a simple mapping from <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es to expanded values such as IRIs or keywords. Contexts may also contain datatype information
-for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
-the JSON-LD processor.
-</p>
-
-<p>Contexts may be specified in-line. This ensures that JSON-LD documents
-can be processed when a JSON-LD processor does not have access to the Web.</p>
-
-<p>
-JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. This means
-that developers can also specify a context for JSON data in an out-of-band
-fashion via the API. The API is described later in this document. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> also define a context that will be pre-loaded for all
-calls to the service. This allows services that have previously been publishing
-and receiving JSON data to accept JSON-LD data without requiring client 
-software to change.
-</p>
-
-</div>
-
-</div>
-
-<div id="from-json-to-json-ld" class="section">
-<h3><span class="secno">2.5 </span>From JSON to JSON-LD</h3>
-
-<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>, 
-and <strong>avatar</strong>,
-are defined in a context, and that context is used to resolve the
-names in JSON objects, machines are able to automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Doing this allows JSON to be unambiguously machine-readable without
-requiring developers that use JSON to drastically change their workflow.</p>
-</div>
-
-</div>
-
-
-
-<div id="basic-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Basic Concepts</h2>
-
-<p>JSON-LD is designed to ensure that Linked Data concepts can be marked 
-up in a way that is simple to understand and author by Web developers. In many
-cases, regular JSON markup can become Linked Data with the simple addition
-of a context. As more JSON-LD features are used, more semantics are added
-to the JSON markup.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">3.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most 
-<a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a> are named. IRIs can be 
-expressed in a variety of different ways in JSON-LD.</p>
-
-<ol>
-  <li>In general, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in the key position in 
-    an associative array that have a mapping to an IRI or another key in the context are
-    expanded to an IRI by JSON-LD processors. There are special rules for 
-    processing keys in <code>@context</code> and when dealing with keys that 
-    start with the <code>@subject</code> character.</li>
-  <li>An IRI is generated for the value specified using <code>@subject</code>, 
-    if it is a string.</li>
-  <li>An IRI is generated for the value specified using <code>@type</code>.</li>
-  <li>An IRI is generated for the value specified using the <code>@iri</code> 
-    keyword.</li>
-  <li>An IRI is generated when there are <code>@coerce</code> rules in 
-    effect for a key named <code>@iri</code>.</li>
-</ol>
-
-<p>IRIs can be expressed directly in the key position like so:
-</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p>In the example above, the key 
-<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
-opposed to being interpreted as a string..</p>
-
-<p>Term expansion occurs for IRIs if a term is defined within the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are expanded when used in keys:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
-...
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><code>foaf:name</code> above will automatically expand out to the IRI
-<code>http://xmlns.com/foaf/0.1/name</code>.</p>
-
-<p>An IRI is generated when a value is associated with a key using 
-the <code>@iri</code> keyword:</p>
-
-<pre class="example">
-{
-...
-  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}</pre>
-
-<p>If type coercion rules are specified in the <code>@context</code> for
-a particular vocabulary term, an IRI is generated:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  {
-    ...
-    "@coerce": 
-    {
-      "@iri": "foaf:homepage"
-    }
-  }</span>
-...
-  "foaf:homepage": "http://manu.sporny.org/",
-...
-}</pre>
-
-<p>Even though the value <code>http://manu.sporny.org/</code> is a string,
-the type coercion rules will transform the value into an IRI when processed
-by a JSON-LD Processor</p>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">3.2 </span>Identifying the Subject</h3>
-
-<p>A subject is declared using the <code>@subject</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, property, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to the IRI 
-<code>http://example.org/people#joebob</code>.
-</p>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">3.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the 
-<code>@type</code> key. Specifying the type in this way will generate a 
-triple of the form (subject, type, type-url).</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple if the JSON-LD 
-document is mapped to RDF (in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-</div>
-
-<div id="strings" class="section">
-<h3><span class="secno">3.4 </span>Strings</h3>
-
-<p>Regular text strings, also refered to as <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn>s, are 
-easily expressed using regular JSON strings.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="string-internationalization" class="section">
-<h3><span class="secno">3.5 </span>String Internationalization</h3>
-
-<p>JSON-LD makes an assumption that strings with associated language encoding 
-information are not very common when used in JavaScript and Web Services. 
-Thus, it takes a little more effort to express strings with associated 
-language information.</p>
-
-<pre class="example">
-{
-...
-  "foaf:name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}</pre>
-
-<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for 
-<em>花澄</em> and associate the <code>ja</code> language code with the triple 
-that is generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="datatypes" class="section">
-<h3><span class="secno">3.6 </span>Datatypes</h3>
-
-<p>
-  A value with an associated datatype, also known as a 
-  <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn>, is indicated by associating a literal with
-  an IRI which indicates the typed literal's datatype. Typed literals may be 
-  expressed in JSON-LD in three ways:
-</p>
-
-<ol>
-  <li>By utilizing the <code>@coerce</code> keyword.</li>
-  <li>By utilizing the expanded form for specifying objects.</li>
-  <li>By using a native JSON datatype.</li>
-</ol>
-
-<p>The first example uses the <code>@coerce</code> keyword to express a
-typed literal:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  {
-    "dc":  "http://purl.org/dc/terms/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#"
-    "@coerce": 
-    {
-      "xsd:dateTime": "dc:modified"
-    }
-  }</span>
-...
-  "dc:modified": "2010-05-29T14:17:39+02:00",
-...
-}</pre>
-
-<p>The second example uses the expanded form for specifying objects:</p>
-
-<pre class="example">
-{
-...
-  "dc:modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "xsd:dateTime"
-  }</span>
-...
-}</pre>
-
-<p>Both examples above would generate an object with the literal value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-<p>The third example uses a built-in native JSON type, a number, to 
-express a datatype:</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:age": <span class="diff">31</span>
-...
-}</pre>
-
-<p>The example above would generate the following triple:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/age&gt; 
-      "31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .</pre>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">3.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-arrays. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an array.</p>
-
-<p class="note">In JSON-LD, Multiple objects on a property are not ordered. This is because typically graphs
-are not inherently ordered data structures. To see more on creating ordered collections
-in JSON-LD, see <a href="#lists">Lists</a>.
-</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "jaybee" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
-form for objects:</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/articles/8",
-  "dcterms:modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "xsd:dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "xsd:dateTime"
-    }
-  ]</span>
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="expansion" class="section">
-<h3><span class="secno">3.9 </span>Expansion</h3>
-
-<p>Expansion is the process of taking a JSON-LD document and applying a 
-context such that all IRI, datatypes, and literal values are expanded so
-that the context is no longer necessary. JSON-LD document expansion 
-is typically used when re-mapping JSON-LD documents to application-specific
-JSON documents or as a part of the <a href="#normalization">Normalization</a>
-process.</p>
-
-<p>For example, assume the following JSON-LD input document:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}</pre>
-
-<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document 
-provided above would result in the following output:</p>
-
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}</pre>
-
-</div> 
-
-<div id="compaction" class="section">
-<h3><span class="secno">3.10 </span>Compaction</h3>
-
-<p>Compaction is the process of taking a JSON-LD document and applying a 
-context such that the most compact form of the document is generated. JSON
-is typically expressed in a very compact, key-value format. That is, full
-IRIs are rarely used as keys. At times, a JSON-LD document may be received
-that is not in its most compact form. JSON-LD, via the API, provides a way
-to compact a JSON-LD document.
-</p>
-
-<p>For example, assume the following JSON-LD input document:</p>
-
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}</pre>
-
-<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
-
-<pre class="example">
-{
-   "name": "http://xmlns.com/foaf/0.1/name",
-   "homepage": "http://xmlns.com/foaf/0.1/homepage",
-   "@coerce": 
-   {
-      "@iri": ["homepage"]
-   }
-}</pre>
-
-<p>Running the JSON-LD Compaction algorithm given the context supplied above 
-against the JSON-LD input document provided above would result in the following
-output:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}</pre>
-
-<p>The compaction algorithm also enables the developer to map any expanded
-format into an application-specific compacted format. While the context 
-provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
-<strong>name</strong>, it could have also mapped it to any arbitrary string
-provided by the developer.
-</p>
-
-</div>
-
-<div id="framing" class="section">
-<h3><span class="secno">3.11 </span>Framing</h3>
-
-<p>A JSON-LD document is a representation of a directed graph. A single
-directed graph can have many different serializations, each expressing
-exactly the same information. Developers typically work with trees, also
-called associative arrays, when dealing with JSON. While mapping a graph to 
-a tree can be done, the layout of the end result must be specified in advance. 
-A <dfn title="Frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to 
-specify a deterministic layout for a graph.
-</p>
-
-<p>Framing is the process of taking a JSON-LD document, which expresses a
-graph of information, and applying a specific graph layout 
-(called a <a class="tref internalDFN" title="Frame" href="#dfn-frame">Frame</a>).
-</p>
-
-<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
-
-<pre class="example">
-{
-   "@coerce": {
-    "dc":  "http://purl.org/dc/terms/",
-    "ex":  "http://example.org/"
-   },
-   "@subject": 
-   [{
-      "@subject": "http://example.org/library",
-      "@type": "ex:Library",
-      "ex:contains": "http://example.org/library/the-republic"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": "http://example.org/library/the-republic#introduction"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": "ex:Chapter",
-      "dc:description": "An introductory chapter on The Republic.",
-      "dc:title": "The Introduction"
-   }],
-   "@context": 
-   {
-      "@coerce": 
-      {
-         "@iri": "ex:contains"
-      },
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   }
-}</pre>
-
-<p>Developers typically like to operate on items in a hierarchical, tree-based
-fashion. Ideally, a developer would want the data above sorted into top-level
-libraries, then the books that are contained in each library, and then the
-chapters contained in each book. To achieve that layout, the developer can
-define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
-
-<pre class="example">
-{
-   "@context": {
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   },
-   "@type": "ex:Library",
-   "ex:contains": {
-      "@type": "ex:Book",
-      "ex:contains": {
-         "@type": "ex:Chapter"
-      }
-   }
-}</pre>
-
-<p>When the framing algorithm is run against the previously defined 
-JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
-JSON-LD document is the end result:</p>
-
-<pre class="example">
-{
-   "@context": 
-   {
-      "ex": "http://example.org/vocab#",
-      "dc":  "http://purl.org/dc/terms/",
-   }
-   "@subject": "http://example.org/library",
-   "@type": "ex:Library",
-   "ex:contains": 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": 
-      {
-         "@subject": "http://example.org/library/the-republic#introduction",
-         "@type": "ex:Chapter",
-         "dc:description": "An introductory chapter on The Republic.",
-         "dc:title": "The Introduction"
-      },
-   },
-}</pre>
-
-<p>The JSON-LD framing algorithm allows developers to query by example and
-force a specific tree layout to a JSON-LD document.
-</p>
-
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>Advanced Concepts</h2>
-
-<p>JSON-LD has a number of features that provide functionality above and beyond
-the core functionality described above. The following sections outline the
-features that are specific to JSON-LD.
-</p>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">4.1 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as doubles, 
-integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
-information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
-
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-<p class="note">When dealing with a number of modern programming languages,
-including JavaScript ECMA-262, there is no distinction between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
-the number <code>5.3</code> and the number 
-<code>5.3e0</code> are treated as if they were the same. When converting from 
-JSON-LD to a language-native format and back, datatype information is lost in a 
-number of these languages. Thus, one could say that <code>5.3</code> is a 
-<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
-<strong>xsd:double</strong> in JSON-LD, but when both values are 
-converted to a language-native format the datatype difference between the two 
-is lost because the machine-level representation will almost always be a 
-<strong>double</strong>. 
-Implementers should be aware of this potential round-tripping issue between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
-objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
-to a language native type.
-</p>
-
-</div>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">4.2 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of values to particular data types. 
-Type coercion allows someone deploying JSON-LD to coerce the incoming or 
-outgoing types to the proper data type based on a mapping of data type IRIs to 
-property types. Using type coercion, one may convert simple JSON data to 
-properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to 
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-        "@iri": "homepage"
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="chaining" class="section">
-  <h3><span class="secno">4.3 </span>Chaining</h3>
-  <p>
-    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to 
-    use the definition of JSON-LD objects as <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This 
-    is a commonly used mechanism for creating a parent-child relationship 
-    between two <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s.
-  </p>
-  <p>The example shows an two subjects related by a property from the first 
-  subject:</p>
-
-  <pre class="example">
-{
-...
-  "foaf:name": "Manu Sporny",
-  "<span class="diff">foaf:knows</span>": {
-    "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}</pre>
-  
-  <p>
-    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a 
-    JSON value at any point in JSON-LD.
-  </p>
-</div>
-
-<div id="identifying-unlabeled-nodes" class="section">
-<h3><span class="secno">4.4 </span>Identifying Unlabeled Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this type of node is called
-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) CURIE 
-prefix.</p>
-
-<pre class="example">
-{
-...
-  "@subject": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-unlabeled node. This practice, however, is usually frowned upon when
-generating Linked Data. If a developer finds that they refer to the unlabeled
-node more than once, they should consider naming the node using a resolve-able
-IRI.
-</p>
-
-</div>
-
-<div id="overriding-keywords" class="section">
-<h3><span class="secno">4.5 </span>Overriding Keywords</h3>
-
-<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
-to be overridden. This feature allows more legacy JSON content to be supported 
-by JSON-LD. It also allows developers to design domain-specific implementations 
-using only the JSON-LD context.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {  
-     <span class="diff">"url": "@subject"</span>,
-     <span class="diff">"a": "@type"</span>,
-     "name": "http://schema.org/name"
-  },
-  "url": "http://example.com/about#gregg",
-  "a": "http://schema.org/Person",
-  "name": "Gregg Kellogg"
-}</pre>
-
-<p>In the example above, the <code>@subject</code> and <code>@type</code> 
-keywords have been overridden by <strong>url</strong> and 
-<strong>a</strong>, respectively.
-</p>
-
-</div>
-
-<div id="normalization" class="section">
-<h3><span class="secno">4.6 </span>Normalization</h3>
-
-<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and 
-performing a deterministic transformation on that input that results in a 
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> that any conforming JSON-LD processor would have 
-generated given the same input. The problem is a fairly difficult technical 
-problem to solve because it requires a directed graph to be ordered into a 
-set of nodes and edges in a deterministic way. This is easy to do when all of 
-the nodes have unique names, but very difficult to do when some of the nodes 
-are not labeled.
-</p>
-
-<p>Normalization is useful when comparing two graphs against one another,
-when generating a detailed list of differences between two graphs, and
-when generating a cryptographic digital signature for information contained 
-in a graph or when generating a hash of the information contained in a graph.
-</p>
-
-<p>The example below is an un-normalized JSON-LD document:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-      "@coerce": 
-      {
-         "@iri": ["homepage"]
-      }
-   }
-}</pre>
-
-<p>The example below is the normalized form of the JSON-LD document above:</p>
-
-<p class="note">Whitespace is used below to aid readability. The normalization
-algorithm for JSON-LD remove all unnecessary whitespace in the fully 
-normalized form.</p>
-
-<pre class="example">
-[{
-    "@subject": 
-    {
-        "@iri": "_:c14n0"
-    },
-    "http://xmlns.com/foaf/0.1/homepage": 
-    {
-        "@iri": "http://manu.sporny.org/"
-    },
-    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
-}]</pre>
-
-<p>Notice how all of the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s have been expanded and sorted in
-alphabetical order. Also, notice how the <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> has been 
-labeled with a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">blank node identifier</a>. Normalization ensures that any arbitrary
-graph containing exactly the same information would be normalized to exactly
-the same form shown above.</p>
-
-</div>
-
-</div>
-
-<div id="algorithms" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>Algorithms</h2>
-
-<p>All algorithms described in this section are intended to operate on
-language-native data structures. That is, the serialization to a text-based
-JSON document isn't required as input or output to any of these algorithms and 
-language-native data structures <em class="rfc2119" title="must">must</em> be used where applicable.</p>
-
-<div id="syntax-tokens-and-keywords" class="section">
-  <h3><span class="secno">5.1 </span>Syntax Tokens and Keywords</h3>
-  
-  <p>JSON-LD specifies a number of syntax tokens and keywords that are using
-  in all algorithms described in this section:</p>
-  
-  <dl>
-  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
-  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
-  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
-  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
-  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
-  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
-  <dt><code>:</code></dt><dd>The separator for CURIEs when used in JSON keys or JSON values.</dd>
-  <dt><code>@subject</code></dt><dd>Sets the active subjects.</dd>
-  <dt><code>@type</code></dt><dd>Used to set the type of the active subjects.</dd>
-  </dl>
-</div>
-
-<div id="algorithm-terms" class="section">
-  <h3><span class="secno">5.2 </span>Algorithm Terms</h3>
-  <dl>
-    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
-    <dd>
-      a context that is specified to the algorithm before processing begins.
-    </dd>
-    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
-    <dd>
-      the currently active subject that the processor should use when 
-      processing.
-    </dd>
-    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
-    <dd>
-      the currently active property that the processor should use when 
-      processing.
-    </dd>
-    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
-    <dd>
-      the currently active object that the processor should use when
-      processing.
-    </dd>
-    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
-    <dd>
-      a context that is used to resolve CURIEs while the processing
-      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context 
-      contained within the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-    </dd>
-    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
-    <dd>
-      a context that is specified at the JSON associative-array level,
-      specified via the <code>@context</code> keyword.
-    </dd>
-    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
-    <dd>
-      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
-      context</a>, <a class="tref" title="current_subject">current subject</a>, and 
-      <a class="tref" title="current_property">current property</a>. The <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> is managed
-      as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
-      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new 
-      associative array.
-    </dd>
-    <dt><dfn title="JSON-LD_input" id="dfn-json-ld_input">JSON-LD input</dfn></dt>
-    <dd>
-      The JSON-LD data structure that is provided as input to the algorithm.
-    </dd>
-    <dt><dfn title="JSON-LD_output" id="dfn-json-ld_output">JSON-LD output</dfn></dt>
-    <dd>
-      The JSON-LD data structure that is produced as output by the algorithm.
-    </dd>
-
-  </dl>
-</div>
-
-<div id="context-1" class="section">
-  <h3 id="context"><span class="secno">5.3 </span>Context</h3>
-  <p>
-    Processing of JSON-LD data structure is managed recursively.
-    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
-    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
-    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-  </p>
-  <p>
-    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of an associative array (or elements
-    of a list (see <span a="#list-processing">List Processing</span>)).
-  </p>
-  <p>
-    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within an associative array having a key of
-    <code>@context</code> with string or an associative array value. When processing a <a class="tref" title="local__context">local
-    context</a>, special processing rules apply:
-  </p>
-  <ol class="algorithm">
-    <li>Create a new, empty <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
-    <li>
-      If the value is a simple string, it <em class="rfc2119" title="must">must</em> have a lexical form of IRI and used to initialize
-      a new JSON document which replaces the value for subsequent processing.
-    </li>
-    <li>If the value is an associative array, perform the following steps:
-      <ol class="algorithm">
-        <li>
-          If the associative array has a <code>@base</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
-          string with the lexical form of an absolute IRI. Add the base mapping to the <a class="tref" title="local__context">local
-          context</a>. <p class="issue">Turtle allows @base to be relative. If we did this, we
-          would have to add <a href="#iri-expansion">IRI Expansion</a>.</p>
-        </li>
-        <li>
-          If the associative array has a <code>@vocab</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
-          string with the lexical form of an absolute IRI. Add the vocabulary mapping to the
-          <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> after performing <a href="#iri-expansion">IRI Expansion</a> on
-          the associated value.
-        </li>
-        <li>
-          If the associative array has a <code>@coerce</code> key, it <em class="rfc2119" title="must">must</em> have a value of an
-          associative array. Add the <code>@coerce</code> mapping to the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>
-          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value(s).
-        </li>
-        <li>
-          Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> and
-          <em class="rfc2119" title="must">must</em> have the value of a simple string with the lexical form of IRI. Merge the key-value
-          pair into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.
-        </li>
-      </ol>
-    </li>
-    <li>
-      Merge the of <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s <code>@coerce</code> mapping into  the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping as described <a href="#coerce">below</a>.
-    </li>
-    <li>
-      Merge all entries other than the <code>@coerce</code> mapping from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>to the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> overwriting any duplicate values.
-    </li>
-  </ol>
-  
-  <div id="coerce" class="section">
-    <h4><span class="secno">5.3.1 </span>Coerce</h4>
-    <p>
-      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
-      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
-      <code>@coerce</code> mapping, overwriting any duplicate values in 
-      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
-      The <code>@coerce</code> mapping has either a single CURIE or an
-      array of CURIEs. When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-      map all CURIE values to array form and replace with the union of the value from
-      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an array
-      with a single CURIE, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
-    </p>
-  </div>
-
-  <div id="initial-context" class="section">
-    <h4><span class="secno">5.3.2 </span>Initial Context</h4>
-    <p>The <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> is initialized as follows:</p>
-    <ul>
-      <li>
-        <code>@base</code> is set using <cite><href="http: www.ietf.org="" rfc="" rfc2396.txt"="">section 5.1 Establishing a
-        Base URI</href="http:></cite> of [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>]. Processors <em class="rfc2119" title="may">may</em> provide a means
-        of setting the base IRI programatically.
-      </li>
-      <li><code>@coerce</code> is set with a single mapping from <code>@iri</code> to <code>@type</code>.</li>
-    </ul>
-    <pre class="example">
-{
-    "@base": <span class="diff">document-location</span>,
-    "@context": {
-      "@iri": "@type"
-    }
-}</pre>
-  </div>
-</div>
-
-<div id="iri-expansion" class="section">
-  <h3><span class="secno">5.4 </span>IRI Expansion</h3>
-  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
-    transforming a value representing an IRI into an actual IRI.</p>
-  <p>IRIs may be represented as an explicit string, or as a CURIE, as a value relative to <code>@base</code>
-    or <code>@vocab</code>.</p>
-  <p>
-    CURIEs are defined more formally in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">section 6 "CURIE Syntax Definition"</a></cite>.
-    Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em> separated by a ':'. In
-    JSON-LD, either the prefix may be the empty string, denoting the <dfn title="default_prefix" id="dfn-default_prefix">default prefix</dfn>.
-  </p>
-  <p>The algorithm for generating an IRI is:
-    </p><ol class="algorithm">
-      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
-      <li>If the prefix is a '_' (underscore), the IRI is unchanged.</li>
-      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
-        by prepending the mapped prefix to the (possibly empty) suffix using textual concatenation. Note that an empty
-        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
-      <li>If the IRI being processed is for a property (i.e., a key value in an associative array, or a
-        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
-        join the mapped value to the suffix using textual concatenation.</li>
-      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
-        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>].</li>
-      <li>Otherwise, use the value directly as an IRI.</li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="iri-compaction" class="section">
-  <h3><span class="secno">5.5 </span>IRI Compaction</h3>
-  <p>Some keys and values are expressed using IRIs. This section defines an 
-    algorithm for transforming an IRI to a compact IRI using the
-    <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es specified in the 
-    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</p>
-
-  <p>The algorithm for generating a compacted IRI is:
-    </p><ol class="algorithm">
-      <li>Search every key-value pair in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for
-        a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that is a complete match 
-        against the IRI. If a complete match is found, the resulting compacted
-        IRI is the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> associated with the IRI in the 
-        <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
-      <li>If a complete match is not found, search for a partial match from
-        the beginning of the IRI. For all matches that are found, the resulting
-        compacted IRI is the <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> associated with the partially
-        matched IRI in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> concatenated with a 
-        colon (:) character and the unmatched part of the string. If there is
-        more than one compacted IRI produced, the final value is the 
-        lexicographically least value of the entire set of compacted IRIs.</li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="value-expansion" class="section">
-  <h3><span class="secno">5.6 </span>Value Expansion</h3>
-  <p>Some values in JSON-LD can be expressed in a compact form. These values
-    are required to be expanded at times when processing JSON-LD documents.
-  </p>
-
-  <p>The algorithm for expanding a value is:
-    </p><ol class="algorithm">
-      <li>If the key that is associated with the value has an associated
-        coercion entry in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, the resulting
-        expansion is an object populated according to the following steps:
-        <ol class="algorithm">
-          <li>If the coercion target is <code>@iri</code>, expand the value
-            by adding a new key-value pair where the key is <code>@iri</code>
-            and the value is the expanded IRI according to the
-            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-          <li>If the coercion target is a typed literal, expand the value
-            by adding two new key-value pairs. The first key-value pair 
-            will be <code>@literal</code> and the unexpanded value. The second
-            key-value pair will be <code>@datatype</code> and the associated
-            coercion datatype expanded according to the
-            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-        </ol>
-      </li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="value-compaction" class="section">
-  <h3><span class="secno">5.7 </span>Value Compaction</h3>
-  <p>Some values, such as IRIs and typed literals, may be expressed in an
-    expanded form in JSON-LD. These values are required to be compacted at 
-    times when processing JSON-LD documents.
-  </p>
-
-  <p>The algorithm for compacting a value is:
-    </p><ol class="algorithm">
-      <li>If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> contains a coercion target for the
-        key that is associated with the value, compact the value using the
-        following steps:
-        <ol class="algorithm">
-          <li>If the coercion target is an <code>@iri</code>, the compacted
-            value is the value associated with the <code>@iri</code> key,
-            processed according to the 
-            <a href="#iri-compaction">IRI Compaction</a> steps.</li>
-          <li>If the coercion target is a typed literal, the compacted
-            value is the value associated with the <code>@literal</code> key.
-          </li>
-          <li>Otherwise, the value is not modified.</li>
-        </ol>
-      </li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="expansion-1" class="section">
-<h3><span class="secno">5.8 </span>Expansion</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>As stated previously, expansion is the process of taking a JSON-LD 
-input and expanding all IRIs and typed literals to their fully-expanded form. 
-The output will not contain a single context declaration and will have all IRIs 
-and typed literals fully expanded.
-</p>
-
-<div id="expansion-algorithm" class="section">
-<h4><span class="secno">5.8.1 </span>Expansion Algorithm</h4>
-
-<ol class="algorithm">
-  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an array, 
-  process each item in the array recursively using this algorithm.</li>
-  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an object, 
-  update the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> according to the steps outlined in
-  the <a href="#context">context</a> section. Process each key, expanding 
-  the key according to the <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-  <ol class="algorithm">
-    <li>Process each value associated with each key
-      <ol class="algorithm">
-        <li>If the value is an array, process each item in the array 
-        recursively using this algorithm.</li>
-        <li>If the value is an object, process the object recursively
-        using this algorithm.</li>
-        <li>Otherwise, check to see the associated key has an associated 
-        coercion rule. If the value should be coerced, expand the value 
-        according to the <a href="#value-expansion">Value Expansion</a> rules. 
-        If the value does not need to be coerced, leave the value as-is.
-        </li>
-      </ol>
-    </li><li>Remove the context from the object</li>
-  </ol>
-</ol>
-</div>
-
-</div>
-
-<div id="compaction-1" class="section">
-<h3><span class="secno">5.9 </span>Compaction</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>As stated previously, compaction is the process of taking a JSON-LD 
-input and compacting all IRIs using a given context. The output
-will contain a single top-level context declaration and will only use
-<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es and will ensure that all
-typed literals are fully compacted.
-</p>
-
-<div id="compaction-algorithm" class="section">
-<h4><span class="secno">5.9.1 </span>Compaction Algorithm</h4>
-
-<ol class="algorithm">
-  <li>Perform the <a href="#expansion-algorithm">Expansion Algorithm</a> on 
-  the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>.</li>
-  <li>If the top-level item is an array, process each item in the array 
-    recursively, starting at this step.
-  </li><li>If the top-level item is an object, compress each key using the steps
-    defined in <a href="#iri-compaction">IRI Compaction</a> and compress each
-    value using the steps defined in 
-    <a href="#value-compaction">Value Compaction</a></li>
-  
-</ol>
-</div>
-
-</div>
-
-
-<div id="framing-1" class="section">
-<h3><span class="secno">5.10 </span>Framing</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>A JSON-LD document is a representation of a directed graph. A single
-directed graph can have many different serializations, each expressing
-exactly the same information. Developers typically don't work directly with
-graphs, but rather, prefer trees when dealing with JSON. While mapping a graph 
-to a tree can be done, the layout of the end result must be specified in 
-advance. This section defines an algorithm for mapping a graph to 
-a tree given a <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>.
-</p>
-
-<div id="framing-algorithm-terms" class="section">
-<h4><span class="secno">5.10.1 </span>Framing Algorithm Terms</h4>
- <dl>
-   <dt><dfn title="input_frame" id="dfn-input_frame">input frame</dfn></dt>
-   <dd>
-     the initial <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> provided to the framing algorithm.
-   </dd>
-   <dt><dfn title="framing_context" id="dfn-framing_context">framing context</dfn></dt>
-   <dd>
-     a context containing the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, the
-     <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> and the 
-     <a class="tref" title="omit_default_flag">omit default flag</a>.
-   </dd>
-   <dt><dfn title="object_embed_flag" id="dfn-object_embed_flag">object embed flag</dfn></dt>
-   <dd>
-     a flag specifying that objects should be directly embedded in the output,
-     instead of being referred to by their IRI.
-   </dd>
-   <dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">explicit inclusion flag</dfn></dt>
-   <dd>
-     a flag specifying that for properties to be included in the output, they
-     must be explicitly declared in the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a>.
-   </dd>
-   <dt><dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">omit missing properties flag</dfn></dt>
-   <dd>
-     a flag specifying that properties that are missing from the 
-     <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> should be omitted from the output.
-   </dd>
-   <dt><dfn title="match_limit" id="dfn-match_limit">match limit</dfn></dt>
-   <dd>
-     A value specifying the maximum number of matches to accept when building
-     arrays of values during the framing algorithm. A value of -1 specifies
-     that there is no match limit.
-   </dd>
-   <dt><dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">map of embedded subjects</dfn></dt>
-   <dd>
-     A map that tracks if a subject has been embedded in the output of the
-     <a href="#framing-algorithm">Framing Algorithm</a>.
- </dd></dl>
-</div>
-
-<div id="framing-algorithm" class="section">
-<h4><span class="secno">5.10.2 </span>Framing Algorithm</h4>
-
-<p>The framing algorithm takes <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> that has been 
-normalized according to the 
-<a href="#normalization-algorithm">Normalization Algorithm</a> 
-(<strong>normalized input</strong>), an 
-<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a> that has been expanded according to the
-<a href="#expansion-algorithm">Expansion Algorithm</a> 
-(<strong>expanded frame</strong>), and a number of options and produces
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The following series of steps is the recursive
-portion of the framing algorithm:
-</p>
-
-<ol class="algorithm">
-  <li>Initialize the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> by setting the
-   <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, clearing the 
-   <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a>, and clearing the
-   <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>. Override these values
-   based on input options provided to the algorithm by the application.
-  </li>
-  <li>Generate a <dfn title="list_of_frames" id="dfn-list_of_frames">list of frames</dfn> by processing the 
-    <strong>expanded frame</strong>:
-    <ol class="algorithm">
-      <li>If the <strong>expanded frame</strong> is not an array, set 
-        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to 1, place the 
-        <strong>expanded frame</strong> into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
-        and set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to <code>null</code>.</li>
-      <li>If the <strong>expanded frame</strong> is an empty array, place an
-        empty object into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
-        set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an array, and set
-        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
-      <li>If the <strong>expanded frame</strong> is a non-empty array, add
-        each item in the <strong>expanded frame</strong> into the 
-        <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>, set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an
-        array, and set <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
-    </ol></li>
-  <li>Create a <dfn title="match_array" id="dfn-match_array">match array</dfn> for each <strong>expanded frame</strong> 
-    in the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> halting when either the 
-    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> is zero or the end of the 
-    <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> is reached. If an 
-    <strong>expanded frame</strong> is 
-    not an object, the processor <em class="rfc2119" title="must">must</em> throw a <code>Invalid Frame Format</code> 
-    exception. Add each matching item from the <strong>normalized input</strong>
-    to the <a class="tref" title="matches_array">matches array</a> and decrement the 
-    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> by 1 if:
-    <ol class="algorithm">
-       <li>The <strong>expanded frame</strong> has an <code>rdf:type</code> 
-         that exists in the item's list of <code>rdf:type</code>s. Note: 
-         the <code>rdf:type</code> can be an array, but only one value needs 
-         to be in common between the item and the 
-         <strong>expanded frame</strong> for a match.</li>
-       <li>The <strong>expanded frame</strong> does not have an 
-         <code>rdf:type</code> property, but every property in the 
-         <strong>expanded frame</strong> exists in the item.</li>
-    </ol></li>
-  <li>Process each item in the <a class="tref internalDFN" title="match_array" href="#dfn-match_array">match array</a> with its associated
-    <dfn title="match_frame" id="dfn-match_frame">match frame</dfn>:
-    <ol class="algorithm">
-      <li>If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@embed</code>
-        keyword, set the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> to its value. 
-        If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@explicit</code>
-        keyword, set the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> to its value. 
-        Note: if the keyword exists, but the value is neither
-        <code>true</code> or <code>false</code>, set the associated flag to 
-        <code>true</code>.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is cleared and the item has
-        the <code>@subject</code> property, replace the item with the value
-        of the <code>@subject</code> property.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
-        the <code>@subject</code> property, and its IRI is in the 
-        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>, throw a
-        <code>Duplicate Embed</code> exception.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
-        the <code>@subject</code> property and its IRI is not in the
-        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>:
-        <ol class="algorithm">
-          <li>If the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> is set, 
-            then delete any key from the item that does not exist in the
-            <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except <code>@subject</code>.</li>
-          <li>For each key in the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except for
-            keywords and <code>rdf:type</code>:
-          <ol class="algorithm">
-            <li>If the key is in the item, then build a new 
-              <dfn title="recursion_input_list" id="dfn-recursion_input_list">recursion input list</dfn> using the object or objects 
-              associated with the key. If any object contains an
-              <code>@iri</code> value that exists in the 
-              <a class="tref" title="normalized_input">normalized input</a>, replace the object in the
-              <a class="tref" title="recusion_input_list">recusion input list</a> with a new object containing
-              the <code>@subject</code> key where the value is the value of
-              the <code>@iri</code>, and all of the other key-value pairs for
-              that subject. Set the <dfn title="recursion_match_frame" id="dfn-recursion_match_frame">recursion match frame</dfn> to the
-              value associated with the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>'s key. Replace
-              the value associated with the key by recursively calling this
-              algorithm using <a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">recursion input list</a>,
-              <a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">recursion match frame</a> as input.</li>
-            <li>If the key is not in the item, add the key to the item and
-              set the associated value to an empty array if the
-              <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> key's value is an array 
-              or <code>null</code> otherwise.</li>
-            <li>If value associated with the item's key is <code>null</code>,
-              process the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>:
-              <ol class="algorithm">
-                <li>If the value associated with the key in the 
-                  <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> is an array, use the first frame 
-                  from the array as the <dfn title="property_frame" id="dfn-property_frame">property frame</dfn>, otherwise
-                  set the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> to an empty object.</li>
-                <li>If the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> contains an
-                <code>@omitDefault</code> keyword, set the
-                <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> to its value.
-                Note: if the keyword exists, but the value is neither
-                <code>true</code> or <code>false</code>, set the associated
-                flag to <code>true</code>.</li>
-                <li>If the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> is set,
-                  delete the key in the item. Otherwise, if the
-                  <code>@default</code> keyword is set in the 
-                  <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> set the item's value to the value
-                  of <code>@default</code>.</li>
-              </ol></li>
-          </ol></li>
-        </ol>
-      </li><li>If the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> is <code>null</code> set it to
-        the item, otherwise, append the item to the
-        <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.
-    </li></ol>
-  </li><li>Return the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.</li>
-</ol>  
-
-The final, non-recursive step of the framing algorithm requires the 
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to be compacted according to the 
-<a href="#compaction-algorithm">Compaction Algorithm</a> by using the 
-context provided in the <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a>. The resulting value is the
-final output of the compaction algorithm and is what should be returned to the
-application.
-
-</div>
-
-</div>
-
-<div id="normalization-1" class="section">
-<h3><span class="secno">5.11 </span>Normalization</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and 
-performing a deterministic transformation on that input that results in all
-aspects of the graph being fully expanded and named in the 
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The normalized output is generated in such a way 
-that any conforming JSON-LD processor will generate identical output 
-given the same input. The problem is a fairly difficult technical 
-problem to solve because it requires a directed graph to be ordered into a 
-set of nodes and edges in a deterministic way. This is easy to do when all of 
-the nodes have unique names, but very difficult to do when some of the nodes 
-are not labeled.
-</p>
-
-<p>In time, there may be more than one normalization algorithm that will need
-to be identified. For identification purposes, this algorithm is named 
-<abbr title="Universal Graph Normalization Algorithm 2011">UGNA2011</abbr>.
-</p>
-
-<div id="normalization-algorithm-terms" class="section">
-<h4><span class="secno">5.11.1 </span>Normalization Algorithm Terms</h4>
- <dl>
-   <dt><dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">list of expanded nodes</dfn></dt>
-   <dd>
-     A list of all nodes in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> graph containing no
-     embedded objects and having all keys and values expanded according to the
-     steps in the <a href="#expansion-algorithm">Expansion Algorithm</a>.
-   </dd>
-   <dt><dfn title="naming_base_string" id="dfn-naming_base_string">naming base string</dfn></dt>
-   <dd>
-     An unlabeled node naming prefix that is not used by any other node 
-     in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and does not start with the characters
-     <code>c14n</code>. The prefix is used to temporarily name nodes during
-     the normalization algorithm in a way that doesn't collide with the
-     names that already exist as well as the names that will be generated by the
-     normalization algorithm. 
-   </dd>
-   <dt><dfn title="alpha" id="dfn-alpha">alpha</dfn> and <dfn title="beta" id="dfn-beta">beta</dfn> values</dt>
-   <dd>
-     The words <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> refer to the first and
-     second nodes or values being examined in an algorithm. The names are
-     merely used to refer to each input value to a comparison algorithm.
-   </dd>
-   <dt><dfn title="naming_base_string" id="dfn-naming_base_string-1">naming base string</dfn></dt>
-   <dd>
-     An unlabeled node naming prefix that is not used by any other node 
-     in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and does not start with the characters
-     <code>c14n</code>. The prefix is used to temporarily name nodes during
-     the normalization algorithm in a way that doesn't collide with the
-     names that already exist as well as the names that will be generated by the
-     normalization algorithm. 
-   </dd>
-</dl>
-</div>
-
-<div id="normalization-algorithm" class="section">
-<h4><span class="secno">5.11.2 </span>Normalization Algorithm</h4>
-
-<p>The normalization algorithm expands the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>,
-flattens the data structure, and creates an initial set of names for all
-nodes in the graph. The flattened data structure is then processed by the
-node labeling algorithm in order to get a fully expanded and named list of
-nodes.
-</p>
-
-<ol class="algorithm">
-<li>Expand the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> according to the steps in
-the <a href="#expansion-algorithm">Expansion Algorithm</a> and store the
-result as the <strong>expanded input</strong>.</li>
-<li>Process every object in the <strong>expanded input</strong>
-searching for <code>@subject</code> values that start with the
-text string <code>_:c14n</code>. If a match is found, rename the subject and 
-all references to the subject by concatenating <code>_:</code> with the 
-<a class="tref internalDFN" title="naming_base_string" href="#dfn-naming_base_string-1">naming base string</a> and a unique identifier, such as an
-incremented counter value.
-</li>
-<li>Create an empty <a class="tref internalDFN" title="list_of_expanded_nodes" href="#dfn-list_of_expanded_nodes">list of expanded nodes</a> and recursively 
-process every object in the <strong>expanded input</strong> that is not an 
-expanded IRI, typed literal or language literal, in depth-first order:
-  <ol class="algorithm">
-    <li>If an object does not contain a <code>@subject</code>, 
-      name it by concatenating 
-      <code>_:</code> with the <a class="tref internalDFN" title="naming_base_string" href="#dfn-naming_base_string-1">naming base string</a> and a 
-      unique identifier, such as an  incremented counter value.</li>
-    <li>Add the object to the <a class="tref" title="list_of_expanded_nodes.">list of expanded nodes<tref>.</tref></a></li>
-    <li>Replace the reference to the object with the value of the
-       <code>@subject</code> in the object.</li>
-    <li>???duplicate objects for predicates???</li>
-  </ol></li>
-<li>Label all of the nodes that contain a <code>@subject</code> key associated
-with a value starting with <code>_:</code> according to the steps in the 
-<a href="#node-labeling-algorithm">Node Labeling Algorithm</a>.</li>
-</ol>
-</div>
-
-<div id="node-labeling-algorithm" class="section">
-<h4><span class="secno">5.11.3 </span>Node Labeling Algorithm</h4>
-
-<p>The node labeling algorithm takes the <a class="tref internalDFN" title="list_of_expanded_nodes" href="#dfn-list_of_expanded_nodes">list of expanded nodes</a>
-and sorts the list, deterministically naming all of the unlabeled nodes 
-in the graph.</p>
-
-<ol class="algorithm">
-  <li>Create a <dfn title="forward_mapping" id="dfn-forward_mapping">forward mapping</dfn> that relates graph
-    nodes to the IRIs of the targets nodes that 
-    they reference. For example, if a node <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> refers to a
-    node <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> via a property, the key in the 
-    <a class="tref internalDFN" title="forward_mapping" href="#dfn-forward_mapping">forward mapping</a> is the subject IRI of <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and 
-    the value is an array containing at least the subject IRI of 
-    <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>.
-    <ol class="algorithm">
-      <li>Add all forward mappings for every node in the graph.</li>
-    </ol></li>
-  <li>Create a <dfn title="reverse_mapping" id="dfn-reverse_mapping">reverse mapping</dfn> that relates graph nodes
-    to every other node that refers to them in the graph.
-    For example, if a node <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> refers to a
-    node <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> via a property, the key in the 
-    <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> is the subject IRI for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> and 
-    the value is an array containing at least the IRI for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>.
-    <ol class="algorithm">
-      <li>Add all reverse mappings for every node in the graph.</li>
-    </ol></li>
-  <li>Label every unlabeled node according to the
-    <a href="#label-generation-algorithm">Label Generation Algorithm</a>
-    in descending order using the 
-    <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
-    determine the sort order.</li>
-</ol>
-</div>
-
-<div id="shallow-comparison-algorithm" class="section">
-<h4><span class="secno">5.11.4 </span>Shallow Comparison Algorithm</h4>
-
-<p>
-The shallow comparison algorithm takes two unlabeled nodes,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, as input and
-determines which one should come first in a sorted list. The following
-algorithm determines the steps that are executed in order to determine the
-node that should come first in a list:
-</p>
-
-<ol class="algorithm">
-  <li>Compare the total number of node properties. The node with fewer 
-    properties is first.</li>
-  <li>Lexicographically sort the property IRIs for each node and compare
-    the sorted lists. If an IRI is found to be lexicographically smaller, the
-    node containing that IRI is first.</li>
-  <li>Compare the property values against one another:
-    <ol class="algorithm">
-      <li>Create an <dfn title="alpha_list" id="dfn-alpha_list">alpha list</dfn> by adding all values associated 
-        with the <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> property that is not an unlabeled node.
-        Track the number of unlabeled nodes not added to the list using an
-        <dfn title="alpha_unlabeled_counter" id="dfn-alpha_unlabeled_counter">alpha unlabeled counter</dfn>.</li>
-      <li>Create a <dfn title="beta_list" id="dfn-beta_list">beta list</dfn> by adding all values associated 
-        with the <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> property that is not an unlabeled node. 
-        Track the number of unlabeled nodes not added to the list using an
-        <dfn title="beta_unlabeled_counter" id="dfn-beta_unlabeled_counter">beta unlabeled counter</dfn>.
-      </li><li>Compare the length of <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and 
-        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a>. The node associated with the list containing the
-        lesser number of items is first.</li>
-      <li>Compare the <a class="tref internalDFN" title="alpha_unlabeled_counter" href="#dfn-alpha_unlabeled_counter">alpha unlabeled counter</a> to the 
-        <a class="tref internalDFN" title="beta_unlabeled_counter" href="#dfn-beta_unlabeled_counter">beta unlabeled counter</a>, the node associated with the lesser
-        value is first.</li>
-      <li>Sort <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> using the
-        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>
-        as the sorting comparator.
-        For each offset into the <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a>, compare the item
-        at the offset against the item at the same offset in the 
-        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> using the 
-        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
-        The node associated with the lesser item is first.
-    </li></ol></li>
-  <li>Process the <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> to determine order:
-    <ol class="algorithm">
-      <li>The node with fewer entries in the <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> 
-      is first.</li>
-      <li>Sort the <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> entry for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
-        into a <dfn title="list_of_sorted_alpha_mappings" id="dfn-list_of_sorted_alpha_mappings">list of sorted alpha mappings</dfn>. Sort the 
-        <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> entry for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        into a <dfn title="list_of_sorted_beta_mappings" id="dfn-list_of_sorted_beta_mappings">list of sorted beta mappings</dfn>.
-      </li><li>The node associated with the list of sorted mappings
-        with the least number of unlabeled nodes is first.</li>
-      <li>For each offset into the <a class="tref internalDFN" title="list_of_sorted_alpha_mappings" href="#dfn-list_of_sorted_alpha_mappings">list of sorted alpha mappings</a>, 
-        compare the IRI at the offset against the IRI at the same offset in the 
-        <a class="tref internalDFN" title="list_of_sorted_beta_mappings" href="#dfn-list_of_sorted_beta_mappings">list of sorted beta mappings</a>.
-        The node associated with the lexicographically lesser IRI is first.</li>
-    </ol></li>
-  <li>Otherwise, the nodes are equal.</li>
-</ol></div>
-
-<div id="object-comparison-algorithm" class="section">
-<h4><span class="secno">5.11.5 </span>Object Comparison Algorithm</h4>
-
-<p>
-The object comparison algorithm is designed to compare two graph node 
-property values, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, against the other.
-The algorithm is useful when sorting two lists of graph node properties.
-</p>
-
-<ol class="algorithm">
-  <li>If one of the values is a string and the other is not, the value that is
-    a string is first.</li>
-  <li>If both values are strings, the lexicographically lesser string is
-    first.</li>
-  <li>If one of the values is a literal and the other is not, the value that is
-    a literal is first.</li>
-  <li>If both values are literals
-    <ol class="algorithm">
-      <li>The lexicographically lesser string associated with 
-        <code>@literal</code> is first.</li>
-      <li>The lexicographically lesser string associated with 
-        <code>@datatype</code> is first.</li>
-      <li>The lexicographically lesser string associated with 
-        <code>@language</code> is first.</li>
-    </ol></li>
-  <li>If both values are expanded IRIs, the 
-    lexicographically lesser string associated with <code>@iri</code> 
-    is first.</li>
-  <li>Otherwise, the two values are equivalent.</li>
-</ol>
-
-</div>
-
-<div id="deep-comparison-algorithm" class="section">
-<h4><span class="secno">5.11.6 </span>Deep Comparison Algorithm</h4>
-
-<p>
-DeepCompare(bnodeA, bnodeB):
-</p>
-
-<ol class="algorithm">
-  <li>Return the value of ShallowCompare if it is non-zero.</li>
-  <li>Compare property serializations and then reference serializations, recycling the mapping from property serializations for reference serializations.
-    <ol class="algorithm">
-      <li>If the serialization for bnodeA is null, do SerializeNode(bnodeA, new Mapping).</li>
-      <li>If the serialization for bnodeB is null, do SerializeNode(bnodeA, new Mapping).</li>
-      <li>Return the result of a lexicographical comparison of the two serializations.</li>
-    </ol>
-</li></ol>
-</div>
-
-<div id="node-serialization-algorithm" class="section">
-<h4><span class="secno">5.11.7 </span>Node Serialization Algorithm</h4>
-
-<p>
-SerializeNode(bnode, mapping, dir):
-</p>
-
-<ol class="algorithm">
-<li>If the bnode's label is already marked as mapped, return.</li>
-<li>Mark the bnode's label as mapped.</li>
-<li>Assign the next serialization name to the bnode's label and store it in "top".</li>
-<li>Split the bnode's adjacent bnodes into a map and a list. The map contains a reverse mapping of serialization names to bnode labels for all labels in the mapping, the list (notMapped) contains all labels not in the mapping yet.</li>
-<li>Save a copy of the mapping.</li>
-<li>Do SerializeCombos for max(1, notMapped.length) using the original mapping for the first call and a copy of the mapping for each subsequent call.</li>
-</ol>
-
-</div>
-
-<div id="combinatorial-serialization-algorithm" class="section">
-<h4><span class="secno">5.11.8 </span>Combinatorial Serialization Algorithm</h4>
-
-<p>
-SerializeCombos(top, mapping, mapped, notMapped, dir):
-</p>
-
-<ol class="algorithm">
-  <li>If notMapped is non-empty, copy mapped and assign the next serialization name to its first bnode, remove it from the list, and update mapped.
-    <ol class="algorithm">
-      <li>For max(1, notMapped.length) recurse into SerializeCombos with the original mapping for the first call and a copy of the mapping for each subsequent call. Rotate notMapped on each iteration.</li>
-    </ol>
-  </li>
-  <li>If notMapped is empty, save an entry mapping from the bnode's serialization name to the reverse mapping (mapped) and its sorted keys then do SerializeMapping.
-    <ol class="algorithm">
-      <li>If the serialization is lexicographically less than the current serialization or the current serialization is null, then iterate over the sorted keys, get the reverse-mapped adjacent bnode and recursively call SerializeNode on each iteration.</li>
-      <li>Do SerializeMapping then if the serialization is lexicographically less than the current serialization or the current serialization is null, then set it as the least serialization for the bnode in the given edge direction ('property' or 'reference').</li>
-    </ol>
-  </li>
-</ol>
-
-</div>
-
-<div id="mapping-serialization-algorithm" class="section">
-<h4><span class="secno">5.11.9 </span>Mapping Serialization Algorithm</h4>
-
-<p>
-SerializeMapping(mapping):
-(This function incrementally updates the relation serialization for a mapping)
-</p>
-
-<ol class="algorithm">
-  <li>If there is an entry on the mapping's key stack, pop it and iterate over every key.</li>
-  <li>For each key, if an entry for the key hasn't been added to the mapping yet, break out of the loop.</li>
-  <li>Update the key stack entry's index.</li>
-  <li>If the key has already been serialized, output "'_' + key" and continue.</li>
-  <li>For each key, serialize the key then its associated bnode properties, then its bnode references. The entire property list is surrounded by '[' and ']' and so is the reference list. Individual properties/references are seperated by '|'. If a property is an array, all of the serializations are concatenated together with no joining delimiter. The '@subject' property is skipped. The property IRI is turtle-serialized. If a property or reference object is a bnode, it is serialized to '_:', otherwise the turtle serialization is used.</li>
-  <li>Join all of the adjacent keys and add them to the serialization.</li>
-  <li>Push the adjacent keys onto the key stack.</li>
-  <li>Do SerializeMapping.</li>
-</ol>
-
-</div>
-
-<div id="label-generation-algorithm" class="section">
-<h4><span class="secno">5.11.10 </span>Label Generation Algorithm</h4>
-
-<p>
-NameNode(bnode):
-</p>
-
-<ol class="algorithm">
-  <li>Remove the first blank node from the list of sorted blank nodes.</li>
-  <li>Give it the next canonical name.</li>
-  <li>Give canonical names to each blank node key in its property serialization mapping in lexicographical order.</li>
-  <li>Give canonical names to each blank node key in its reference serialization mapping in lexicographical order.</li>
-  <li>Set all serializations containing newly-named blank nodes to null.</li>
-</ol>
-
-</div>
-
-</div>
-
-<div id="data-round-tripping" class="section">
-
-<h3><span class="secno">5.12 </span>Data Round Tripping</h3>
-
-<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
-ensure that the normalized value is a string. In order to generate the
-string from a <strong>double</strong> value, output equivalent to the
-<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
-<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
-is the value to be converted.</p>
-
-<p>To convert the a double value in JavaScript, implementers can use the 
-following snippet of code:</p>
-
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
-
-<p class="note">When data needs to be normalized, JSON-LD authors should
-not use values that are going to undergo automatic conversion. This is due
-to the lossy nature of <strong>xsd:double</strong> values.</p>
-
-<p class="issue">Round-tripping data can be problematic if we mix and
-match @coerce rules with JSON-native datatypes, like integers. Consider the 
-following code example:</p>
-
-<pre class="example">
-var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-
-// Convert the normalized object back to a JavaScript object
-var myObj2 = jsonld.parse(jsonldText);</pre>
-
-<p class="issue">At this point, myObj2 and myObj will have different
-values for the "number" value. myObj will be the number 42, while
-myObj2 will be the string "42". This type of data round-tripping
-error can bite developers. We are currently wondering if having a
-"coerce validation" phase in the parsing/normalization phases would be a 
-good idea. It would prevent data round-tripping issues like the
-one mentioned above.</p>
-
-</div>
-
-<div id="rdf-conversion" class="section">
-<h3><span class="secno">5.13 </span>RDF Conversion</h3>
-
-<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted to any other RDF-compatible document
-format using the algorithm specified in this section.</p>
-
-<p>
-  The JSON-LD Processing Model describes processing rules for extracting RDF
-  from a JSON-LD document. Note that many uses of JSON-LD may not require 
-  generation of RDF.
-</p>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD to RDF processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The RDF Conversion Algorithm is a work in progress.</p>
-
-<div class="informative section" id="overview">
-  <h4><span class="secno">5.13.1 </span>Overview</h4><p><em>This section is non-normative.</em></p>
-  <p>
-    JSON-LD is intended to have an easy to parse grammar that closely models existing
-    practice in using JSON for describing object representations. This allows the use
-    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
-    for stream-based parsing similar to SAX.
-  </p>
-  <p>
-    As with other grammars used for describing <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
-    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
-    externally named entities, <em>BNodes</em>, resources for which an external name does not
-    exist, or is not known, and Literals, which describe terminal entities such as strings,
-    dates and other representations having a lexical representation possibly including
-    an explicit language or datatype.
-  </p>
-  <p>
-    Data described with JSON-LD may be considered to be the representation of a graph made
-    up of <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> resources related via a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> resource.
-    However, specific implementations may choose to operate on the document as a normal
-    JSON description of objects having attributes.
-  </p>
-</div>
-
-<div id="rdf-conversion-algorithm-terms" class="section">
-  <h4><span class="secno">5.13.2 </span>RDF Conversion Algorithm Terms</h4>
-  <dl>
-    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
-    <dd>
-      the destination graph for all triples generated by JSON-LD markup.
-    </dd>
-  </dl>
-</div>
-
-<div id="rdf-conversion-algorithm" class="section">
-  <h4><span class="secno">5.13.3 </span>RDF Conversion Algorithm</h4>
-  <p>
-    The algorithm below is designed for in-memory implementations with random access to associative
-    array elements.
-  </p>
-  <p>
-    A conforming JSON-LD processor implementing RDF conversion <em class="rfc2119" title="must">must</em> implement a
-    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
-    algorithm generates:
-  </p>
-
-  <ol class="algorithm">
-    <li id="processing-step-default-context">
-      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
-      <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      initialized to NULL.
-    </li>
-
-    <li id="processing-step-associative">
-      If an associative array is detected, perform the following steps:
-      <ol class="algorithm">
-        <li>
-          If the associative array has a <code>@context</code> key, process the local context as
-          described in <a href="#context">Context</a>.
-        </li>
-        <li>
-          Create a new associative array by mapping the keys from the current associative array using the
-          <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to new keys using the associated value from the current associative array.
-          Repeat the mapping until no entry is found within the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for the key. Use the new
-          associative array in subsequent steps.
-        </li>
-        <li>
-          If the associative array has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
-          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. Generate a
-          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-          <p class="issue"><code>@iri</code> really just behaves the same as <code>@subject</code>, consider consolidating them.</p>
-        </li>
-        <li>
-          If the associative array has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-          to a literal value as follows:
-          <ol class="algorithm">
-            <li>
-              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the associative array contains a <code>@datatype</code> key
-              after performing <a href="#iri-expansion">IRI Expansion</a> on the specified<code>@datatype</code>.
-            </li>
-            <li>
-              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the associative array contains
-              a <code>@language</code> key, use it's value to set the language of the plain literal.
-            </li>
-            <li>
-              Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-            </li>
-          </ol>
-        </li>
-        <li id="processing-step-subject">If the associative array has a <code>@subject</code> key:
-          <ol class="algorithm">
-            <li>
-              If the value is a string, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
-              <a href="#iri-expansion">IRI Expansion</a>. Generate a
-              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
-            </li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
-              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          If the associative array does not have a <code>@subject</code> key, set the <a class="tref" title="active__object">active
-          object</a> to newly generated <dfn title="blank_node_identifier" id="dfn-blank_node_identifier">blank node identifier</dfn>. Generate a triple
-          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
-          object</a>.
-        </li>
-        <li>
-          For each key in the associative array that has not already been processed, perform
-          the following steps:
-          <ol class="algorithm">
-            <li>
-              If the key is <code>@type</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-              to <code>rdf:type</code>.
-            </li>
-            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
-            <a href="#iri-expansion">IRI Expansion</a> on the key.</li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
-              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-      </ol>
-    </li>
-
-    <li>
-      If a regular array is detected, process each value in the array by doing the following
-      returning the result of processing the last value in the array:
-
-      <ol class="algorithm">
-        <li>
-          Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref" title="active__context">active
-          context</a>, <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-          starting at <a href="#processing-step-associative">Step 2</a> then proceed using the previous
-          <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-        </li>
-      </ol>
-    </li>
-    
-    <li>
-      If a string is detected:
-      <ol class="algorithm">
-        <li>
-          If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@iri</code> coercion,
-          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
-          performing <a href="#iri-expansion">IRI Expansion</a> on the string.
-        </li>
-        <li>
-          Otherwise, if the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of coercion,
-          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by creating a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using
-          the string and the coercion key as the datatype IRI.
-        </li>
-        <li>
-          Otherwise, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from
-          the string.
-        </li>
-      </ol>
-      Generate a
-      triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
-    </li>
-    
-    <li>
-      If a number is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
-      the value with datatype set to either <code>xsd:integer</code> or
-      <code>xsd:double</code>, depending on if the value contains a
-      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
-      subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the generated typed literal.
-    </li>
-    
-    <li>
-      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
-      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
-      value with datatype set to <code>xsd:boolean</code>.
-    </li>
-  </ol>
-</div>
-
-
-<!--  THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT 
-
-<section>
-<h1>Best Practices</h1>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be 
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<section>
-<h2>JavaScript</h2>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in 
-JavaScript environments, however, features like the expanded form for
-object values mean that using JSON-LD directly in JavaScript may be 
-annoying without a middleware layer such as a simple library that 
-converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDF API, which enables a variety of RDF-based
-Web Applications, but some don't want to require that level of functionality 
-just to use JSON-LD. The group is still discussing the best way to proceed, 
-so input on how JSON-LD could more easily be utilized in JavaScript 
-environments would be very much appreciated.
-</p>
-</section>
-
-<section>
-<h2>Schema-less Databases</h2>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from 
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-
-<p class="issue">MongoDB does not allow the '.' character to be used in
-key names. This prevents developers from storing IRIs as keys, which also
-prevents storage of the data in normalized form. While this issue can
-be avoided by using CURIEs for key values, it is not known if this
-mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
-is useful to developers.
-</p>
-
- -->
-
-</div>
-
-</div>
-
-<div id="experimental-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>Experimental Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear 
-whether or not the JSON-LD specification is going to support the complexity 
-necessary to support each concept. The entire section on Advanced Concepts 
-should be considered as discussion points; it is merely a list of 
-possibilities where all of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">6.1 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an array to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single JSON-LD associative
-array.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "@coerce": {
-    "foaf": "http://xmlns.com/foaf/0.1/"
-  },
-  "@subject": 
-  [
-    {
-      "@subject": "http://example.org/people#john",
-      "@type": "foaf:Person"
-    },
-    {
-      "@subject": "http://example.org/people#jane",
-      "@type": "foaf:Person"
-    }
-  ]
-}</pre>
-
-<p>A disjoint graph could also be expressed like so:</p>
-
-<pre class="example">
-[
-  {
-    "@subject": "http://example.org/people#john",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  },
-  {
-    "@subject": "http://example.org/people#jane",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  }
-]</pre>
-
-</div>
-
-<div id="lists" class="section">
-  <h3><span class="secno">6.2 </span>Lists</h3>
-  <p>
-    Because graphs do not describe ordering for links between nodes, multi-valued properties
-    in JSON do not provide an ordering of the listed objects. For example, consider the following
-    simple document:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-  <p>
-    This results in three triples being generated, each relating the subject to an individual
-    object, with no inherent order. To address this issue, RDF-based languages, such as [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>]
-    use the concept of an <code>rdf:List</code> (as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">RDF-SCHEMA</a></cite>]). This uses a sequence
-    of unlabeled nodes with properties describing a value, a null-terminated next property. Without
-    specific syntactical support, this could be represented in JSON-LD as follows:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">{</span>,
-    <span class="diff">"@first": "joe"</span>,
-    <span class="diff">"@rest": {</span>
-      <span class="diff">"@first": "bob"</span>,
-      <span class="diff">"@rest": {</span>
-        <span class="diff">"@first": "jaybee"</span>,
-        <span class="diff">"@rest": "@nil"</span>
-        <span class="diff">}</span>
-      <span class="diff">}</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-}</pre>
-  <p>
-    As this notation is rather unwieldy and the notion of ordered collections is rather important
-    in data modeling, it is useful to have specific language support. In JSON-LD, a list may
-    be represented using the <code>@list</code> keyword as follows:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
-...
-}</pre>
-  <p>
-    This describes the use of this array as being ordered, and order is maintained through
-    normalization and RDF conversion. If every use of a given multi-valued property is a
-    list, this may be abbreviated by adding an <code>@coerce</code> term:
-  </p>
-  <pre class="example">
-{
-  <span class="diff">"@context": {</span>
-    ...
-    <span class="diff">"@context": {</span>
-      <span class="diff">"@list": ["foaf:nick"]</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-  <div id="expansion-2" class="section"><h4 id="list-expansion"><span class="secno">6.2.1 </span>Expansion</h4>
-    <p class="issue">TBD.</p>
-  </div>
-  <div id="normalization-2" class="section"><h4 id="list-normalization"><span class="secno">6.2.2 </span>Normalization</h4>
-    <p class="issue">TBD.</p>
-  </div>
-  <div id="rdf-conversion-1" class="section"><h4 id="list-rdf"><span class="secno">6.2.3 </span>RDF Conversion</h4>
-    <p>
-      To support RDF Conversion of lists, <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>
-      is updated as follows:
-    </p>
-    <ol class="algorithm update">
-      <li>
-        <span class="list-number">2.4a.</span>
-        If the associative array has a <code>@list</code> key and the value is an array
-        process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
-      </li>
-      <li>
-        <span class="list-number">2.7.3.</span>
-        Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
-        <ol class="algorithm">
-          <li>
-            If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@list</code> coercion,
-            and the value is an array,
-            process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
-          </li>
-          <li>
-            Otherwise, process the value starting at
-            <a href="#processing-step-associative">Step 2</a>.
-          </li>
-          <li>Proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-        </ol>
-      </li>
-      <li id="processing-step-list">
-        <span class="list-number">3a.</span>
-        Generate an RDF List by linking
-        each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
-        using the following sequence:
-        <ol class="algorithm">
-          <li>
-            If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-            and <code>rdf:nil</code>.
-          </li>
-          <li>
-            Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-            and a newly generated BNode identified as <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">blank node identifier</dfn></em>.
-          </li>
-          <li>
-            For each element other than the last element in the list:
-            <ol class="algorithm">
-              <li>Create a processor state using the active context, <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">blank node identifier</dfn></em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
-              <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">blank node identifier</dfn></em>, otherwise use <code>rdf:nil</code>.</li>
-              <li>Generate a new triple using <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">blank node identifier</dfn></em>, <code>rdf:rest</code> and <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">blank node identifier</dfn></em>.</li>
-              <li>Set <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">blank node identifier</dfn></em> to <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">blank node identifier</dfn></em>.</li>
-            </ol>
-          </li>
-        </ol>
-      </li>
-    </ol>
-  </div>
-</div>
-
-
-<!-- -section>
-<h2>The JSON-LD API</h2>
-
-<p>This API provides a clean mechanism that enables developers to convert 
-JSON-LD data into a format that is easier to work with in various programming
-languages.
-</p>
-
-<section>
-<h3>JSONLDProcessor</h3>
-<dl title="[NoInterfaceObject] interface JSONLDProcessor" class="idl">
-
-  <dt>object toProjection()</dt>
-  <dd>Parses JSON-LD text into an RDF API Projection object as specified
-    by the RDF API specification [[!RDF-API]].
-    If there are any errors, <code>null</code> is returned.
-  <dl class="parameters">
-     <dt>DOMString jsonld</dt>
-     <dd>The JSON-LD string to parse into the Projection.</dd>
-     <dt>object? template</dt>
-     <dd>The Projection template to use when building the Projection.</dd>
-     <dt>DOMString? subject</dt>
-     <dd>The subject to use when building the Projection.</dd>
-     <dt>JSONLDParserCallback optional? callback</dt>
-     <dd>A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</dd>
-  </dl>
-  </dd>
-
-  <dt>Graph toGraph()</dt>
-  <dd>Parses JSON-LD and transforms the data into an Graph, which is 
-  compatible with the RDF Interfaces API specification [[!RDF-INTERFACES]]. 
-  This method will 
-  return <code>null</code> if there are any errors, or if the RDF Interfaces 
-  API is not available for use.
-  <dl class="parameters">
-     <dt>DOMString jsonld</dt>
-     <dd>The JSON-LD string to parse into the RDFGraph.</dd>
-     <dt>JSONLDParserCallback optional? callback</dt>
-     <dd>A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</dd>
-  </dl>
-  </dd>
-
-</dl>
-</section>
-<section>
-<h3>JSONLDParserCallback</h3>
-<p>The JSONLDParserCallback is called whenever a processing error occurs on
-input data.</p>
-
-<dl title="[NoInterfaceObject Callback] interface JSONLDProcessorCallback" 
-    class="idl">
-
-  <dt>void error()</dt>
-  <dd>This callback is invoked whenever an error occurs during processing.
-  <dl class="parameters">
-     <dt>DOMString error</dt>
-     <dd>A descriptive error string returned by the processor.</dd>
-  </dl>
-  </dd>
-</dl>
-
-<p>The following example demonstrates how to convert JSON-LD to a projection
-that is directly usable in a programming environment:
-</p>
-
-<pre class="example" data-transform="updateExample">
-// retrieve JSON-LD from a Web Service
-var jsonldString = fetchPerson();
-
-// This map, usually defined once per script, defines how to map incoming 
-// JSON-LD to JavaScript objects
-var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
-                   "http://xmlns.com/foaf/0.1/age" : "age",
-                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
-
-// Map the JSON-LD to a language-native object
-var person = jsonld.toProjection(jsonldString, myTemplate);
-
-// Use the language-native object
-alert(person.name + " is " + person.age + " years old. " +
-      "Their homepage is: " + person.homepage);
-</pre>
-</section>
-<section><h3>JSONLDSerializer</h3>
-<p>A JSON-LD Serializer is also available to map a language-native object
-to JSON-LD.
-
-<dl title="[NoInterfaceObject] interface JSONLDSerializer" class="idl">
-
-  <dt>DOMString normalize()</dt>
-  <dd>Serializes a language-native object into a normalized JSON-LD string.
-  Normalization is important when performing things like equality comparison
-  and digital signature creation and verification.
-  <dl class="parameters">
-     <dt>object obj</dt>
-     <dd>An associative array of key-value pairs that should be converted
-     to a JSON-LD string. It is assumed that a map already exists for the
-     data.</dd>
-  </dl>
-  </dd>
-</dl>
-
-</section>
-
-</section  -->
-
-
-</div>
-
-<div class="appendix section" id="markup-examples">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">A.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-{
-  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
-  "@subject": [
-   {
-     "@subject": "_:bnode1",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/bob/",
-     "foaf:name": "Bob"
-   },
-   {
-     "@subject": "_:bnode2",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/eve/",
-     "foaf:name": "Eve"
-   },
-   {
-     "@subject": "_:bnode3",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/manu/",
-     "foaf:name": "Manu"
-   }
-  ]
-}</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">A.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@subject": "_:bnode1",
-  "@type": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">A.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "@type": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]</pre>
-</div>
-
-<div class="appendix section" id="mashing-up-vocabularies">
-<h3><span class="secno">A.4 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>RDF - for describing information about objects on the semantic web.</li>
-   <li>RDFS - for expressing things like labels and comments.</li>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>You can use these vocabularies in combination, like so:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword, 
-like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "@type": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}</pre>
-
-<p>The <code>@context</code> keyword is used to change how the JSON-LD
-processor evaluates key-value pairs. In this case, it was used to
-map one string ('myvocab') to another string, which is interpreted as
-a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced 
-with "<code>http://example.org/myvocab#</code>" when it
-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 for RDF, called a CURIE, and provides
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div class="appendix section" id="acknowledgements">
-<h3><span class="secno">A.5 </span>Acknowledgements</h3>
-
-<p>The editors would like to thank Mark Birbeck, who provided a great deal of 
-the initial push behind the JSON-LD work via his work on RDFj, 
-Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and 
-performed several implementations of the specification, and Ian Davis, who 
-created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
-Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
-Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard 
-Cyganiak for their input on the specification. Another huge thank you goes out
-to Dave Longley who designed many of the algorithms used in this specification,
-including the normalization algorithm which was a monumentally difficult 
-design challenge.
-</p>
-</div>
-
-
-
-
-</div><div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd>T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 
-</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a> 
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification, Third Edition.</cite></a> December 1999. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 
-</dd><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd>Dan Brickley; Ramanathan V. Guha. <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite>RDF Vocabulary Description Language 1.0: RDF Schema.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">http://www.w3.org/TR/2004/REC-rdf-schema-20040210</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
-</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd>David Beckett, Tim Berners-Lee. <a href="http://www.w3.org/TeamSubmission/turtle/"><cite>Turtle: Terse RDF Triple Language.</cite></a> January 2008. W3C Team Submission. URL: <a href="http://www.w3.org/TeamSubmission/turtle/">http://www.w3.org/TeamSubmission/turtle/</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20110808/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20110817/diff-20110808.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23273 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-ol.algorithm.update { margin-left: 2em; }
-ol.algorithm.update>li { list-style-type: none; }
-ol.algorithm.update>li>span.list-number {
-  display:block;
-  float: left; 
-  margin-left: -3.5em;
-}
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  1px dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-
-
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
-1.0
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-Linking
-Data
-</h2>
-<h2 id="unofficial-draft-17-august-2011">
-Unofficial
-Draft
-<del class="diff-old">08
-</del>
-<ins class="diff-chg">17
-</ins>
-August
-2011
-</h2>
-<dl>
-<dt>
-Editors:
-</dt>
-<dd>
-<a href="http://manu.sporny.org/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</a>
-</dd>
-<dd>
-<a href="http://greggkellogg.net/">
-Gregg
-Kellogg
-</a>,
-Kellogg
-Associates
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-<ins class="diff-new">Dave
-Longley
-</ins></a>,<a href="http://digitalbazaar.com/"><ins class="diff-new">
-Digital
-Bazaar
-</ins></a></dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</a>
-</dd>
-<dd>
-<a href="http://greggkellogg.net/">
-Gregg
-Kellogg
-</a>,
-Kellogg
-Associates
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Dave
-Longley
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</a>
-</dd>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-</dl>
-<p>
-This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-<a href="diff-20110808.html">
-diff
-to
-previous
-version
-</a>.
-</p>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-JSON
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-]
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-format.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-expressing
-directed
-graphs;
-mixing
-both
-Linked
-Data
-and
-non-Linked
-Data
-in
-a
-single
-document.
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-Introduction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-1.2
-</span>
-Contributing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design" class="tocxref">
-<span class="secno">
-2.
-</span>
-Design
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals-and-rationale" class="tocxref">
-<span class="secno">
-2.1
-</span>
-Goals
-and
-Rationale
-</a>
-</li>
-<li class="tocline">
-<a href="#linked-data" class="tocxref">
-<span class="secno">
-2.2
-</span>
-Linked
-Data
-</a>
-</li>
-<li class="tocline">
-<a href="#linking-data" class="tocxref">
-<span class="secno">
-2.3
-</span>
-Linking
-Data
-</a>
-</li>
-<li class="tocline">
-<a href="#the-context" class="tocxref">
-<span class="secno">
-2.4
-</span>
-The
-Context
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#inside-a-context" class="tocxref">
-<span class="secno">
-2.4.1
-</span>
-Inside
-a
-Context
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#from-json-to-json-ld" class="tocxref">
-<span class="secno">
-2.5
-</span>
-From
-JSON
-to
-JSON-LD
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#basic-concepts" class="tocxref">
-<span class="secno">
-3.
-</span>
-Basic
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-3.1
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-3.2
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-3.3
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#strings" class="tocxref">
-<span class="secno">
-3.4
-</span>
-Strings
-</a>
-</li>
-<li class="tocline">
-<a href="#string-internationalization" class="tocxref">
-<span class="secno">
-3.5
-</span>
-String
-Internationalization
-</a>
-</li>
-<li class="tocline">
-<a href="#datatypes" class="tocxref">
-<span class="secno">
-3.6
-</span>
-Datatypes
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-3.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-3.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#expansion" class="tocxref">
-<span class="secno">
-3.9
-</span>
-Expansion
-</a>
-</li>
-<li class="tocline">
-<a href="#compaction" class="tocxref">
-<span class="secno">
-3.10
-</span>
-Compaction
-</a>
-</li>
-<li class="tocline">
-<a href="#framing" class="tocxref">
-<span class="secno">
-3.11
-</span>
-Framing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-4.
-</span>
-Advanced
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#curies" class="tocxref">
-<span class="secno">
-4.1
-</span>
-<ins class="diff-new">CURIEs
-</ins></a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno"><ins class="diff-new">
-4.2
-</ins></span>
-Automatic
-Typing
-</a>
-</li>
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.2
-</del>
-<ins class="diff-chg">4.3
-</ins>
-</span>
-Type
-Coercion
-</a>
-</li>
-<li class="tocline">
-<a href="#chaining" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.3
-</del>
-<ins class="diff-chg">4.4
-</ins>
-</span>
-Chaining
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-unlabeled-nodes" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.4
-</del>
-<ins class="diff-chg">4.5
-</ins>
-</span>
-Identifying
-Unlabeled
-Nodes
-</a>
-</li>
-<li class="tocline">
-<a href="#overriding-keywords" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.5
-</del>
-<ins class="diff-chg">4.6
-</ins>
-</span>
-Overriding
-Keywords
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization" class="tocxref">
-<span class="secno">
-<del class="diff-old">4.6
-</del>
-<ins class="diff-chg">4.7
-</ins>
-</span>
-Normalization
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-application-programming-interface" class="tocxref">
-<span class="secno">
-5.
-</span>
-<ins class="diff-new">The
-Application
-Programming
-Interface
-</ins></a><ul class="toc"><li class="tocline"><a href="#jsonldprocessor" class="tocxref"><span class="secno"><ins class="diff-new">
-5.1
-</ins></span><ins class="diff-new">
-JSONLDProcessor
-</ins></a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno"><ins class="diff-new">
-5.1.1
-</ins></span><ins class="diff-new">
-Methods
-</ins></a></li></ul></li><li class="tocline"><a href="#jsonldprocessorcallback" class="tocxref"><span class="secno"><ins class="diff-new">
-5.2
-</ins></span><ins class="diff-new">
-JSONLDProcessorCallback
-</ins></a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno"><ins class="diff-new">
-5.2.1
-</ins></span><ins class="diff-new">
-Methods
-</ins></a></li></ul></li><li class="tocline"><a href="#jsonldtriplecallback" class="tocxref"><span class="secno"><ins class="diff-new">
-5.3
-</ins></span><ins class="diff-new">
-JSONLDTripleCallback
-</ins></a><ul class="toc"><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno"><ins class="diff-new">
-5.3.1
-</ins></span><ins class="diff-new">
-Methods
-</ins></a></li></ul></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno"><ins class="diff-new">
-6.
-</ins></span>
-Algorithms
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#syntax-tokens-and-keywords" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Syntax
-Tokens
-and
-Keywords
-</a>
-</li>
-<li class="tocline">
-<a href="#algorithm-terms" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#context-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.3
-</del>
-<ins class="diff-chg">6.3
-</ins>
-</span>
-Context
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#coerce" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.3.1
-</del>
-<ins class="diff-chg">6.3.1
-</ins>
-</span>
-Coerce
-</a>
-</li>
-<li class="tocline">
-<a href="#initial-context" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.3.2
-</del>
-<ins class="diff-chg">6.3.2
-</ins>
-</span>
-Initial
-Context
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#iri-expansion" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.4
-</del>
-<ins class="diff-chg">6.4
-</ins>
-</span>
-IRI
-Expansion
-</a>
-</li>
-<li class="tocline">
-<a href="#iri-compaction" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.5
-</del>
-<ins class="diff-chg">6.5
-</ins>
-</span>
-IRI
-Compaction
-</a>
-</li>
-<li class="tocline">
-<a href="#value-expansion" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.6
-</del>
-<ins class="diff-chg">6.6
-</ins>
-</span>
-Value
-Expansion
-</a>
-</li>
-<li class="tocline">
-<a href="#value-compaction" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.7
-</del>
-<ins class="diff-chg">6.7
-</ins>
-</span>
-Value
-Compaction
-</a>
-</li>
-<li class="tocline">
-<a href="#expansion-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.8
-</del>
-<ins class="diff-chg">6.8
-</ins>
-</span>
-Expansion
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#expansion-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.8.1
-</del>
-<ins class="diff-chg">6.8.1
-</ins>
-</span>
-Expansion
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#compaction-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.9
-</del>
-<ins class="diff-chg">6.9
-</ins>
-</span>
-Compaction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#compaction-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.9.1
-</del>
-<ins class="diff-chg">6.9.1
-</ins>
-</span>
-Compaction
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#framing-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.10
-</del>
-<ins class="diff-chg">6.10
-</ins>
-</span>
-Framing
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#framing-algorithm-terms" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.10.1
-</del>
-<ins class="diff-chg">6.10.1
-</ins>
-</span>
-Framing
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#framing-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.10.2
-</del>
-<ins class="diff-chg">6.10.2
-</ins>
-</span>
-Framing
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#normalization-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11
-</del>
-<ins class="diff-chg">6.11
-</ins>
-</span>
-Normalization
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normalization-algorithm-terms" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.1
-</del>
-<ins class="diff-chg">6.11.1
-</ins>
-</span>
-Normalization
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization-state" class="tocxref">
-<span class="secno">
-<ins class="diff-new">6.11.2
-</ins></span><ins class="diff-new">
-Normalization
-State
-</ins></a></li><li class="tocline">
-<a href="#normalization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.2
-</del>
-<ins class="diff-chg">6.11.3
-</ins>
-</span>
-Normalization
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#node-relabeling-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.3
-</del>
-<ins class="diff-chg">6.11.4
-</ins>
-</span>
-Node
-<ins class="diff-new">Relabeling
-Algorithm
-</ins></a></li><li class="tocline"><a href="#deterministic-labeling-algorithm" class="tocxref"><span class="secno"><ins class="diff-new">
-6.11.5
-</ins></span><ins class="diff-new">
-Deterministic
-</ins>
-Labeling
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#shallow-comparison-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.4
-</del>
-<ins class="diff-chg">6.11.6
-</ins>
-</span>
-Shallow
-Comparison
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#object-comparison-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.5
-</del>
-<ins class="diff-chg">6.11.7
-</ins>
-</span>
-Object
-Comparison
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#deep-comparison-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.6
-</del>
-<ins class="diff-chg">6.11.8
-</ins>
-</span>
-Deep
-Comparison
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#node-serialization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.7
-</del>
-<ins class="diff-chg">6.11.9
-</ins>
-</span>
-Node
-Serialization
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#serialization-label-generation-algorithm" class="tocxref">
-<span class="secno">
-<ins class="diff-new">6.11.10
-</ins></span><ins class="diff-new">
-Serialization
-Label
-Generation
-Algorithm
-</ins></a></li><li class="tocline">
-<a href="#combinatorial-serialization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.8
-</del>
-<ins class="diff-chg">6.11.11
-</ins>
-</span>
-Combinatorial
-Serialization
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#mapping-serialization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.9
-</del>
-<ins class="diff-chg">6.11.12
-</ins>
-</span>
-Mapping
-Serialization
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#label-serialization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.11.10
-</del>
-<ins class="diff-chg">6.11.13
-</ins>
-</span>
-Label
-<del class="diff-old">Generation
-</del>
-<ins class="diff-chg">Serialization
-</ins>
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#data-round-tripping" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.12
-</del>
-<ins class="diff-chg">6.12
-</ins>
-</span>
-Data
-Round
-Tripping
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.13
-</del>
-<ins class="diff-chg">6.13
-</ins>
-</span>
-RDF
-Conversion
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#overview" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.13.1
-</del>
-<ins class="diff-chg">6.13.1
-</ins>
-</span>
-Overview
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion-algorithm-terms" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.13.2
-</del>
-<ins class="diff-chg">6.13.2
-</ins>
-</span>
-RDF
-Conversion
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">5.13.3
-</del>
-<ins class="diff-chg">6.13.3
-</ins>
-</span>
-RDF
-Conversion
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#experimental-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">7.
-</ins>
-</span>
-Experimental
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">7.1
-</ins>
-</span>
-Disjoint
-Graphs
-</a>
-</li>
-<li class="tocline">
-<a href="#lists" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">7.2
-</ins>
-</span>
-Lists
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#expansion-2" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2.1
-</del>
-<ins class="diff-chg">7.2.1
-</ins>
-</span>
-Expansion
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization-2" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2.2
-</del>
-<ins class="diff-chg">7.2.2
-</ins>
-</span>
-Normalization
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.2.3
-</del>
-<ins class="diff-chg">7.2.3
-</ins>
-</span>
-RDF
-Conversion
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-A.
-</span>
-Markup
-Examples
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#rdfa" class="tocxref">
-<span class="secno">
-A.1
-</span>
-RDFa
-</a>
-</li>
-<li class="tocline">
-<a href="#microformats" class="tocxref">
-<span class="secno">
-A.2
-</span>
-Microformats
-</a>
-</li>
-<li class="tocline">
-<a href="#microdata" class="tocxref">
-<span class="secno">
-A.3
-</span>
-Microdata
-</a>
-</li>
-<li class="tocline">
-<a href="#mashing-up-vocabularies" class="tocxref">
-<span class="secno">
-A.4
-</span>
-Mashing
-Up
-Vocabularies
-</a>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-A.5
-</span>
-Acknowledgements
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-B.
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-B.1
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-B.2
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<p>
-JSON,
-as
-specified
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-],
-is
-a
-simple
-language
-for
-representing
-data
-on
-the
-Web.
-Linked
-Data
-is
-a
-technique
-for
-describing
-content
-across
-different
-documents
-or
-Web
-sites.
-Web
-resources
-are
-described
-using
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s,
-and
-typically
-are
-dereferencable
-entities
-that
-may
-be
-used
-to
-find
-more
-information,
-creating
-a
-"Web
-of
-Knowledge".
-JSON-LD
-is
-intended
-to
-be
-a
-simple
-publishing
-method
-for
-expressing
-not
-only
-Linked
-Data
-in
-JSON,
-but
-for
-adding
-semantics
-to
-existing
-JSON.
-</p>
-<p>
-JSON-LD
-is
-designed
-as
-a
-light-weight
-syntax
-that
-can
-be
-used
-to
-express
-Linked
-Data.
-It
-is
-primarily
-intended
-to
-be
-a
-way
-to
-express
-Linked
-Data
-in
-Javascript
-and
-other
-Web-based
-programming
-environments.
-It
-is
-also
-useful
-when
-building
-interoperable
-Web
-Services
-and
-when
-storing
-Linked
-Data
-in
-JSON-based
-document
-storage
-engines.
-It
-is
-practical
-and
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-and
-existing
-code
-that
-is
-in
-use
-today.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-RDFa
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-]
-data,
-Microformats
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
-MICROFORMATS
-</a>
-</cite>
-]
-data,
-and
-Microdata
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
-MICRODATA
-</a>
-</cite>
-].
-That
-is,
-it
-supports
-every
-major
-Web-based
-structured
-data
-model
-in
-use
-today.
-</p>
-<p>
-The
-syntax
-does
-not
-require
-many
-applications
-to
-change
-their
-JSON,
-but
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-either
-in-band
-or
-out-of-band.
-The
-syntax
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-migration
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-fast
-to
-parse,
-fast
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-very
-small
-memory
-footprint
-in
-order
-to
-operate.
-</p>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</h3>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-JSON
-for
-Linked
-data.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-implement
-processors
-and
-APIs
-for
-JSON-LD.
-</li>
-</ul>
-<p>
-To
-understand
-the
-basics
-in
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-].
-To
-understand
-the
-API
-and
-how
-it
-is
-intended
-to
-operate
-in
-a
-programming
-environment,
-it
-is
-useful
-to
-have
-working
-knowledge
-of
-the
-JavaScript
-programming
-language
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-ECMA-262">
-ECMA-262
-</a>
-</cite>
-]
-and
-WebIDL
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-WEBIDL">
-WEBIDL
-</a>
-</cite>
-].
-To
-understand
-how
-JSON-LD
-maps
-to
-RDF,
-it
-is
-helpful
-to
-be
-familiar
-with
-the
-basic
-RDF
-concepts
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
-RDF-CONCEPTS
-</a>
-</cite>
-].
-</p>
-<p>
-Examples
-may
-contain
-references
-to
-existing
-vocabularies
-and
-use
-abbreviations
-in
-<del class="diff-old">CURIEs
-</del>
-<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
-<ins class="diff-chg">CURIE
-</ins></a><ins class="diff-chg">
-s
-</ins>
-and
-source
-code.
-The
-following
-is
-a
-list
-of
-all
-vocabularies
-and
-their
-abbreviations,
-as
-used
-in
-this
-document:
-</p>
-<ul>
-<li>
-The
-<a href="http://purl.org/dc/terms/">
-Dublin
-Core
-</a>
-vocabulary
-(abbreviation:
-<code>
-dc
-</code>,
-e.g.,
-<code>
-dc:title
-</code>
-)
-</li>
-<li>
-The
-<a href="http://xmlns.com/foaf/0.1/">
-Friend
-of
-a
-Friend
-</a>
-vocabulary
-(abbreviation:
-<code>
-foaf
-</code>,
-e.g.,
-<code>
-foaf:knows
-</code>
-)
-</li>
-<li>
-The
-<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-RDF
-</a>
-vocabulary
-(abbreviation:
-<code>
-rdf
-</code>,
-e.g.,
-<code>
-rdf:type
-</code>
-)
-</li>
-<li>
-The
-<a href="http://www.w3.org/2001/XMLSchema#">
-XSD
-</a>
-vocabulary
-(abbreviation:
-<code>
-xsd
-</code>,
-e.g.,
-<code>
-xsd:integer
-</code>
-)
-</li>
-</ul>
-<p>
-<ins class="diff-new">JSON
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
-RFC4627
-</ins></a></cite><ins class="diff-new">
-]
-defines
-several
-terms
-which
-are
-used
-throughout
-this
-document:
-</ins></p><dl><dt><dfn title="JSON_Object" id="dfn-json_object"><ins class="diff-new">
-JSON
-Object
-</ins></dfn></dt><dd><ins class="diff-new">
-An
-object
-structure
-is
-represented
-as
-a
-pair
-of
-curly
-brackets
-surrounding
-zero
-or
-more
-name/value
-pairs
-(or
-members).
-A
-name
-is
-a
-</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-new">
-string
-</ins></a>.<ins class="diff-new">
-A
-single
-colon
-comes
-after
-each
-name,
-separating
-the
-name
-from
-the
-value.
-A
-single
-comma
-separates
-a
-value
-from
-a
-following
-name.
-The
-names
-within
-an
-object
-</ins><em class="rfc2119" title="should"><ins class="diff-new">
-should
-</ins></em><ins class="diff-new">
-be
-unique.
-</ins></dd><dt><dfn title="array" id="dfn-array"><ins class="diff-new">
-array
-</ins></dfn></dt><dd><ins class="diff-new">
-An
-</ins><em><ins class="diff-new">
-array
-</ins></em><ins class="diff-new">
-is
-an
-ordered
-collection
-of
-values.
-An
-array
-begins
-with
-[
-(left
-bracket)
-and
-ends
-with
-]
-(right
-bracket).
-Values
-are
-separated
-by
-,
-(comma).
-Within
-JSON-LD,
-array
-order
-is
-not
-preserved,
-unless
-specific
-markup
-is
-provided
-(see
-</ins><a href="#lists"><ins class="diff-new">
-Lists
-</ins></a><ins class="diff-new">
-).
-This
-is
-because
-the
-basic
-data
-model
-of
-JSON-LD
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-new">
-linked
-data
-graph
-</ins></a>,<ins class="diff-new">
-which
-is
-inherently
-unordered.
-</ins></dd><dt><dfn title="string" id="dfn-string"><ins class="diff-new">
-string
-</ins></dfn></dt><dd><ins class="diff-new">
-A
-string
-is
-a
-sequence
-of
-zero
-or
-more
-Unicode
-characters,
-wrapped
-in
-double
-quotes,
-using
-backslash
-escapes.
-A
-character
-is
-represented
-as
-a
-single
-character
-string.
-A
-string
-is
-very
-much
-like
-a
-C
-or
-Java
-string.
-</ins></dd><dt><dfn title="number" id="dfn-number"><ins class="diff-new">
-number
-</ins></dfn></dt><dd><ins class="diff-new">
-A
-number
-is
-very
-much
-like
-a
-C
-or
-Java
-number,
-except
-that
-the
-octal
-and
-hexadecimal
-formats
-are
-not
-used.
-</ins></dd><dt><dfn title="true" id="dfn-true"><ins class="diff-new">
-true
-</ins></dfn><ins class="diff-new">
-and
-</ins><dfn title="false" id="dfn-false"><ins class="diff-new">
-false
-</ins></dfn></dt><dd><ins class="diff-new">
-Boolean
-values.
-</ins></dd><dt><dfn title="null" id="dfn-null"><ins class="diff-new">
-null
-</ins></dfn></dt><dd><ins class="diff-new">
-The
-use
-of
-the
-</ins><em><ins class="diff-new">
-null
-</ins></em><ins class="diff-new">
-value
-is
-undefined
-within
-JSON-LD.
-</ins></dd></dl><p></p>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-1.2
-</span>
-Contributing
-</h3>
-<p>
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</p>
-<ul>
-<li>
-Technical
-discussion
-typically
-occurs
-on
-the
-public
-mailing
-list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
-public-linked-json@w3.org
-</a>
-</li>
-<li>
-<a href="http://json-ld.org/minutes/">
-Public
-teleconferences
-</a>
-are
-held
-on
-Tuesdays
-at
-1500UTC
-on
-the
-second
-and
-fourth
-week
-of
-each
-month.
-</li>
-<li>
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-<a href="https://github.com/json-ld/json-ld.org/issues">
-issue
-tracker
-</a>.
-</li>
-<li>
-<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
-Source
-code
-</a>
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</li>
-<li>
-The
-<a href="http://webchat.freenode.net/?channels=#json-ld">
-#json-ld
-</a>
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</li>
-</ul>
-</div>
-</div>
-<div id="design" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Design
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="goals-and-rationale" class="section">
-<h3>
-<span class="secno">
-2.1
-</span>
-Goals
-and
-Rationale
-</h3>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-need
-only
-know
-JSON
-and
-three
-keywords
-to
-use
-the
-basic
-functionality
-in
-JSON-LD.
-No
-extra
-processors
-or
-software
-libraries
-are
-necessary
-to
-use
-JSON-LD
-in
-its
-most
-basic
-form.
-The
-language
-attempts
-to
-ensure
-that
-developers
-have
-an
-easy
-learning
-curve.
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-must
-be
-100%
-compatible
-with
-JSON.
-This
-ensures
-that
-all
-of
-the
-standard
-JSON
-libraries
-work
-seamlessly
-with
-JSON-LD
-documents.
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-The
-syntax
-must
-be
-able
-to
-express
-directed
-graphs,
-which
-have
-been
-proven
-to
-be
-able
-to
-simply
-express
-almost
-every
-real
-world
-data
-model.
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-readable,
-requiring
-as
-little
-as
-possible
-from
-the
-developer.
-</dd>
-<dt>
-<del class="diff-old">Pragmatism
-Mixing
-the
-expression
-of
-pure
-Linked
-Data
-with
-data
-that
-is
-not
-linked
-was
-an
-approach
-that
-was
-driven
-by
-pragmatism.
-JSON-LD
-attempts
-to
-be
-more
-practical
-than
-theoretical
-in
-its
-approach
-to
-Linked
-Data.
-</del>
-Zero
-Edits,
-most
-of
-the
-time
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-At
-times,
-mapping
-JSON
-to
-a
-graph
-representation
-can
-become
-difficult.
-In
-these
-instances,
-rather
-than
-having
-JSON-LD
-support
-esoteric
-markup,
-we
-chose
-not
-to
-support
-the
-use
-case
-and
-support
-a
-simplified
-syntax
-instead.
-So,
-while
-Zero
-Edits
-was
-a
-goal,
-it
-was
-not
-always
-possible
-without
-adding
-great
-complexity
-to
-the
-language.
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<div id="linked-data" class="section">
-<h3>
-<span class="secno">
-2.2
-</span>
-Linked
-Data
-</h3>
-<p>
-The
-following
-definition
-for
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>
-is
-the
-one
-that
-will
-be
-used
-for
-this
-specification.
-</p>
-<ol>
-<li>
-<dfn title="Linked_Data" id="dfn-linked_data">
-Linked
-Data
-</dfn>
-is
-a
-set
-of
-documents,
-each
-containing
-a
-representation
-of
-a
-linked
-data
-graph.
-</li>
-<li>
-A
-<dfn title="linked_data_graph" id="dfn-linked_data_graph">
-linked
-data
-graph
-</dfn>
-is
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">an
-unordered
-</ins>
-labeled
-directed
-graph,
-where
-nodes
-are
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>
-s
-or
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-s,
-and
-edges
-are
-properties.
-</li>
-<li>
-A
-<dfn title="subject" id="dfn-subject">
-subject
-</dfn>
-is
-any
-node
-in
-a
-<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
-linked
-data
-graph
-</a>
-with
-at
-least
-one
-outgoing
-edge.
-</li>
-<li>
-A
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>
-<em class="rfc2119" title="should">
-should
-</em>
-be
-labeled
-with
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">an
-</ins>
-IRI.
-</li>
-<li>
-A
-<dfn title="property" id="dfn-property">
-property
-</dfn>
-is
-an
-edge
-of
-the
-<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
-linked
-data
-graph
-<del class="diff-old">.
-</del>
-</a>.
-</li>
-<li>
-A
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>
-<del class="diff-old">must
-</del>
-<em class="rfc2119" title="should">
-<ins class="diff-chg">should
-</ins>
-</em>
-be
-labeled
-with
-an
-IRI.
-</li>
-<li>
-An
-<dfn title="object" id="dfn-object">
-object
-</dfn>
-is
-a
-node
-in
-a
-<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
-linked
-data
-graph
-</a>
-with
-at
-least
-one
-incoming
-edge.
-</li>
-<li>
-An
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-<em class="rfc2119" title="may">
-may
-</em>
-be
-labeled
-with
-an
-IRI.
-</li>
-<li>
-An
-IRI
-that
-is
-a
-label
-in
-a
-<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
-linked
-data
-graph
-</a>
-<em class="rfc2119" title="should">
-should
-</em>
-be
-dereferencable
-to
-a
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>
-document
-describing
-the
-labeled
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>,
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-or
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-<del class="diff-old">.
-</del>
-</a>.
-</li>
-<li>
-A
-<dfn title="literal" id="dfn-literal">
-literal
-</dfn>
-is
-an
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-with
-a
-label
-that
-is
-not
-an
-IRI
-</li>
-</ol>
-<p>
-Note
-that
-the
-definition
-for
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>
-above
-is
-silent
-on
-the
-topic
-of
-unlabeled
-nodes.
-Unlabeled
-nodes
-are
-not
-considered
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>.
-However,
-this
-specification
-allows
-for
-the
-expression
-of
-unlabled
-nodes,
-as
-most
-graph-based
-data
-sets
-on
-the
-Web
-contain
-a
-number
-of
-associated
-nodes
-that
-are
-not
-named
-and
-thus
-are
-not
-directly
-de-referenceable.
-</p>
-</div>
-<div id="linking-data" class="section">
-<h3>
-<span class="secno">
-2.3
-</span>
-Linking
-Data
-</h3>
-<p>
-An
-Internationalized
-Resource
-Identifier
-(
-<dfn title="IRI" id="dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>
-),
-as
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-],
-is
-a
-mechanism
-for
-representing
-unique
-identifiers
-on
-the
-web.
-In
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>,
-an
-IRI
-is
-commonly
-used
-for
-expressing
-a
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>,
-a
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>
-or
-an
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>.
-</p>
-<p>
-JSON-LD
-defines
-a
-mechanism
-to
-map
-JSON
-values
-to
-IRIs.
-This
-does
-not
-mean
-that
-JSON-LD
-requires
-every
-key
-or
-value
-to
-be
-an
-IRI,
-but
-rather
-ensures
-that
-keys
-and
-values
-can
-be
-mapped
-to
-IRIs
-if
-the
-developer
-so
-desires
-to
-transform
-their
-data
-into
-Linked
-Data.
-There
-are
-a
-few
-techniques
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-Linked
-Data
-for
-the
-Web.
-JSON-LD
-formalizes
-those
-techniques.
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-markup
-as
-the
-example
-for
-the
-rest
-of
-this
-section:
-</p>
-<pre class="example">
-{
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-</div>
-<div id="the-context" class="section">
-<h3>
-<span class="secno">
-2.4
-</span>
-The
-Context
-</h3>
-<p>
-In
-JSON-LD,
-a
-context
-is
-used
-to
-allow
-developers
-to
-map
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-to
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s.
-A
-<dfn title="term" id="dfn-term">
-term
-</dfn>
-is
-a
-short
-word
-that
-<em class="rfc2119" title="may">
-may
-</em>
-be
-expanded
-to
-an
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>.
-The
-semantic
-web,
-just
-like
-the
-document-based
-web,
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-mean
-something
-that
-may
-be
-of
-use
-to
-other
-developers.
-For
-example,
-the
-term
-<code>
-name
-</code>
-may
-map
-directly
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-allows
-JSON-LD
-documents
-to
-be
-constructed
-using
-the
-common
-JSON
-practice
-of
-simple
-name/value
-pairs
-while
-ensuring
-that
-the
-data
-is
-useful
-outside
-of
-the
-database
-or
-page
-in
-which
-it
-resides.
-</p>
-<p>
-These
-Linked
-Data
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-are
-typically
-collected
-in
-a
-context
-and
-then
-used
-by
-adding
-a
-single
-line
-to
-the
-JSON
-markup
-above:
-</p>
-<pre class="example">
-{
-  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-<p>
-The
-addition
-above
-transforms
-the
-previous
-JSON
-document
-into
-a
-JSON
-document
-with
-added
-semantics
-because
-the
-<code>
-@context
-</code>
-specifies
-how
-the
-<strong>
-name
-</strong>,
-<strong>
-homepage
-</strong>,
-and
-<strong>
-avatar
-</strong>
-terms
-map
-to
-IRIs.
-Mapping
-those
-keys
-to
-IRIs
-gives
-the
-data
-global
-context.
-If
-two
-developers
-use
-the
-same
-IRI
-to
-describe
-a
-property,
-they
-are
-more
-than
-likely
-expressing
-the
-same
-concept.
-This
-allows
-both
-developers
-to
-re-use
-each
-others
-data
-without
-having
-to
-agree
-to
-how
-their
-data
-will
-inter-operate
-on
-a
-site-by-site
-basis.
-</p>
-<p>
-The
-semantic
-web
-uses
-a
-special
-type
-of
-document
-called
-a
-<em>
-Web
-Vocabulary
-</em>
-to
-define
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s.
-A
-context
-is
-a
-type
-of
-Web
-vocabulary.
-Typically,
-these
-Web
-Vocabulary
-documents
-have
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-es
-associated
-with
-them
-and
-contain
-a
-number
-of
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-declarations.
-A
-<dfn title="prefix" id="dfn-prefix">
-prefix
-</dfn>,
-like
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>,
-is
-a
-short
-word
-that
-expands
-to
-a
-Web
-Vocabulary
-IRI.
-<a class="tref internalDFN" title="Prefix" href="#dfn-prefix">
-Prefix
-</a>
-es
-are
-helpful
-when
-a
-developer
-wants
-to
-mix
-multiple
-vocabularies
-together
-in
-a
-context,
-but
-does
-not
-want
-to
-go
-to
-the
-trouble
-of
-defining
-every
-single
-term
-in
-every
-single
-vocabulary.
-Some
-Web
-Vocabularies
-may
-have
-10-20
-terms
-defined.
-If
-a
-developer
-wants
-to
-use
-3-4
-different
-vocabularies,
-the
-number
-of
-terms
-that
-would
-have
-to
-be
-declared
-in
-a
-single
-context
-would
-become
-quite
-large.
-To
-reduce
-the
-number
-of
-different
-terms
-that
-must
-be
-defined,
-JSON-LD
-also
-allows
-prefixes
-to
-be
-used
-to
-compact
-IRIs.
-</p>
-<p>
-</p>
-<p>
-For
-example,
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/
-</code>
-specifies
-a
-Web
-Vocabulary
-which
-may
-be
-represented
-using
-the
-<code>
-foaf
-</code>
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>.
-The
-<code>
-foaf
-</code>
-Web
-Vocabulary
-contains
-a
-term
-called
-<strong>
-name
-</strong>.
-If
-you
-join
-the
-<code>
-foaf
-</code>
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-with
-the
-<strong>
-name
-</strong>
-suffix,
-you
-can
-build
-a
-compact
-IRI
-that
-will
-expand
-out
-into
-an
-absolute
-IRI
-for
-the
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-vocabulary
-term.
-That
-is,
-the
-compact
-IRI,
-or
-short-form,
-is
-<code>
-foaf:name
-</code>
-and
-the
-expanded-form
-is
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-vocabulary
-term
-is
-used
-to
-specify
-a
-person's
-name.
-</p>
-<p>
-Developers,
-and
-machines,
-are
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-WordNet
-today
-to
-see
-the
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
-definition
-</a>
-of
-words
-in
-the
-English
-language.
-Developers
-and
-machines
-need
-the
-same
-sort
-of
-dictionary
-of
-terms.
-IRIs
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-The
-context
-provides
-a
-collection
-of
-vocabulary
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-es
-that
-can
-be
-used
-to
-expand
-JSON
-keys
-and
-values
-into
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s.
-</p>
-<div id="inside-a-context" class="section">
-<h4>
-<span class="secno">
-2.4.1
-</span>
-Inside
-a
-Context
-</h4>
-<p>
-In
-the
-previous
-section,
-the
-developer
-used
-the
-<code>
-@context
-</code>
-keyword
-to
-pull
-in
-an
-external
-context.
-That
-context
-document,
-if
-de-referenced,
-would
-look
-something
-like
-this:
-</p>
-<pre class="example">
-{
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-}
-</pre>
-<p>
-A
-JSON-LD
-context
-document
-is
-a
-simple
-mapping
-from
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-es
-to
-expanded
-values
-such
-as
-IRIs
-or
-keywords.
-Contexts
-may
-also
-contain
-datatype
-information
-for
-certain
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-as
-well
-as
-other
-processing
-instructions
-for
-the
-JSON-LD
-processor.
-</p>
-<p>
-Contexts
-may
-be
-specified
-in-line.
-This
-ensures
-that
-JSON-LD
-documents
-can
-be
-processed
-when
-a
-JSON-LD
-processor
-does
-not
-have
-access
-to
-the
-Web.
-</p>
-<p>
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-This
-means
-that
-developers
-can
-also
-specify
-a
-context
-for
-JSON
-data
-in
-an
-out-of-band
-fashion
-via
-the
-API.
-The
-API
-is
-described
-later
-in
-this
-document.
-A
-JSON-LD
-aware
-Web
-Service
-<em class="rfc2119" title="may">
-may
-</em>
-also
-define
-a
-context
-that
-will
-be
-pre-loaded
-for
-all
-calls
-to
-the
-service.
-This
-allows
-services
-that
-have
-previously
-been
-publishing
-and
-receiving
-JSON
-data
-to
-accept
-JSON-LD
-data
-without
-requiring
-client
-software
-to
-change.
-</p>
-</div>
-</div>
-<div id="from-json-to-json-ld" class="section">
-<h3>
-<span class="secno">
-2.5
-</span>
-From
-JSON
-to
-JSON-LD
-</h3>
-<p>
-If
-a
-set
-of
-terms
-such
-as,
-<strong>
-name
-</strong>,
-<strong>
-homepage
-</strong>,
-and
-<strong>
-avatar
-</strong>,
-are
-defined
-in
-a
-context,
-and
-that
-context
-is
-used
-to
-resolve
-the
-names
-in
-JSON
-objects,
-machines
-are
-able
-to
-automatically
-expand
-the
-terms
-to
-something
-meaningful
-and
-unambiguous,
-like
-this:
-</p>
-<pre class="example">
-{
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-<p>
-Doing
-this
-allows
-JSON
-to
-be
-unambiguously
-machine-readable
-without
-requiring
-developers
-that
-use
-JSON
-to
-drastically
-change
-their
-workflow.
-</p>
-</div>
-</div>
-<div id="basic-concepts" class="section">
-<h2>
-<span class="secno">
-3.
-</span>
-Basic
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-regular
-JSON
-markup
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-As
-more
-JSON-LD
-features
-are
-used,
-more
-semantics
-are
-added
-to
-the
-JSON
-markup.
-</p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-3.1
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>
-s
-and
-many
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-are
-named.
-IRIs
-can
-be
-expressed
-in
-a
-variety
-of
-different
-ways
-in
-JSON-LD.
-</p>
-<ol>
-<li>
-In
-general,
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-in
-the
-key
-position
-in
-<del class="diff-old">an
-associative
-array
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a>
-that
-have
-a
-mapping
-to
-an
-IRI
-or
-another
-key
-in
-the
-context
-are
-expanded
-to
-an
-IRI
-by
-JSON-LD
-processors.
-There
-are
-special
-rules
-for
-processing
-keys
-in
-<code>
-@context
-</code>
-and
-when
-dealing
-with
-keys
-that
-start
-with
-the
-<code>
-@subject
-</code>
-character.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-@subject
-</code>,
-if
-it
-is
-a
-<del class="diff-old">string.
-</del>
-<a class="tref internalDFN" title="string" href="#dfn-string">
-<ins class="diff-chg">string
-</ins></a>.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-@type
-</code>.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-the
-<code>
-@iri
-</code>
-keyword.
-</li>
-<li>
-An
-IRI
-is
-generated
-when
-there
-are
-<code>
-@coerce
-</code>
-rules
-in
-effect
-for
-a
-key
-named
-<code>
-@iri
-</code>.
-</li>
-</ol>
-<p>
-IRIs
-can
-be
-expressed
-directly
-in
-the
-key
-position
-like
-so:
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-In
-the
-example
-above,
-the
-key
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-is
-interpreted
-as
-an
-IRI,
-as
-opposed
-to
-being
-interpreted
-as
-a
-<del class="diff-old">string..
-</del>
-<ins class="diff-chg">string.
-</ins>
-</p>
-<p>
-Term
-expansion
-occurs
-for
-IRIs
-if
-a
-term
-is
-defined
-within
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>:
-</p>
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-<a class="tref internalDFN" title="Prefix" href="#dfn-prefix">
-Prefix
-</a>
-es
-are
-expanded
-when
-used
-in
-keys:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  ""},
-</del>
-<ins class="diff-chg">  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-</ins>
-...
-<del class="diff-old">  "": "Manu Sporny",
-</del>
-<ins class="diff-chg">  "<span class="diff">name</span>": "Manu Sporny",
-</ins>
-...
-}
-</pre>
-<p>
-<code>
-<del class="diff-old">foaf:name
-</del>
-<ins class="diff-chg">name
-</ins>
-</code>
-above
-will
-automatically
-expand
-out
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-</p>
-<p>
-An
-IRI
-is
-generated
-when
-a
-value
-is
-associated
-with
-a
-key
-using
-the
-<code>
-@iri
-</code>
-keyword:
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "foaf:homepage": { "": "http://manu.sporny.org" }
-</del>
-<ins class="diff-chg">  "homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-</ins>
-...
-}
-</pre>
-<p>
-If
-type
-coercion
-rules
-are
-specified
-in
-the
-<code>
-@context
-</code>
-for
-a
-particular
-vocabulary
-term,
-an
-IRI
-is
-generated:
-</p>
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  {
-    ...
-    "@coerce": 
-    {
-<del class="diff-old">      "@iri": "foaf:homepage"
-</del>
-<ins class="diff-chg">      "@iri": "homepage"
-</ins>
-    }
-  }</span>
-...
-<del class="diff-old">  "foaf:homepage": "http://manu.sporny.org/",
-</del>
-<ins class="diff-chg">  "homepage": "http://manu.sporny.org/",
-</ins>
-...
-}
-</pre>
-<p>
-Even
-though
-the
-value
-<code>
-http://manu.sporny.org/
-</code>
-is
-a
-<del class="diff-old">string,
-</del>
-<a class="tref internalDFN" title="string" href="#dfn-string">
-<ins class="diff-chg">string
-</ins></a>,
-the
-type
-coercion
-rules
-will
-transform
-the
-value
-into
-an
-IRI
-when
-processed
-by
-a
-JSON-LD
-Processor
-</p>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-3.2
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-<ins class="diff-new">IRI
-</ins></a><ins class="diff-new">
-s
-are
-a
-fundamental
-concept
-of
-Linked
-Data,
-and
-nodes
-should
-have
-a
-de-referencable
-identifier
-used
-to
-name
-and
-locate
-them.
-For
-nodes
-to
-be
-truely
-linked,
-de-referencing
-the
-identifier
-should
-result
-in
-a
-representation
-of
-that
-node.
-Associating
-an
-IRI
-with
-a
-node
-tells
-an
-application
-that
-the
-returned
-document
-contains
-a
-description
-of
-of
-the
-identifier
-requested.
-</ins></p><p><ins class="diff-new">
-JSON-LD
-documents
-may
-also
-contain
-descriptions
-of
-other
-nodes,
-so
-it
-is
-necessary
-to
-be
-able
-to
-uniquely
-identify
-each
-node
-which
-may
-be
-externally
-referenced.
-</ins></p><p>
-A
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>
-<ins class="diff-new">of
-a
-node
-</ins>
-is
-declared
-using
-the
-<code>
-@subject
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-property,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-the
-IRI
-<code>
-http://example.org/people#joebob
-</code>.
-</p>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-3.3
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-@type
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-<del class="diff-old">type-url).
-</del>
-<ins class="diff-chg">type-uri).
-</ins></p><p><ins class="diff-chg">
-To
-be
-Linked
-Data,
-types
-should
-be
-uniquely
-identified
-by
-an
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
-IRI
-</ins></a>.
-</p>
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-if
-the
-JSON-LD
-document
-is
-mapped
-to
-RDF
-(in
-N-Triples
-notation):
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-</div>
-<div id="strings" class="section">
-<h3>
-<span class="secno">
-3.4
-</span>
-Strings
-</h3>
-<p>
-Regular
-text
-strings,
-also
-<del class="diff-old">refered
-</del>
-<ins class="diff-chg">referred
-</ins>
-to
-as
-<dfn title="plain_literal" id="dfn-plain_literal">
-plain
-literal
-</dfn>
-s,
-are
-easily
-expressed
-using
-regular
-JSON
-<del class="diff-old">strings.
-</del>
-<a class="tref internalDFN" title="string" href="#dfn-string">
-<ins class="diff-chg">string
-</ins></a><ins class="diff-chg">
-s.
-</ins>
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "foaf:name": "",
-</del>
-<ins class="diff-chg">  "name": "<span class="diff">Mark Birbeck</span>",
-</ins>
-...
-}
-</pre>
-</div>
-<div id="string-internationalization" class="section">
-<h3>
-<span class="secno">
-3.5
-</span>
-String
-Internationalization
-</h3>
-<p>
-JSON-LD
-makes
-an
-assumption
-that
-strings
-with
-associated
-language
-encoding
-information
-are
-not
-very
-common
-when
-used
-in
-JavaScript
-and
-Web
-Services.
-Thus,
-it
-takes
-a
-little
-more
-effort
-to
-express
-strings
-with
-associated
-language
-information.
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "foaf:name": 
-</del>
-<ins class="diff-chg">  "name": <span class="diff">
-</ins>
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-for
-<em>
-花澄
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-code
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="datatypes" class="section">
-<h3>
-<span class="secno">
-3.6
-</span>
-Datatypes
-</h3>
-<p>
-A
-value
-with
-an
-associated
-datatype,
-also
-known
-as
-a
-<dfn title="typed_literal" id="dfn-typed_literal">
-typed
-literal
-</dfn>,
-is
-indicated
-by
-associating
-a
-literal
-with
-an
-IRI
-which
-indicates
-the
-typed
-literal's
-datatype.
-Typed
-literals
-may
-be
-expressed
-in
-JSON-LD
-in
-three
-ways:
-</p>
-<ol>
-<li>
-By
-utilizing
-the
-<code>
-@coerce
-</code>
-keyword.
-</li>
-<li>
-By
-utilizing
-the
-expanded
-form
-for
-specifying
-objects.
-</li>
-<li>
-By
-using
-a
-native
-JSON
-datatype.
-</li>
-</ol>
-<p>
-The
-first
-example
-uses
-the
-<code>
-@coerce
-</code>
-keyword
-to
-express
-a
-typed
-literal:
-</p>
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  {
-<del class="diff-old">    "dc":  "http://purl.org/dc/terms/",
-    "xsd": "http://www.w3.org/2001/XMLSchema#"
-</del>
-<ins class="diff-chg">    "modified":  "http://purl.org/dc/terms/modified",
-    "dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
-</ins>
-    "@coerce": 
-    {
-<del class="diff-old">      "xsd:dateTime": "dc:modified"
-</del>
-<ins class="diff-chg">      "dateTime": "modified"
-</ins>
-    }
-  }</span>
-...
-<del class="diff-old">  "dc:modified": "2010-05-29T14:17:39+02:00",
-</del>
-<ins class="diff-chg">  "modified": "2010-05-29T14:17:39+02:00",
-</ins>
-...
-}
-</pre>
-<p>
-The
-second
-example
-uses
-the
-expanded
-form
-for
-specifying
-objects:
-</p>
-<pre class="example">
-{
-...
-<del class="diff-old">  "dc:modified": 
-</del>
-<ins class="diff-chg">  "modified": <span class="diff">
-</ins>
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-<del class="diff-old">    "@datatype": "xsd:dateTime"
-</del>
-<ins class="diff-chg">    "@datatype": "dateTime"
-</ins>
-  }</span>
-...
-}
-</pre>
-<p>
-Both
-examples
-above
-would
-generate
-an
-object
-with
-the
-literal
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-<p>
-The
-third
-example
-uses
-a
-built-in
-native
-JSON
-type,
-a
-<del class="diff-old">number,
-</del>
-<a class="tref internalDFN" title="number" href="#dfn-number">
-<ins class="diff-chg">number
-</ins></a>,
-to
-express
-a
-datatype:
-</p>
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-<del class="diff-old">  "foaf:age": 
-</del>
-<ins class="diff-chg">  "age": <span class="diff">31</span>
-</ins>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple:
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/age&gt; 
-"31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
-.
-</pre>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-3.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-<del class="diff-old">arrays.
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a><ins class="diff-chg">
-s.
-</ins>
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-<del class="diff-old">array.
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>.
-</p>
-<p class="note">
-In
-JSON-LD,
-Multiple
-objects
-on
-a
-property
-are
-not
-ordered.
-This
-is
-because
-typically
-graphs
-are
-not
-inherently
-ordered
-data
-structures.
-To
-see
-more
-on
-creating
-ordered
-collections
-in
-JSON-LD,
-see
-<a href="#lists">
-Lists
-</a>.
-</p>
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-<del class="diff-old">  "foaf:nick": ,
-</del>
-<ins class="diff-chg">  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-</ins>
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-"jaybee"
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-3.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s
-may
-also
-be
-expressed
-using
-the
-expanded
-form
-for
-objects:
-</p>
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/articles/8",
-<del class="diff-old">  "dcterms:modified": 
-</del>
-<ins class="diff-chg">  "modified": <span class="diff">
-</ins>
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-<del class="diff-old">      "@datatype": "xsd:dateTime"
-</del>
-<ins class="diff-chg">      "@datatype": "dateTime"
-</ins>
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-<del class="diff-old">      "@datatype": "xsd:dateTime"
-</del>
-<ins class="diff-chg">      "@datatype": "dateTime"
-</ins>
-    }
-  ]</span>
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="expansion" class="section">
-<h3>
-<span class="secno">
-3.9
-</span>
-Expansion
-</h3>
-<p>
-Expansion
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document
-and
-applying
-a
-context
-such
-that
-all
-IRI,
-datatypes,
-and
-literal
-values
-are
-expanded
-so
-that
-the
-context
-is
-no
-longer
-necessary.
-JSON-LD
-document
-expansion
-is
-typically
-used
-when
-re-mapping
-JSON-LD
-documents
-to
-application-specific
-JSON
-documents
-or
-as
-a
-part
-of
-the
-<a href="#normalization">
-Normalization
-</a>
-process.
-</p>
-<p>
-For
-example,
-assume
-the
-following
-JSON-LD
-input
-document:
-</p>
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}
-</pre>
-<p>
-Running
-the
-JSON-LD
-Expansion
-algorithm
-against
-the
-JSON-LD
-input
-document
-provided
-above
-would
-result
-in
-the
-following
-output:
-</p>
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}
-</pre>
-</div>
-<div id="compaction" class="section">
-<h3>
-<span class="secno">
-3.10
-</span>
-Compaction
-</h3>
-<p>
-Compaction
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document
-and
-applying
-a
-context
-such
-that
-the
-most
-compact
-form
-of
-the
-document
-is
-generated.
-JSON
-is
-typically
-expressed
-in
-a
-very
-compact,
-key-value
-format.
-That
-is,
-full
-IRIs
-are
-rarely
-used
-as
-keys.
-At
-times,
-a
-JSON-LD
-document
-may
-be
-received
-that
-is
-not
-in
-its
-most
-compact
-form.
-JSON-LD,
-via
-the
-API,
-provides
-a
-way
-to
-compact
-a
-JSON-LD
-document.
-</p>
-<p>
-For
-example,
-assume
-the
-following
-JSON-LD
-input
-document:
-</p>
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}
-</pre>
-<p>
-Additionally,
-assume
-the
-following
-developer-supplied
-JSON-LD
-context:
-</p>
-<pre class="example">
-{
-   "name": "http://xmlns.com/foaf/0.1/name",
-   "homepage": "http://xmlns.com/foaf/0.1/homepage",
-   "@coerce": 
-   {
-      "@iri": ["homepage"]
-   }
-}
-</pre>
-<p>
-Running
-the
-JSON-LD
-Compaction
-algorithm
-given
-the
-context
-supplied
-above
-against
-the
-JSON-LD
-input
-document
-provided
-above
-would
-result
-in
-the
-following
-output:
-</p>
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}
-</pre>
-<p>
-The
-compaction
-algorithm
-also
-enables
-the
-developer
-to
-map
-any
-expanded
-format
-into
-an
-application-specific
-compacted
-format.
-While
-the
-context
-provided
-above
-mapped
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-to
-<strong>
-name
-</strong>,
-it
-could
-have
-also
-mapped
-it
-to
-any
-arbitrary
-string
-provided
-by
-the
-developer.
-</p>
-</div>
-<div id="framing" class="section">
-<h3>
-<span class="secno">
-3.11
-</span>
-Framing
-</h3>
-<p>
-A
-JSON-LD
-document
-is
-a
-representation
-of
-a
-directed
-graph.
-A
-single
-directed
-graph
-can
-have
-many
-different
-serializations,
-each
-expressing
-exactly
-the
-same
-information.
-Developers
-typically
-work
-with
-trees,
-<del class="diff-old">also
-called
-associative
-arrays,
-when
-dealing
-with
-JSON.
-</del>
-<ins class="diff-chg">represented
-as
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a><ins class="diff-chg">
-s.
-</ins>
-While
-mapping
-a
-graph
-to
-a
-tree
-can
-be
-done,
-the
-layout
-of
-the
-end
-result
-must
-be
-specified
-in
-advance.
-A
-<dfn title="Frame" id="dfn-frame">
-Frame
-</dfn>
-can
-be
-used
-by
-a
-developer
-on
-a
-JSON-LD
-document
-to
-specify
-a
-deterministic
-layout
-for
-a
-graph.
-</p>
-<p>
-Framing
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document,
-which
-expresses
-a
-graph
-of
-information,
-and
-applying
-a
-specific
-graph
-layout
-(called
-a
-<a class="tref internalDFN" title="Frame" href="#dfn-frame">
-Frame
-</a>
-).
-</p>
-<p>
-The
-JSON-LD
-document
-below
-expresses
-a
-library,
-a
-book
-and
-a
-chapter:
-</p>
-<pre class="example">
-{
-<del class="diff-old">   "@coerce": {
-    "dc":  "http://purl.org/dc/terms/",
-    "ex":  "http://example.org/"
-   },
-   "@subject": 
-   [{
-      "@subject": "http://example.org/library",
-      "@type": "ex:Library",
-      "ex:contains": "http://example.org/library/the-republic"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": "http://example.org/library/the-republic#introduction"
-   }, 
-   {
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": "ex:Chapter",
-      "dc:description": "An introductory chapter on The Republic.",
-      "dc:title": "The Introduction"
-   }],
-   "@context": 
-   {
-      "@coerce": 
-      {
-         "@iri": "ex:contains"
-      },
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   }
-</del>
-<ins class="diff-chg">  "@coerce": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title",
-    "@coerce": 
-    {
-      "@iri": "ex:contains"
-    },
-  },
-  "@subject": 
-  [{
-    "@subject": "http://example.com/library",
-    "@type": "Library",
-    "contains": "http://example.org/library/the-republic"
-  }, 
-  {
-    "@subject": "http://example.org/library/the-republic",
-    "@type": "Book",
-    "creator": "Plato",
-    "title": "The Republic",
-    "contains": "http://example.org/library/the-republic#introduction"
-  }, 
-  {
-    "@subject": "http://example.org/library/the-republic#introduction",
-    "@type": "Chapter",
-    "description": "An introductory chapter on The Republic.",
-    "title": "The Introduction"
-  }]
-</ins>
-}
-</pre>
-<p>
-Developers
-typically
-like
-to
-operate
-on
-items
-in
-a
-hierarchical,
-tree-based
-fashion.
-Ideally,
-a
-developer
-would
-want
-the
-data
-above
-sorted
-into
-top-level
-libraries,
-then
-the
-books
-that
-are
-contained
-in
-each
-library,
-and
-then
-the
-chapters
-contained
-in
-each
-book.
-To
-achieve
-that
-layout,
-the
-developer
-can
-define
-the
-following
-<a class="tref internalDFN" title="frame" href="#dfn-frame">
-frame
-</a>:
-</p>
-<pre class="example">
-{
-<del class="diff-old">   "@context": {
-      "dc": "http://purl.org/dc/elements/1.1/",
-      "ex": "http://example.org/vocab#"
-   },
-   "@type": "ex:Library",
-   "ex:contains": {
-      "@type": "ex:Book",
-      "ex:contains": {
-         "@type": "ex:Chapter"
-      }
-   }
-</del>
-<ins class="diff-chg">  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title"
-  },
-  "@type": "Library",
-  "contains": {
-    "@type": "Book",
-    "contains": {
-      "@type": "Chapter"
-    }
-  }
-</ins>
-}
-</pre>
-<p>
-When
-the
-framing
-algorithm
-is
-run
-against
-the
-previously
-defined
-JSON-LD
-document,
-paired
-with
-the
-<a class="tref internalDFN" title="frame" href="#dfn-frame">
-frame
-</a>
-above,
-the
-following
-JSON-LD
-document
-is
-the
-end
-result:
-</p>
-<pre class="example">
-{
-<del class="diff-old">   "@context": 
-   {
-      "ex": "http://example.org/vocab#",
-      "dc":  "http://purl.org/dc/terms/",
-   }
-   "@subject": "http://example.org/library",
-   "@type": "ex:Library",
-   "ex:contains": 
-   {
-      "@subject": "http://example.org/library/the-republic",
-      "@type": "ex:Book",
-      "dc:creator": "Plato",
-      "dc:title": "The Republic",
-      "ex:contains": 
-      {
-         "@subject": "http://example.org/library/the-republic#introduction",
-         "@type": "ex:Chapter",
-         "dc:description": "An introductory chapter on The Republic.",
-         "dc:title": "The Introduction"
-      },
-   },
-</del>
-<ins class="diff-chg">  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title"
-  },
-  "@subject": "http://example.org/library",
-  "@type": "Library",
-  "contains": {
-</ins>    <span class="diff">"@subject": "http://example.org/library/the-republic",</span><ins class="diff-chg">
-    "@type": "Book",
-</ins>    <span class="diff">"creator": "Plato",</span>    <span class="diff">"title": "The Republic",</span><ins class="diff-chg">
-    "contains": {
-</ins>      <span class="diff">"@subject": "http://example.org/library/the-republic#introduction",</span><ins class="diff-chg">
-      "@type": "Chapter",
-</ins>      <span class="diff">"description": "An introductory chapter on The Republic.",</span>      <span class="diff">"title": "The Introduction"</span><ins class="diff-chg">
-    },
-  },
-</ins>
-}
-</pre>
-<p>
-The
-JSON-LD
-framing
-algorithm
-allows
-developers
-to
-query
-by
-example
-and
-force
-a
-specific
-tree
-layout
-to
-a
-JSON-LD
-document.
-</p>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-4.
-</span>
-Advanced
-Concepts
-</h2>
-<p>
-JSON-LD
-has
-a
-number
-of
-features
-that
-provide
-functionality
-above
-and
-beyond
-the
-core
-functionality
-described
-above.
-The
-following
-sections
-outline
-the
-features
-that
-are
-specific
-to
-JSON-LD.
-</p>
-<div id="curies" class="section">
-<h3>
-<span class="secno">
-4.1
-</span>
-<ins class="diff-new">CURIEs
-</ins></h3><p><ins class="diff-new">
-Concepts
-in
-Linked
-Data
-documents
-may
-draw
-on
-a
-number
-of
-different
-vocabularies.
-The
-@vocab
-mechanism
-is
-useful
-to
-easily
-associate
-types
-and
-properties
-with
-a
-specific
-vocabulary,
-but
-when
-many
-vocabularies
-are
-used,
-this
-becomes
-difficult.
-Consider
-the
-following
-example:
-</ins></p>  <pre class="example"><ins class="diff-new">
-{
-  "@context": {
-</ins>    <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>    <span class="diff">"ex": "http://example.org/vocab#"</span><ins class="diff-new">
-  },
-  "@subject": "http://example.org/library",
-  "@type": <span class="diff">"ex:Library"</span>,
-</ins>  <span class="diff">"ex:contains"</span>: {<ins class="diff-new">
-    "@subject": "http://example.org/library/the-republic",
-    "@type": <span class="diff">"ex:Book"</span>,
-</ins>    <span class="diff">"dc:creator"</span>: "Plato",    <span class="diff">"dc:title"</span>: "The Republic",    <span class="diff">"ex:contains"</span>: {<ins class="diff-new">
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": <span class="diff">"ex:Chapter"</span>,
-</ins>      <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",      <span class="diff">"dc:title"</span>: "The Introduction"<ins class="diff-new">
-    },
-  },
-}
-</ins></pre><p><ins class="diff-new">
-In
-this
-example,
-two
-different
-vocabularies
-are
-identified
-with
-prefixes,
-and
-used
-as
-type
-and
-property
-values
-using
-the
-CURIE
-notation.
-</ins></p><p><ins class="diff-new">
-A
-</ins><dfn title="CURIE" id="dfn-curie"><ins class="diff-new">
-CURIE
-</ins></dfn><ins class="diff-new">
-is
-a
-compact
-way
-of
-describing
-an
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
-IRI
-</ins></a>.<ins class="diff-new">
-The
-term
-actually
-comes
-from
-Compact
-URI.
-Generally,
-a
-CURIE
-is
-composed
-of
-a
-</ins><em><ins class="diff-new">
-prefix
-</ins></em><ins class="diff-new">
-and
-a
-</ins><em><ins class="diff-new">
-suffix
-</ins></em><ins class="diff-new">
-separated
-by
-a
-':'.
-In
-JSON-LD,
-the
-prefix
-may
-be
-the
-empty
-string,
-denoting
-the
-</ins><dfn title="default_prefix" id="dfn-default_prefix"><ins class="diff-new">
-default
-prefix
-</ins></dfn>.</p><p><ins class="diff-new">
-CURIEs
-are
-defined
-more
-formally
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-new">
-RDFA-CORE
-</ins></a></cite><ins class="diff-new">
-]
-</ins><cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies"><ins class="diff-new">
-section
-6
-"CURIE
-Syntax
-Definition"
-</ins></a></cite>.</p></div><div id="automatic-typing" class="section"><h3><span class="secno"><ins class="diff-new">
-4.2
-</ins></span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-doubles,
-integers,
-and
-boolean
-values.
-As
-demonstrated
-below,
-JSON-LD
-utilizes
-that
-information
-to
-create
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s:
-</p>
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}
-</pre>
-<p class="note">
-When
-dealing
-with
-a
-number
-of
-modern
-programming
-languages,
-including
-JavaScript
-ECMA-262,
-there
-is
-no
-distinction
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>
-values.
-That
-is,
-the
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>
-<code>
-5.3
-</code>
-and
-the
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>
-<code>
-5.3e0
-</code>
-are
-treated
-as
-if
-they
-were
-the
-same.
-When
-converting
-from
-JSON-LD
-to
-a
-language-native
-format
-and
-back,
-datatype
-information
-is
-lost
-in
-a
-number
-of
-these
-languages.
-Thus,
-one
-could
-say
-that
-<code>
-5.3
-</code>
-is
-a
-<strong>
-xsd:decimal
-</strong>
-and
-<code>
-5.3e0
-</code>
-is
-an
-<strong>
-xsd:double
-</strong>
-in
-JSON-LD,
-but
-when
-both
-values
-are
-converted
-to
-a
-language-native
-format
-the
-datatype
-difference
-between
-the
-two
-is
-lost
-because
-the
-machine-level
-representation
-will
-almost
-always
-be
-a
-<strong>
-double
-</strong>.
-Implementers
-should
-be
-aware
-of
-this
-potential
-round-tripping
-issue
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>.
-Specifically
-objects
-with
-a
-datatype
-of
-<strong>
-xsd:decimal
-</strong>
-<em class="rfc2119" title="must not">
-must
-not
-</em>
-be
-converted
-to
-a
-language
-native
-type.
-</p>
-</div>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.2
-</del>
-<ins class="diff-chg">4.3
-</ins>
-</span>
-Type
-Coercion
-</h3>
-<p>
-JSON-LD
-supports
-the
-coercion
-of
-values
-to
-particular
-data
-types.
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-the
-incoming
-or
-outgoing
-types
-to
-the
-proper
-data
-type
-based
-on
-a
-mapping
-of
-data
-type
-IRIs
-to
-property
-types.
-Using
-type
-coercion,
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-s,
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s
-and
-IRIs.
-</p>
-<pre class="example">
-{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-        "@iri": "homepage"
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-<div id="chaining" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.3
-</del>
-<ins class="diff-chg">4.4
-</ins>
-</span>
-Chaining
-</h3>
-<p>
-Object
-<dfn title="chaining" id="dfn-chaining">
-chaining
-</dfn>
-is
-a
-JSON-LD
-feature
-that
-allows
-an
-author
-to
-use
-the
-definition
-of
-JSON-LD
-objects
-as
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>
-values.
-This
-is
-a
-commonly
-used
-mechanism
-for
-creating
-a
-parent-child
-relationship
-between
-two
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>
-s.
-</p>
-<p>
-The
-example
-shows
-an
-two
-subjects
-related
-by
-a
-property
-from
-the
-first
-subject:
-</p>
-  <pre class="example">
-{
-...
-<del class="diff-old">  "foaf:name": "Manu Sporny",
-  "": {
-    "",
-    "",
-</del>
-<ins class="diff-chg">  "name": "Manu Sporny",
-  "<span class="diff">knows</span>": {
-    "<span class="diff">@type</span>": "<span class="diff">Person</span>",
-    "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
-</ins>
-  }
-...
-}
-</pre>
-<p>
-An
-object
-definition,
-like
-the
-one
-used
-above,
-<em class="rfc2119" title="may">
-may
-</em>
-be
-used
-as
-a
-JSON
-value
-at
-any
-point
-in
-JSON-LD.
-</p>
-</div>
-<div id="identifying-unlabeled-nodes" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.4
-</del>
-<ins class="diff-chg">4.5
-</ins>
-</span>
-Identifying
-Unlabeled
-Nodes
-</h3>
-<p>
-At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-type
-of
-node
-is
-called
-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)
-<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
-CURIE
-</a>
-prefix.
-</p>
-<pre class="example">
-{
-...
-  "@subject": "<span class="diff">_:foo</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<code>
-_:foo
-</code>,
-which
-can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-unlabeled
-node.
-This
-practice,
-however,
-is
-usually
-frowned
-upon
-when
-generating
-Linked
-Data.
-If
-a
-developer
-finds
-that
-they
-refer
-to
-the
-unlabeled
-node
-more
-than
-once,
-they
-should
-consider
-naming
-the
-node
-using
-a
-resolve-able
-IRI.
-</p>
-</div>
-<div id="overriding-keywords" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.5
-</del>
-<ins class="diff-chg">4.6
-</ins>
-</span>
-Overriding
-Keywords
-</h3>
-<p>
-JSON-LD
-allows
-all
-of
-the
-syntax
-keywords,
-except
-for
-<code>
-@context
-</code>,
-to
-be
-overridden.
-This
-feature
-allows
-more
-legacy
-JSON
-content
-to
-be
-supported
-by
-JSON-LD.
-It
-also
-allows
-developers
-to
-design
-domain-specific
-implementations
-using
-only
-the
-JSON-LD
-context.
-</p>
-<pre class="example">
-{
-  "@context": 
-  {  
-     <span class="diff">"url": "@subject"</span>,
-     <span class="diff">"a": "@type"</span>,
-     "name": "http://schema.org/name"
-  },
-  "url": "http://example.com/about#gregg",
-  "a": "http://schema.org/Person",
-  "name": "Gregg Kellogg"
-}
-</pre>
-<p>
-In
-the
-example
-above,
-the
-<code>
-@subject
-</code>
-and
-<code>
-@type
-</code>
-keywords
-have
-been
-overridden
-by
-<strong>
-url
-</strong>
-and
-<strong>
-a
-</strong>,
-respectively.
-</p>
-</div>
-<div id="normalization" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">4.6
-</del>
-<ins class="diff-chg">4.7
-</ins>
-</span>
-Normalization
-</h3>
-<p>
-Normalization
-is
-the
-process
-of
-taking
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-and
-performing
-a
-deterministic
-transformation
-on
-that
-input
-that
-results
-in
-a
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-that
-any
-conforming
-JSON-LD
-processor
-would
-have
-generated
-given
-the
-same
-input.
-The
-problem
-is
-a
-fairly
-difficult
-technical
-problem
-to
-solve
-because
-it
-requires
-a
-directed
-graph
-to
-be
-ordered
-into
-a
-set
-of
-nodes
-and
-edges
-in
-a
-deterministic
-way.
-This
-is
-easy
-to
-do
-when
-all
-of
-the
-nodes
-have
-unique
-names,
-but
-very
-difficult
-to
-do
-when
-some
-of
-the
-nodes
-are
-not
-labeled.
-</p>
-<p>
-Normalization
-is
-useful
-when
-comparing
-two
-graphs
-against
-one
-another,
-when
-generating
-a
-detailed
-list
-of
-differences
-between
-two
-graphs,
-and
-when
-generating
-a
-cryptographic
-digital
-signature
-for
-information
-contained
-in
-a
-graph
-or
-when
-generating
-a
-hash
-of
-the
-information
-contained
-in
-a
-graph.
-</p>
-<p>
-The
-example
-below
-is
-an
-un-normalized
-JSON-LD
-document:
-</p>
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-      "@coerce": 
-      {
-         "@iri": ["homepage"]
-      }
-   }
-}
-</pre>
-<p>
-The
-example
-below
-is
-the
-normalized
-form
-of
-the
-JSON-LD
-document
-above:
-</p>
-<p class="note">
-Whitespace
-is
-used
-below
-to
-aid
-readability.
-The
-normalization
-algorithm
-for
-JSON-LD
-remove
-all
-unnecessary
-whitespace
-in
-the
-fully
-normalized
-form.
-</p>
-<pre class="example">
-[{
-    "@subject": 
-    {
-        "@iri": "_:c14n0"
-    },
-    "http://xmlns.com/foaf/0.1/homepage": 
-    {
-        "@iri": "http://manu.sporny.org/"
-    },
-    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
-}]
-</pre>
-<p>
-Notice
-how
-all
-of
-the
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-have
-been
-expanded
-and
-sorted
-in
-alphabetical
-order.
-Also,
-notice
-how
-the
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>
-has
-been
-labeled
-with
-a
-<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">
-blank
-node
-identifier
-</a>.
-Normalization
-ensures
-that
-any
-arbitrary
-graph
-containing
-exactly
-the
-same
-information
-would
-be
-normalized
-to
-exactly
-the
-same
-form
-shown
-above.
-</p>
-</div>
-</div>
-<div id="the-application-programming-interface" class="section">
-<h2>
-<span class="secno">
-5.
-</span>
-<ins class="diff-new">The
-Application
-Programming
-Interface
-</ins></h2><p><ins class="diff-new">
-This
-API
-provides
-a
-clean
-mechanism
-that
-enables
-developers
-to
-convert
-JSON-LD
-data
-into
-a
-a
-variety
-of
-output
-formats
-that
-are
-easier
-to
-work
-with
-in
-various
-programming
-languages.
-If
-an
-API
-is
-provided
-in
-a
-programming
-environment,
-the
-entire
-API
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-implemented.
-</ins></p><div id="jsonldprocessor" class="section"><h3><span class="secno"><ins class="diff-new">
-5.1
-</ins></span><ins class="diff-new">
-JSONLDProcessor
-</ins></h3><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-new">
-interface <span class="idlInterfaceID">JSONLDProcessor</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-expand-object-object-input-JSONLDProcessorCallback-callback">expand</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-compact-object-object-input-object-context-JSONLDProcessorCallback-callback">compact</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">context</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-frame-object-object-input-object-frame-object-options-JSONLDProcessorCallback-callback">frame</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">frame</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-normalize-object-object-input-JSONLDProcessorCallback-callback">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-triples-object-object-input-JSONLDTripleCallback-tripleCallback-JSONLDProcessorCallback-parserCallback">triples</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a href="#idl-def-JSONLDTripleCallback" class="idlType"><code>JSONLDTripleCallback</code></a></span> <span class="idlParamName">tripleCallback</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">parserCallback</span></span>);</span><ins class="diff-new">
-};</span>
-</ins></pre><div id="methods" class="section"><h4><span class="secno"><ins class="diff-new">
-5.1.1
-</ins></span><ins class="diff-new">
-Methods
-</ins></h4><dl class="methods"><dt id="widl-JSONLDProcessor-compact-object-object-input-object-context-JSONLDProcessorCallback-callback"><code><ins class="diff-new">
-compact
-</ins></code></dt><dd><a href="#compaction"><ins class="diff-new">
-Compacts
-</ins></a><ins class="diff-new">
-the
-given
-</ins><code><ins class="diff-new">
-input
-</ins></code><ins class="diff-new">
-according
-to
-the
-steps
-in
-the
-</ins><a href="#compaction-algorithm"><ins class="diff-new">
-Compaction
-Algorithm
-</ins></a>.<ins class="diff-new">
-The
-</ins><code><ins class="diff-new">
-input
-</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-copied,
-compacted
-and
-returned
-if
-there
-are
-no
-errors.
-If
-the
-compaction
-fails,
-</ins><code><ins class="diff-new">
-null
-</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-returned.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-input
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-JSON-LD
-object
-to
-perform
-compaction
-on.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-context
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-base
-context
-to
-use
-when
-compacting
-the
-</ins><code><ins class="diff-new">
-input
-</ins></code>.</td></tr><tr><td class="prmName"><ins class="diff-new">
-callback
-</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
-JSONLDProcessorCallback
-</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-</ins><code><ins class="diff-new">
-input
-</ins></code>.</td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-object
-</ins></a></code></div></dd><dt id="widl-JSONLDProcessor-expand-object-object-input-JSONLDProcessorCallback-callback"><code><ins class="diff-new">
-expand
-</ins></code></dt><dd><a href="#expansion"><ins class="diff-new">
-Expands
-</ins></a><ins class="diff-new">
-the
-given
-</ins><code><ins class="diff-new">
-input
-</ins></code><ins class="diff-new">
-according
-to
-the
-steps
-in
-the
-</ins><a href="#expansion-algorithm"><ins class="diff-new">
-Expansion
-Algorithm
-</ins></a>.<ins class="diff-new">
-The
-</ins><code><ins class="diff-new">
-input
-</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-copied,
-expanded
-and
-returned
-if
-there
-are
-no
-errors.
-If
-the
-expansion
-fails,
-</ins><code><ins class="diff-new">
-null
-</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-returned.
-</ins><div class="issue"><ins class="diff-new">
-How
-do
-we
-generate
-warning
-messages
-during
-this
-process?
-For
-example,
-what
-happens
-when
-a
-key
-that
-doesn't
-have
-a
-mapping
-is
-discovered?
-</ins></div><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-input
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-JSON-LD
-object
-to
-copy
-and
-perform
-the
-expansion
-upon.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-callback
-</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
-JSONLDProcessorCallback
-</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-</ins><code><ins class="diff-new">
-input
-</ins></code>.</td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-object
-</ins></a></code></div></dd><dt id="widl-JSONLDProcessor-frame-object-object-input-object-frame-object-options-JSONLDProcessorCallback-callback"><code><ins class="diff-new">
-frame
-</ins></code></dt><dd><a href="#framing"><ins class="diff-new">
-Frames
-</ins></a><ins class="diff-new">
-the
-given
-</ins><code><ins class="diff-new">
-input
-</ins></code><ins class="diff-new">
-using
-the
-</ins><code><ins class="diff-new">
-frame
-</ins></code><ins class="diff-new">
-according
-to
-the
-steps
-in
-the
-</ins><a href="#framing-algorithm"><ins class="diff-new">
-Framing
-Algorithm
-</ins></a>.<ins class="diff-new">
-The
-</ins><code><ins class="diff-new">
-input
-</ins></code><ins class="diff-new">
-is
-used
-to
-build
-the
-framed
-output
-and
-is
-returned
-if
-there
-are
-no
-errors.
-Exceptions
-are
-thrown
-if
-there
-are
-errors.
-</ins><div class="issue"><ins class="diff-new">
-Define
-what
-the
-exceptions
-are.
-We
-need
-to
-specify
-whether
-or
-not
-we
-want
-exceptions
-thrown,
-or
-errors
-returned
-to
-the
-error
-callback?
-</ins></div><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-input
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-JSON-LD
-object
-to
-perform
-framing
-on.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-frame
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-frame
-to
-use
-when
-re-arranging
-the
-data.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-options
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-set
-of
-options
-that
-will
-affect
-the
-framing
-algorithm.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-callback
-</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
-JSONLDProcessorCallback
-</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-</ins><code><ins class="diff-new">
-input
-</ins></code>.</td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-object
-</ins></a></code></div></dd><dt id="widl-JSONLDProcessor-normalize-object-object-input-JSONLDProcessorCallback-callback"><code><ins class="diff-new">
-normalize
-</ins></code></dt><dd><a href="#normalization"><ins class="diff-new">
-Normalizes
-</ins></a><ins class="diff-new">
-the
-given
-</ins><code><ins class="diff-new">
-input
-</ins></code><ins class="diff-new">
-according
-to
-the
-steps
-in
-the
-</ins><a href="#normalization-algorithm"><ins class="diff-new">
-Normalization
-Algorithm
-</ins></a>.<ins class="diff-new">
-The
-</ins><code><ins class="diff-new">
-input
-</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-copied,
-normalized
-and
-returned
-if
-there
-are
-no
-errors.
-If
-the
-compaction
-fails,
-</ins><code><ins class="diff-new">
-null
-</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-returned.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-input
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-JSON-LD
-object
-to
-perform
-normalization
-upon.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-callback
-</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
-JSONLDProcessorCallback
-</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-JSON-LD
-string.
-</ins></td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-object
-</ins></a></code></div></dd><dt id="widl-JSONLDProcessor-triples-object-object-input-JSONLDTripleCallback-tripleCallback-JSONLDProcessorCallback-parserCallback"><code><ins class="diff-new">
-triples
-</ins></code></dt><dd><ins class="diff-new">
-Processes
-the
-</ins><code><ins class="diff-new">
-input
-</ins></code><ins class="diff-new">
-according
-to
-the
-</ins><a href="#rdf-conversion-algorithm"><ins class="diff-new">
-RDF
-Conversion
-Algorithm
-</ins></a>,<ins class="diff-new">
-calling
-the
-provided
-</ins><code><ins class="diff-new">
-tripleCallback
-</ins></code><ins class="diff-new">
-for
-each
-triple
-generated.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-input
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-object
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-JSON-LD
-object
-to
-process
-when
-outputting
-triples.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-tripleCallback
-</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDTripleCallback" class="idlType"><code><ins class="diff-new">
-JSONLDTripleCallback
-</ins></code></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-</ins><code><ins class="diff-new">
-input
-</ins></code>.<div class="issue"><ins class="diff-new">
-This
-callback
-should
-be
-aligned
-with
-the
-RDF
-API.
-</ins></div></td></tr><tr><td class="prmName"><ins class="diff-new">
-parserCallback
-</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
-JSONLDProcessorCallback
-</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-</ins><code><ins class="diff-new">
-input
-</ins></code>.</td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-object
-</ins></a></code></div></dd></dl></div></div><div id="jsonldprocessorcallback" class="section"><h3><span class="secno"><ins class="diff-new">
-5.2
-</ins></span><ins class="diff-new">
-JSONLDProcessorCallback
-</ins></h3><p><ins class="diff-new">
-The
-JSONLDProcessorCallback
-is
-called
-whenever
-a
-processing
-error
-occurs
-while
-processing
-the
-</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-new">
-JSON-LD
-input
-</ins></a>.</p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]<ins class="diff-new">
-interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span><ins class="diff-new">
-};</span>
-</ins></pre><div id="methods-1" class="section"><h4><span class="secno"><ins class="diff-new">
-5.2.1
-</ins></span><ins class="diff-new">
-Methods
-</ins></h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code><ins class="diff-new">
-error
-</ins></code></dt><dd><ins class="diff-new">
-This
-callback
-is
-invoked
-whenever
-an
-error
-occurs
-during
-processing.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-error
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-A
-descriptive
-error
-string
-returned
-by
-the
-processor.
-</ins></td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-void
-</ins></a></code></div></dd></dl></div></div><div id="jsonldtriplecallback" class="section"><h3><span class="secno"><ins class="diff-new">
-5.3
-</ins></span><ins class="diff-new">
-JSONLDTripleCallback
-</ins></h3><p><ins class="diff-new">
-The
-JSONLDTripleCallback
-is
-called
-whenever
-the
-processor
-generates
-a
-triple
-during
-the
-</ins><code><ins class="diff-new">
-triple()
-</ins></code><ins class="diff-new">
-call.
-</ins></p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDTripleCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]<ins class="diff-new">
-interface <span class="idlInterfaceID">JSONLDTripleCallback</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">triple</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">objectType</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">object</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">datatype</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">language</span></span>);</span><ins class="diff-new">
-};</span>
-</ins></pre><div id="methods-2" class="section"><h4><span class="secno"><ins class="diff-new">
-5.3.1
-</ins></span><ins class="diff-new">
-Methods
-</ins></h4><dl class="methods"><dt id="widl-JSONLDTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language"><code><ins class="diff-new">
-triple
-</ins></code></dt><dd><ins class="diff-new">
-This
-callback
-is
-invoked
-whenever
-a
-triple
-is
-generated
-by
-the
-processor.
-</ins><table class="parameters"><tr><th><ins class="diff-new">
-Parameter
-</ins></th><th><ins class="diff-new">
-Type
-</ins></th><th><ins class="diff-new">
-Nullable
-</ins></th><th><ins class="diff-new">
-Optional
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
-subject
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-subject
-IRI
-that
-is
-associated
-with
-the
-triple.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-property
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-property
-IRI
-that
-is
-associated
-with
-the
-triple.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-objectType
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-type
-of
-object
-that
-is
-associated
-with
-the
-triple.
-Valid
-values
-are
-</ins><code><ins class="diff-new">
-IRI
-</ins></code><ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-literal
-</ins></code>.</td></tr><tr><td class="prmName"><ins class="diff-new">
-object
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-object
-value
-associated
-with
-the
-subject
-and
-the
-property.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-datatype
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-datatype
-associated
-with
-the
-object.
-</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
-language
-</ins></td><td class="prmType"><code><a><ins class="diff-new">
-DOMString
-</ins></a></code></td><td class="prmNullTrue"><ins class="diff-new">
-✔
-</ins></td><td class="prmOptFalse"><ins class="diff-new">
-✘
-</ins></td><td class="prmDesc"><ins class="diff-new">
-The
-language
-associated
-with
-the
-object
-in
-BCP47
-format.
-</ins></td></tr></table><div><em><ins class="diff-new">
-No
-exceptions.
-</ins></em></div><div><em><ins class="diff-new">
-Return
-type:
-</ins></em><code><a><ins class="diff-new">
-void
-</ins></a></code></div></dd></dl></div></div></div><div id="algorithms" class="section"><h2><span class="secno"><ins class="diff-new">
-6.
-</ins></span>
-Algorithms
-</h2>
-<p>
-All
-algorithms
-described
-in
-this
-section
-are
-intended
-to
-operate
-on
-language-native
-data
-structures.
-That
-is,
-the
-serialization
-to
-a
-text-based
-JSON
-document
-isn't
-required
-as
-input
-or
-output
-to
-any
-of
-these
-algorithms
-and
-language-native
-data
-structures
-<em class="rfc2119" title="must">
-must
-</em>
-be
-used
-where
-applicable.
-</p>
-<div id="syntax-tokens-and-keywords" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.1
-</del>
-<ins class="diff-chg">6.1
-</ins>
-</span>
-Syntax
-Tokens
-and
-Keywords
-</h3>
-<p>
-JSON-LD
-specifies
-a
-number
-of
-syntax
-tokens
-and
-keywords
-that
-are
-using
-in
-all
-algorithms
-described
-in
-this
-section:
-</p>
-<dl>
-<dt>
-<code>
-@context
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</dd>
-<dt>
-<code>
-@base
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</dd>
-<dt>
-<code>
-@vocab
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</dd>
-<dt>
-<code>
-@coerce
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-type
-coercion
-rules.
-</dd>
-<dt>
-<code>
-@literal
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-a
-literal
-value.
-</dd>
-<dt>
-<code>
-@iri
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-an
-IRI
-value.
-</dd>
-<dt>
-<code>
-@language
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-the
-language
-for
-a
-literal.
-</dd>
-<dt>
-<code>
-@datatype
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-the
-datatype
-for
-a
-literal.
-</dd>
-<dt>
-<code>:
-</code>
-</dt>
-<dd>
-The
-separator
-for
-<del class="diff-old">CURIEs
-</del>
-<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
-<ins class="diff-chg">CURIE
-</ins></a><ins class="diff-chg">
-s
-</ins>
-when
-used
-in
-JSON
-keys
-or
-JSON
-values.
-</dd>
-<dt>
-<code>
-@subject
-</code>
-</dt>
-<dd>
-Sets
-the
-active
-subjects.
-</dd>
-<dt>
-<code>
-@type
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-type
-of
-the
-active
-subjects.
-</dd>
-</dl>
-</div>
-<div id="algorithm-terms" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.2
-</del>
-<ins class="diff-chg">6.2
-</ins>
-</span>
-Algorithm
-Terms
-</h3>
-<dl>
-<dt>
-<dfn title="initial_context" id="dfn-initial_context">
-initial
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-specified
-to
-the
-algorithm
-before
-processing
-begins.
-</dd>
-<dt>
-<dfn title="active_subject" id="dfn-active_subject">
-active
-subject
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active_property" id="dfn-active_property">
-active
-property
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active_object" id="dfn-active_object">
-active
-object
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active_context" id="dfn-active_context">
-active
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-used
-to
-resolve
-<del class="diff-old">CURIEs
-</del>
-<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
-<ins class="diff-chg">CURIE
-</ins></a><ins class="diff-chg">
-s
-</ins>
-while
-the
-processing
-algorithm
-is
-running.
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-the
-context
-contained
-within
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</dd>
-<dt>
-<dfn title="local_context" id="dfn-local_context">
-local
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-specified
-<del class="diff-old">at
-the
-</del>
-<ins class="diff-chg">within
-a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-<del class="diff-old">associative-array
-level,
-</del>
-<ins class="diff-chg">object
-</ins></a>,
-specified
-via
-the
-<code>
-@context
-</code>
-keyword.
-</dd>
-<dt>
-<dfn title="processor_state" id="dfn-processor_state">
-processor
-state
-</dfn>
-</dt>
-<dd>
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>,
-which
-includes
-the
-<a class="tref" title="active__context">
-active
-context
-</a>,
-<a class="tref" title="current_subject">
-current
-subject
-</a>,
-and
-<a class="tref" title="current_property">
-current
-property
-</a>.
-The
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-is
-managed
-as
-a
-stack
-with
-elements
-from
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copied
-into
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-when
-entering
-a
-new
-<del class="diff-old">associative
-array.
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>.
-</dd>
-<dt>
-<dfn title="JSON-LD_input" id="dfn-json-ld_input">
-JSON-LD
-input
-</dfn>
-</dt>
-<dd>
-The
-JSON-LD
-data
-structure
-that
-is
-provided
-as
-input
-to
-the
-algorithm.
-</dd>
-<dt>
-<dfn title="JSON-LD_output" id="dfn-json-ld_output">
-JSON-LD
-output
-</dfn>
-</dt>
-<dd>
-The
-JSON-LD
-data
-structure
-that
-is
-produced
-as
-output
-by
-the
-algorithm.
-</dd>
-</dl>
-</div>
-<div id="context-1" class="section">
-<h3 id="context">
-<span class="secno">
-<del class="diff-old">5.3
-</del>
-<ins class="diff-chg">6.3
-</ins>
-</span>
-Context
-</h3>
-<p>
-Processing
-of
-JSON-LD
-data
-structure
-is
-managed
-recursively.
-During
-processing,
-each
-rule
-is
-applied
-using
-information
-provided
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-Processing
-begins
-by
-pushing
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-onto
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-stack
-and
-initializing
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-with
-the
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-initial
-context
-</a>.
-If
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-encountered,
-information
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-merged
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</p>
-<p>
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-used
-for
-expanding
-keys
-and
-values
-of
-<del class="diff-old">an
-associative
-array
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a>
-(or
-elements
-of
-a
-list
-(see
-<span a="#list-processing">
-List
-Processing
-</span>
-)).
-</p>
-<p>
-A
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-identified
-within
-<del class="diff-old">an
-associative
-array
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a>
-having
-a
-key
-of
-<code>
-@context
-</code>
-with
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-or
-<del class="diff-old">an
-associative
-array
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a>
-value.
-When
-processing
-a
-<a class="tref" title="local__context">
-local
-context
-</a>,
-special
-processing
-rules
-apply:
-</p>
-<ol class="algorithm">
-<li>
-Create
-a
-new,
-empty
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-simple
-<del class="diff-old">string,
-</del>
-<a class="tref internalDFN" title="string" href="#dfn-string">
-<ins class="diff-chg">string
-</ins></a>,
-it
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-lexical
-form
-of
-IRI
-and
-used
-to
-initialize
-a
-new
-JSON
-document
-which
-replaces
-the
-value
-for
-subsequent
-processing.
-</li>
-<li>
-If
-the
-value
-is
-<del class="diff-old">an
-associative
-array,
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a>,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-has
-a
-<code>
-@base
-</code>
-key,
-it
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-simple
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-with
-the
-lexical
-form
-of
-an
-absolute
-IRI.
-Add
-the
-base
-mapping
-to
-the
-<a class="tref" title="local__context">
-local
-context
-</a>.
-<p class="issue">
-Turtle
-allows
-@base
-to
-be
-relative.
-If
-we
-did
-this,
-we
-would
-have
-to
-add
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>.
-</p>
-</li>
-<li>
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-has
-a
-<code>
-@vocab
-</code>
-key,
-it
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-simple
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-with
-the
-lexical
-form
-of
-an
-absolute
-IRI.
-Add
-the
-vocabulary
-mapping
-to
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-after
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-associated
-value.
-</li>
-<li>
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-has
-a
-<code>
-@coerce
-</code>
-key,
-it
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-<del class="diff-old">an
-associative
-array.
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a>.
-Add
-the
-<code>
-@coerce
-</code>
-mapping
-to
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-associated
-value(s).
-</li>
-<li>
-Otherwise,
-the
-key
-<em class="rfc2119" title="must">
-must
-</em>
-have
-the
-lexical
-form
-of
-<cite>
-<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">
-NCName
-</a>
-</cite>
-and
-<em class="rfc2119" title="must">
-must
-</em>
-have
-the
-value
-of
-a
-simple
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-with
-the
-lexical
-form
-of
-IRI.
-Merge
-the
-key-value
-pair
-into
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Merge
-the
-of
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping
-as
-described
-<a href="#coerce">
-below
-</a>.
-</li>
-<li>
-Merge
-all
-entries
-other
-than
-the
-<code>
-@coerce
-</code>
-mapping
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-to
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-overwriting
-any
-duplicate
-values.
-</li>
-</ol>
-<div id="coerce" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.3.1
-</del>
-<ins class="diff-chg">6.3.1
-</ins>
-</span>
-Coerce
-</h4>
-<p>
-Map
-each
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping,
-overwriting
-any
-duplicate
-values
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping.
-The
-<code>
-@coerce
-</code>
-mapping
-has
-either
-a
-single
-<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
-CURIE
-</a>
-or
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-of
-CURIEs.
-When
-merging
-with
-an
-existing
-mapping
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-map
-all
-CURIE
-values
-to
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-form
-and
-replace
-with
-the
-union
-of
-the
-value
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-and
-the
-value
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-If
-the
-result
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-with
-a
-single
-CURIE,
-the
-processor
-<em class="rfc2119" title="may">
-may
-</em>
-represent
-this
-as
-a
-string
-value.
-</p>
-</div>
-<div id="initial-context" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.3.2
-</del>
-<ins class="diff-chg">6.3.2
-</ins>
-</span>
-Initial
-Context
-</h4>
-<p>
-The
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-initial
-context
-</a>
-is
-initialized
-as
-follows:
-</p>
-<ul>
-<li>
-<code>
-@base
-</code>
-is
-set
-using
-<cite>
-<href="http: www.ietf.org="" rfc="" rfc2396.txt"="">
-section
-5.1
-Establishing
-a
-Base
-URI
-</href="http:>
-</cite>
-of
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
-RFC3986
-</a>
-</cite>
-].
-Processors
-<em class="rfc2119" title="may">
-may
-</em>
-provide
-a
-means
-of
-setting
-the
-base
-IRI
-programatically.
-</li>
-<li>
-<code>
-@coerce
-</code>
-is
-set
-with
-a
-single
-mapping
-from
-<code>
-@iri
-</code>
-to
-<code>
-@type
-</code>.
-</li>
-</ul>
-    <pre class="example">
-{
-    "@base": <span class="diff">document-location</span>,
-    "@context": {
-      "@iri": "@type"
-    }
-}
-</pre>
-</div>
-</div>
-<div id="iri-expansion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.4
-</del>
-<ins class="diff-chg">6.4
-</ins>
-</span>
-IRI
-Expansion
-</h3>
-<p>
-Keys
-and
-some
-values
-are
-evaluated
-to
-produce
-an
-IRI.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-a
-value
-representing
-an
-IRI
-into
-an
-actual
-IRI.
-</p>
-<p>
-IRIs
-may
-be
-represented
-as
-an
-explicit
-string,
-or
-as
-a
-<del class="diff-old">CURIE,
-</del>
-<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
-<ins class="diff-chg">CURIE
-</ins></a>,
-as
-a
-value
-relative
-to
-<code>
-@base
-</code>
-or
-<code>
-@vocab
-</code>.
-</p>
-<p>
-<del class="diff-old">CURIEs
-are
-defined
-more
-formally
-in
-[
-RDFA-CORE
-]
-section
-6
-"CURIE
-Syntax
-Definition"
-.
-Generally,
-a
-CURIE
-is
-composed
-of
-a
-prefix
-and
-a
-suffix
-separated
-by
-a
-':'.
-In
-JSON-LD,
-either
-the
-prefix
-may
-be
-the
-empty
-string,
-denoting
-the
-default
-prefix
-.
-</del>
-The
-algorithm
-for
-generating
-an
-IRI
-is:
-</p>
-<ol class="algorithm">
-<li>
-Split
-the
-value
-into
-a
-<em>
-prefix
-</em>
-and
-<em>
-suffix
-</em>
-from
-the
-first
-occurrence
-of
-':'.
-</li>
-<li>
-If
-the
-prefix
-is
-a
-'_'
-(underscore),
-the
-IRI
-is
-unchanged.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-contains
-a
-mapping
-for
-<em>
-prefix
-</em>,
-generate
-an
-IRI
-by
-prepending
-the
-mapped
-prefix
-to
-the
-(possibly
-empty)
-suffix
-using
-textual
-concatenation.
-Note
-that
-an
-empty
-suffix
-and
-no
-suffix
-(meaning
-the
-value
-contains
-no
-':'
-string
-at
-all)
-are
-treated
-equivalently.
-</li>
-<li>
-If
-the
-IRI
-being
-processed
-is
-for
-a
-property
-(i.e.,
-a
-key
-value
-in
-<del class="diff-old">an
-associative
-array,
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a>,
-or
-a
-value
-in
-a
-<code>
-@coerce
-</code>
-mapping)
-and
-the
-active
-context
-has
-a
-<code>
-@vocab
-</code>
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-textual
-concatenation.
-</li>
-<li>
-If
-the
-IRI
-being
-processed
-is
-for
-a
-subject
-or
-object
-(i.e.,
-not
-a
-property)
-and
-the
-active
-context
-has
-a
-<code>
-@base
-</code>
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-the
-method
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
-RFC3986
-</a>
-</cite>
-].
-</li>
-<li>
-Otherwise,
-use
-the
-value
-directly
-as
-an
-IRI.
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="iri-compaction" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.5
-</del>
-<ins class="diff-chg">6.5
-</ins>
-</span>
-IRI
-Compaction
-</h3>
-<p>
-Some
-keys
-and
-values
-are
-expressed
-using
-IRIs.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-an
-IRI
-to
-a
-compact
-IRI
-using
-the
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-es
-specified
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</p>
-<p>
-The
-algorithm
-for
-generating
-a
-compacted
-IRI
-is:
-</p>
-<ol class="algorithm">
-<li>
-Search
-every
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-for
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-that
-is
-a
-complete
-match
-against
-the
-IRI.
-If
-a
-complete
-match
-is
-found,
-the
-resulting
-compacted
-IRI
-is
-the
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-associated
-with
-the
-IRI
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</li>
-<li>
-If
-a
-complete
-match
-is
-not
-found,
-search
-for
-a
-partial
-match
-from
-the
-beginning
-of
-the
-IRI.
-For
-all
-matches
-that
-are
-found,
-the
-resulting
-compacted
-IRI
-is
-the
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-associated
-with
-the
-partially
-matched
-IRI
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-concatenated
-with
-a
-colon
-(:)
-character
-and
-the
-unmatched
-part
-of
-the
-string.
-If
-there
-is
-more
-than
-one
-compacted
-IRI
-produced,
-the
-final
-value
-is
-the
-lexicographically
-least
-value
-of
-the
-entire
-set
-of
-compacted
-IRIs.
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="value-expansion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.6
-</del>
-<ins class="diff-chg">6.6
-</ins>
-</span>
-Value
-Expansion
-</h3>
-<p>
-Some
-values
-in
-JSON-LD
-can
-be
-expressed
-in
-a
-compact
-form.
-These
-values
-are
-required
-to
-be
-expanded
-at
-times
-when
-processing
-JSON-LD
-documents.
-</p>
-<p>
-The
-algorithm
-for
-expanding
-a
-value
-is:
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-key
-that
-is
-associated
-with
-the
-value
-has
-an
-associated
-coercion
-entry
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>,
-the
-resulting
-expansion
-is
-an
-object
-populated
-according
-to
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-coercion
-target
-is
-<code>
-@iri
-</code>,
-expand
-the
-value
-by
-adding
-a
-new
-key-value
-pair
-where
-the
-key
-is
-<code>
-@iri
-</code>
-and
-the
-value
-is
-the
-expanded
-IRI
-according
-to
-the
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-rules.
-</li>
-<li>
-If
-the
-coercion
-target
-is
-a
-typed
-literal,
-expand
-the
-value
-by
-adding
-two
-new
-key-value
-pairs.
-The
-first
-key-value
-pair
-will
-be
-<code>
-@literal
-</code>
-and
-the
-unexpanded
-value.
-The
-second
-key-value
-pair
-will
-be
-<code>
-@datatype
-</code>
-and
-the
-associated
-coercion
-datatype
-expanded
-according
-to
-the
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-rules.
-</li>
-</ol>
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="value-compaction" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.7
-</del>
-<ins class="diff-chg">6.7
-</ins>
-</span>
-Value
-Compaction
-</h3>
-<p>
-Some
-values,
-such
-as
-IRIs
-and
-typed
-literals,
-may
-be
-expressed
-in
-an
-expanded
-form
-in
-JSON-LD.
-These
-values
-are
-required
-to
-be
-compacted
-at
-times
-when
-processing
-JSON-LD
-documents.
-</p>
-<p>
-The
-algorithm
-for
-compacting
-a
-value
-is:
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-contains
-a
-coercion
-target
-for
-the
-key
-that
-is
-associated
-with
-the
-value,
-compact
-the
-value
-using
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-coercion
-target
-is
-an
-<code>
-@iri
-</code>,
-the
-compacted
-value
-is
-the
-value
-associated
-with
-the
-<code>
-@iri
-</code>
-key,
-processed
-according
-to
-the
-<a href="#iri-compaction">
-IRI
-Compaction
-</a>
-steps.
-</li>
-<li>
-If
-the
-coercion
-target
-is
-a
-typed
-literal,
-the
-compacted
-value
-is
-the
-value
-associated
-with
-the
-<code>
-@literal
-</code>
-key.
-</li>
-<li>
-Otherwise,
-the
-value
-is
-not
-modified.
-</li>
-</ol>
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="expansion-1" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.8
-</del>
-<ins class="diff-chg">6.8
-</ins>
-</span>
-Expansion
-</h3>
-<p class="issue">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</p>
-<p>
-As
-stated
-previously,
-expansion
-is
-the
-process
-of
-taking
-a
-JSON-LD
-input
-and
-expanding
-all
-IRIs
-and
-typed
-literals
-to
-their
-fully-expanded
-form.
-The
-output
-will
-not
-contain
-a
-single
-context
-declaration
-and
-will
-have
-all
-IRIs
-and
-typed
-literals
-fully
-expanded.
-</p>
-<div id="expansion-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.8.1
-</del>
-<ins class="diff-chg">6.8.1
-</ins>
-</span>
-Expansion
-Algorithm
-</h4>
-<ol class="algorithm">
-<li>
-If
-the
-top-level
-item
-in
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-is
-an
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-process
-each
-item
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-recursively
-using
-this
-algorithm.
-</li>
-<li>
-If
-the
-top-level
-item
-in
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-is
-an
-object,
-update
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-according
-to
-the
-steps
-outlined
-in
-the
-<a href="#context">
-context
-</a>
-section.
-Process
-each
-key,
-expanding
-the
-key
-according
-to
-the
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-rules.
-</li>
-<ol class="algorithm">
-<li>
-Process
-each
-value
-associated
-with
-each
-key
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-an
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-process
-each
-item
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-recursively
-using
-this
-algorithm.
-</li>
-<li>
-If
-the
-value
-is
-an
-object,
-process
-the
-object
-recursively
-using
-this
-algorithm.
-</li>
-<li>
-Otherwise,
-check
-to
-see
-the
-associated
-key
-has
-an
-associated
-coercion
-rule.
-If
-the
-value
-should
-be
-coerced,
-expand
-the
-value
-according
-to
-the
-<a href="#value-expansion">
-Value
-Expansion
-</a>
-rules.
-If
-the
-value
-does
-not
-need
-to
-be
-coerced,
-leave
-the
-value
-as-is.
-</li>
-</ol>
-</li>
-<li>
-Remove
-the
-context
-from
-the
-object
-</li>
-</ol>
-</ol>
-</div>
-</div>
-<div id="compaction-1" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.9
-</del>
-<ins class="diff-chg">6.9
-</ins>
-</span>
-Compaction
-</h3>
-<p class="issue">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</p>
-<p>
-As
-stated
-previously,
-compaction
-is
-the
-process
-of
-taking
-a
-JSON-LD
-input
-and
-compacting
-all
-IRIs
-using
-a
-given
-context.
-The
-output
-will
-contain
-a
-single
-top-level
-context
-declaration
-and
-will
-only
-use
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-es
-and
-will
-ensure
-that
-all
-typed
-literals
-are
-fully
-compacted.
-</p>
-<div id="compaction-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.9.1
-</del>
-<ins class="diff-chg">6.9.1
-</ins>
-</span>
-Compaction
-Algorithm
-</h4>
-<ol class="algorithm">
-<li>
-Perform
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>
-on
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>.
-</li>
-<li>
-If
-the
-top-level
-item
-is
-an
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-process
-each
-item
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-recursively,
-starting
-at
-this
-step.
-</li>
-<li>
-If
-the
-top-level
-item
-is
-an
-object,
-compress
-each
-key
-using
-the
-steps
-defined
-in
-<a href="#iri-compaction">
-IRI
-Compaction
-</a>
-and
-compress
-each
-value
-using
-the
-steps
-defined
-in
-<a href="#value-compaction">
-Value
-Compaction
-</a>
-</li>
-</ol>
-</div>
-</div>
-<div id="framing-1" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.10
-</del>
-<ins class="diff-chg">6.10
-</ins>
-</span>
-Framing
-</h3>
-<p class="issue">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</p>
-<p>
-A
-JSON-LD
-document
-is
-a
-representation
-of
-a
-directed
-graph.
-A
-single
-directed
-graph
-can
-have
-many
-different
-serializations,
-each
-expressing
-exactly
-the
-same
-information.
-Developers
-typically
-don't
-work
-directly
-with
-graphs,
-but
-rather,
-prefer
-trees
-when
-dealing
-with
-JSON.
-While
-mapping
-a
-graph
-to
-a
-tree
-can
-be
-done,
-the
-layout
-of
-the
-end
-result
-must
-be
-specified
-in
-advance.
-This
-section
-defines
-an
-algorithm
-for
-mapping
-a
-graph
-to
-a
-tree
-given
-a
-<a class="tref internalDFN" title="frame" href="#dfn-frame">
-frame
-</a>.
-</p>
-<div id="framing-algorithm-terms" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.10.1
-</del>
-<ins class="diff-chg">6.10.1
-</ins>
-</span>
-Framing
-Algorithm
-Terms
-</h4>
-<dl>
-<dt>
-<dfn title="input_frame" id="dfn-input_frame">
-input
-frame
-</dfn>
-</dt>
-<dd>
-the
-initial
-<a class="tref internalDFN" title="frame" href="#dfn-frame">
-frame
-</a>
-provided
-to
-the
-framing
-algorithm.
-</dd>
-<dt>
-<dfn title="framing_context" id="dfn-framing_context">
-framing
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-containing
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>,
-the
-<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</a>
-and
-the
-<a class="tref" title="omit_default_flag">
-omit
-default
-flag
-</a>.
-</dd>
-<dt>
-<dfn title="object_embed_flag" id="dfn-object_embed_flag">
-object
-embed
-flag
-</dfn>
-</dt>
-<dd>
-a
-flag
-specifying
-that
-objects
-should
-be
-directly
-embedded
-in
-the
-output,
-instead
-of
-being
-referred
-to
-by
-their
-IRI.
-</dd>
-<dt>
-<dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</dfn>
-</dt>
-<dd>
-a
-flag
-specifying
-that
-for
-properties
-to
-be
-included
-in
-the
-output,
-they
-must
-be
-explicitly
-declared
-in
-the
-<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
-framing
-context
-</a>.
-</dd>
-<dt>
-<dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</dfn>
-</dt>
-<dd>
-a
-flag
-specifying
-that
-properties
-that
-are
-missing
-from
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-should
-be
-omitted
-from
-the
-output.
-</dd>
-<dt>
-<dfn title="match_limit" id="dfn-match_limit">
-match
-limit
-</dfn>
-</dt>
-<dd>
-A
-value
-specifying
-the
-maximum
-number
-of
-matches
-to
-accept
-when
-building
-arrays
-of
-values
-during
-the
-framing
-algorithm.
-A
-value
-of
--1
-specifies
-that
-there
-is
-no
-match
-limit.
-</dd>
-<dt>
-<dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">
-map
-of
-embedded
-subjects
-</dfn>
-</dt>
-<dd>
-A
-map
-that
-tracks
-if
-a
-subject
-has
-been
-embedded
-in
-the
-output
-of
-the
-<a href="#framing-algorithm">
-Framing
-Algorithm
-</a>.
-</dd>
-</dl>
-</div>
-<div id="framing-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.10.2
-</del>
-<ins class="diff-chg">6.10.2
-</ins>
-</span>
-Framing
-Algorithm
-</h4>
-<p>
-The
-framing
-algorithm
-takes
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-that
-has
-been
-normalized
-according
-to
-the
-<a href="#normalization-algorithm">
-Normalization
-Algorithm
-</a>
-(
-<strong>
-normalized
-input
-</strong>
-),
-an
-<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
-input
-frame
-</a>
-that
-has
-been
-expanded
-according
-to
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>
-(
-<strong>
-expanded
-frame
-</strong>
-),
-and
-a
-number
-of
-options
-and
-produces
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>.
-The
-following
-series
-of
-steps
-is
-the
-recursive
-portion
-of
-the
-framing
-algorithm:
-</p>
-<ol class="algorithm">
-<li>
-Initialize
-the
-<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
-framing
-context
-</a>
-by
-setting
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>,
-clearing
-the
-<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</a>,
-and
-clearing
-the
-<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</a>.
-Override
-these
-values
-based
-on
-input
-options
-provided
-to
-the
-algorithm
-by
-the
-application.
-</li>
-<li>
-Generate
-a
-<dfn title="list_of_frames" id="dfn-list_of_frames">
-list
-of
-frames
-</dfn>
-by
-processing
-the
-<strong>
-expanded
-frame
-</strong>:
-<ol class="algorithm">
-<li>
-If
-the
-<strong>
-expanded
-frame
-</strong>
-is
-not
-an
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-set
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-to
-1,
-place
-the
-<strong>
-expanded
-frame
-</strong>
-into
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>,
-and
-set
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-to
-<code>
-null
-</code>.
-</li>
-<li>
-If
-the
-<strong>
-expanded
-frame
-</strong>
-is
-an
-empty
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-place
-an
-empty
-object
-into
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>,
-set
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-to
-an
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-and
-set
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-to
--1.
-</li>
-<li>
-If
-the
-<strong>
-expanded
-frame
-</strong>
-is
-a
-non-empty
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-add
-each
-item
-in
-the
-<strong>
-expanded
-frame
-</strong>
-into
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>,
-set
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-to
-an
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-and
-set
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-to
--1.
-</li>
-</ol>
-</li>
-<li>
-Create
-a
-<dfn title="match_array" id="dfn-match_array">
-match
-array
-</dfn>
-for
-each
-<strong>
-expanded
-frame
-</strong>
-in
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>
-halting
-when
-either
-the
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-is
-zero
-or
-the
-end
-of
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>
-is
-reached.
-If
-an
-<strong>
-expanded
-frame
-</strong>
-is
-not
-an
-object,
-the
-processor
-<em class="rfc2119" title="must">
-must
-</em>
-throw
-a
-<code>
-Invalid
-Frame
-Format
-</code>
-exception.
-Add
-each
-matching
-item
-from
-the
-<strong>
-normalized
-input
-</strong>
-to
-the
-<a class="tref" title="matches_array">
-matches
-array
-</a>
-and
-decrement
-the
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-by
-1
-if:
-<ol class="algorithm">
-<li>
-The
-<strong>
-expanded
-frame
-</strong>
-has
-an
-<code>
-rdf:type
-</code>
-that
-exists
-in
-the
-item's
-list
-of
-<code>
-rdf:type
-</code>
-s.
-Note:
-the
-<code>
-rdf:type
-</code>
-can
-be
-an
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-but
-only
-one
-value
-needs
-to
-be
-in
-common
-between
-the
-item
-and
-the
-<strong>
-expanded
-frame
-</strong>
-for
-a
-match.
-</li>
-<li>
-The
-<strong>
-expanded
-frame
-</strong>
-does
-not
-have
-an
-<code>
-rdf:type
-</code>
-property,
-but
-every
-property
-in
-the
-<strong>
-expanded
-frame
-</strong>
-exists
-in
-the
-item.
-</li>
-</ol>
-</li>
-<li>
-Process
-each
-item
-in
-the
-<a class="tref internalDFN" title="match_array" href="#dfn-match_array">
-match
-array
-</a>
-with
-its
-associated
-<dfn title="match_frame" id="dfn-match_frame">
-match
-frame
-</dfn>:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-contains
-an
-<code>
-@embed
-</code>
-keyword,
-set
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>
-to
-its
-value.
-If
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-contains
-an
-<code>
-@explicit
-</code>
-keyword,
-set
-the
-<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</a>
-to
-its
-value.
-Note:
-if
-the
-keyword
-exists,
-but
-the
-value
-is
-neither
-<code>
-true
-</code>
-or
-<code>
-false
-</code>,
-set
-the
-associated
-flag
-to
-<code>
-true
-</code>.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>
-is
-cleared
-and
-the
-item
-has
-the
-<code>
-@subject
-</code>
-property,
-replace
-the
-item
-with
-the
-value
-of
-the
-<code>
-@subject
-</code>
-property.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>
-is
-set
-and
-the
-item
-has
-the
-<code>
-@subject
-</code>
-property,
-and
-its
-IRI
-is
-in
-the
-<a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">
-map
-of
-embedded
-subjects
-</a>,
-throw
-a
-<code>
-Duplicate
-Embed
-</code>
-exception.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>
-is
-set
-and
-the
-item
-has
-the
-<code>
-@subject
-</code>
-property
-and
-its
-IRI
-is
-not
-in
-the
-<a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">
-map
-of
-embedded
-subjects
-</a>:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</a>
-is
-set,
-then
-delete
-any
-key
-from
-the
-item
-that
-does
-not
-exist
-in
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>,
-except
-<code>
-@subject
-</code>.
-</li>
-<li>
-For
-each
-key
-in
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>,
-except
-for
-keywords
-and
-<code>
-rdf:type
-</code>:
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-in
-the
-item,
-then
-build
-a
-new
-<dfn title="recursion_input_list" id="dfn-recursion_input_list">
-recursion
-input
-list
-</dfn>
-using
-the
-object
-or
-objects
-associated
-with
-the
-key.
-If
-any
-object
-contains
-an
-<code>
-@iri
-</code>
-value
-that
-exists
-in
-the
-<a class="tref" title="normalized_input">
-normalized
-input
-</a>,
-replace
-the
-object
-in
-the
-<a class="tref" title="recusion_input_list">
-recusion
-input
-list
-</a>
-with
-a
-new
-object
-containing
-the
-<code>
-@subject
-</code>
-key
-where
-the
-value
-is
-the
-value
-of
-the
-<code>
-@iri
-</code>,
-and
-all
-of
-the
-other
-key-value
-pairs
-for
-that
-subject.
-Set
-the
-<dfn title="recursion_match_frame" id="dfn-recursion_match_frame">
-recursion
-match
-frame
-</dfn>
-to
-the
-value
-associated
-with
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-'s
-key.
-Replace
-the
-value
-associated
-with
-the
-key
-by
-recursively
-calling
-this
-algorithm
-using
-<a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">
-recursion
-input
-list
-</a>,
-<a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">
-recursion
-match
-frame
-</a>
-as
-input.
-</li>
-<li>
-If
-the
-key
-is
-not
-in
-the
-item,
-add
-the
-key
-to
-the
-item
-and
-set
-the
-associated
-value
-to
-an
-empty
-array
-if
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-key's
-value
-is
-an
-array
-or
-<code>
-null
-</code>
-otherwise.
-</li>
-<li>
-If
-value
-associated
-with
-the
-item's
-key
-is
-<code>
-null
-</code>,
-process
-the
-<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</a>:
-<ol class="algorithm">
-<li>
-If
-the
-value
-associated
-with
-the
-key
-in
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-is
-an
-array,
-use
-the
-first
-frame
-from
-the
-array
-as
-the
-<dfn title="property_frame" id="dfn-property_frame">
-property
-frame
-</dfn>,
-otherwise
-set
-the
-<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
-property
-frame
-</a>
-to
-an
-empty
-object.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
-property
-frame
-</a>
-contains
-an
-<code>
-@omitDefault
-</code>
-keyword,
-set
-the
-<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</a>
-to
-its
-value.
-Note:
-if
-the
-keyword
-exists,
-but
-the
-value
-is
-neither
-<code>
-true
-</code>
-or
-<code>
-false
-</code>,
-set
-the
-associated
-flag
-to
-<code>
-true
-</code>.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</a>
-is
-set,
-delete
-the
-key
-in
-the
-item.
-Otherwise,
-if
-the
-<code>
-@default
-</code>
-keyword
-is
-set
-in
-the
-<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
-property
-frame
-</a>
-set
-the
-item's
-value
-to
-the
-value
-of
-<code>
-@default
-</code>.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-is
-<code>
-null
-</code>
-set
-it
-to
-the
-item,
-otherwise,
-append
-the
-item
-to
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Return
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>.
-</li>
-</ol>
-The
-final,
-non-recursive
-step
-of
-the
-framing
-algorithm
-requires
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-to
-be
-compacted
-according
-to
-the
-<a href="#compaction-algorithm">
-Compaction
-Algorithm
-</a>
-by
-using
-the
-context
-provided
-in
-the
-<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
-input
-frame
-</a>.
-The
-resulting
-value
-is
-the
-final
-output
-of
-the
-compaction
-algorithm
-and
-is
-what
-should
-be
-returned
-to
-the
-application.
-</div>
-</div>
-<div id="normalization-1" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.11
-</del>
-<ins class="diff-chg">6.11
-</ins>
-</span>
-Normalization
-</h3>
-<p class="issue">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</p>
-<p>
-Normalization
-is
-the
-process
-of
-taking
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-and
-performing
-a
-deterministic
-transformation
-on
-that
-input
-that
-results
-in
-all
-aspects
-of
-the
-graph
-being
-fully
-expanded
-and
-named
-in
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>.
-The
-normalized
-output
-is
-generated
-in
-such
-a
-way
-that
-any
-conforming
-JSON-LD
-processor
-will
-generate
-identical
-output
-given
-the
-same
-input.
-The
-problem
-is
-a
-fairly
-difficult
-technical
-problem
-to
-solve
-because
-it
-requires
-a
-directed
-graph
-to
-be
-ordered
-into
-a
-set
-of
-nodes
-and
-edges
-in
-a
-deterministic
-way.
-This
-is
-easy
-to
-do
-when
-all
-of
-the
-nodes
-have
-unique
-names,
-but
-very
-difficult
-to
-do
-when
-some
-of
-the
-nodes
-are
-not
-labeled.
-</p>
-<p>
-In
-time,
-there
-may
-be
-more
-than
-one
-normalization
-algorithm
-that
-will
-need
-to
-be
-identified.
-For
-identification
-purposes,
-this
-algorithm
-is
-named
-<abbr title="Universal Graph Normalization Algorithm 2011">
-UGNA2011
-</abbr>.
-</p>
-<div id="normalization-algorithm-terms" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.1
-</del>
-<ins class="diff-chg">6.11.1
-</ins>
-</span>
-Normalization
-Algorithm
-Terms
-</h4>
-<dl>
-<dt>
-<dfn title="label" id="dfn-label">
-<ins class="diff-new">label
-</ins></dfn></dt><dd><ins class="diff-new">
-The
-subject
-IRI
-associated
-with
-a
-graph
-node.
-The
-subject
-IRI
-is
-expressed
-using
-a
-key-value
-pair
-in
-a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-new">
-JSON
-object
-</ins></a><ins class="diff-new">
-where
-the
-key
-is
-</ins><code><ins class="diff-new">
-@subject
-</ins></code><ins class="diff-new">
-and
-the
-value
-is
-a
-string
-that
-is
-an
-IRI
-or
-a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-new">
-JSON
-object
-</ins></a><ins class="diff-new">
-containing
-the
-key
-</ins><code><ins class="diff-new">
-@iri
-</ins></code><ins class="diff-new">
-and
-a
-value
-that
-is
-a
-string
-that
-is
-an
-IRI.
-</ins></dd><dt>
-<dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">
-list
-of
-expanded
-nodes
-</dfn>
-</dt>
-<dd>
-A
-list
-of
-all
-nodes
-in
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-graph
-containing
-no
-embedded
-objects
-and
-having
-all
-keys
-and
-values
-expanded
-according
-to
-the
-steps
-in
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>.
-</dd>
-<dt>
-<del class="diff-old">naming
-base
-string
-An
-unlabeled
-node
-naming
-prefix
-that
-is
-not
-used
-by
-any
-other
-node
-in
-the
-JSON-LD
-input
-and
-does
-not
-start
-with
-the
-characters
-c14n
-.
-The
-prefix
-is
-used
-to
-temporarily
-name
-nodes
-during
-the
-normalization
-algorithm
-in
-a
-way
-that
-doesn't
-collide
-with
-the
-names
-that
-already
-exist
-as
-well
-as
-the
-names
-that
-will
-be
-generated
-by
-the
-normalization
-algorithm.
-</del>
-<dfn title="alpha" id="dfn-alpha">
-alpha
-</dfn>
-and
-<dfn title="beta" id="dfn-beta">
-beta
-</dfn>
-values
-</dt>
-<dd>
-The
-words
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-and
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-refer
-to
-the
-first
-and
-second
-nodes
-or
-values
-being
-examined
-in
-an
-algorithm.
-The
-names
-are
-merely
-used
-to
-refer
-to
-each
-input
-value
-to
-a
-comparison
-algorithm.
-</dd>
-<dt>
-<del class="diff-old">naming
-base
-string
-</del>
-<dfn title="renaming_counter" id="dfn-renaming_counter">
-<ins class="diff-chg">renaming
-counter
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-counter
-that
-is
-used
-during
-the
-</ins><a href="#node-relabeling-algorithm"><ins class="diff-chg">
-Node
-Relabeling
-Algorithm
-</ins></a>.<ins class="diff-chg">
-The
-counter
-typically
-starts
-at
-one
-(1)
-and
-counts
-up
-for
-every
-node
-that
-is
-relabeled.
-There
-will
-be
-two
-such
-renaming
-counters
-in
-an
-implementation
-of
-the
-normalization
-algorithm.
-The
-first
-is
-the
-</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-chg">
-labeling
-counter
-</ins></a><ins class="diff-chg">
-and
-the
-second
-is
-the
-</ins><a class="tref" title="deterministic_labeling_counter"><ins class="diff-chg">
-deterministic
-labeling
-counter
-</ins></a>.</dd><dt><dfn title="serialization_label" id="dfn-serialization_label"><ins class="diff-chg">
-serialization
-label
-</ins>
-</dfn>
-</dt>
-<dd>
-An
-<del class="diff-old">unlabeled
-</del>
-<ins class="diff-chg">identifier
-that
-is
-created
-to
-aid
-in
-the
-normalization
-process
-in
-the
-</ins><a href="#deep-comparison-algorithm"><ins class="diff-chg">
-Deep
-Comparison
-Algorithm
-</ins></a>.<ins class="diff-chg">
-The
-value
-typically
-takes
-the
-form
-of
-</ins><code><ins class="diff-chg">
-s
-</ins><NUMBER></code><ins class="diff-chg">
-or
-</ins><code><ins class="diff-chg">
-c
-</ins><NUMBER></code>.</dd></dl></div><div id="normalization-state" class="section"><h4><span class="secno"><ins class="diff-chg">
-6.11.2
-</ins></span><ins class="diff-chg">
-Normalization
-State
-</ins></h4><p><ins class="diff-chg">
-When
-performing
-the
-steps
-required
-by
-the
-normalization
-algorithm,
-it
-is
-helpful
-to
-track
-the
-many
-pieces
-of
-information
-in
-a
-data
-structure
-called
-the
-</ins><dfn title="normalization_state" id="dfn-normalization_state"><ins class="diff-chg">
-normalization
-state
-</ins></dfn>.<ins class="diff-chg">
-Many
-of
-these
-pieces
-simply
-provide
-indexes
-into
-the
-graph.
-The
-information
-contained
-in
-the
-</ins><a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state"><ins class="diff-chg">
-normalization
-state
-</ins></a><ins class="diff-chg">
-is
-described
-below.
-</ins></p><dl><dt><dfn title="node_state" id="dfn-node_state">
-node
-<del class="diff-old">naming
-</del>
-<ins class="diff-chg">state
-</ins></dfn></dt><dd><ins class="diff-chg">
-Each
-node
-in
-the
-graph
-will
-be
-assigned
-a
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a>.<ins class="diff-chg">
-This
-state
-contains
-the
-information
-necessary
-to
-deterministically
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-all
-nodes
-in
-the
-graph.
-A
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a><ins class="diff-chg">
-includes:
-</ins><dl><dt><dfn title="node_reference" id="dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a><ins class="diff-chg">
-is
-a
-reference
-to
-a
-node
-in
-the
-graph.
-For
-a
-given
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a>,<ins class="diff-chg">
-its
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a><ins class="diff-chg">
-refers
-to
-the
-node
-that
-the
-state
-is
-for.
-When
-a
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a><ins class="diff-chg">
-is
-created,
-its
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a><ins class="diff-chg">
-should
-be
-to
-the
-node
-it
-is
-created
-for.
-</ins></dd><dt><dfn title="outgoing_list" id="dfn-outgoing_list"><ins class="diff-chg">
-outgoing
-list
-</ins></dfn></dt><dd><ins class="diff-chg">
-Lists
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-for
-all
-nodes
-that
-are
-properties
-of
-the
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a>.<ins class="diff-chg">
-This
-list
-should
-be
-initialized
-by
-iterating
-over
-every
-object
-associated
-with
-a
-property
-in
-the
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a><ins class="diff-chg">
-adding
-its
-label
-if
-it
-is
-another
-node.
-</ins></dd><dt><dfn title="incoming_list" id="dfn-incoming_list"><ins class="diff-chg">
-incoming
-list
-</ins></dfn></dt><dd><ins class="diff-chg">
-Lists
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-for
-all
-nodes
-in
-the
-graph
-for
-which
-the
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a><ins class="diff-chg">
-is
-a
-property.
-This
-list
-is
-initialized
-to
-an
-empty
-list.
-</ins></dd><dt><dfn title="outgoing_serialization_map" id="dfn-outgoing_serialization_map"><ins class="diff-chg">
-outgoing
-serialization
-map
-</ins></dfn></dt><dd><ins class="diff-chg">
-Maps
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-to
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-s.
-This
-map
-is
-initialized
-to
-an
-empty
-map.
-When
-this
-map
-is
-populated,
-it
-will
-be
-filled
-with
-keys
-that
-are
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-of
-every
-node
-in
-the
-graph
-with
-a
-label
-that
-begins
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-and
-that
-has
-a
-path,
-via
-properties,
-that
-starts
-with
-the
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a>.</dd><dt><dfn title="outgoing_serialization" id="dfn-outgoing_serialization"><ins class="diff-chg">
-outgoing
-serialization
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-string
-that
-can
-be
-lexicographically
-compared
-to
-the
-</ins><a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization"><ins class="diff-chg">
-outgoing
-serialization
-</ins></a><ins class="diff-chg">
-s
-of
-other
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a><ins class="diff-chg">
-s.
-It
-is
-a
-representation
-of
-the
-</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-chg">
-outgoing
-serialization
-map
-</ins></a><ins class="diff-chg">
-and
-other
-related
-information.
-This
-string
-is
-initialized
-to
-an
-empty
-string.
-</ins></dd><dt><dfn title="incoming_serialization_map" id="dfn-incoming_serialization_map"><ins class="diff-chg">
-incoming
-serialization
-map
-</ins></dfn></dt><dd><ins class="diff-chg">
-Maps
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-to
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-s.
-This
-map
-is
-initialized
-to
-an
-empty
-map.
-When
-this
-map
-is
-populated,
-it
-will
-be
-filled
-with
-keys
-that
-are
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-of
-every
-node
-in
-the
-graph
-with
-a
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-that
-begins
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-and
-that
-has
-a
-path,
-via
-properties,
-that
-ends
-with
-the
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a>.</dd><dt><dfn title="incoming_serialization" id="dfn-incoming_serialization"><ins class="diff-chg">
-incoming
-serialization
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-string
-that
-can
-be
-lexicographically
-compared
-to
-the
-</ins><a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization"><ins class="diff-chg">
-outgoing
-serialization
-</ins></a><ins class="diff-chg">
-s
-of
-other
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a><ins class="diff-chg">
-s.
-It
-is
-a
-representation
-of
-the
-</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-chg">
-incoming
-serialization
-map
-</ins></a><ins class="diff-chg">
-and
-other
-related
-information.
-This
-string
-is
-initialized
-to
-an
-empty
-string.
-</ins></dd></dl></dd><dt><dfn title="node_state_map" id="dfn-node_state_map"><ins class="diff-chg">
-node
-state
-map
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-mapping
-from
-a
-node's
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-to
-a
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a>.<ins class="diff-chg">
-It
-is
-initialized
-to
-an
-empty
-map.
-</ins></dd><dt><dfn title="labeling_prefix" id="dfn-labeling_prefix"><ins class="diff-chg">
-labeling
-</ins>
-prefix
-</dfn>
-</dt>
-<dd>
-<ins class="diff-new">The
-labeling
-prefix
-is
-a
-string
-</ins>
-that
-is
-<ins class="diff-new">used
-as
-the
-beginning
-of
-a
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a>.<ins class="diff-new">
-It
-should
-be
-initialized
-to
-a
-random
-base
-string
-that
-starts
-with
-the
-characters
-</ins><code><ins class="diff-new">
-_:
-</ins></code>,<ins class="diff-new">
-is
-</ins>
-not
-used
-by
-any
-other
-<del class="diff-old">node
-</del>
-<ins class="diff-chg">node's
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>
-in
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>,
-and
-does
-not
-start
-with
-the
-characters
-<code>
-<del class="diff-old">c14n
-</del>
-<ins class="diff-chg">_:c14n
-</ins>
-</code>.
-The
-prefix
-<ins class="diff-new">has
-two
-uses.
-First
-it
-</ins>
-is
-used
-to
-temporarily
-name
-nodes
-during
-the
-normalization
-algorithm
-in
-a
-way
-that
-doesn't
-collide
-with
-the
-names
-that
-already
-exist
-as
-well
-as
-the
-names
-that
-will
-be
-generated
-by
-the
-normalization
-algorithm.
-<ins class="diff-new">Second,
-it
-will
-eventually
-be
-set
-to
-</ins><code><ins class="diff-new">
-_:c14n
-</ins></code><ins class="diff-new">
-to
-generate
-the
-final,
-deterministic
-labels
-for
-nodes
-in
-the
-graph.
-This
-prefix
-will
-be
-concatenated
-with
-the
-</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-new">
-labeling
-counter
-</ins></a><ins class="diff-new">
-to
-produce
-a
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a>.<ins class="diff-new">
-For
-example,
-</ins><code><ins class="diff-new">
-_:j8r3k
-</ins></code><ins class="diff-new">
-is
-a
-proper
-initial
-value
-for
-the
-</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-new">
-labeling
-prefix
-</ins></a>.</dd><dt><dfn title="labeling_counter" id="dfn-labeling_counter"><ins class="diff-new">
-labeling
-counter
-</ins></dfn></dt><dd><ins class="diff-new">
-A
-counter
-that
-is
-used
-to
-label
-nodes.
-It
-is
-appended
-to
-the
-</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-new">
-labeling
-prefix
-</ins></a><ins class="diff-new">
-to
-create
-a
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a>.<ins class="diff-new">
-It
-is
-initialized
-to
-</ins><code><ins class="diff-new">
-1
-</ins></code>.</dd><dt><dfn title="map_of_flattened_nodes" id="dfn-map_of_flattened_nodes"><ins class="diff-new">
-map
-of
-flattened
-nodes
-</ins></dfn></dt><dd><ins class="diff-new">
-A
-map
-containing
-a
-representation
-of
-all
-nodes
-in
-the
-graph
-where
-the
-key
-is
-a
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-and
-the
-value
-is
-a
-single
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-new">
-JSON
-object
-</ins></a><ins class="diff-new">
-that
-has
-no
-nested
-sub-objects
-and
-has
-had
-all
-properties
-for
-the
-same
-node
-merged
-into
-a
-single
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-new">
-JSON
-object
-</ins></a>.
-</dd>
-</dl>
-</div>
-<div id="normalization-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.2
-</del>
-<ins class="diff-chg">6.11.3
-</ins>
-</span>
-Normalization
-Algorithm
-</h4>
-<p>
-The
-normalization
-algorithm
-expands
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>,
-flattens
-the
-data
-structure,
-and
-creates
-an
-initial
-set
-of
-names
-for
-all
-nodes
-in
-the
-graph.
-The
-flattened
-data
-structure
-is
-then
-processed
-by
-<del class="diff-old">the
-</del>
-<ins class="diff-chg">a
-</ins>
-node
-labeling
-algorithm
-in
-order
-to
-get
-a
-fully
-expanded
-and
-named
-list
-of
-<ins class="diff-new">nodes
-which
-is
-then
-sorted.
-The
-result
-is
-a
-deterministically
-named
-and
-ordered
-list
-of
-graph
-</ins>
-nodes.
-</p>
-<ol class="algorithm">
-<li>
-Expand
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-according
-to
-the
-steps
-in
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>
-and
-store
-the
-result
-as
-the
-<strong>
-expanded
-input
-</strong>.
-</li>
-<li>
-<del class="diff-old">Process
-every
-object
-in
-the
-expanded
-input
-searching
-for
-@subject
-values
-that
-start
-with
-the
-text
-string
-_:c14n
-.
-If
-a
-match
-is
-found,
-rename
-the
-subject
-and
-all
-references
-to
-the
-subject
-by
-concatenating
-_:
-with
-the
-naming
-base
-string
-and
-</del>
-<ins class="diff-chg">Create
-</ins>
-a
-<del class="diff-old">unique
-identifier,
-such
-as
-an
-incremented
-counter
-value.
-</del>
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
-<ins class="diff-chg">normalization
-state
-</ins></a>.
-</li>
-<li>
-<del class="diff-old">Create
-an
-empty
-list
-</del>
-<ins class="diff-chg">Initialize
-the
-</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-chg">
-map
-</ins>
-of
-<del class="diff-old">expanded
-</del>
-<ins class="diff-chg">flattened
-</ins>
-nodes
-</a>
-<del class="diff-old">and
-</del>
-<ins class="diff-chg">by
-</ins>
-recursively
-<del class="diff-old">process
-</del>
-<ins class="diff-chg">processing
-</ins>
-every
-<del class="diff-old">object
-</del>
-<dfn title="expanded_node" id="dfn-expanded_node">
-<ins class="diff-chg">expanded
-node
-</ins></dfn>
-in
-the
-<strong>
-expanded
-input
-</strong>
-<del class="diff-old">that
-is
-not
-an
-expanded
-IRI,
-typed
-literal
-or
-language
-literal,
-</del>
-in
-depth-first
-order:
-<ol class="algorithm">
-<li>
-If
-<ins class="diff-new">the
-</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
-expanded
-node
-</ins></a><ins class="diff-new">
-is
-</ins>
-an
-<del class="diff-old">object
-does
-not
-contain
-</del>
-<ins class="diff-chg">unlabeled
-node,
-add
-</ins>
-a
-<ins class="diff-new">new
-key-value
-pair
-to
-the
-</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
-expanded
-node
-</ins></a><ins class="diff-new">
-where
-the
-key
-is
-</ins>
-<code>
-@subject
-<del class="diff-old">,
-name
-it
-by
-concatenating
-_:
-</del>
-</code>
-<del class="diff-old">with
-</del>
-<ins class="diff-chg">and
-</ins>
-the
-<del class="diff-old">naming
-base
-string
-</del>
-<ins class="diff-chg">value
-is
-the
-concatenation
-of
-the
-</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-chg">
-labeling
-prefix
-</ins>
-</a>
-and
-<del class="diff-old">a
-unique
-identifier,
-such
-as
-an
-incremented
-</del>
-<ins class="diff-chg">the
-string
-value
-of
-the
-</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-chg">
-labeling
-</ins>
-counter
-<del class="diff-old">value.
-</del>
-</a>.
-<ins class="diff-chg">Increment
-the
-</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-chg">
-labeling
-counter
-</ins></a>.
-</li>
-<li>
-Add
-the
-<del class="diff-old">object
-</del>
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-<ins class="diff-chg">expanded
-node
-</ins></a>
-to
-the
-<del class="diff-old">list
-</del>
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-<ins class="diff-chg">map
-</ins>
-of
-<ins class="diff-new">flattened
-nodes
-</ins></a>:<ol class="algorithm"><li><ins class="diff-new">
-If
-the
-</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-<ins class="diff-new">node
-</ins></a><ins class="diff-new">
-'s
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-is
-already
-in
-the
-</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-new">
-map
-of
-flattened
-</ins>
-nodes
-<del class="diff-old">.
-</del>
-</a>
-<ins class="diff-new">merge
-all
-properties
-from
-the
-entry
-in
-the
-</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-new">
-map
-of
-flattened
-nodes
-</ins></a><ins class="diff-new">
-into
-the
-</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
-expanded
-node
-</ins></a>.</li><li><ins class="diff-new">
-Go
-through
-every
-property
-associated
-with
-an
-array
-in
-the
-</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
-expanded
-node
-</ins></a><ins class="diff-new">
-and
-remove
-any
-duplicate
-IRI
-entries
-from
-the
-array.
-If
-the
-resulting
-array
-only
-has
-one
-IRI
-entry,
-change
-it
-from
-an
-array
-to
-an
-object.
-</ins></li><li><ins class="diff-new">
-Set
-the
-entry
-for
-the
-</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
-expanded
-node
-</ins></a><ins class="diff-new">
-'s
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-in
-the
-</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-new">
-map
-of
-flattened
-nodes
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
-expanded
-node
-</ins></a>.</li></ol>
-</li>
-<li>
-<del class="diff-old">Replace
-</del>
-<ins class="diff-chg">After
-exiting
-the
-recursive
-step,
-replace
-</ins>
-the
-reference
-to
-the
-<del class="diff-old">object
-</del>
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-<ins class="diff-chg">expanded
-node
-</ins></a>
-with
-<ins class="diff-new">an
-object
-containing
-a
-single
-key-value
-pair
-where
-the
-key
-is
-</ins><code><ins class="diff-new">
-@iri
-</ins></code><ins class="diff-new">
-and
-the
-value
-is
-</ins>
-the
-value
-of
-the
-<code>
-@subject
-</code>
-<ins class="diff-new">key
-</ins>
-in
-the
-<del class="diff-old">object.
-</del>
-<ins class="diff-chg">node.
-</ins></li></ol>
-</li>
-<li>
-<del class="diff-old">???duplicate
-objects
-for
-predicates???
-</del>
-<ins class="diff-chg">For
-every
-entry
-in
-the
-</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-chg">
-map
-of
-flattened
-nodes
-</ins></a>,<ins class="diff-chg">
-insert
-a
-key-value
-pair
-into
-the
-</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map"><ins class="diff-chg">
-node
-state
-map
-</ins></a><ins class="diff-chg">
-where
-the
-key
-is
-the
-key
-from
-the
-</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-chg">
-map
-of
-flattened
-nodes
-</ins></a><ins class="diff-chg">
-and
-the
-value
-is
-a
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a><ins class="diff-chg">
-where
-its
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a><ins class="diff-chg">
-refers
-to
-the
-value
-from
-the
-</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-chg">
-map
-of
-flattened
-nodes
-</ins></a>.
-</li>
-<li>
-<ins class="diff-new">Populate
-the
-</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-new">
-incoming
-list
-</ins></a><ins class="diff-new">
-for
-each
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-new">
-node
-state
-</ins></a><ins class="diff-new">
-by
-iterating
-over
-every
-node
-in
-the
-graph
-and
-adding
-its
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-new">
-incoming
-list
-</ins></a><ins class="diff-new">
-associated
-with
-each
-node
-found
-in
-its
-properties.
-</ins>
-</li>
-<li>
-<ins class="diff-new">For
-every
-entry
-in
-the
-</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map"><ins class="diff-new">
-node
-state
-map
-</ins></a><ins class="diff-new">
-that
-has
-a
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-that
-begins
-with
-</ins><code><ins class="diff-new">
-_:c14n
-</ins></code>,<ins class="diff-new">
-relabel
-the
-node
-using
-the
-</ins><a href="#node-relabeling-algorithm"><ins class="diff-new">
-Node
-Relabeling
-Algorithm
-</ins></a>.</li><li>
-Label
-all
-of
-the
-nodes
-that
-contain
-a
-<code>
-@subject
-</code>
-key
-associated
-with
-a
-value
-starting
-with
-<code>
-_:
-</code>
-according
-to
-the
-steps
-in
-the
-<del class="diff-old">Node
-</del>
-<a href="#deterministic-labeling-algorithm">
-<ins class="diff-chg">Deterministic
-</ins>
-Labeling
-Algorithm
-</a>.
-</li>
-</ol>
-</div>
-<div id="node-relabeling-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.3
-</del>
-<ins class="diff-chg">6.11.4
-</ins>
-</span>
-Node
-<del class="diff-old">Labeling
-</del>
-<ins class="diff-chg">Relabeling
-</ins>
-Algorithm
-</h4>
-<p>
-<ins class="diff-new">This
-algorithm
-renames
-a
-node
-by
-generating
-a
-unique
-</ins><dfn title="new_label" id="dfn-new_label"><ins class="diff-new">
-new
-label
-</ins></dfn><ins class="diff-new">
-and
-updating
-all
-references
-to
-that
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-in
-the
-</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map"><ins class="diff-new">
-node
-state
-map
-</ins></a>.<ins class="diff-new">
-The
-</ins><dfn title="old_label" id="dfn-old_label"><ins class="diff-new">
-old
-label
-</ins></dfn><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state"><ins class="diff-new">
-normalization
-state
-</ins></a><ins class="diff-new">
-must
-be
-given
-as
-an
-input
-to
-the
-algorithm.
-The
-</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
-old
-label
-</ins></a><ins class="diff-new">
-is
-the
-current
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-of
-the
-node
-that
-is
-to
-be
-relabeled.
-</ins></p><p>
-The
-node
-<ins class="diff-new">relabeling
-algorithm
-is
-as
-follows:
-</ins></p><ol class="algorithm"><li><ins class="diff-new">
-If
-the
-</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-new">
-labeling
-prefix
-</ins></a><ins class="diff-new">
-is
-</ins><code><ins class="diff-new">
-_:c14n
-</ins></code><ins class="diff-new">
-and
-the
-</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
-old
-label
-</ins></a><ins class="diff-new">
-begins
-with
-</ins><code><ins class="diff-new">
-_:c14n
-</ins></code><ins class="diff-new">
-then
-return
-as
-the
-node
-has
-already
-been
-renamed.
-</ins></li><li><ins class="diff-new">
-Generate
-the
-</ins><dfn title="new_label" id="dfn-new_label-1"><ins class="diff-new">
-new
-label
-</ins></dfn><ins class="diff-new">
-by
-concatenating
-the
-</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-new">
-labeling
-prefix
-</ins></a><ins class="diff-new">
-with
-the
-string
-value
-of
-the
-</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-new">
-labeling
-counter
-</ins></a>.<ins class="diff-new">
-Increment
-the
-</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-new">
-labeling
-counter
-</ins></a>.</li><li><ins class="diff-new">
-For
-the
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-new">
-node
-state
-</ins></a><ins class="diff-new">
-associated
-with
-the
-</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
-old
-label
-</ins></a>,<ins class="diff-new">
-update
-every
-node
-in
-the
-</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-new">
-incoming
-list
-</ins></a><ins class="diff-new">
-by
-changing
-all
-the
-properties
-that
-reference
-the
-</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
-old
-label
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="new_label" href="#dfn-new_label-1"><ins class="diff-new">
-new
-label
-</ins></a>.</li><li><ins class="diff-new">
-Change
-the
-</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
-old
-label
-</ins></a><ins class="diff-new">
-key
-in
-the
-</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map"><ins class="diff-new">
-node
-state
-map
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="new_label" href="#dfn-new_label-1"><ins class="diff-new">
-new
-label
-</ins></a><ins class="diff-new">
-and
-set
-the
-associated
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-new">
-node
-reference
-</ins></a><ins class="diff-new">
-'s
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="new_label" href="#dfn-new_label-1"><ins class="diff-new">
-new
-label
-</ins></a>.</li></ol></div><div id="deterministic-labeling-algorithm" class="section"><h4><span class="secno"><ins class="diff-new">
-6.11.5
-</ins></span><ins class="diff-new">
-Deterministic
-Labeling
-Algorithm
-</ins></h4><p><ins class="diff-new">
-The
-deterministic
-</ins>
-labeling
-algorithm
-takes
-the
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
-<ins class="diff-chg">normalization
-state
-</ins></a><ins class="diff-chg">
-and
-produces
-a
-</ins><dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes">
-list
-of
-<del class="diff-old">expanded
-</del>
-<ins class="diff-chg">finished
-</ins>
-nodes
-</dfn>
-<ins class="diff-chg">that
-is
-sorted
-</ins>
-and
-<del class="diff-old">sorts
-the
-list,
-</del>
-<ins class="diff-chg">contains
-</ins>
-deterministically
-<del class="diff-old">naming
-all
-of
-the
-unlabeled
-</del>
-<ins class="diff-chg">named
-and
-expanded
-</ins>
-nodes
-<del class="diff-old">in
-</del>
-<ins class="diff-chg">from
-</ins>
-the
-graph.
-</p>
-<ol class="algorithm">
-<li>
-<del class="diff-old">Create
-a
-forward
-mapping
-that
-relates
-graph
-nodes
-</del>
-<ins class="diff-chg">Set
-the
-</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-chg">
-labeling
-prefix
-</ins></a>
-to
-<code>
-<ins class="diff-new">_:c14n
-</ins></code>,
-the
-<del class="diff-old">IRIs
-</del>
-<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
-<ins class="diff-chg">labeling
-counter
-</ins></a><ins class="diff-chg">
-to
-</ins><code><ins class="diff-chg">
-1
-</ins></code>,<ins class="diff-chg">
-the
-</ins><dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes-1"><ins class="diff-chg">
-list
-</ins>
-of
-<ins class="diff-new">finished
-nodes
-</ins></dfn><ins class="diff-new">
-to
-an
-empty
-array,
-and
-create
-an
-empty
-array,
-</ins>
-the
-<del class="diff-old">targets
-</del>
-<dfn title="list_of_unfinished_nodes" id="dfn-list_of_unfinished_nodes">
-<ins class="diff-chg">list
-of
-unfinished
-</ins>
-nodes
-<del class="diff-old">that
-they
-reference.
-</del>
-</dfn>.
-</li>
-<li>
-For
-<del class="diff-old">example,
-if
-a
-</del>
-<ins class="diff-chg">each
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-<del class="diff-old">alpha
-</del>
-<ins class="diff-chg">reference
-</ins>
-</a>
-<del class="diff-old">refers
-to
-a
-</del>
-<ins class="diff-chg">in
-the
-</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
-node
-<del class="diff-old">beta
-</del>
-<ins class="diff-chg">state
-map
-</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-node's
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins>
-</a>
-<del class="diff-old">via
-a
-property,
-</del>
-<ins class="diff-chg">does
-not
-start
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-then
-put
-</ins>
-the
-<del class="diff-old">key
-</del>
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-<ins class="diff-chg">node
-reference
-</ins></a>
-in
-the
-<del class="diff-old">forward
-mapping
-</del>
-<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
-<ins class="diff-chg">list
-of
-finished
-nodes
-</ins></a>.</li><li><ins class="diff-chg">
-If
-the
-node's
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins>
-</a>
-<del class="diff-old">is
-</del>
-<ins class="diff-chg">does
-start
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-then
-put
-</ins>
-the
-<del class="diff-old">subject
-IRI
-</del>
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-<ins class="diff-chg">node
-reference
-</ins></a><ins class="diff-chg">
-in
-the
-</ins><a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes"><ins class="diff-chg">
-list
-</ins>
-of
-<del class="diff-old">alpha
-</del>
-<ins class="diff-chg">unfinished
-nodes
-</ins></a>.</li></ol></li><li><ins class="diff-chg">
-Append
-to
-the
-</ins><a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1"><ins class="diff-chg">
-list
-of
-finished
-nodes
-</ins>
-</a>
-<del class="diff-old">and
-</del>
-<ins class="diff-chg">by
-processing
-</ins>
-the
-<del class="diff-old">value
-is
-an
-array
-containing
-at
-least
-</del>
-<ins class="diff-chg">remainder
-of
-</ins>
-the
-<del class="diff-old">subject
-IRI
-</del>
-<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
-<ins class="diff-chg">list
-</ins>
-of
-<del class="diff-old">beta
-.
-</del>
-<ins class="diff-chg">unfinished
-nodes
-</ins></a><ins class="diff-chg">
-until
-it
-is
-empty:
-</ins>
-<ol class="algorithm">
-<li>
-<del class="diff-old">Add
-all
-forward
-mappings
-for
-every
-node
-</del>
-<ins class="diff-chg">Sort
-the
-</ins><a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes"><ins class="diff-chg">
-list
-of
-unfinished
-nodes
-</ins></a>
-in
-<ins class="diff-new">descending
-order
-according
-to
-</ins>
-the
-<del class="diff-old">graph.
-</del>
-<a href="#deep-comparison-algorithm">
-<ins class="diff-chg">Deep
-Comparison
-Algorithm
-</ins></a><ins class="diff-chg">
-to
-determine
-the
-sort
-order.
-</ins>
-</li>
-<li>
-Create
-a
-<del class="diff-old">reverse
-mapping
-</del>
-<dfn title="list_of_labels" id="dfn-list_of_labels">
-<ins class="diff-chg">list
-of
-labels
-</ins>
-</dfn>
-<del class="diff-old">that
-relates
-graph
-nodes
-</del>
-<ins class="diff-chg">and
-initialize
-it
-</ins>
-to
-<del class="diff-old">every
-other
-</del>
-<ins class="diff-chg">an
-empty
-array.
-</ins></li><li><ins class="diff-chg">
-For
-the
-first
-</ins>
-node
-<del class="diff-old">that
-refers
-</del>
-<ins class="diff-chg">from
-the
-</ins><a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes"><ins class="diff-chg">
-list
-of
-unfinished
-nodes
-</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
-Add
-its
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>
-to
-<del class="diff-old">them
-in
-</del>
-the
-<del class="diff-old">graph.
-</del>
-<a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">
-<ins class="diff-chg">list
-of
-labels
-</ins></a>.</li><li>
-For
-<del class="diff-old">example,
-if
-</del>
-<ins class="diff-chg">each
-key-value
-pair
-from
-its
-associated
-</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-chg">
-outgoing
-serialization
-map
-</ins></a>,<ins class="diff-chg">
-add
-the
-key
-to
-</ins>
-a
-<del class="diff-old">node
-alpha
-refers
-</del>
-<ins class="diff-chg">list
-and
-then
-sort
-the
-list
-according
-to
-the
-lexicographical
-order
-of
-the
-keys'
-associated
-values.
-Append
-the
-list
-to
-the
-</ins><a class="tref" title="list_of_nodes_to_label"><ins class="diff-chg">
-list
-of
-nodes
-to
-label
-</ins></a>.</li><li><ins class="diff-chg">
-For
-each
-key-value
-pair
-from
-its
-associated
-</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-chg">
-incoming
-serialization
-map
-</ins></a>,<ins class="diff-chg">
-add
-the
-key
-</ins>
-to
-a
-<ins class="diff-new">list
-and
-then
-sort
-the
-list
-according
-to
-the
-lexicographical
-order
-of
-the
-keys'
-associated
-values.
-Append
-the
-list
-to
-the
-</ins><a class="tref" title="list_of_nodes_to_label"><ins class="diff-new">
-list
-of
-nodes
-to
-label
-</ins></a>.</li></ol></li><li><ins class="diff-new">
-For
-each
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-in
-the
-</ins><a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels"><ins class="diff-new">
-list
-of
-labels
-</ins></a>,<ins class="diff-new">
-relabel
-the
-associated
-</ins>
-node
-<del class="diff-old">beta
-</del>
-<ins class="diff-chg">according
-to
-the
-</ins><a href="#node-relabeling-algorithm"><ins class="diff-chg">
-Node
-Relabeling
-Algorithm
-</ins></a>.<ins class="diff-chg">
-If
-any
-</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-chg">
-outgoing
-serialization
-map
-</ins>
-</a>
-<del class="diff-old">via
-</del>
-<ins class="diff-chg">contains
-</ins>
-a
-<del class="diff-old">property,
-the
-</del>
-key
-<del class="diff-old">in
-</del>
-<ins class="diff-chg">that
-matches
-</ins>
-the
-<del class="diff-old">reverse
-mapping
-is
-</del>
-<a class="tref internalDFN" title="label" href="#dfn-label">
-<ins class="diff-chg">label
-</ins></a>,<ins class="diff-chg">
-clear
-</ins>
-the
-<del class="diff-old">subject
-IRI
-for
-beta
-</del>
-<ins class="diff-chg">map
-</ins>
-and
-<ins class="diff-new">set
-</ins>
-the
-<del class="diff-old">value
-is
-</del>
-<ins class="diff-chg">associated
-</ins><a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization"><ins class="diff-chg">
-outgoing
-serialization
-</ins></a><ins class="diff-chg">
-to
-</ins>
-an
-<del class="diff-old">array
-containing
-at
-least
-</del>
-<ins class="diff-chg">empty
-string.
-If
-any
-</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-chg">
-incoming
-serialization
-map
-</ins></a><ins class="diff-chg">
-contains
-a
-key
-that
-matches
-</ins>
-the
-<del class="diff-old">IRI
-for
-alpha
-.
-</del>
-<a class="tref internalDFN" title="label" href="#dfn-label">
-<ins class="diff-chg">label
-</ins></a>,<ins class="diff-chg">
-clear
-the
-map
-and
-set
-the
-associated
-</ins><a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization"><ins class="diff-chg">
-incoming
-serialization
-</ins></a><ins class="diff-chg">
-to
-an
-empty
-string.
-</ins></li>
-<li>
-<del class="diff-old">Add
-all
-reverse
-mappings
-for
-every
-</del>
-<ins class="diff-chg">Remove
-each
-</ins>
-node
-<del class="diff-old">in
-</del>
-<ins class="diff-chg">with
-a
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-that
-starts
-with
-</ins><code><ins class="diff-chg">
-_:c14n
-</ins></code><ins class="diff-chg">
-from
-</ins>
-the
-<del class="diff-old">graph.
-</del>
-<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
-<ins class="diff-chg">list
-of
-unfinished
-nodes
-</ins></a><ins class="diff-chg">
-and
-add
-it
-to
-the
-</ins><a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1"><ins class="diff-chg">
-list
-of
-finished
-nodes
-</ins></a>.
-</li>
-</ol>
-</li>
-<li>
-<del class="diff-old">Label
-every
-unlabeled
-node
-according
-to
-</del>
-<ins class="diff-chg">Sort
-</ins>
-the
-<del class="diff-old">Label
-Generation
-Algorithm
-</del>
-<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
-<ins class="diff-chg">list
-of
-finished
-nodes
-</ins>
-</a>
-in
-descending
-order
-<del class="diff-old">using
-</del>
-<ins class="diff-chg">according
-to
-</ins>
-the
-<a href="#deep-comparison-algorithm">
-Deep
-Comparison
-Algorithm
-</a>
-to
-determine
-the
-sort
-order.
-</li>
-</ol>
-</div>
-<div id="shallow-comparison-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.4
-</del>
-<ins class="diff-chg">6.11.6
-</ins>
-</span>
-Shallow
-Comparison
-Algorithm
-</h4>
-<p>
-The
-shallow
-comparison
-algorithm
-takes
-two
-unlabeled
-nodes,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-and
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>,
-as
-input
-and
-determines
-which
-one
-should
-come
-first
-in
-a
-sorted
-list.
-The
-following
-algorithm
-determines
-the
-steps
-that
-are
-executed
-in
-order
-to
-determine
-the
-node
-that
-should
-come
-first
-in
-a
-list:
-</p>
-<ol class="algorithm">
-<li>
-Compare
-the
-total
-number
-of
-node
-properties.
-The
-node
-with
-fewer
-properties
-is
-first.
-</li>
-<li>
-Lexicographically
-sort
-the
-property
-IRIs
-for
-each
-node
-and
-compare
-the
-sorted
-lists.
-If
-an
-IRI
-is
-found
-to
-be
-lexicographically
-smaller,
-the
-node
-containing
-that
-IRI
-is
-first.
-</li>
-<li>
-Compare
-the
-property
-values
-against
-one
-another:
-<ol class="algorithm">
-<li>
-Create
-an
-<dfn title="alpha_list" id="dfn-alpha_list">
-alpha
-list
-</dfn>
-by
-adding
-all
-values
-associated
-with
-the
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-property
-that
-is
-not
-an
-unlabeled
-node.
-Track
-the
-number
-of
-unlabeled
-nodes
-not
-added
-to
-the
-list
-using
-an
-<dfn title="alpha_unlabeled_counter" id="dfn-alpha_unlabeled_counter">
-alpha
-unlabeled
-counter
-</dfn>.
-</li>
-<li>
-Create
-a
-<dfn title="beta_list" id="dfn-beta_list">
-beta
-list
-</dfn>
-by
-adding
-all
-values
-associated
-with
-the
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-property
-that
-is
-not
-an
-unlabeled
-node.
-Track
-the
-number
-of
-unlabeled
-nodes
-not
-added
-to
-the
-list
-using
-an
-<dfn title="beta_unlabeled_counter" id="dfn-beta_unlabeled_counter">
-beta
-unlabeled
-counter
-</dfn>.
-</li>
-<li>
-Compare
-the
-length
-of
-<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
-alpha
-list
-</a>
-and
-<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
-beta
-list
-</a>.
-The
-node
-associated
-with
-the
-list
-containing
-the
-lesser
-number
-of
-items
-is
-first.
-</li>
-<li>
-Compare
-the
-<a class="tref internalDFN" title="alpha_unlabeled_counter" href="#dfn-alpha_unlabeled_counter">
-alpha
-unlabeled
-counter
-</a>
-to
-the
-<a class="tref internalDFN" title="beta_unlabeled_counter" href="#dfn-beta_unlabeled_counter">
-beta
-unlabeled
-counter
-</a>,
-the
-node
-associated
-with
-the
-lesser
-value
-is
-first.
-</li>
-<li>
-Sort
-<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
-alpha
-list
-</a>
-and
-<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
-beta
-list
-</a>
-<del class="diff-old">using
-</del>
-<ins class="diff-chg">according
-to
-</ins>
-the
-<a href="#object-comparison-algorithm">
-Object
-Comparison
-Algorithm
-</a>
-as
-the
-sorting
-comparator.
-For
-each
-offset
-into
-the
-<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
-alpha
-list
-</a>,
-compare
-the
-item
-at
-the
-offset
-against
-the
-item
-at
-the
-same
-offset
-in
-the
-<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
-beta
-list
-</a>
-<del class="diff-old">using
-</del>
-<ins class="diff-chg">according
-to
-</ins>
-the
-<a href="#object-comparison-algorithm">
-Object
-Comparison
-Algorithm
-</a>.
-The
-node
-associated
-with
-the
-lesser
-item
-is
-first.
-</li>
-</ol>
-</li>
-<li>
-Process
-the
-<del class="diff-old">reverse
-mapping
-</del>
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-<ins class="diff-chg">incoming
-list
-</ins>
-</a>
-<ins class="diff-new">s
-associated
-with
-each
-node
-</ins>
-to
-determine
-order:
-<ol class="algorithm">
-<li>
-The
-node
-with
-<del class="diff-old">fewer
-entries
-in
-</del>
-the
-<del class="diff-old">reverse
-mapping
-</del>
-<ins class="diff-chg">shortest
-</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-chg">
-incoming
-list
-</ins>
-</a>
-is
-first.
-</li>
-<li>
-Sort
-the
-<del class="diff-old">reverse
-mapping
-entry
-for
-alpha
-into
-a
-</del>
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-<ins class="diff-chg">incoming
-</ins>
-list
-<del class="diff-old">of
-sorted
-alpha
-mappings
-.
-Sort
-the
-reverse
-mapping
-</del>
-</a>
-<del class="diff-old">entry
-for
-beta
-into
-a
-list
-of
-sorted
-beta
-mappings
-.
-</del>
-<ins class="diff-chg">s
-according
-to
-incoming
-property
-and
-then
-incoming
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>.
-</li>
-<li>
-The
-node
-associated
-with
-the
-<del class="diff-old">list
-of
-sorted
-mappings
-with
-the
-</del>
-least
-number
-of
-<ins class="diff-new">incoming
-</ins>
-unlabeled
-nodes
-is
-first.
-</li>
-<li>
-For
-each
-offset
-into
-the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-<ins class="diff-chg">incoming
-</ins>
-list
-<del class="diff-old">of
-sorted
-alpha
-mappings
-,
-</del>
-</a>
-<ins class="diff-chg">s,
-</ins>
-compare
-the
-<del class="diff-old">IRI
-at
-the
-offset
-against
-the
-IRI
-at
-the
-same
-offset
-in
-</del>
-<ins class="diff-chg">associated
-properties
-and
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s.
-The
-node
-associated
-with
-</ins>
-the
-<del class="diff-old">list
-of
-sorted
-beta
-mappings
-.
-</del>
-<ins class="diff-chg">lexicographically
-lesser
-associated
-property
-is
-first.
-</ins>
-The
-node
-associated
-with
-the
-lexicographically
-lesser
-<del class="diff-old">IRI
-</del>
-<a class="tref internalDFN" title="label" href="#dfn-label">
-<ins class="diff-chg">label
-</ins></a>
-is
-first.
-</li>
-</ol>
-</li>
-<li>
-Otherwise,
-the
-nodes
-are
-<del class="diff-old">equal.
-</del>
-<ins class="diff-chg">equivalent.
-</ins>
-</li>
-</ol>
-</div>
-<div id="object-comparison-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.5
-</del>
-<ins class="diff-chg">6.11.7
-</ins>
-</span>
-Object
-Comparison
-Algorithm
-</h4>
-<p>
-The
-object
-comparison
-algorithm
-is
-designed
-to
-compare
-two
-graph
-node
-property
-values,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-and
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>,
-against
-the
-other.
-The
-algorithm
-is
-useful
-when
-sorting
-two
-lists
-of
-graph
-node
-properties.
-</p>
-<ol class="algorithm">
-<li>
-If
-one
-of
-the
-values
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-and
-the
-other
-is
-not,
-the
-value
-that
-is
-a
-string
-is
-first.
-</li>
-<li>
-If
-both
-values
-are
-<del class="diff-old">strings,
-</del>
-<a class="tref internalDFN" title="string" href="#dfn-string">
-<ins class="diff-chg">string
-</ins></a><ins class="diff-chg">
-s,
-</ins>
-the
-lexicographically
-lesser
-string
-is
-first.
-</li>
-<li>
-If
-one
-of
-the
-values
-is
-a
-literal
-and
-the
-other
-is
-not,
-the
-value
-that
-is
-a
-literal
-is
-first.
-</li>
-<li>
-If
-both
-values
-are
-literals
-<ol class="algorithm">
-<li>
-The
-lexicographically
-lesser
-string
-associated
-with
-<code>
-@literal
-</code>
-is
-first.
-</li>
-<li>
-The
-lexicographically
-lesser
-string
-associated
-with
-<code>
-@datatype
-</code>
-is
-first.
-</li>
-<li>
-The
-lexicographically
-lesser
-string
-associated
-with
-<code>
-@language
-</code>
-is
-first.
-</li>
-</ol>
-</li>
-<li>
-If
-both
-values
-are
-expanded
-IRIs,
-the
-lexicographically
-lesser
-string
-associated
-with
-<code>
-@iri
-</code>
-is
-first.
-</li>
-<li>
-Otherwise,
-the
-two
-values
-are
-equivalent.
-</li>
-</ol>
-</div>
-<div id="deep-comparison-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.6
-</del>
-<ins class="diff-chg">6.11.8
-</ins>
-</span>
-Deep
-Comparison
-Algorithm
-</h4>
-<p>
-<del class="diff-old">DeepCompare(bnodeA,
-bnodeB):
-Return
-</del>
-<ins class="diff-chg">The
-deep
-comparison
-algorithm
-is
-used
-to
-compare
-the
-difference
-between
-two
-nodes,
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a>.<ins class="diff-chg">
-A
-deep
-comparison
-takes
-</ins>
-the
-<ins class="diff-new">incoming
-and
-outgoing
-node
-edges
-in
-a
-graph
-into
-account
-if
-the
-number
-of
-properties
-and
-</ins>
-value
-of
-<del class="diff-old">ShallowCompare
-</del>
-<ins class="diff-chg">those
-properties
-are
-identical.
-The
-algorithm
-is
-helpful
-when
-sorting
-a
-list
-of
-nodes
-and
-will
-return
-whichever
-node
-should
-be
-placed
-first
-in
-a
-list
-</ins>
-if
-<ins class="diff-new">the
-two
-nodes
-are
-not
-truly
-equivalent.
-</ins></p><p><ins class="diff-new">
-When
-performing
-the
-steps
-required
-by
-the
-deep
-comparison
-algorithm,
-</ins>
-it
-is
-<del class="diff-old">non-zero.
-</del>
-<ins class="diff-chg">helpful
-to
-track
-state
-information
-about
-mappings.
-The
-information
-contained
-in
-a
-</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-chg">
-mapping
-state
-</ins></a><ins class="diff-chg">
-is
-described
-below.
-</ins></p><dl class="algorithm"><dt><dfn title="mapping_state" id="dfn-mapping_state"><ins class="diff-chg">
-mapping
-state
-</ins></dfn></dt><dd><dl><dt><dfn title="mapping_counter" id="dfn-mapping_counter"><ins class="diff-chg">
-mapping
-counter
-</ins></dfn></dt><dd><ins class="diff-chg">
-Keeps
-track
-of
-the
-number
-of
-nodes
-that
-have
-been
-mapped
-to
-</ins><a class="tref" title="serialization_labels"><ins class="diff-chg">
-serialization
-labels
-</ins></a>.<ins class="diff-chg">
-It
-is
-initialized
-to
-</ins><code><ins class="diff-chg">
-1
-</ins></code>.</dd><dt><dfn title="processed_labels_map" id="dfn-processed_labels_map"><ins class="diff-chg">
-processed
-labels
-map
-</ins></dfn></dt><dd><ins class="diff-chg">
-Keeps
-track
-of
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-of
-nodes
-that
-have
-already
-been
-assigned
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-s.
-It
-is
-initialized
-to
-an
-empty
-map.
-</ins></dd><dt><dfn title="serialized_labels_map" id="dfn-serialized_labels_map"><ins class="diff-chg">
-serialized
-labels
-map
-</ins></dfn></dt><dd><ins class="diff-chg">
-Maps
-a
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-to
-its
-associated
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a>.<ins class="diff-chg">
-It
-is
-initialized
-to
-an
-empty
-map.
-</ins></dd><dt><dfn title="adjacent_info_map" id="dfn-adjacent_info_map"><ins class="diff-chg">
-adjacent
-info
-map
-</ins></dfn></dt><dd><ins class="diff-chg">
-Maps
-a
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-to
-the
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-associated
-with
-it,
-the
-list
-of
-sorted
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-s
-for
-adjacent
-nodes,
-and
-the
-map
-of
-adjacent
-node
-</ins><a class="tref" title="serialiation_label"><ins class="diff-chg">
-serialiation
-label
-</ins></a><ins class="diff-chg">
-s
-to
-their
-associated
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s.
-It
-is
-initialized
-to
-an
-empty
-map.
-</ins></dd><dt><dfn title="key_stack" id="dfn-key_stack"><ins class="diff-chg">
-key
-stack
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-stack
-where
-each
-element
-contains
-an
-array
-of
-adjacent
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-s
-and
-an
-index
-into
-that
-array.
-It
-is
-initialized
-to
-a
-stack
-containing
-a
-single
-element
-where
-its
-array
-contains
-a
-single
-string
-element
-</ins><code><ins class="diff-chg">
-s1
-</ins></code><ins class="diff-chg">
-and
-its
-index
-is
-set
-to
-</ins><code><ins class="diff-chg">
-0
-</ins></code>.</dd><dt><dfn title="serialized_keys" id="dfn-serialized_keys"><ins class="diff-chg">
-serialized
-keys
-</ins></dfn></dt><dd><ins class="diff-chg">
-Keeps
-track
-of
-which
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-s
-have
-already
-been
-written
-at
-least
-once
-to
-the
-</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
-serialization
-string
-</ins></a>.<ins class="diff-chg">
-It
-is
-initialized
-to
-an
-empty
-map.
-</ins></dd><dt><dfn title="serialization_string" id="dfn-serialization_string"><ins class="diff-chg">
-serialization
-string
-</ins></dfn></dt><dd><ins class="diff-chg">
-A
-string
-that
-is
-incrementally
-updated
-as
-a
-serialization
-is
-built.
-It
-is
-initialized
-to
-an
-empty
-string.
-</ins></dd></dl></dd></dl><p><ins class="diff-chg">
-The
-deep
-comparison
-algorithm
-is
-as
-follows:
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Perform
-a
-comparison
-between
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-according
-to
-the
-</ins><a href="#shallow-comparison-algorithm"><ins class="diff-chg">
-Shallow
-Comparison
-Algorithm
-</ins></a>.<ins class="diff-chg">
-If
-the
-result
-does
-not
-show
-that
-the
-two
-nodes
-are
-equivalent,
-return
-the
-result.
-</ins>
-</li>
-<li>
-Compare
-<del class="diff-old">property
-serializations
-</del>
-<ins class="diff-chg">incoming
-</ins>
-and
-<del class="diff-old">then
-reference
-serializations,
-recycling
-the
-mapping
-from
-property
-serializations
-</del>
-<ins class="diff-chg">outgoing
-edges
-</ins>
-for
-<del class="diff-old">reference
-serializations.
-</del>
-<ins class="diff-chg">each
-node,
-updating
-their
-associated
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a><ins class="diff-chg">
-as
-each
-node
-is
-processed:
-</ins>
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-<ins class="diff-new">outgoing
-</ins>
-serialization
-<ins class="diff-new">map
-</ins></a>
-for
-<del class="diff-old">bnodeA
-</del>
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-<ins class="diff-chg">alpha
-</ins></a>
-is
-<del class="diff-old">null,
-do
-SerializeNode(bnodeA,
-</del>
-<ins class="diff-chg">empty,
-generate
-the
-serialization
-according
-to
-the
-</ins><a href="#node-serialization-algorithm"><ins class="diff-chg">
-Node
-Serialization
-Algorithm
-</ins></a>.<ins class="diff-chg">
-Provide
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-'s
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a>,<ins class="diff-chg">
-a
-</ins>
-new
-<del class="diff-old">Mapping).
-</del>
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-<ins class="diff-chg">mapping
-state
-</ins></a>,<code><ins class="diff-chg">
-outgoing
-direction
-</ins></code><ins class="diff-chg">
-to
-the
-algorithm
-as
-inputs.
-</ins>
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-<ins class="diff-new">outgoing
-</ins>
-serialization
-<ins class="diff-new">map
-</ins></a>
-for
-<del class="diff-old">bnodeB
-</del>
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-<ins class="diff-chg">beta
-</ins></a>
-is
-<del class="diff-old">null,
-do
-SerializeNode(bnodeA,
-</del>
-<ins class="diff-chg">empty,
-generate
-the
-serialization
-according
-to
-the
-</ins><a href="#node-serialization-algorithm"><ins class="diff-chg">
-Node
-Serialization
-Algorithm
-</ins></a>.<ins class="diff-chg">
-Provide
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-'s
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a>,<ins class="diff-chg">
-a
-</ins>
-new
-<del class="diff-old">Mapping).
-</del>
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-<ins class="diff-chg">mapping
-state
-</ins></a>,<ins class="diff-chg">
-and
-</ins><code><ins class="diff-chg">
-outgoing
-direction
-</ins></code><ins class="diff-chg">
-to
-the
-algorithm
-as
-inputs.
-</ins>
-</li>
-<li>
-<del class="diff-old">Return
-</del>
-<ins class="diff-chg">If
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-'s
-</ins><a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization"><ins class="diff-chg">
-outgoing
-serialization
-</ins></a><ins class="diff-chg">
-is
-lexicographically
-less
-than
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-'s,
-then
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-is
-first.
-If
-it
-is
-greater,
-then
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-is
-first.
-</ins></li><li><ins class="diff-chg">
-If
-</ins>
-the
-<del class="diff-old">result
-</del>
-<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
-<ins class="diff-chg">incoming
-serialization
-map
-</ins></a><ins class="diff-chg">
-for
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-is
-empty,
-generate
-the
-serialization
-according
-to
-the
-</ins><a href="#node-serialization-algorithm"><ins class="diff-chg">
-Node
-Serialization
-Algorithm
-</ins></a>.<ins class="diff-chg">
-Provide
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-'s
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a>,<ins class="diff-chg">
-a
-new
-</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-chg">
-mapping
-state
-</ins></a><ins class="diff-chg">
-with
-its
-</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
-serialized
-labels
-map
-</ins></a><ins class="diff-chg">
-set
-to
-a
-copy
-</ins>
-of
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-<ins class="diff-new">alpha
-</ins></a><ins class="diff-new">
-'s
-</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-new">
-outgoing
-serialization
-map
-</ins></a>,<ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-incoming
-direction
-</ins></code><ins class="diff-new">
-to
-the
-algorithm
-as
-inputs.
-</ins></li><li><ins class="diff-new">
-If
-the
-</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-new">
-incoming
-serialization
-map
-</ins></a><ins class="diff-new">
-for
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-new">
-beta
-</ins></a><ins class="diff-new">
-is
-empty,
-generate
-the
-serialization
-according
-to
-the
-</ins><a href="#node-serialization-algorithm"><ins class="diff-new">
-Node
-Serialization
-Algorithm
-</ins></a>.<ins class="diff-new">
-Provide
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-new">
-beta
-</ins></a><ins class="diff-new">
-'s
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-new">
-node
-state
-</ins></a>,
-a
-<del class="diff-old">lexicographical
-comparison
-</del>
-<ins class="diff-chg">new
-</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-chg">
-mapping
-state
-</ins></a><ins class="diff-chg">
-with
-its
-</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
-serialized
-labels
-map
-</ins></a><ins class="diff-chg">
-set
-to
-a
-copy
-</ins>
-of
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-<ins class="diff-new">beta
-</ins></a><ins class="diff-new">
-'s
-</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-new">
-outgoing
-serialization
-map
-</ins></a>,<ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-incoming
-direction
-</ins></code><ins class="diff-new">
-to
-</ins>
-the
-<del class="diff-old">two
-serializations.
-</del>
-<ins class="diff-chg">algorithm
-as
-inputs.
-</ins>
-</li>
-<li>
-<ins class="diff-chg">If
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-'s
-</ins><a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization"><ins class="diff-chg">
-incoming
-serialization
-</ins></a><ins class="diff-chg">
-is
-lexicographically
-less
-than
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-'s,
-then
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-is
-first.
-If
-it
-is
-greater,
-then
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-is
-first.
-</ins>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<div id="node-serialization-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.7
-</del>
-<ins class="diff-chg">6.11.9
-</ins>
-</span>
-Node
-Serialization
-Algorithm
-</h4>
-<p>
-<del class="diff-old">SerializeNode(bnode,
-mapping,
-dir):
-</del>
-<ins class="diff-chg">The
-node
-serialization
-algorithm
-takes
-a
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
-node
-state
-</ins></a>,<ins class="diff-chg">
-a
-</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-chg">
-mapping
-state
-</ins></a>,<ins class="diff-chg">
-and
-a
-</ins><dfn title="direction" id="dfn-direction"><ins class="diff-chg">
-direction
-</ins></dfn><ins class="diff-chg">
-(either
-</ins><code><ins class="diff-chg">
-outgoing
-direction
-</ins></code><ins class="diff-chg">
-or
-</ins><code><ins class="diff-chg">
-incoming
-direction
-</ins></code><ins class="diff-chg">
-)
-as
-inputs
-and
-generates
-a
-deterministic
-serialization
-for
-the
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a>.
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-<del class="diff-old">bnode's
-</del>
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-<del class="diff-old">is
-already
-marked
-</del>
-</a>
-<ins class="diff-chg">exists
-in
-the
-</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
-processed
-labels
-map
-</ins></a>,<ins class="diff-chg">
-terminate
-the
-algorithm
-</ins>
-as
-<del class="diff-old">mapped,
-return.
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-has
-already
-been
-created.
-</ins>
-</li>
-<li>
-<del class="diff-old">Mark
-</del>
-<ins class="diff-chg">Set
-</ins>
-the
-<del class="diff-old">bnode's
-</del>
-<ins class="diff-chg">value
-associated
-with
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label">
-label
-<del class="diff-old">as
-mapped.
-</del>
-</a>
-<ins class="diff-chg">in
-the
-</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
-processed
-labels
-map
-</ins></a><ins class="diff-chg">
-to
-</ins><code><ins class="diff-chg">
-true
-</ins></code>.
-</li>
-<li>
-<del class="diff-old">Assign
-</del>
-<ins class="diff-chg">Generate
-</ins>
-the
-next
-<dfn title="serialization_label" id="dfn-serialization_label-1">
-serialization
-<del class="diff-old">name
-</del>
-<ins class="diff-chg">label
-</ins></dfn><ins class="diff-chg">
-for
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-according
-</ins>
-to
-the
-<del class="diff-old">bnode's
-</del>
-<a href="#serialization-label-generation-algorithm">
-<ins class="diff-chg">Serialization
-Label
-Generation
-Algorithm
-</ins></a>.</li><li><ins class="diff-chg">
-Create
-an
-empty
-array
-called
-the
-</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
-list
-of
-unserialized
-labels
-</ins></a>.</li><li><ins class="diff-chg">
-For
-every
-</ins><a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-<ins class="diff-new">in
-a
-list,
-where
-the
-list
-the
-</ins><a class="tref internalDFN" title="outgoing_list" href="#dfn-outgoing_list"><ins class="diff-new">
-outgoing
-list
-</ins></a><ins class="diff-new">
-if
-the
-</ins><a class="tref internalDFN" title="direction" href="#dfn-direction"><ins class="diff-new">
-direction
-</ins></a><ins class="diff-new">
-is
-</ins><code><ins class="diff-new">
-outgoing
-direction
-</ins></code>
-and
-<del class="diff-old">store
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-chg">
-incoming
-list
-</ins></a><ins class="diff-chg">
-otherwise,
-if
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-starts
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code>,
-it
-<del class="diff-old">in
-"top".
-</del>
-<ins class="diff-chg">is
-the
-</ins><dfn title="target_node_label" id="dfn-target_node_label"><ins class="diff-chg">
-target
-node
-label
-</ins></dfn>:<ol class="algorithm">
-<li>
-<del class="diff-old">Split
-</del>
-<ins class="diff-chg">Look
-up
-</ins>
-the
-<del class="diff-old">bnode's
-adjacent
-bnodes
-into
-a
-</del>
-<a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">
-<ins class="diff-chg">target
-node
-label
-</ins></a><ins class="diff-chg">
-in
-the
-</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
-processed
-labels
-</ins>
-map
-</a>
-and
-<ins class="diff-new">if
-</ins>
-a
-<del class="diff-old">list.
-The
-map
-contains
-a
-reverse
-</del>
-mapping
-<del class="diff-old">of
-serialization
-names
-to
-bnode
-labels
-for
-all
-</del>
-<ins class="diff-chg">exists,
-update
-the
-</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
-serialized
-</ins>
-labels
-<ins class="diff-new">map
-</ins></a><ins class="diff-new">
-where
-the
-key
-is
-the
-value
-</ins>
-in
-the
-<del class="diff-old">mapping,
-</del>
-<a class="tref" title="serialization_map">
-<ins class="diff-chg">serialization
-map
-</ins></a><ins class="diff-chg">
-and
-the
-value
-is
-the
-</ins><a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label"><ins class="diff-chg">
-target
-node
-label
-</ins></a>.</li><li><ins class="diff-chg">
-Otherwise,
-add
-the
-</ins><a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label"><ins class="diff-chg">
-target
-node
-label
-</ins></a><ins class="diff-chg">
-to
-</ins>
-the
-<a class="tref" title="list_of_unserialized_labels">
-list
-<del class="diff-old">(notMapped)
-contains
-all
-</del>
-<ins class="diff-chg">of
-unserialized
-</ins>
-labels
-<del class="diff-old">not
-in
-the
-mapping
-yet.
-</del>
-</a>.
-</li>
-</ol>
-</li>
-<li>
-<del class="diff-old">Save
-a
-copy
-</del>
-<ins class="diff-chg">Set
-the
-</ins><dfn title="maximum_serialization_combinations" id="dfn-maximum_serialization_combinations"><ins class="diff-chg">
-maximum
-serialization
-combinations
-</ins></dfn><ins class="diff-chg">
-to
-</ins><code><ins class="diff-chg">
-1
-</ins></code><ins class="diff-chg">
-or
-the
-length
-</ins>
-of
-the
-<del class="diff-old">mapping.
-</del>
-<a class="tref" title="list_of_unserialized_labels">
-<ins class="diff-chg">list
-of
-unserialized
-labels
-</ins></a>,<ins class="diff-chg">
-whichever
-is
-greater.
-</ins>
-</li>
-<li>
-<del class="diff-old">Do
-SerializeCombos
-for
-max(1,
-notMapped.length)
-using
-</del>
-<ins class="diff-chg">While
-</ins>
-the
-<del class="diff-old">original
-mapping
-for
-</del>
-<a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">
-<ins class="diff-chg">maximum
-serialization
-combinations
-</ins></a><ins class="diff-chg">
-is
-greater
-than
-</ins><code><ins class="diff-chg">
-0
-</ins></code>,<ins class="diff-chg">
-perform
-</ins>
-the
-<del class="diff-old">first
-call
-</del>
-<a href="#combinatorial-serialization-algorithm">
-<ins class="diff-chg">Combinatorial
-Serialization
-Algorithm
-</ins></a><ins class="diff-chg">
-and
-decrement
-the
-</ins><a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations"><ins class="diff-chg">
-maximum
-serialization
-combinations
-</ins></a><ins class="diff-chg">
-by
-</ins><code><ins class="diff-chg">
-1
-</ins></code><ins class="diff-chg">
-for
-each
-iteration.
-</ins></li></ol></div><div id="serialization-label-generation-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
-6.11.10
-</ins></span><ins class="diff-chg">
-Serialization
-Label
-Generation
-Algorithm
-</ins></h4><p><ins class="diff-chg">
-The
-algorithm
-generates
-a
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-given
-a
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>
-and
-a
-<del class="diff-old">copy
-</del>
-<a class="tref" title="mapping_count">
-<ins class="diff-chg">mapping
-count
-</ins></a>.</p><li><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-starts
-with
-the
-string
-</ins><code><ins class="diff-chg">
-_:c14n
-</ins></code>,<ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-is
-the
-letter
-</ins><code><ins class="diff-chg">
-c
-</ins></code><ins class="diff-chg">
-followed
-by
-the
-number
-that
-follows
-</ins><code><ins class="diff-chg">
-_:c14n
-</ins></code><ins class="diff-chg">
-in
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>.</li><li><ins class="diff-chg">
-Otherwise,
-the
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-is
-the
-letter
-</ins><code><ins class="diff-chg">
-s
-</ins></code><ins class="diff-chg">
-followed
-by
-the
-string
-value
-</ins>
-of
-<a class="tref" title="mapping_count">
-<ins class="diff-new">mapping
-count
-</ins></a>.<ins class="diff-new">
-Increment
-</ins>
-the
-<a class="tref" title="mapping_count">
-mapping
-<del class="diff-old">for
-each
-subsequent
-call.
-</del>
-<ins class="diff-chg">count
-</ins></a><ins class="diff-chg">
-by
-</ins><code><ins class="diff-chg">
-1
-</ins></code><ins class="diff-chg">
-ensuring
-that
-the
-value
-persists
-across
-multiple
-invocations
-of
-this
-algorithm.
-</ins>
-</li>
-</ol>
-</li>
-</div>
-<div id="combinatorial-serialization-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.8
-</del>
-<ins class="diff-chg">6.11.11
-</ins>
-</span>
-Combinatorial
-Serialization
-Algorithm
-</h4>
-<p>
-<del class="diff-old">SerializeCombos(top,
-mapping,
-mapped,
-notMapped,
-dir):
-</del>
-<ins class="diff-chg">SerializeCombos()
-takes
-a
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>,<ins class="diff-chg">
-a
-</ins><a class="tref" title="serialization_map"><ins class="diff-chg">
-serialization
-map
-</ins></a>,<ins class="diff-chg">
-a
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a>,<ins class="diff-chg">
-a
-</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
-processed
-labels
-map
-</ins></a>,<ins class="diff-chg">
-a
-</ins><a class="tref" title="serialization_map"><ins class="diff-chg">
-serialization
-map
-</ins></a>,<ins class="diff-chg">
-a
-</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
-serialized
-labels
-map
-</ins></a>,<ins class="diff-chg">
-and
-a
-</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
-list
-of
-unserialized
-labels
-</ins></a><ins class="diff-chg">
-as
-inputs
-and
-generates
-deterministic
-serializations
-for
-all
-possible
-combinations
-of
-graphs.
-</ins>
-</p>
-<ol class="algorithm">
-<li>
-If
-<del class="diff-old">notMapped
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
-list
-of
-unserialized
-labels
-</ins></a>
-is
-<del class="diff-old">non-empty,
-copy
-mapped
-and
-assign
-</del>
-<ins class="diff-chg">not
-empty:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-Copy
-</ins>
-the
-<del class="diff-old">next
-</del>
-<a class="tref" title="serialization_map">
-serialization
-<del class="diff-old">name
-</del>
-<ins class="diff-chg">map
-</ins></a>
-to
-<del class="diff-old">its
-</del>
-<ins class="diff-chg">the
-</ins><dfn title="serialization_map_copy" id="dfn-serialization_map_copy"><ins class="diff-chg">
-serialization
-map
-copy
-</ins></dfn>.</li><li><ins class="diff-chg">
-Remove
-the
-</ins>
-first
-<del class="diff-old">bnode,
-remove
-it
-</del>
-<a class="tref" title="unserialized_label">
-<ins class="diff-chg">unserialized
-label
-</ins></a>
-from
-the
-<del class="diff-old">list,
-</del>
-<a class="tref" title="list_of_unserialized_labels">
-<ins class="diff-chg">list
-of
-unserialized
-labels
-</ins></a>
-and
-<del class="diff-old">update
-mapped.
-For
-max(1,
-notMapped.length)
-recurse
-into
-SerializeCombos
-with
-</del>
-<ins class="diff-chg">create
-a
-new
-</ins><dfn title="new_serialization_label" id="dfn-new_serialization_label"><ins class="diff-chg">
-new
-serialization
-label
-</ins></dfn><ins class="diff-chg">
-according
-to
-</ins>
-the
-<del class="diff-old">original
-</del>
-<a href="#serialization-label-generation-algorithm">
-<ins class="diff-chg">Serialization
-Label
-Generation
-Algorithm
-</ins></a><ins class="diff-chg">
-passing
-the
-</ins><a class="tref" title="unserialized_label"><ins class="diff-chg">
-unserialized
-label
-</ins></a><ins class="diff-chg">
-and
-the
-</ins><a class="tref internalDFN" title="mapping_counter" href="#dfn-mapping_counter">
-mapping
-<del class="diff-old">for
-</del>
-<ins class="diff-chg">counter
-</ins></a><ins class="diff-chg">
-as
-parameters.
-</ins></li><li><ins class="diff-chg">
-Create
-a
-new
-key-value
-mapping
-in
-the
-</ins><a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy"><ins class="diff-chg">
-serialization
-map
-copy
-</ins></a><ins class="diff-chg">
-where
-the
-key
-is
-the
-</ins><a class="tref internalDFN" title="new_serialization_label" href="#dfn-new_serialization_label"><ins class="diff-chg">
-new
-serialization
-label
-</ins></a><ins class="diff-chg">
-and
-the
-value
-is
-the
-</ins><a class="tref" title="unserialized_label"><ins class="diff-chg">
-unserialized
-label
-</ins></a>.</li><li><ins class="diff-chg">
-Set
-the
-</ins><dfn title="maximum_serialization_rotations" id="dfn-maximum_serialization_rotations"><ins class="diff-chg">
-maximum
-serialization
-rotations
-</ins></dfn><ins class="diff-chg">
-to
-</ins><code><ins class="diff-chg">
-1
-</ins></code><ins class="diff-chg">
-or
-the
-length
-of
-the
-</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
-list
-of
-unserialized
-labels
-</ins></a>,<ins class="diff-chg">
-whichever
-is
-greater.
-</ins></li><li><ins class="diff-chg">
-While
-the
-</ins><a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations"><ins class="diff-chg">
-maximum
-serialization
-rotations
-</ins></a><ins class="diff-chg">
-is
-greater
-than
-</ins><code><ins class="diff-chg">
-0
-</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
-If
-this
-is
-</ins>
-the
-first
-<del class="diff-old">call
-</del>
-<ins class="diff-chg">iteration
-in
-the
-loop,
-perform
-the
-</ins><a href="#combinatorial-serialization-algorithm"><ins class="diff-chg">
-Combinatorial
-Serialization
-Algorithm
-</ins></a><ins class="diff-chg">
-passing
-in
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>,<ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy"><ins class="diff-chg">
-serialization
-map
-copy
-</ins></a>,<ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a>,<ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
-processed
-labels
-map
-</ins></a>,<a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
-serialized
-labels
-map
-</ins></a>,
-and
-<del class="diff-old">a
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
-list
-of
-unserialized
-labels
-</ins></a>.</li><li><ins class="diff-chg">
-If
-this
-is
-not
-the
-first
-iteration
-in
-the
-loop,
-perform
-the
-</ins><a href="#combinatorial-serialization-algorithm"><ins class="diff-chg">
-Combinatorial
-Serialization
-Algorithm
-</ins></a><ins class="diff-chg">
-passing
-in
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>,<ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy"><ins class="diff-chg">
-serialization
-map
-</ins>
-copy
-</a>,
-<ins class="diff-new">the
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-new">
-serialization
-label
-</ins></a>,<ins class="diff-new">
-and
-temporary
-copies
-</ins>
-of
-the
-<del class="diff-old">mapping
-</del>
-<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">
-<ins class="diff-chg">processed
-labels
-map
-</ins></a>,<a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
-serialized
-labels
-map
-</ins></a>,<ins class="diff-chg">
-and
-the
-</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
-list
-of
-unserialized
-labels
-</ins></a>.</li><li><ins class="diff-chg">
-Decrement
-the
-</ins><a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations"><ins class="diff-chg">
-maximum
-serialization
-rotations
-</ins></a><ins class="diff-chg">
-by
-</ins><code><ins class="diff-chg">
-1
-</ins></code>
-for
-each
-<del class="diff-old">subsequent
-call.
-Rotate
-notMapped
-on
-each
-</del>
-iteration.
-</li>
-</ol>
-</li>
-<li>
-If
-<del class="diff-old">notMapped
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
-list
-of
-unserialized
-labels
-</ins></a>
-is
-<del class="diff-old">empty,
-save
-</del>
-<ins class="diff-chg">empty:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-???Save
-</ins>
-an
-entry
-mapping
-from
-the
-bnode's
-serialization
-name
-to
-the
-reverse
-mapping
-(mapped)
-and
-its
-sorted
-keys
-then
-do
-<del class="diff-old">SerializeMapping.
-</del>
-<ins class="diff-chg">SerializeMapping:
-</ins>
-<ol class="algorithm">
-<li>
-<del class="diff-old">If
-</del>
-<ins class="diff-chg">???If
-</ins>
-the
-serialization
-is
-lexicographically
-less
-than
-the
-current
-serialization
-or
-the
-current
-serialization
-is
-null,
-then
-iterate
-over
-the
-sorted
-keys,
-get
-the
-reverse-mapped
-adjacent
-bnode
-and
-recursively
-call
-SerializeNode
-on
-each
-iteration.
-</li>
-<li>
-<del class="diff-old">Do
-</del>
-<ins class="diff-chg">???Do
-</ins>
-SerializeMapping
-then
-if
-the
-serialization
-is
-lexicographically
-less
-than
-the
-current
-serialization
-or
-the
-current
-serialization
-is
-null,
-then
-set
-it
-as
-the
-least
-serialization
-for
-the
-bnode
-in
-the
-given
-edge
-direction
-('property'
-or
-'reference').
-</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<div id="mapping-serialization-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.11.9
-</del>
-<ins class="diff-chg">6.11.12
-</ins>
-</span>
-Mapping
-Serialization
-Algorithm
-</h4>
-<p>
-<a class="tref" title="map_of_all_labels">
-<ins class="diff-new">map
-of
-all
-labels
-</ins></a>,<a class="tref" title="map_of_all_properties"><ins class="diff-new">
-map
-of
-all
-properties
-</ins></a>,<dfn title="key_stack" id="dfn-key_stack-1"><ins class="diff-new">
-key
-stack
-</ins></dfn>,<dfn title="serialization_string_" id="dfn-serialization_string_"><ins class="diff-new">
-serialization
-string
-</ins></dfn></p><p>
-SerializeMapping(mapping):
-(This
-function
-incrementally
-updates
-the
-relation
-serialization
-for
-a
-mapping)
-</p>
-<ol class="algorithm">
-<li>
-If
-<del class="diff-old">there
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref" title="serialization_keys_stack"><ins class="diff-chg">
-serialization
-keys
-stack
-</ins></a>
-is
-<del class="diff-old">an
-entry
-on
-</del>
-<ins class="diff-chg">not
-empty
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-Pop
-</ins>
-the
-<del class="diff-old">mapping's
-key
-stack,
-pop
-it
-and
-iterate
-over
-every
-key.
-</del>
-<dfn title="list_of_serialization_keys" id="dfn-list_of_serialization_keys">
-<ins class="diff-chg">list
-of
-serialization
-keys
-</ins></dfn><ins class="diff-chg">
-off
-of
-the
-</ins><a class="tref" title="serialization_keys_stack"><ins class="diff-chg">
-serialization
-keys
-stack
-</ins></a>.
-</li>
-<li>
-For
-each
-<del class="diff-old">key,
-if
-an
-entry
-for
-the
-</del>
-<dfn title="serialization_key" id="dfn-serialization_key">
-<ins class="diff-chg">serialization
-</ins>
-key
-<del class="diff-old">hasn't
-been
-added
-to
-</del>
-</dfn>
-<ins class="diff-chg">in
-</ins>
-the
-<del class="diff-old">mapping
-yet,
-break
-out
-</del>
-<a class="tref internalDFN" title="list_of_serialization_keys" href="#dfn-list_of_serialization_keys">
-<ins class="diff-chg">list
-</ins>
-of
-<del class="diff-old">the
-loop.
-</del>
-<ins class="diff-chg">serialization
-keys
-</ins></a>:<ol class="algorithm">
-<li>
-<del class="diff-old">Update
-</del>
-<ins class="diff-chg">If
-</ins>
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-<ins class="diff-new">serialization
-</ins>
-key
-</a>
-<ins class="diff-new">is
-not
-in
-the
-???list
-of
-adjacent
-nodes???,
-push
-the
-</ins><a class="tref internalDFN" title="list_of_serialization_keys" href="#dfn-list_of_serialization_keys"><ins class="diff-new">
-list
-of
-serialization
-keys
-</ins></a><ins class="diff-new">
-onto
-the
-</ins><a class="tref" title="serialization_keys_stack"><ins class="diff-new">
-serialization
-keys
-</ins>
-stack
-<del class="diff-old">entry's
-index.
-</del>
-</a>
-<ins class="diff-chg">and
-exit
-from
-this
-loop.
-</ins>
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-<ins class="diff-new">serialization
-</ins>
-key
-</a>
-<ins class="diff-new">is
-a
-key
-in
-the
-</ins><a class="tref" title="completed_serialization_key_map"><ins class="diff-new">
-completed
-serialization
-key
-map
-</ins></a>,<ins class="diff-new">
-a
-cycle
-</ins>
-has
-<del class="diff-old">already
-</del>
-been
-<del class="diff-old">serialized,
-output
-"'_'
-+
-key"
-</del>
-<ins class="diff-chg">detected.
-Append
-the
-concatenation
-of
-the
-</ins><code><ins class="diff-chg">
-_
-</ins></code><ins class="diff-chg">
-character
-</ins>
-and
-<del class="diff-old">continue.
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-chg">
-serialization
-key
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
-serialization
-string
-</ins></a>.
-</li>
-<li>
-<del class="diff-old">For
-each
-key,
-</del>
-<ins class="diff-chg">Otherwise,
-</ins>
-serialize
-<ins class="diff-new">all
-outgoing
-and
-incoming
-edges
-in
-the
-graph
-by
-performing
-</ins>
-the
-<ins class="diff-new">following
-steps:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-Mark
-the
-</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-new">
-serialization
-</ins>
-key
-<del class="diff-old">then
-its
-associated
-bnode
-properties,
-then
-its
-bnode
-references.
-The
-entire
-property
-list
-is
-surrounded
-</del>
-</a>
-<ins class="diff-chg">as
-being
-processed
-</ins>
-by
-<del class="diff-old">'['
-and
-']'
-</del>
-<ins class="diff-chg">adding
-a
-new
-key-value
-pair
-to
-the
-</ins><a class="tref" title="completed_serialization_key_map"><ins class="diff-chg">
-completed
-serialization
-key
-map
-</ins></a><ins class="diff-chg">
-where
-the
-key
-is
-the
-</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-chg">
-serialization
-key
-</ins></a>
-and
-<del class="diff-old">so
-</del>
-<ins class="diff-chg">the
-value
-</ins>
-is
-<code>
-<ins class="diff-new">true
-</ins></code>.</li><li><ins class="diff-new">
-Set
-</ins>
-the
-<del class="diff-old">reference
-list.
-Individual
-properties/references
-are
-seperated
-</del>
-<a class="tref" title="serialization_fragment">
-<ins class="diff-chg">serialization
-fragment
-</ins></a><ins class="diff-chg">
-to
-the
-value
-of
-the
-</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-chg">
-serialization
-key
-</ins></a>.</li><li><ins class="diff-chg">
-Set
-the
-</ins><a class="tref" title="list_of_adjacent_node_keys"><ins class="diff-chg">
-list
-of
-adjacent
-node
-keys
-</ins></a>
-by
-<del class="diff-old">'|'.
-</del>
-<ins class="diff-chg">using
-the
-</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-chg">
-serialization
-key
-</ins></a><ins class="diff-chg">
-to
-look
-up
-the
-list
-in
-the
-</ins><a class="tref" title="adjacent_node_keys_map"><ins class="diff-chg">
-adjacent
-node
-keys
-map
-</ins></a>.</li><li><ins class="diff-chg">
-Set
-the
-</ins><a class="tref" title="adjacent_node_label"><ins class="diff-chg">
-adjacent
-node
-label
-</ins></a><ins class="diff-chg">
-???somehow???.
-</ins></li><li>
-If
-a
-<ins class="diff-new">mapping
-for
-the
-</ins><a class="tref" title="adjacent_node_label"><ins class="diff-new">
-adjacent
-node
-label
-</ins></a><ins class="diff-new">
-exists
-in
-the
-</ins><a class="tref" title="map_of_all_labels"><ins class="diff-new">
-map
-of
-all
-labels
-</ins></a>:<ol class="algorithm"><li><ins class="diff-new">
-Append
-the
-result
-of
-the
-</ins><a href=""><ins class="diff-new">
-Label
-Serialization
-Algorithm
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref" title="serialization_fragment"><ins class="diff-new">
-serialization
-fragment
-</ins></a>.</li></ol></li></ol></li></ol></li></ol></li></ol></div><div id="label-serialization-algorithm" class="section"><h4><span class="secno"><ins class="diff-new">
-6.11.13
-</ins></span><ins class="diff-new">
-Label
-Serialization
-Algorithm
-</ins></h4><p><a class="tref" title="map_of_properties"><ins class="diff-new">
-map
-of
-properties
-</ins></a>,<dfn title="label_serialization" id="dfn-label_serialization"><ins class="diff-new">
-label
-serialization
-</ins></dfn>,<a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a>,<a class="tref" title="incoming_map"><ins class="diff-new">
-incoming
-map
-</ins></a>,<dfn title="adjacent_node_labels" id="dfn-adjacent_node_labels"><ins class="diff-new">
-adjacent
-node
-labels
-</ins></dfn>,<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack-1"><ins class="diff-new">
-key
-stack
-</ins></a>.</p><ol class="algorithm"><li><ins class="diff-new">
-Initialize
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
-label
-serialization
-</ins></a><ins class="diff-new">
-to
-an
-empty
-string.
-</ins></li><li><ins class="diff-new">
-Append
-the
-</ins><code><ins class="diff-new">
-[
-</ins></code><ins class="diff-new">
-character
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
-label
-serialization
-</ins></a>.</li><li><ins class="diff-new">
-Append
-all
-properties
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
-label
-serialization
-</ins></a><ins class="diff-new">
-by
-processing
-each
-key-value
-pair
-in
-the
-</ins><a class="tref" title="map_of_properties"><ins class="diff-new">
-map
-of
-properties
-</ins></a>,<ins class="diff-new">
-excluding
-the
-</ins><code><ins class="diff-new">
-@subject
-</ins></code>
-property
-<ins class="diff-new">???do
-the
-map
-keys
-need
-to
-be
-sorted???:
-</ins><ol class="algorithm"><li><ins class="diff-new">
-Build
-a
-string
-using
-the
-pattern
-</ins><code><</code><strong><ins class="diff-new">
-KEY
-</ins></strong><code><ins class="diff-new">
->
-</ins></code><ins class="diff-new">
-where
-</ins><strong><ins class="diff-new">
-KEY
-</ins></strong>
-is
-<ins class="diff-new">the
-current
-key.
-Append
-string
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
-label
-serialization
-</ins></a>.</li><li><ins class="diff-new">
-The
-value
-may
-be
-a
-single
-object
-or
-</ins>
-an
-<del class="diff-old">array,
-</del>
-<ins class="diff-chg">array
-of
-objects.
-Process
-</ins>
-all
-of
-the
-<del class="diff-old">serializations
-</del>
-<ins class="diff-chg">objects
-that
-</ins>
-are
-<del class="diff-old">concatenated
-together
-</del>
-<ins class="diff-chg">associated
-</ins>
-with
-<del class="diff-old">no
-joining
-delimiter.
-The
-'@subject'
-property
-is
-skipped.
-The
-property
-</del>
-<ins class="diff-chg">the
-key,
-building
-an
-</ins><dfn title="object_string" id="dfn-object_string"><ins class="diff-chg">
-object
-string
-</ins></dfn><ins class="diff-chg">
-for
-each
-item:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-If
-the
-object
-contains
-an
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code><ins class="diff-chg">
-key
-with
-a
-value
-that
-starts
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code>,<ins class="diff-chg">
-set
-the
-</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string"><ins class="diff-chg">
-object
-string
-</ins></a><ins class="diff-chg">
-to
-the
-value
-</ins><code><ins class="diff-chg">
-_:
-</ins></code>.<ins class="diff-chg">
-If
-the
-value
-does
-not
-start
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code>,<ins class="diff-chg">
-build
-the
-</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string"><ins class="diff-chg">
-object
-string
-</ins></a><ins class="diff-chg">
-using
-the
-pattern
-</ins><code><</code><strong>
-IRI
-</strong>
-<code>
-<ins class="diff-new">>
-</ins></code><ins class="diff-new">
-where
-</ins><strong><ins class="diff-new">
-IRI
-</ins></strong>
-is
-<del class="diff-old">turtle-serialized.
-</del>
-<ins class="diff-chg">the
-value
-associated
-with
-the
-</ins><code><ins class="diff-chg">
-@iri
-</ins></code><ins class="diff-chg">
-key.
-</ins></li><li>
-If
-<ins class="diff-new">the
-object
-contains
-</ins>
-a
-<del class="diff-old">property
-or
-reference
-</del>
-<code>
-<ins class="diff-chg">@literal
-</ins></code><ins class="diff-chg">
-key
-and
-a
-</ins><code><ins class="diff-chg">
-@datatype
-</ins></code><ins class="diff-chg">
-key,
-build
-the
-</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string">
-object
-<ins class="diff-new">string
-</ins></a><ins class="diff-new">
-using
-the
-pattern
-</ins><code><ins class="diff-new">
-"
-</ins></code><strong><ins class="diff-new">
-LITERAL
-</ins></strong><code><ins class="diff-new">
-"^^
-</ins><</code><strong><ins class="diff-new">
-DATATYPE
-</ins></strong><code><ins class="diff-new">
->
-</ins></code><ins class="diff-new">
-where
-</ins><strong><ins class="diff-new">
-LITERAL
-</ins></strong>
-is
-<ins class="diff-new">the
-value
-associated
-with
-the
-</ins><code><ins class="diff-new">
-@literal
-</ins></code><ins class="diff-new">
-key
-and
-</ins><strong><ins class="diff-new">
-DATATYPE
-</ins></strong><ins class="diff-new">
-is
-the
-value
-associated
-with
-the
-</ins><code><ins class="diff-new">
-@datatype
-</ins></code><ins class="diff-new">
-key.
-</ins></li><li><ins class="diff-new">
-If
-the
-object
-contains
-</ins>
-a
-<del class="diff-old">bnode,
-it
-</del>
-<code>
-<ins class="diff-chg">@literal
-</ins></code><ins class="diff-chg">
-key
-and
-a
-</ins><code><ins class="diff-chg">
-@language
-</ins></code><ins class="diff-chg">
-key,
-build
-the
-</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string"><ins class="diff-chg">
-object
-string
-</ins></a><ins class="diff-chg">
-using
-the
-pattern
-</ins><code><ins class="diff-chg">
-"
-</ins></code><strong><ins class="diff-chg">
-LITERAL
-</ins></strong><code><ins class="diff-chg">
-"@
-</ins></code><strong><ins class="diff-chg">
-LANGUAGE
-</ins></strong><ins class="diff-chg">
-where
-</ins><strong><ins class="diff-chg">
-LITERAL
-</ins></strong>
-is
-<del class="diff-old">serialized
-to
-'_:',
-otherwise
-</del>
-the
-<del class="diff-old">turtle
-serialization
-</del>
-<ins class="diff-chg">value
-associated
-with
-the
-</ins><code><ins class="diff-chg">
-@literal
-</ins></code><ins class="diff-chg">
-key
-and
-</ins><strong><ins class="diff-chg">
-LANGUAGE
-</ins></strong>
-is
-<del class="diff-old">used.
-</del>
-<ins class="diff-chg">the
-value
-associated
-with
-the
-</ins><code><ins class="diff-chg">
-@language
-</ins></code><ins class="diff-chg">
-key.
-</ins>
-</li>
-<li>
-<del class="diff-old">Join
-all
-of
-</del>
-<ins class="diff-chg">Otherwise,
-</ins>
-the
-<del class="diff-old">adjacent
-keys
-and
-add
-them
-to
-</del>
-<ins class="diff-chg">value
-is
-a
-string.
-Build
-</ins>
-the
-<del class="diff-old">serialization.
-</del>
-<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
-<ins class="diff-chg">object
-string
-</ins></a><ins class="diff-chg">
-using
-the
-pattern
-</ins><code><ins class="diff-chg">
-"
-</ins></code><strong><ins class="diff-chg">
-LITERAL
-</ins></strong><code><ins class="diff-chg">
-"
-</ins></code><ins class="diff-chg">
-where
-</ins><strong><ins class="diff-chg">
-LITERAL
-</ins></strong><ins class="diff-chg">
-is
-the
-value
-associated
-with
-the
-current
-key.
-</ins>
-</li>
-<li>
-<del class="diff-old">Push
-</del>
-<ins class="diff-chg">If
-this
-is
-</ins>
-the
-<del class="diff-old">adjacent
-keys
-onto
-</del>
-<ins class="diff-chg">second
-iteration
-of
-</ins>
-the
-<del class="diff-old">key
-stack.
-</del>
-<ins class="diff-chg">loop,
-append
-a
-</ins><code><ins class="diff-chg">
-|
-</ins></code><ins class="diff-chg">
-separator
-character
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a>.
-</li>
-<li>
-<del class="diff-old">Do
-SerializeMapping.
-</del>
-<ins class="diff-chg">Append
-the
-</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string"><ins class="diff-chg">
-object
-string
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a>.
-</li>
-</ol>
-</li>
-<del class="diff-old">5.11.10
-Label
-Generation
-Algorithm
-NameNode(bnode):
-</del>
-</ol>
-</li>
-<li>
-<del class="diff-old">Remove
-</del>
-<ins class="diff-chg">Append
-</ins>
-the
-<del class="diff-old">first
-blank
-node
-from
-</del>
-<code>
-<ins class="diff-chg">]
-</ins></code><ins class="diff-chg">
-character
-to
-</ins>
-the
-<del class="diff-old">list
-of
-sorted
-blank
-nodes.
-</del>
-<a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">
-<ins class="diff-chg">label
-serialization
-</ins></a>.
-</li>
-<li>
-<del class="diff-old">Give
-it
-</del>
-<ins class="diff-chg">Append
-</ins>
-the
-<del class="diff-old">next
-canonical
-name.
-</del>
-<code>
-<ins class="diff-chg">[
-</ins></code><ins class="diff-chg">
-character
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a>.
-</li>
-<li>
-<del class="diff-old">Give
-canonical
-names
-</del>
-<ins class="diff-chg">Append
-all
-incoming
-references
-for
-the
-current
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>
-to
-<del class="diff-old">each
-blank
-node
-key
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a><ins class="diff-chg">
-by
-processing
-all
-of
-the
-items
-associated
-with
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>
-in
-<del class="diff-old">its
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref" title="incoming_map"><ins class="diff-chg">
-incoming
-map
-</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
-Build
-a
-</ins><dfn title="reference_string" id="dfn-reference_string"><ins class="diff-chg">
-reference
-string
-</ins></dfn><ins class="diff-chg">
-using
-the
-pattern
-</ins><code><</code><strong><ins class="diff-chg">
-PROPERTY
-</ins></strong><code><ins class="diff-chg">
->
-</ins></code><code><</code><strong><ins class="diff-chg">
-REFERER
-</ins></strong><code><ins class="diff-chg">
->
-</ins></code><ins class="diff-chg">
-where
-</ins><strong><ins class="diff-chg">
-PROPERTY
-</ins></strong><ins class="diff-chg">
-is
-the
-</ins>
-property
-<del class="diff-old">serialization
-mapping
-</del>
-<ins class="diff-chg">associated
-with
-the
-incoming
-reference
-and
-</ins><strong><ins class="diff-chg">
-REFERER
-</ins></strong><ins class="diff-chg">
-is
-either
-the
-subject
-of
-the
-node
-referring
-to
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a>
-in
-<del class="diff-old">lexicographical
-order.
-</del>
-<ins class="diff-chg">the
-incoming
-reference
-or
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-if
-</ins><strong><ins class="diff-chg">
-REFERER
-</ins></strong><ins class="diff-chg">
-begins
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code>.
-</li>
-<li>
-<del class="diff-old">Give
-canonical
-names
-</del>
-<ins class="diff-chg">If
-this
-is
-the
-second
-iteration
-of
-the
-loop,
-append
-a
-</ins><code><ins class="diff-chg">
-|
-</ins></code><ins class="diff-chg">
-separator
-character
-</ins>
-to
-<del class="diff-old">each
-blank
-node
-key
-in
-its
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a>.</li><li><ins class="diff-chg">
-Append
-the
-</ins><a class="tref internalDFN" title="reference_string" href="#dfn-reference_string">
-reference
-<ins class="diff-new">string
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
-label
-</ins>
-serialization
-<del class="diff-old">mapping
-in
-lexicographical
-order.
-</del>
-</a>.
-</li>
-</ol>
-</li>
-<li>
-<del class="diff-old">Set
-</del>
-<ins class="diff-chg">Append
-the
-</ins><code><ins class="diff-chg">
-]
-</ins></code><ins class="diff-chg">
-character
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a>.</li><li><ins class="diff-chg">
-Append
-</ins>
-all
-<del class="diff-old">serializations
-containing
-newly-named
-blank
-nodes
-</del>
-<a class="tref internalDFN" title="adjacent_node_labels" href="#dfn-adjacent_node_labels">
-<ins class="diff-chg">adjacent
-node
-labels
-</ins></a>
-to
-<del class="diff-old">null.
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a><ins class="diff-chg">
-by
-concatenating
-the
-string
-value
-for
-all
-of
-them,
-one
-after
-the
-other,
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a>.</li><li><ins class="diff-chg">
-Push
-the
-</ins><a class="tref internalDFN" title="adjacent_node_labels" href="#dfn-adjacent_node_labels"><ins class="diff-chg">
-adjacent
-node
-labels
-</ins></a><ins class="diff-chg">
-onto
-the
-</ins><a class="tref internalDFN" title="key_stack" href="#dfn-key_stack-1"><ins class="diff-chg">
-key
-stack
-</ins></a><ins class="diff-chg">
-and
-append
-the
-result
-of
-the
-</ins><a href="#mapping-serialization-algorithm"><ins class="diff-chg">
-Mapping
-Serialization
-Algorithm
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
-label
-serialization
-</ins></a>.
-</li>
-</ol>
-</div>
-</div>
-<div id="data-round-tripping" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.12
-</del>
-<ins class="diff-chg">6.12
-</ins>
-</span>
-Data
-Round
-Tripping
-</h3>
-<p>
-When
-normalizing
-<strong>
-xsd:double
-</strong>
-values,
-implementers
-<em class="rfc2119" title="must">
-must
-</em>
-ensure
-that
-the
-normalized
-value
-is
-a
-string.
-In
-order
-to
-generate
-the
-string
-from
-a
-<strong>
-double
-</strong>
-value,
-output
-equivalent
-to
-the
-<code>
-printf("%1.6e",
-value)
-</code>
-function
-in
-C
-<em class="rfc2119" title="must">
-must
-</em>
-be
-used
-where
-<strong>
-"%1.6e"
-</strong>
-is
-the
-string
-formatter
-and
-<strong>
-value
-</strong>
-is
-the
-value
-to
-be
-converted.
-</p>
-<p>
-To
-convert
-the
-a
-double
-value
-in
-JavaScript,
-implementers
-can
-use
-the
-following
-snippet
-of
-code:
-</p>
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
-'$10$2')
-</pre>
-<p class="note">
-When
-data
-needs
-to
-be
-normalized,
-JSON-LD
-authors
-should
-not
-use
-values
-that
-are
-going
-to
-undergo
-automatic
-conversion.
-This
-is
-due
-to
-the
-lossy
-nature
-of
-<strong>
-xsd:double
-</strong>
-values.
-</p>
-<p class="issue">
-Round-tripping
-data
-can
-be
-problematic
-if
-we
-mix
-and
-match
-@coerce
-rules
-with
-JSON-native
-datatypes,
-like
-integers.
-Consider
-the
-following
-code
-example:
-</p>
-<pre class="example">
-var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-// Convert the normalized object back to a JavaScript object
-var
-myObj2
-=
-jsonld.parse(jsonldText);
-</pre>
-<p class="issue">
-At
-this
-point,
-myObj2
-and
-myObj
-will
-have
-different
-values
-for
-the
-"number"
-value.
-myObj
-will
-be
-the
-number
-42,
-while
-myObj2
-will
-be
-the
-string
-"42".
-This
-type
-of
-data
-round-tripping
-error
-can
-bite
-developers.
-We
-are
-currently
-wondering
-if
-having
-a
-"coerce
-validation"
-phase
-in
-the
-parsing/normalization
-phases
-would
-be
-a
-good
-idea.
-It
-would
-prevent
-data
-round-tripping
-issues
-like
-the
-one
-mentioned
-above.
-</p>
-</div>
-<div id="rdf-conversion" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.13
-</del>
-<ins class="diff-chg">6.13
-</ins>
-</span>
-RDF
-Conversion
-</h3>
-<p>
-A
-JSON-LD
-document
-<em class="rfc2119" title="may">
-may
-</em>
-be
-converted
-to
-any
-other
-RDF-compatible
-document
-format
-using
-the
-algorithm
-specified
-in
-this
-section.
-</p>
-<p>
-The
-JSON-LD
-Processing
-Model
-describes
-processing
-rules
-for
-extracting
-RDF
-from
-a
-JSON-LD
-document.
-Note
-that
-many
-uses
-of
-JSON-LD
-may
-not
-require
-generation
-of
-RDF.
-</p>
-<p>
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-to
-RDF
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</p>
-<p class="issue">
-The
-RDF
-Conversion
-Algorithm
-is
-a
-work
-in
-progress.
-</p>
-<div class="informative section" id="overview">
-<h4>
-<span class="secno">
-<del class="diff-old">5.13.1
-</del>
-<ins class="diff-chg">6.13.1
-</ins>
-</span>
-Overview
-</h4>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-JSON-LD
-is
-intended
-to
-have
-an
-easy
-to
-parse
-grammar
-that
-closely
-models
-existing
-practice
-in
-using
-JSON
-for
-describing
-object
-representations.
-This
-allows
-the
-use
-of
-existing
-libraries
-for
-parsing
-JSON
-in
-a
-document-oriented
-fashion,
-or
-can
-allow
-for
-stream-based
-parsing
-similar
-to
-SAX.
-</p>
-<p>
-As
-with
-other
-grammars
-used
-for
-describing
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>,
-a
-key
-concept
-is
-that
-of
-a
-<em>
-resource
-</em>.
-Resources
-may
-be
-of
-three
-basic
-types:
-<em>
-IRI
-</em>
-s,
-for
-describing
-externally
-named
-entities,
-<em>
-BNodes
-</em>,
-resources
-for
-which
-an
-external
-name
-does
-not
-exist,
-or
-is
-not
-known,
-and
-Literals,
-which
-describe
-terminal
-entities
-such
-as
-strings,
-dates
-and
-other
-representations
-having
-a
-lexical
-representation
-possibly
-including
-an
-explicit
-language
-or
-datatype.
-</p>
-<p>
-Data
-described
-with
-JSON-LD
-may
-be
-considered
-to
-be
-the
-representation
-of
-a
-graph
-made
-up
-of
-<a class="tref internalDFN" title="subject" href="#dfn-subject">
-subject
-</a>
-and
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-resources
-related
-via
-a
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>
-resource.
-However,
-specific
-implementations
-may
-choose
-to
-operate
-on
-the
-document
-as
-a
-normal
-JSON
-description
-of
-objects
-having
-attributes.
-</p>
-</div>
-<div id="rdf-conversion-algorithm-terms" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.13.2
-</del>
-<ins class="diff-chg">6.13.2
-</ins>
-</span>
-RDF
-Conversion
-Algorithm
-Terms
-</h4>
-<dl>
-<dt>
-<dfn title="default_graph" id="dfn-default_graph">
-default
-graph
-</dfn>
-</dt>
-<dd>
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</dd>
-</dl>
-</div>
-<div id="rdf-conversion-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.13.3
-</del>
-<ins class="diff-chg">6.13.3
-</ins>
-</span>
-RDF
-Conversion
-Algorithm
-</h4>
-<p>
-The
-algorithm
-below
-is
-designed
-for
-in-memory
-implementations
-with
-random
-access
-to
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-elements.
-</p>
-<p>
-A
-conforming
-JSON-LD
-processor
-implementing
-RDF
-conversion
-<em class="rfc2119" title="must">
-must
-</em>
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>
-that
-the
-following
-algorithm
-generates:
-</p>
-<ol class="algorithm">
-<li id="processing-step-default-context">
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-with
-with
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-set
-to
-the
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-initial
-context
-</a>
-and
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-initialized
-to
-NULL.
-</li>
-<li id="processing-step-associative">
-If
-<del class="diff-old">an
-associative
-array
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
-JSON
-object
-</ins></a>
-is
-detected,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-has
-a
-<code>
-@context
-</code>
-key,
-process
-the
-local
-context
-as
-described
-in
-<a href="#context">
-Context
-</a>.
-</li>
-<li>
-Create
-a
-new
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-by
-mapping
-the
-keys
-from
-the
-current
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-using
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-to
-new
-keys
-using
-the
-associated
-value
-from
-the
-current
-<del class="diff-old">associative
-array.
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>.
-Repeat
-the
-mapping
-until
-no
-entry
-is
-found
-within
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-for
-the
-key.
-Use
-the
-new
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-in
-subsequent
-steps.
-</li>
-<li>
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-has
-an
-<code>
-@iri
-</code>
-key,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-associated
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-<p class="issue">
-<code>
-@iri
-</code>
-really
-just
-behaves
-the
-same
-as
-<code>
-@subject
-</code>,
-consider
-consolidating
-them.
-</p>
-</li>
-<li>
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-has
-a
-<code>
-@literal
-</code>
-key,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-a
-literal
-value
-as
-follows:
-<ol class="algorithm">
-<li>
-as
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-if
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-contains
-a
-<code>
-@datatype
-</code>
-key
-after
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-specified
-<code>
-@datatype
-</code>.
-</li>
-<li>
-otherwise,
-as
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>.
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-contains
-a
-<code>
-@language
-</code>
-key,
-use
-it's
-value
-to
-set
-the
-language
-of
-the
-plain
-literal.
-</li>
-<li>
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-</ol>
-</li>
-<li id="processing-step-subject">
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-has
-a
-<code>
-@subject
-</code>
-key:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-a
-<del class="diff-old">string,
-</del>
-<a class="tref internalDFN" title="string" href="#dfn-string">
-<ins class="diff-chg">string
-</ins></a>,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-result
-of
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Set
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-using
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>,
-set
-the
-<a class="tref" title="active__subject">
-active
-subject
-</a>
-to
-the
-result
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-does
-not
-have
-a
-<code>
-@subject
-</code>
-key,
-set
-the
-<a class="tref" title="active__object">
-active
-object
-</a>
-to
-newly
-generated
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier">
-blank
-node
-identifier
-</dfn>.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Set
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-<a class="tref" title="active__object">
-active
-object
-</a>.
-</li>
-<li>
-For
-each
-key
-in
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-that
-has
-not
-already
-been
-processed,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-<code>
-@type
-</code>,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-<code>
-rdf:type
-</code>.
-</li>
-<li>
-Otherwise,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-the
-result
-of
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-key.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-</ol>
-</li>
-<li>
-If
-a
-regular
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-is
-detected,
-process
-each
-value
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-by
-doing
-the
-following
-returning
-the
-result
-of
-processing
-the
-last
-value
-in
-the
-<del class="diff-old">array:
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>:
-<ol class="algorithm">
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-using
-copies
-of
-the
-<a class="tref" title="active__context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>
-then
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-is
-detected:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-is
-the
-target
-of
-a
-<code>
-@iri
-</code>
-coercion,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-string.
-</li>
-<li>
-Otherwise,
-if
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-is
-the
-target
-of
-coercion,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-creating
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-using
-the
-string
-and
-the
-coercion
-key
-as
-the
-datatype
-IRI.
-</li>
-<li>
-Otherwise,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-value
-created
-from
-the
-string.
-</li>
-</ol>
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-If
-a
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>
-is
-detected,
-generate
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-using
-a
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-either
-<code>
-xsd:integer
-</code>
-or
-<code>
-xsd:double
-</code>,
-depending
-on
-if
-the
-value
-contains
-a
-fractional
-and/or
-an
-exponential
-component.
-Generate
-a
-triple
-using
-the
-<a class="tref" title="active__subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-generated
-typed
-literal.
-</li>
-<li>
-Otherwise,
-if
-<strong>
-true
-</strong>
-or
-<strong>
-false
-</strong>
-is
-detected,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-value
-created
-from
-the
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-<code>
-xsd:boolean
-</code>.
-</li>
-</ol>
-</div>
-</div>
-</div>
-<div id="experimental-concepts" class="section">
-<h2>
-<span class="secno">
-<del class="diff-old">6.
-</del>
-<ins class="diff-chg">7.
-</ins>
-</span>
-Experimental
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-considered
-as
-discussion
-points;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.1
-</del>
-<ins class="diff-chg">7.1
-</ins>
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-<del class="diff-old">JSON-LD
-associative
-array.
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "@coerce": {
-    "foaf": "http://xmlns.com/foaf/0.1/"
-</del>
-<ins class="diff-chg">  "@context": {
-    "Person": "http://xmlns.com/foaf/0.1/Person"
-</ins>
-  },
-  "@subject": 
-  [
-    {
-      "@subject": "http://example.org/people#john",
-<del class="diff-old">      "@type": "foaf:Person"
-</del>
-<ins class="diff-chg">      "@type": "Person"
-</ins>
-    },
-    {
-      "@subject": "http://example.org/people#jane",
-<del class="diff-old">      "@type": "foaf:Person"
-</del>
-<ins class="diff-chg">      "@type": "Person"
-</ins>
-    }
-  ]
-}
-</pre>
-<p>
-A
-disjoint
-graph
-could
-also
-be
-expressed
-like
-so:
-</p>
-<pre class="example">
-[
-  {
-    "@subject": "http://example.org/people#john",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  },
-  {
-    "@subject": "http://example.org/people#jane",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  }
-]
-</pre>
-</div>
-<div id="lists" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">6.2
-</del>
-<ins class="diff-chg">7.2
-</ins>
-</span>
-Lists
-</h3>
-<p>
-Because
-graphs
-do
-not
-describe
-ordering
-for
-links
-between
-nodes,
-multi-valued
-properties
-in
-JSON
-do
-not
-provide
-an
-ordering
-of
-the
-listed
-objects.
-For
-example,
-consider
-the
-following
-simple
-document:
-</p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-<del class="diff-old">  "foaf:nick": ,
-</del>
-<ins class="diff-chg">  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-</ins>
-...
-}
-</pre>
-<p>
-This
-results
-in
-three
-triples
-being
-generated,
-each
-relating
-the
-subject
-to
-an
-individual
-object,
-with
-no
-inherent
-order.
-To
-address
-this
-issue,
-RDF-based
-languages,
-such
-as
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-TURTLE">
-TURTLE
-</a>
-</cite>
-]
-use
-the
-concept
-of
-an
-<code>
-rdf:List
-</code>
-(as
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">
-RDF-SCHEMA
-</a>
-</cite>
-]).
-This
-uses
-a
-sequence
-of
-unlabeled
-nodes
-with
-properties
-describing
-a
-value,
-a
-null-terminated
-next
-property.
-Without
-specific
-syntactical
-support,
-this
-could
-be
-represented
-in
-JSON-LD
-as
-follows:
-</p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-<del class="diff-old">  "foaf:nick": ,
-</del>
-<ins class="diff-chg">  "nick": <span class="diff">{</span>,
-</ins>
-    <span class="diff">"@first": "joe"</span>,
-    <span class="diff">"@rest": {</span>
-      <span class="diff">"@first": "bob"</span>,
-      <span class="diff">"@rest": {</span>
-        <span class="diff">"@first": "jaybee"</span>,
-        <span class="diff">"@rest": "@nil"</span>
-        <span class="diff">}</span>
-      <span class="diff">}</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-}
-</pre>
-<p>
-As
-this
-notation
-is
-rather
-unwieldy
-and
-the
-notion
-of
-ordered
-collections
-is
-rather
-important
-in
-data
-modeling,
-it
-is
-useful
-to
-have
-specific
-language
-support.
-In
-JSON-LD,
-a
-list
-may
-be
-represented
-using
-the
-<code>
-@list
-</code>
-keyword
-as
-follows:
-</p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
-...
-}
-</pre>
-<p>
-This
-describes
-the
-use
-of
-this
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-as
-being
-ordered,
-and
-order
-is
-maintained
-through
-normalization
-and
-RDF
-conversion.
-If
-every
-use
-of
-a
-given
-multi-valued
-property
-is
-a
-list,
-this
-may
-be
-abbreviated
-by
-adding
-an
-<code>
-@coerce
-</code>
-term:
-</p>
-  <pre class="example">
-{
-  <span class="diff">"@context": {</span>
-    ...
-    <span class="diff">"@context": {</span>
-      <span class="diff">"@list": ["foaf:nick"]</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}
-</pre>
-<div id="expansion-2" class="section">
-<h4 id="list-expansion">
-<span class="secno">
-<del class="diff-old">6.2.1
-</del>
-<ins class="diff-chg">7.2.1
-</ins>
-</span>
-Expansion
-</h4>
-<p class="issue">
-TBD.
-</p>
-</div>
-<div id="normalization-2" class="section">
-<h4 id="list-normalization">
-<span class="secno">
-<del class="diff-old">6.2.2
-</del>
-<ins class="diff-chg">7.2.2
-</ins>
-</span>
-Normalization
-</h4>
-<p class="issue">
-TBD.
-</p>
-</div>
-<div id="rdf-conversion-1" class="section">
-<h4 id="list-rdf">
-<span class="secno">
-<del class="diff-old">6.2.3
-</del>
-<ins class="diff-chg">7.2.3
-</ins>
-</span>
-RDF
-Conversion
-</h4>
-<p>
-To
-support
-RDF
-Conversion
-of
-lists,
-<a href="#rdf-conversion-algorithm">
-RDF
-Conversion
-Algorithm
-</a>
-is
-updated
-as
-follows:
-</p>
-<ol class="algorithm update">
-<li>
-<span class="list-number">
-2.4a.
-</span>
-If
-the
-<del class="diff-old">associative
-array
-</del>
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-<ins class="diff-chg">JSON
-object
-</ins></a>
-has
-a
-<code>
-@list
-</code>
-key
-and
-the
-value
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-process
-the
-value
-as
-a
-list
-starting
-at
-<a href="#processing-step-list">
-Step
-3a
-</a>.
-</li>
-<li>
-<span class="list-number">
-2.7.3.
-</span>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>.
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-is
-the
-target
-of
-a
-<code>
-@list
-</code>
-coercion,
-and
-the
-value
-is
-an
-<del class="diff-old">array,
-</del>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-<ins class="diff-chg">array
-</ins></a>,
-process
-the
-value
-as
-a
-list
-starting
-at
-<a href="#processing-step-list">
-Step
-3a
-</a>.
-</li>
-<li>
-Otherwise,
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>.
-</li>
-<li>
-Proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li id="processing-step-list">
-<span class="list-number">
-3a.
-</span>
-Generate
-an
-RDF
-List
-by
-linking
-each
-element
-of
-the
-list
-using
-<code>
-rdf:first
-</code>
-and
-<code>
-rdf:next
-</code>,
-terminating
-the
-list
-with
-<code>
-rdf:nil
-</code>
-using
-the
-following
-sequence:
-<ol class="algorithm">
-<li>
-If
-the
-list
-has
-no
-element,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-<code>
-rdf:nil
-</code>.
-</li>
-<li>
-Otherwise,
-generate
-a
-triple
-using
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-a
-newly
-generated
-BNode
-identified
-as
-<em>
-first
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">
-blank
-node
-identifier
-</dfn>
-</em>.
-</li>
-<li>
-For
-each
-element
-other
-than
-the
-last
-element
-in
-the
-list:
-<ol class="algorithm">
-<li>
-Create
-a
-processor
-state
-using
-the
-active
-context,
-<em>
-first
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">
-blank
-node
-identifier
-</dfn>
-</em>
-as
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-and
-<code>
-rdf:first
-</code>
-as
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>.
-</li>
-<li>
-Unless
-this
-is
-the
-last
-element
-in
-the
-list,
-generate
-a
-new
-BNode
-identified
-as
-<em>
-rest
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">
-blank
-node
-identifier
-</dfn>
-</em>,
-otherwise
-use
-<code>
-rdf:nil
-</code>.
-</li>
-<li>
-Generate
-a
-new
-triple
-using
-<em>
-first
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">
-blank
-node
-identifier
-</dfn>
-</em>,
-<code>
-rdf:rest
-</code>
-and
-<em>
-rest
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">
-blank
-node
-identifier
-</dfn>
-</em>.
-</li>
-<li>
-Set
-<em>
-first
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">
-blank
-node
-identifier
-</dfn>
-</em>
-to
-<em>
-rest
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">
-blank
-node
-identifier
-</dfn>
-</em>.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-</div>
-</div>
-<div class="appendix section" id="markup-examples">
-<h2>
-<span class="secno">
-A.
-</span>
-Markup
-Examples
-</h2>
-<p>
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</p>
-<div id="rdfa" class="section">
-<h3>
-<span class="secno">
-A.1
-</span>
-RDFa
-</h3>
-<p>
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</p>
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</pre>
-<p>
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</p>
-<pre class="example">
-{
-  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
-  "@subject": [
-   {
-     "@subject": "_:bnode1",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/bob/",
-     "foaf:name": "Bob"
-   },
-   {
-     "@subject": "_:bnode2",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/eve/",
-     "foaf:name": "Eve"
-   },
-   {
-     "@subject": "_:bnode3",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/manu/",
-     "foaf:name": "Manu"
-   }
-  ]
-}
-</pre>
-</div>
-<div id="microformats" class="section">
-<h3>
-<span class="secno">
-A.2
-</span>
-Microformats
-</h3>
-<p>
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</p>
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-</pre>
-<p>
-The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-<code>
-url
-</code>
-and
-<code>
-fn
-</code>
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-<code>
-http://tantek.com
-</code>.
-</p>
-<pre class="example">
-{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@subject": "_:bnode1",
-  "@type": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}
-</pre>
-</div>
-<div id="microdata" class="section">
-<h3>
-<span class="secno">
-A.3
-</span>
-Microdata
-</h3>
-<p>
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</p>
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</pre>
-<p>
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</p>
-<pre class="example">
-[
-  {
-    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "@type": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]
-</pre>
-</div>
-<div class="appendix section" id="mashing-up-vocabularies">
-<h3>
-<span class="secno">
-A.4
-</span>
-Mashing
-Up
-Vocabularies
-</h3>
-<p>
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-Vocabulary
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</p>
-<ul>
-<li>
-RDF
--
-for
-describing
-information
-about
-objects
-on
-the
-semantic
-web.
-</li>
-<li>
-RDFS
--
-for
-expressing
-things
-like
-labels
-and
-comments.
-</li>
-<li>
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</li>
-<li>
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</li>
-<li>
-FOAF
--
-for
-describing
-social
-networks.
-</li>
-<li>
-Calendar
--
-for
-specifying
-events.
-</li>
-<li>
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</li>
-<li>
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</li>
-<li>
-GEO
--
-for
-describing
-geographic
-location.
-</li>
-<li>
-VCard
--
-for
-describing
-organizations
-and
-people.
-</li>
-<li>
-DOAP
--
-for
-describing
-projects.
-</li>
-</ul>
-<p>
-You
-can
-use
-these
-vocabularies
-in
-combination,
-like
-so:
-</p>
-<pre class="example">
-{
-  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-<p>
-Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-in-line
-using
-the
-<code>
-@context
-</code>
-keyword,
-like
-so:
-</p>
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "@type": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}
-</pre>
-<p>
-The
-<code>
-@context
-</code>
-keyword
-is
-used
-to
-change
-how
-the
-JSON-LD
-processor
-evaluates
-key-value
-pairs.
-In
-this
-case,
-it
-was
-used
-to
-map
-one
-string
-('myvocab')
-to
-another
-string,
-which
-is
-interpreted
-as
-a
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>.
-In
-the
-example
-above,
-the
-<code>
-myvocab
-</code>
-string
-is
-replaced
-with
-"
-<code>
-http://example.org/myvocab#
-</code>
-"
-when
-it
-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
-for
-RDF,
-called
-a
-<del class="diff-old">CURIE,
-</del>
-<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
-<ins class="diff-chg">CURIE
-</ins></a>,
-and
-provides
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</p>
-<p>
-</p>
-</div>
-<div class="appendix section" id="acknowledgements">
-<h3>
-<span class="secno">
-A.5
-</span>
-Acknowledgements
-</h3>
-<p>
-The
-editors
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-initial
-push
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-Longley,
-Dave
-Lehn
-and
-Mike
-Johnson
-who
-reviewed,
-provided
-feedback,
-and
-performed
-several
-implementations
-of
-the
-specification,
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-Thanks
-also
-to
-Nathan
-Rixham,
-Bradley
-P.
-Allen,
-Kingsley
-Idehen,
-Glenn
-McDonald,
-Alexandre
-Passant,
-Danny
-Ayers,
-Ted
-Thibodeau
-Jr.,
-Olivier
-Grisel,
-Niklas
-Lindström,
-Markus
-Lanthaler,
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-Another
-huge
-thank
-you
-goes
-out
-to
-Dave
-Longley
-who
-designed
-many
-of
-the
-algorithms
-used
-in
-this
-specification,
-including
-the
-normalization
-algorithm
-which
-was
-a
-monumentally
-difficult
-design
-challenge.
-</p>
-</div>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-B.
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-B.1
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<dt id="bib-RDF-CONCEPTS">
-[RDF-CONCEPTS]
-</dt>
-<dd>
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-<cite>
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</a>
-</dd>
-<dt id="bib-RFC3986">
-[RFC3986]
-</dt>
-<dd>
-T.
-Berners-Lee;
-R.
-Fielding;
-L.
-Masinter.
-<a href="http://www.ietf.org/rfc/rfc3986.txt">
-<cite>
-Uniform
-Resource
-Identifier
-(URI):
-Generic
-Syntax.
-</cite>
-</a>
-January
-2005.
-Internet
-RFC
-3986.
-URL:
-<a href="http://www.ietf.org/rfc/rfc3986.txt">
-http://www.ietf.org/rfc/rfc3986.txt
-</a>
-</dd>
-<dt id="bib-RFC3987">
-[RFC3987]
-</dt>
-<dd>
-M.
-Dürst;
-M.
-Suignard.
-<a href="http://www.ietf.org/rfc/rfc3987.txt">
-<cite>
-Internationalized
-Resource
-Identifiers
-(IRIs).
-</cite>
-</a>
-January
-2005.
-Internet
-RFC
-3987.
-URL:
-<a href="http://www.ietf.org/rfc/rfc3987.txt">
-http://www.ietf.org/rfc/rfc3987.txt
-</a>
-</dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford.
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-<cite>
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</cite>
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-<dt id="bib-WEBIDL">
-[WEBIDL]
-</dt>
-<dd>
-Cameron
-McCormack.
-<a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">
-<cite>
-Web
-IDL.
-</cite>
-</a>
-19
-December
-2008.
-W3C
-Working
-Draft.
-(Work
-in
-progress.)
-URL:
-<a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">
-http://www.w3.org/TR/2008/WD-WebIDL-20081219
-</a>
-</dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-B.2
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-ECMA-262">
-[ECMA-262]
-</dt>
-<dd>
-<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
-<cite>
-ECMAScript
-Language
-Specification,
-Third
-Edition.
-</cite>
-</a>
-December
-1999.
-URL:
-<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
-http://www.ecma-international.org/publications/standards/Ecma-262.htm
-</a>
-</dd>
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDF-SCHEMA">
-[RDF-SCHEMA]
-</dt>
-<dd>
-Dan
-Brickley;
-Ramanathan
-V.
-Guha.
-<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
-<cite>
-RDF
-Vocabulary
-Description
-Language
-1.0:
-RDF
-Schema.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
-http://www.w3.org/TR/2004/REC-rdf-schema-20040210
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-31
-March
-2011.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-http://www.w3.org/TR/2011/WD-rdfa-core-20110331
-</a>
-</dd>
-<dt id="bib-TURTLE">
-[TURTLE]
-</dt>
-<dd>
-David
-Beckett,
-Tim
-Berners-Lee.
-<a href="http://www.w3.org/TeamSubmission/turtle/">
-<cite>
-Turtle:
-Terse
-RDF
-Triple
-Language.
-</cite>
-</a>
-January
-2008.
-W3C
-Team
-Submission.
-URL:
-<a href="http://www.w3.org/TeamSubmission/turtle/">
-http://www.w3.org/TeamSubmission/turtle/
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20110817/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4086 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!--  
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-ol.algorithm.update { margin-left: 2em; }
-ol.algorithm.update>li { list-style-type: none; }
-ol.algorithm.update>li>span.list-number {
-  display:block;
-  float: left; 
-  margin-left: -3.5em;
-}
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  1px dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-17-august-2011">Unofficial Draft 17 August 2011</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
-<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dt>Authors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
-<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-</dl><p>This document is also available in this non-normative format: <a href="diff-20110808.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and 
-messaging format. In an attempt to harmonize the representation of Linked Data 
-in JSON, this specification outlines a common JSON representation format for 
-expressing directed graphs; mixing both Linked Data and non-Linked Data in 
-a single document. 
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design" class="tocxref"><span class="secno">2. </span>Design</a><ul class="toc"><li class="tocline"><a href="#goals-and-rationale" class="tocxref"><span class="secno">2.1 </span>Goals and Rationale</a></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">2.2 </span>Linked Data</a></li><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">2.3 </span>Linking Data</a></li><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">2.4 </span>The Context</a><ul class="toc"><li class="tocline"><a href="#inside-a-context" class="tocxref"><span class="secno">2.4.1 </span>Inside a Context</a></li></ul></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">2.5 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno">3.4 </span>Strings</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">3.6 </span>Datatypes</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">3.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.9 </span>Expansion</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.10 </span>Compaction</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#curies" class="tocxref"><span class="secno">4.1 </span>CURIEs</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">4.2 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.3 </span>Type Coercion</a></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">4.4 </span>Chaining</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.5 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#overriding-keywords" class="tocxref"><span class="secno">4.6 </span>Overriding Keywords</a></li><li class="tocline"><a href="#normalization" class="tocxref"><span class="secno">4.7 </span>Normalization</a></li></ul></li><li class="tocline"><a href="#the-application-programming-interface" class="tocxref"><span class="secno">5. </span>The Application Programming Interface</a><ul class="toc"><li class="tocline"><a href="#jsonldprocessor" class="tocxref"><span class="secno">5.1 </span>JSONLDProcessor</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">5.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#jsonldprocessorcallback" class="tocxref"><span class="secno">5.2 </span>JSONLDProcessorCallback</a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">5.2.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#jsonldtriplecallback" class="tocxref"><span class="secno">5.3 </span>JSONLDTripleCallback</a><ul class="toc"><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">5.3.1 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">6. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">6.1 </span>Syntax Tokens and Keywords</a></li><li class="tocline"><a href="#algorithm-terms" class="tocxref"><span class="secno">6.2 </span>Algorithm Terms</a></li><li class="tocline"><a href="#context-1" class="tocxref"><span class="secno">6.3 </span>Context</a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno">6.3.1 </span>Coerce</a></li><li class="tocline"><a href="#initial-context" class="tocxref"><span class="secno">6.3.2 </span>Initial Context</a></li></ul></li><li class="tocline"><a href="#iri-expansion" class="tocxref"><span class="secno">6.4 </span>IRI Expansion</a></li><li class="tocline"><a href="#iri-compaction" class="tocxref"><span class="secno">6.5 </span>IRI Compaction</a></li><li class="tocline"><a href="#value-expansion" class="tocxref"><span class="secno">6.6 </span>Value Expansion</a></li><li class="tocline"><a href="#value-compaction" class="tocxref"><span class="secno">6.7 </span>Value Compaction</a></li><li class="tocline"><a href="#expansion-1" class="tocxref"><span class="secno">6.8 </span>Expansion</a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno">6.8.1 </span>Expansion Algorithm</a></li></ul></li><li class="tocline"><a href="#compaction-1" class="tocxref"><span class="secno">6.9 </span>Compaction</a><ul class="toc"><li class="tocline"><a href="#compaction-algorithm" class="tocxref"><span class="secno">6.9.1 </span>Compaction Algorithm</a></li></ul></li><li class="tocline"><a href="#framing-1" class="tocxref"><span class="secno">6.10 </span>Framing</a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno">6.10.1 </span>Framing Algorithm Terms</a></li><li class="tocline"><a href="#framing-algorithm" class="tocxref"><span class="secno">6.10.2 </span>Framing Algorithm</a></li></ul></li><li class="tocline"><a href="#normalization-1" class="tocxref"><span class="secno">6.11 </span>Normalization</a><ul class="toc"><li class="tocline"><a href="#normalization-algorithm-terms" class="tocxref"><span class="secno">6.11.1 </span>Normalization Algorithm Terms</a></li><li class="tocline"><a href="#normalization-state" class="tocxref"><span class="secno">6.11.2 </span>Normalization State</a></li><li class="tocline"><a href="#normalization-algorithm" class="tocxref"><span class="secno">6.11.3 </span>Normalization Algorithm</a></li><li class="tocline"><a href="#node-relabeling-algorithm" class="tocxref"><span class="secno">6.11.4 </span>Node Relabeling Algorithm</a></li><li class="tocline"><a href="#deterministic-labeling-algorithm" class="tocxref"><span class="secno">6.11.5 </span>Deterministic Labeling Algorithm</a></li><li class="tocline"><a href="#shallow-comparison-algorithm" class="tocxref"><span class="secno">6.11.6 </span>Shallow Comparison Algorithm</a></li><li class="tocline"><a href="#object-comparison-algorithm" class="tocxref"><span class="secno">6.11.7 </span>Object Comparison Algorithm</a></li><li class="tocline"><a href="#deep-comparison-algorithm" class="tocxref"><span class="secno">6.11.8 </span>Deep Comparison Algorithm</a></li><li class="tocline"><a href="#node-serialization-algorithm" class="tocxref"><span class="secno">6.11.9 </span>Node Serialization Algorithm</a></li><li class="tocline"><a href="#serialization-label-generation-algorithm" class="tocxref"><span class="secno">6.11.10 </span>Serialization Label Generation Algorithm</a></li><li class="tocline"><a href="#combinatorial-serialization-algorithm" class="tocxref"><span class="secno">6.11.11 </span>Combinatorial Serialization Algorithm</a></li><li class="tocline"><a href="#mapping-serialization-algorithm" class="tocxref"><span class="secno">6.11.12 </span>Mapping Serialization Algorithm</a></li><li class="tocline"><a href="#label-serialization-algorithm" class="tocxref"><span class="secno">6.11.13 </span>Label Serialization Algorithm</a></li></ul></li><li class="tocline"><a href="#data-round-tripping" class="tocxref"><span class="secno">6.12 </span>Data Round Tripping</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">6.13 </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">6.13.1 </span>Overview</a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno">6.13.2 </span>RDF Conversion Algorithm Terms</a></li><li class="tocline"><a href="#rdf-conversion-algorithm" class="tocxref"><span class="secno">6.13.3 </span>RDF Conversion Algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno">7. </span>Experimental Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">7.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#lists" class="tocxref"><span class="secno">7.2 </span>Lists</a><ul class="toc"><li class="tocline"><a href="#expansion-2" class="tocxref"><span class="secno">7.2.1 </span>Expansion</a></li><li class="tocline"><a href="#normalization-2" class="tocxref"><span class="secno">7.2.2 </span>Normalization</a></li><li class="tocline"><a href="#rdf-conversion-1" class="tocxref"><span class="secno">7.2.3 </span>RDF Conversion</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">A. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">A.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">A.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">A.3 </span>Microdata</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">A.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A.5 </span>Acknowledgements</a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-<p>
-JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing 
-data on the Web. Linked Data is a technique for describing content across 
-different 
-documents or Web sites. Web resources are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s, 
-and typically are dereferencable entities that may be used to find more 
-information, creating a "Web of Knowledge". JSON-LD is intended to be a simple 
-publishing method for expressing not only Linked Data in JSON, but for adding
-semantics to existing JSON.
-</p>
-
-<p>
-JSON-LD is designed as a light-weight syntax that can be used to express 
-Linked Data. It is primarily intended to be a way to express Linked Data 
-in Javascript and other Web-based programming environments. It is also 
-useful when building interoperable Web Services and when storing Linked 
-Data in JSON-based document storage engines. It is practical and designed 
-to be as simple as possible, utilizing the large number of JSON parsers 
-and existing code that is in use today. It is designed to be able to 
-express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats 
-[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports 
-every major Web-based structured data model in use today. 
-</p>
-
-<p>
-The syntax does not require many applications to change their JSON, but 
-easily add meaning by adding context in a way that is either in-band or 
-out-of-band. The syntax is designed to not disturb already deployed systems 
-running on JSON, but provide a smooth migration path from JSON to JSON with 
-added semantics. Finally, the format is intended to be fast to parse, fast to 
-generate, stream-based and document-based processing compatible, and require
-a very small memory footprint in order to operate.
-</p>
-
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of JSON for Linked
-data. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and 
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to implement processors and APIs for 
-  JSON-LD.</li>
-</ul>
-
-<p>
-To understand the basics in this specification you must first be familiar with 
-JSON, which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. To understand the API and how it is
-intended to operate  in a programming environment, it is useful to have working 
-knowledge of the JavaScript programming language [<cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and 
-WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be 
-familiar with the basic RDF concepts [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-
-<p>
-  Examples may contain references to existing vocabularies and use abbreviations in <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>s and source code. The following is a list of all vocabularies and their abbreviations, as used in this document:
-</p>
-<ul>
-  <li>The <a href="http://purl.org/dc/terms/">Dublin Core</a>
-  vocabulary (abbreviation: <code>dc</code>, e.g., <code>dc:title</code>)</li>
-  <li>The <a href="http://xmlns.com/foaf/0.1/">Friend of a Friend</a>
-  vocabulary (abbreviation: <code>foaf</code>, e.g., <code>foaf:knows</code>)</li>
-  <li>The <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">RDF</a>
-  vocabulary (abbreviation: <code>rdf</code>, e.g., <code>rdf:type</code>)</li>
-  <li>The <a href="http://www.w3.org/2001/XMLSchema#">XSD</a>
-  vocabulary (abbreviation: <code>xsd</code>, e.g., <code>xsd:integer</code>)</li>
-</ul>
-
-<p>
-  JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] defines several terms which are used throughout this document:
-  </p><dl>
-    <dt><dfn title="JSON_Object" id="dfn-json_object">JSON Object</dfn></dt><dd>
-      An object structure is represented as a pair of curly brackets surrounding zero or
-      more name/value pairs (or members). A name is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A single colon comes after
-      each name, separating the name from the value. A single comma separates a value
-      from a following name. The names within an object <em class="rfc2119" title="should">should</em> be unique.
-    </dd>
-    <dt><dfn title="array" id="dfn-array">array</dfn></dt><dd>
-      An <em>array</em> is an ordered collection of values. An array begins with [ (left bracket) and ends with ]
-      (right bracket). Values are separated by , (comma). Within JSON-LD, array order is not preserved, unless
-      specific markup is provided (see <a href="#lists">Lists</a>). This is because the basic data model of JSON-LD
-      <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>, which is inherently unordered.
-    </dd>
-    <dt><dfn title="string" id="dfn-string">string</dfn></dt><dd>
-      A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A
-      character is represented as a single character string. A string is very much like a C or Java string.
-    </dd>
-    <dt><dfn title="number" id="dfn-number">number</dfn></dt><dd>
-      A number is very much like a C or Java number, except that the octal and hexadecimal formats are not used.
-    </dd>
-    <dt><dfn title="true" id="dfn-true">true</dfn> and <dfn title="false" id="dfn-false">false</dfn></dt><dd>
-      Boolean values.
-    </dd>
-    <dt><dfn title="null" id="dfn-null">null</dfn></dt><dd>
-      The use of the <em>null</em> value is undefined within JSON-LD.
-    </dd>
-  </dl>
-<p></p>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>Technical discussion typically occurs on the public mailing list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
-</li>
-
-<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held 
-on Tuesdays at 1500UTC on the second and fourth week of each month.
-</li>
-
-<li>Specification bugs and issues should be reported in the 
-<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
-
-<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the 
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design</h2>
-
-<p>The following section outlines the design goals and rationale behind the 
-JSON-LD markup language.
-</p>
-
-<div id="goals-and-rationale" class="section">
-<h3><span class="secno">2.1 </span>Goals and Rationale</h3>
-
-<p>
-A number of design considerations were explored during the creation of this 
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers need only know JSON and three keywords to use the basic 
- functionality in JSON-LD. No extra processors or software libraries are
- necessary to use JSON-LD in its most basic form. The language attempts to
- ensure that developers have an easy learning curve.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
- all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
- <dt>Expressiveness</dt>
- <dd>The syntax must be able to express directed graphs, which have been proven
- to be able to simply express almost every real world data model.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable, requiring as
- little as possible from the developer.</dd>
- 
-<!-- <dt>Pragmatism</dt>
- <dd>Mixing the expression of pure Linked Data with data that is not
- linked was an approach that was driven by pragmatism. JSON-LD attempts to be
- more practical than theoretical in its approach to Linked Data.</dd> -->
-
- <dt>Zero Edits, most of the time</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify 
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers. At times, mapping JSON to 
- a graph representation can become difficult. In these instances, rather than 
- having JSON-LD support esoteric markup, we chose not to support the use case 
- and support a simplified syntax instead. So, while Zero Edits was a goal,
- it was not always possible without adding great complexity to the language.
- </dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="linked-data" class="section">
-<h3><span class="secno">2.2 </span>Linked Data</h3>
-<p>
-The following definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> is the one that will 
-be used for this specification.
-</p>
-<ol>
-  <li><dfn title="Linked_Data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a representation of a linked data graph.</li>
-  <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is an unordered labeled directed graph, where nodes are <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are properties.</li>
-  <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one outgoing edge.</li>
-  <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> <em class="rfc2119" title="should">should</em> be labeled with an IRI.</li>
-  <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>.</li>
-  <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <em class="rfc2119" title="should">should</em> be labeled with an IRI.</li>
-  <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one incoming edge.</li>
-  <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an IRI.</li>
-  <li>An IRI that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be dereferencable to a <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> document describing the labeled <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>.</li>
-  <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not an IRI</li>
-</ol>
-
-<p>
-Note that the definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> above is silent on the 
-topic of unlabeled nodes. Unlabeled nodes are not considered 
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
-of unlabled nodes, as most graph-based data sets on the Web contain a number 
-of associated nodes that are not named and thus are not directly 
-de-referenceable.
-</p>
-</div>
-
-<div id="linking-data" class="section">
-<h3><span class="secno">2.3 </span>Linking Data</h3>
-
-<p>
-An Internationalized Resource Identifier 
-(<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
-as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique 
-identifiers on the web. In <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, an IRI is commonly 
-used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an 
-<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
-</p>
-
-<p>JSON-LD defines a mechanism to map JSON values to IRIs. This does not mean 
-that JSON-LD requires every key or value to be an IRI, but rather ensures that
-keys and values can be mapped to IRIs if the developer so desires to transform
-their data into Linked Data. There are a few techniques that can ensure 
-that developers will generate good Linked Data for the Web. JSON-LD 
-formalizes those techniques.
-</p>
-
-<p>We will be using the following JSON markup as the example for the
-rest of this section:
-</p>
-
-<pre class="example">
-{
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-</div>
-
-<div id="the-context" class="section">
-<h3><span class="secno">2.4 </span>The Context</h3>
-
-<p>In JSON-LD, a context is used to allow developers to map <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s 
-to <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that <em class="rfc2119" title="may">may</em> be expanded
-to an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The semantic web, just like the document-based 
-web, uses IRIs for unambiguous identification. The idea is that these 
-<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s mean something that may be of use to other developers.
-For example, the term <code>name</code> may map directly to the IRI 
-<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to 
-be constructed using the common JSON practice of simple name/value pairs while
-ensuring that the data is useful outside of the database or page in which it
-resides.
-</p>
-
-<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a context and
-then used by adding a single line to the JSON markup above:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>The addition above transforms the previous JSON document into a JSON document
-with added semantics because the <code>@context</code> specifies how the
-<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong> 
-terms map to IRIs. 
-Mapping those keys to IRIs gives the data global context. If two 
-developers use the same IRI to describe a property, they are more than likely
-expressing the same concept. This allows both developers to re-use each others
-data without having to agree to how their data will inter-operate on a 
-site-by-site basis.</p>
-
-<p>
-The semantic web uses a special type of document called a 
-<em>Web Vocabulary</em> to define <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s. A context is a type of
-Web vocabulary.
-Typically, these Web Vocabulary documents have <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es associated
-with them and contain a number of <a class="tref internalDFN" title="term" href="#dfn-term">term</a> declarations. A
-<dfn title="prefix" id="dfn-prefix">prefix</dfn>, like a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, is a short word that expands
-to a Web Vocabulary IRI. <a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are helpful when a developer
-wants to mix multiple vocabularies together in a context, but does not want
-to go to the trouble of defining every single term in every single vocabulary.
-Some Web Vocabularies may have 10-20 terms defined. If a developer wants to use 
-3-4 different vocabularies, the number of terms that 
-would have to be declared in a single context would become quite large. To 
-reduce the number of different terms that must be defined, JSON-LD also allows 
-prefixes to be used to compact IRIs.
-</p><p>
-
-</p><p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code> 
-specifies a Web Vocabulary which may be represented using the
-<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>. The <code>foaf</code> Web Vocabulary
-contains a term called <strong>name</strong>. If you join the 
-<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> with the <strong>name</strong> suffix, 
-you can build a compact IRI that will expand out into an absolute IRI for the
-<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
-That is, the compact IRI, or short-form, is <code>foaf:name</code> and the 
-expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary 
-term is used to specify a person's name.
-</p>
-
-<p>Developers, and machines, are able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a 
-definition of what the term means. Much like we can use WordNet today to 
-see the 
-<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
-of words in the English language. Developers and machines need the same sort of 
-dictionary of terms. IRIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>The context provides a collection of vocabulary <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and 
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es that can be used to expand JSON keys and values into
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s.</p>
-
-<div id="inside-a-context" class="section">
-<h4><span class="secno">2.4.1 </span>Inside a Context</h4>
-
-<p>In the previous section, the developer used the <code>@context</code>
-keyword to pull in an external context. That context document, if 
-de-referenced, would look something like this:</p>
-
-<pre class="example">
-{
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-}</pre>
-
-<p>A JSON-LD context document is a simple mapping from <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es to expanded values such as IRIs or keywords. Contexts may also contain datatype information
-for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
-the JSON-LD processor.
-</p>
-
-<p>Contexts may be specified in-line. This ensures that JSON-LD documents
-can be processed when a JSON-LD processor does not have access to the Web.</p>
-
-<p>
-JSON-LD strives to ensure that developers don't have to change the JSON
-that is going into and being returned from their Web applications. This means
-that developers can also specify a context for JSON data in an out-of-band
-fashion via the API. The API is described later in this document. A JSON-LD 
-aware Web Service <em class="rfc2119" title="may">may</em> also define a context that will be pre-loaded for all
-calls to the service. This allows services that have previously been publishing
-and receiving JSON data to accept JSON-LD data without requiring client 
-software to change.
-</p>
-
-</div>
-
-</div>
-
-<div id="from-json-to-json-ld" class="section">
-<h3><span class="secno">2.5 </span>From JSON to JSON-LD</h3>
-
-<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>, 
-and <strong>avatar</strong>,
-are defined in a context, and that context is used to resolve the
-names in JSON objects, machines are able to automatically expand the terms to 
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Doing this allows JSON to be unambiguously machine-readable without
-requiring developers that use JSON to drastically change their workflow.</p>
-</div>
-
-</div>
-
-
-
-<div id="basic-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Basic Concepts</h2>
-
-<p>JSON-LD is designed to ensure that Linked Data concepts can be marked 
-up in a way that is simple to understand and author by Web developers. In many
-cases, regular JSON markup can become Linked Data with the simple addition
-of a context. As more JSON-LD features are used, more semantics are added
-to the JSON markup.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">3.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most 
-<a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a> are named. IRIs can be 
-expressed in a variety of different ways in JSON-LD.</p>
-
-<ol>
-  <li>In general, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in the key position in 
-    a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that have a mapping to an IRI or another key in the context are
-    expanded to an IRI by JSON-LD processors. There are special rules for 
-    processing keys in <code>@context</code> and when dealing with keys that 
-    start with the <code>@subject</code> character.</li>
-  <li>An IRI is generated for the value specified using <code>@subject</code>, 
-    if it is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>.</li>
-  <li>An IRI is generated for the value specified using <code>@type</code>.</li>
-  <li>An IRI is generated for the value specified using the <code>@iri</code> 
-    keyword.</li>
-  <li>An IRI is generated when there are <code>@coerce</code> rules in 
-    effect for a key named <code>@iri</code>.</li>
-</ol>
-
-<p>IRIs can be expressed directly in the key position like so:
-</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p>In the example above, the key 
-<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
-opposed to being interpreted as a string.</p>
-
-<p>Term expansion occurs for IRIs if a term is defined within the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are expanded when used in keys:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><code>name</code> above will automatically expand out to the IRI
-<code>http://xmlns.com/foaf/0.1/name</code>.</p>
-
-<p>An IRI is generated when a value is associated with a key using 
-the <code>@iri</code> keyword:</p>
-
-<pre class="example">
-{
-...
-  "homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}</pre>
-
-<p>If type coercion rules are specified in the <code>@context</code> for
-a particular vocabulary term, an IRI is generated:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  {
-    ...
-    "@coerce": 
-    {
-      "@iri": "homepage"
-    }
-  }</span>
-...
-  "homepage": "http://manu.sporny.org/",
-...
-}</pre>
-
-<p>Even though the value <code>http://manu.sporny.org/</code> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>,
-the type coercion rules will transform the value into an IRI when processed
-by a JSON-LD Processor</p>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">3.2 </span>Identifying the Subject</h3>
-
-<p>
-  <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s are a fundamental concept of Linked Data, and nodes should have a de-referencable
-  identifier used to name and locate them. For nodes to be truely linked, de-referencing the identifier
-  should result in a representation of that node. Associating an IRI with a node tells an application
-  that the returned document contains a description of of the identifier requested.
-</p>
-<p>
-  JSON-LD documents may also contain descriptions of other nodes, so it is necessary to be able to
-  uniquely identify each node which may be externally referenced.
-</p>
-<p>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> of a node is declared using the <code>@subject</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, property, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to the IRI 
-<code>http://example.org/people#joebob</code>.
-</p>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">3.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the 
-<code>@type</code> key. Specifying the type in this way will generate a 
-triple of the form (subject, type, type-uri).</p>
-
-<p>To be Linked Data, types should be uniquely identified by an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>.</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple if the JSON-LD 
-document is mapped to RDF (in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-</div>
-
-<div id="strings" class="section">
-<h3><span class="secno">3.4 </span>Strings</h3>
-
-<p>Regular text strings, also referred to as <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn>s, are 
-easily expressed using regular JSON <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s.</p>
-
-<pre class="example">
-{
-...
-  "name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="string-internationalization" class="section">
-<h3><span class="secno">3.5 </span>String Internationalization</h3>
-
-<p>JSON-LD makes an assumption that strings with associated language encoding 
-information are not very common when used in JavaScript and Web Services. 
-Thus, it takes a little more effort to express strings with associated 
-language information.</p>
-
-<pre class="example">
-{
-...
-  "name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}</pre>
-
-<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for 
-<em>花澄</em> and associate the <code>ja</code> language code with the triple 
-that is generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="datatypes" class="section">
-<h3><span class="secno">3.6 </span>Datatypes</h3>
-
-<p>
-  A value with an associated datatype, also known as a 
-  <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn>, is indicated by associating a literal with
-  an IRI which indicates the typed literal's datatype. Typed literals may be 
-  expressed in JSON-LD in three ways:
-</p>
-
-<ol>
-  <li>By utilizing the <code>@coerce</code> keyword.</li>
-  <li>By utilizing the expanded form for specifying objects.</li>
-  <li>By using a native JSON datatype.</li>
-</ol>
-
-<p>The first example uses the <code>@coerce</code> keyword to express a
-typed literal:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context": 
-  {
-    "modified":  "http://purl.org/dc/terms/modified",
-    "dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
-    "@coerce": 
-    {
-      "dateTime": "modified"
-    }
-  }</span>
-...
-  "modified": "2010-05-29T14:17:39+02:00",
-...
-}</pre>
-
-<p>The second example uses the expanded form for specifying objects:</p>
-
-<pre class="example">
-{
-...
-  "modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "dateTime"
-  }</span>
-...
-}</pre>
-
-<p>Both examples above would generate an object with the literal value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-<p>The third example uses a built-in native JSON type, a <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, to 
-express a datatype:</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "age": <span class="diff">31</span>
-...
-}</pre>
-
-<p>The example above would generate the following triple:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/age&gt; 
-      "31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .</pre>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">3.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-<a class="tref internalDFN" title="array" href="#dfn-array">array</a>s. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</p>
-
-<p class="note">In JSON-LD, Multiple objects on a property are not ordered. This is because typically graphs
-are not inherently ordered data structures. To see more on creating ordered collections
-in JSON-LD, see <a href="#lists">Lists</a>.
-</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "jaybee" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
-form for objects:</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/articles/8",
-  "modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "dateTime"
-    }
-  ]</span>
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt; 
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="expansion" class="section">
-<h3><span class="secno">3.9 </span>Expansion</h3>
-
-<p>Expansion is the process of taking a JSON-LD document and applying a 
-context such that all IRI, datatypes, and literal values are expanded so
-that the context is no longer necessary. JSON-LD document expansion 
-is typically used when re-mapping JSON-LD documents to application-specific
-JSON documents or as a part of the <a href="#normalization">Normalization</a>
-process.</p>
-
-<p>For example, assume the following JSON-LD input document:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}</pre>
-
-<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document 
-provided above would result in the following output:</p>
-
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}</pre>
-
-</div> 
-
-<div id="compaction" class="section">
-<h3><span class="secno">3.10 </span>Compaction</h3>
-
-<p>Compaction is the process of taking a JSON-LD document and applying a 
-context such that the most compact form of the document is generated. JSON
-is typically expressed in a very compact, key-value format. That is, full
-IRIs are rarely used as keys. At times, a JSON-LD document may be received
-that is not in its most compact form. JSON-LD, via the API, provides a way
-to compact a JSON-LD document.
-</p>
-
-<p>For example, assume the following JSON-LD input document:</p>
-
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage": 
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}</pre>
-
-<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
-
-<pre class="example">
-{
-   "name": "http://xmlns.com/foaf/0.1/name",
-   "homepage": "http://xmlns.com/foaf/0.1/homepage",
-   "@coerce": 
-   {
-      "@iri": ["homepage"]
-   }
-}</pre>
-
-<p>Running the JSON-LD Compaction algorithm given the context supplied above 
-against the JSON-LD input document provided above would result in the following
-output:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce": 
-      {
-         "@iri": "homepage"
-      }
-   }
-}</pre>
-
-<p>The compaction algorithm also enables the developer to map any expanded
-format into an application-specific compacted format. While the context 
-provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
-<strong>name</strong>, it could have also mapped it to any arbitrary string
-provided by the developer.
-</p>
-
-</div>
-
-<div id="framing" class="section">
-<h3><span class="secno">3.11 </span>Framing</h3>
-
-<p>A JSON-LD document is a representation of a directed graph. A single
-directed graph can have many different serializations, each expressing
-exactly the same information. Developers typically work with trees, represented as
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>s. While mapping a graph to 
-a tree can be done, the layout of the end result must be specified in advance. 
-A <dfn title="Frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to 
-specify a deterministic layout for a graph.
-</p>
-
-<p>Framing is the process of taking a JSON-LD document, which expresses a
-graph of information, and applying a specific graph layout 
-(called a <a class="tref internalDFN" title="Frame" href="#dfn-frame">Frame</a>).
-</p>
-
-<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
-
-<pre class="example">
-{
-  "@coerce": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title",
-    "@coerce": 
-    {
-      "@iri": "ex:contains"
-    },
-  },
-  "@subject": 
-  [{
-    "@subject": "http://example.com/library",
-    "@type": "Library",
-    "contains": "http://example.org/library/the-republic"
-  }, 
-  {
-    "@subject": "http://example.org/library/the-republic",
-    "@type": "Book",
-    "creator": "Plato",
-    "title": "The Republic",
-    "contains": "http://example.org/library/the-republic#introduction"
-  }, 
-  {
-    "@subject": "http://example.org/library/the-republic#introduction",
-    "@type": "Chapter",
-    "description": "An introductory chapter on The Republic.",
-    "title": "The Introduction"
-  }]
-}</pre>
-
-<p>Developers typically like to operate on items in a hierarchical, tree-based
-fashion. Ideally, a developer would want the data above sorted into top-level
-libraries, then the books that are contained in each library, and then the
-chapters contained in each book. To achieve that layout, the developer can
-define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
-
-<pre class="example">
-{
-  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title"
-  },
-  "@type": "Library",
-  "contains": {
-    "@type": "Book",
-    "contains": {
-      "@type": "Chapter"
-    }
-  }
-}</pre>
-
-<p>When the framing algorithm is run against the previously defined 
-JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
-JSON-LD document is the end result:</p>
-
-<pre class="example">
-{
-  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title"
-  },
-  "@subject": "http://example.org/library",
-  "@type": "Library",
-  "contains": {
-    <span class="diff">"@subject": "http://example.org/library/the-republic",</span>
-    "@type": "Book",
-    <span class="diff">"creator": "Plato",</span>
-    <span class="diff">"title": "The Republic",</span>
-    "contains": {
-      <span class="diff">"@subject": "http://example.org/library/the-republic#introduction",</span>
-      "@type": "Chapter",
-      <span class="diff">"description": "An introductory chapter on The Republic.",</span>
-      <span class="diff">"title": "The Introduction"</span>
-    },
-  },
-}</pre>
-
-<p>The JSON-LD framing algorithm allows developers to query by example and
-force a specific tree layout to a JSON-LD document.
-</p>
-
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>Advanced Concepts</h2>
-
-<p>JSON-LD has a number of features that provide functionality above and beyond
-the core functionality described above. The following sections outline the
-features that are specific to JSON-LD.
-</p>
-
-<div id="curies" class="section">
-  <h3><span class="secno">4.1 </span>CURIEs</h3>
-  <p>
-    Concepts in Linked Data documents may draw on a number of different vocabularies. The @vocab mechanism
-    is useful to easily associate types and properties with a specific vocabulary, but when many vocabularies
-    are used, this becomes difficult. Consider the following example:
-  </p>
-  <pre class="example">
-{
-  "@context": {
-    <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>
-    <span class="diff">"ex": "http://example.org/vocab#"</span>
-  },
-  "@subject": "http://example.org/library",
-  "@type": <span class="diff">"ex:Library"</span>,
-  <span class="diff">"ex:contains"</span>: {
-    "@subject": "http://example.org/library/the-republic",
-    "@type": <span class="diff">"ex:Book"</span>,
-    <span class="diff">"dc:creator"</span>: "Plato",
-    <span class="diff">"dc:title"</span>: "The Republic",
-    <span class="diff">"ex:contains"</span>: {
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": <span class="diff">"ex:Chapter"</span>,
-      <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",
-      <span class="diff">"dc:title"</span>: "The Introduction"
-    },
-  },
-}</pre>
-  <p>
-    In this example, two different vocabularies are identified with prefixes, and used as type
-    and property values using the CURIE notation.
-  </p>
-  <p>
-    A <dfn title="CURIE" id="dfn-curie">CURIE</dfn> is a compact way of describing an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The term actually comes
-    from Compact URI.
-    Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em> separated by a ':'. In
-    JSON-LD, the prefix may be the empty string, denoting the <dfn title="default_prefix" id="dfn-default_prefix">default prefix</dfn>.
-  </p>
-  <p>
-    CURIEs are defined more formally in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">section 6 "CURIE Syntax Definition"</a></cite>.
-  </p>
-</div>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">4.2 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as doubles, 
-integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
-information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
-
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-<p class="note">When dealing with a number of modern programming languages,
-including JavaScript ECMA-262, there is no distinction between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
-the <a class="tref internalDFN" title="number" href="#dfn-number">number</a> <code>5.3</code> and the <a class="tref internalDFN" title="number" href="#dfn-number">number</a> 
-<code>5.3e0</code> are treated as if they were the same. When converting from 
-JSON-LD to a language-native format and back, datatype information is lost in a 
-number of these languages. Thus, one could say that <code>5.3</code> is a 
-<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
-<strong>xsd:double</strong> in JSON-LD, but when both values are 
-converted to a language-native format the datatype difference between the two 
-is lost because the machine-level representation will almost always be a 
-<strong>double</strong>. 
-Implementers should be aware of this potential round-tripping issue between 
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
-objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
-to a language native type.
-</p>
-
-</div>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">4.3 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of values to particular data types. 
-Type coercion allows someone deploying JSON-LD to coerce the incoming or 
-outgoing types to the proper data type based on a mapping of data type IRIs to 
-property types. Using type coercion, one may convert simple JSON data to 
-properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to 
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {  
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-        "@iri": "homepage"
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="chaining" class="section">
-  <h3><span class="secno">4.4 </span>Chaining</h3>
-  <p>
-    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to 
-    use the definition of JSON-LD objects as <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This 
-    is a commonly used mechanism for creating a parent-child relationship 
-    between two <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s.
-  </p>
-  <p>The example shows an two subjects related by a property from the first 
-  subject:</p>
-
-  <pre class="example">
-{
-...
-  "name": "Manu Sporny",
-  "<span class="diff">knows</span>": {
-    "<span class="diff">@type</span>": "<span class="diff">Person</span>",
-    "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}</pre>
-  
-  <p>
-    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a 
-    JSON value at any point in JSON-LD.
-  </p>
-</div>
-
-<div id="identifying-unlabeled-nodes" class="section">
-<h3><span class="secno">4.5 </span>Identifying Unlabeled Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this type of node is called
-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) <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a> 
-prefix.</p>
-
-<pre class="example">
-{
-...
-  "@subject": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the 
-unlabeled node. This practice, however, is usually frowned upon when
-generating Linked Data. If a developer finds that they refer to the unlabeled
-node more than once, they should consider naming the node using a resolve-able
-IRI.
-</p>
-
-</div>
-
-<div id="overriding-keywords" class="section">
-<h3><span class="secno">4.6 </span>Overriding Keywords</h3>
-
-<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
-to be overridden. This feature allows more legacy JSON content to be supported 
-by JSON-LD. It also allows developers to design domain-specific implementations 
-using only the JSON-LD context.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {  
-     <span class="diff">"url": "@subject"</span>,
-     <span class="diff">"a": "@type"</span>,
-     "name": "http://schema.org/name"
-  },
-  "url": "http://example.com/about#gregg",
-  "a": "http://schema.org/Person",
-  "name": "Gregg Kellogg"
-}</pre>
-
-<p>In the example above, the <code>@subject</code> and <code>@type</code> 
-keywords have been overridden by <strong>url</strong> and 
-<strong>a</strong>, respectively.
-</p>
-
-</div>
-
-<div id="normalization" class="section">
-<h3><span class="secno">4.7 </span>Normalization</h3>
-
-<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and 
-performing a deterministic transformation on that input that results in a 
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> that any conforming JSON-LD processor would have 
-generated given the same input. The problem is a fairly difficult technical 
-problem to solve because it requires a directed graph to be ordered into a 
-set of nodes and edges in a deterministic way. This is easy to do when all of 
-the nodes have unique names, but very difficult to do when some of the nodes 
-are not labeled.
-</p>
-
-<p>Normalization is useful when comparing two graphs against one another,
-when generating a detailed list of differences between two graphs, and
-when generating a cryptographic digital signature for information contained 
-in a graph or when generating a hash of the information contained in a graph.
-</p>
-
-<p>The example below is an un-normalized JSON-LD document:</p>
-
-<pre class="example">
-{
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-      "@coerce": 
-      {
-         "@iri": ["homepage"]
-      }
-   }
-}</pre>
-
-<p>The example below is the normalized form of the JSON-LD document above:</p>
-
-<p class="note">Whitespace is used below to aid readability. The normalization
-algorithm for JSON-LD remove all unnecessary whitespace in the fully 
-normalized form.</p>
-
-<pre class="example">
-[{
-    "@subject": 
-    {
-        "@iri": "_:c14n0"
-    },
-    "http://xmlns.com/foaf/0.1/homepage": 
-    {
-        "@iri": "http://manu.sporny.org/"
-    },
-    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
-}]</pre>
-
-<p>Notice how all of the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s have been expanded and sorted in
-alphabetical order. Also, notice how the <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> has been 
-labeled with a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">blank node identifier</a>. Normalization ensures that any arbitrary
-graph containing exactly the same information would be normalized to exactly
-the same form shown above.</p>
-
-</div>
-
-</div>
-
-<div id="the-application-programming-interface" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>The Application Programming Interface</h2>
-
-<p>This API provides a clean mechanism that enables developers to convert 
-JSON-LD data into a a variety of output formats that are easier to work with in 
-various programming languages. If an API is provided in a programming 
-environment, the entire API <em class="rfc2119" title="must">must</em> be implemented.
-</p>
-
-<div id="jsonldprocessor" class="section">
-<h3><span class="secno">5.1 </span>JSONLDProcessor</h3>
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JSONLDProcessor</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-expand-object-object-input-JSONLDProcessorCallback-callback">expand</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-compact-object-object-input-object-context-JSONLDProcessorCallback-callback">compact</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">context</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-frame-object-object-input-object-frame-object-options-JSONLDProcessorCallback-callback">frame</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">frame</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-normalize-object-object-input-JSONLDProcessorCallback-callback">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-triples-object-object-input-JSONLDTripleCallback-tripleCallback-JSONLDProcessorCallback-parserCallback">triples</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a href="#idl-def-JSONLDTripleCallback" class="idlType"><code>JSONLDTripleCallback</code></a></span> <span class="idlParamName">tripleCallback</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">parserCallback</span></span>);</span>
-};</span>
-</pre><div id="methods" class="section"><h4><span class="secno">5.1.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessor-compact-object-object-input-object-context-JSONLDProcessorCallback-callback"><code>compact</code></dt><dd><a href="#compaction">Compacts</a> the given <code>input</code>
-    according to the steps in the
-    <a href="#compaction-algorithm">Compaction Algorithm</a>. The
-    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, compacted and returned if there are
-    no errors. If the compaction fails, <code>null</code> <em class="rfc2119" title="must">must</em> be returned.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform compaction on.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The base context to use when compacting the <code>input</code>.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-       the given <code>input</code>.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDProcessor-expand-object-object-input-JSONLDProcessorCallback-callback"><code>expand</code></dt><dd><a href="#expansion">Expands</a> the given <code>input</code>
-    according to the steps in the
-    <a href="#expansion-algorithm">Expansion Algorithm</a>. The
-    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, expanded and returned if there are
-    no errors. If the expansion fails, <code>null</code> <em class="rfc2119" title="must">must</em> be returned.
-    <div class="issue">How do we generate warning messages during this process?
-      For example, what happens when a key that doesn't have a mapping is
-      discovered?</div>
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to copy and perform the expansion upon.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the <code>input</code>.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDProcessor-frame-object-object-input-object-frame-object-options-JSONLDProcessorCallback-callback"><code>frame</code></dt><dd><a href="#framing">Frames</a> the given <code>input</code>
-    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. Exceptions are thrown if there are errors.
-    <div class="issue">Define what the exceptions are. We need to specify
-    whether or not we want exceptions thrown, or errors returned to the
-    error callback?</div>
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform framing on.</td></tr><tr><td class="prmName">frame</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The frame to use when re-arranging the data.</td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A set of options that will affect the framing algorithm.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given <code>input</code>.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDProcessor-normalize-object-object-input-JSONLDProcessorCallback-callback"><code>normalize</code></dt><dd><a href="#normalization">Normalizes</a> the given <code>input</code>
-    according to the steps in the
-    <a href="#normalization-algorithm">Normalization Algorithm</a>. The
-    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, normalized and returned if there are
-    no errors. If the compaction fails, <code>null</code> <em class="rfc2119" title="must">must</em> be returned.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform normalization upon.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDProcessor-triples-object-object-input-JSONLDTripleCallback-tripleCallback-JSONLDProcessorCallback-parserCallback"><code>triples</code></dt><dd>Processes the <code>input</code> according to the 
-    <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>, calling
-    the provided <code>tripleCallback</code> for each triple generated.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to process when outputting triples.</td></tr><tr><td class="prmName">tripleCallback</td><td class="prmType"><code><a href="#idl-def-JSONLDTripleCallback" class="idlType"><code>JSONLDTripleCallback</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given <code>input</code>.
-     <div class="issue">This callback should be aligned with the 
-       RDF API.</div></td></tr><tr><td class="prmName">parserCallback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given <code>input</code>.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
-</div>
-
-<div id="jsonldprocessorcallback" class="section">
-<h3><span class="secno">5.2 </span>JSONLDProcessorCallback</h3>
-<p>The JSONLDProcessorCallback is called whenever a processing error occurs 
-while processing the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>.</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
-};</span>
-</pre><div id="methods-1" class="section"><h4><span class="secno">5.2.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
-</div>
-
-<div id="jsonldtriplecallback" class="section">
-<h3><span class="secno">5.3 </span>JSONLDTripleCallback</h3>
-<p>The JSONLDTripleCallback is called whenever the processor generates a
-triple during the <code>triple()</code> call.</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JSONLDTripleCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JSONLDTripleCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">triple</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">objectType</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">object</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">datatype</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">language</span></span>);</span>
-};</span>
-</pre><div id="methods-2" class="section"><h4><span class="secno">5.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language"><code>triple</code></dt><dd>This callback is invoked whenever a triple is generated by the processor.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject IRI that is associated with the triple.</td></tr><tr><td class="prmName">property</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The property IRI that is associated with the triple.</td></tr><tr><td class="prmName">objectType</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The type of object that is associated with the triple. Valid values
-       are <code>IRI</code> and <code>literal</code>.</td></tr><tr><td class="prmName">object</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The object value associated with the subject and the property.</td></tr><tr><td class="prmName">datatype</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The datatype associated with the object.</td></tr><tr><td class="prmName">language</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The language associated with the object in BCP47 format.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
-</div>
-
-
-</div>
-
-<div id="algorithms" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>Algorithms</h2>
-
-<p>All algorithms described in this section are intended to operate on
-language-native data structures. That is, the serialization to a text-based
-JSON document isn't required as input or output to any of these algorithms and 
-language-native data structures <em class="rfc2119" title="must">must</em> be used where applicable.</p>
-
-<div id="syntax-tokens-and-keywords" class="section">
-  <h3><span class="secno">6.1 </span>Syntax Tokens and Keywords</h3>
-  
-  <p>JSON-LD specifies a number of syntax tokens and keywords that are using
-  in all algorithms described in this section:</p>
-  
-  <dl>
-  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
-  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
-  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
-  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
-  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
-  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
-  <dt><code>:</code></dt><dd>The separator for <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>s when used in JSON keys or JSON values.</dd>
-  <dt><code>@subject</code></dt><dd>Sets the active subjects.</dd>
-  <dt><code>@type</code></dt><dd>Used to set the type of the active subjects.</dd>
-  </dl>
-</div>
-
-<div id="algorithm-terms" class="section">
-  <h3><span class="secno">6.2 </span>Algorithm Terms</h3>
-  <dl>
-    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
-    <dd>
-      a context that is specified to the algorithm before processing begins.
-    </dd>
-    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
-    <dd>
-      the currently active subject that the processor should use when 
-      processing.
-    </dd>
-    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
-    <dd>
-      the currently active property that the processor should use when 
-      processing.
-    </dd>
-    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
-    <dd>
-      the currently active object that the processor should use when
-      processing.
-    </dd>
-    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
-    <dd>
-      a context that is used to resolve <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>s while the processing
-      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context 
-      contained within the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-    </dd>
-    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
-    <dd>
-      a context that is specified within a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>,
-      specified via the <code>@context</code> keyword.
-    </dd>
-    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
-    <dd>
-      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
-      context</a>, <a class="tref" title="current_subject">current subject</a>, and 
-      <a class="tref" title="current_property">current property</a>. The <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> is managed
-      as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
-      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new 
-      <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
-    </dd>
-    <dt><dfn title="JSON-LD_input" id="dfn-json-ld_input">JSON-LD input</dfn></dt>
-    <dd>
-      The JSON-LD data structure that is provided as input to the algorithm.
-    </dd>
-    <dt><dfn title="JSON-LD_output" id="dfn-json-ld_output">JSON-LD output</dfn></dt>
-    <dd>
-      The JSON-LD data structure that is produced as output by the algorithm.
-    </dd>
-
-  </dl>
-</div>
-
-<div id="context-1" class="section">
-  <h3 id="context"><span class="secno">6.3 </span>Context</h3>
-  <p>
-    Processing of JSON-LD data structure is managed recursively.
-    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
-    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
-    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-  </p>
-  <p>
-    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> (or elements
-    of a list (see <span a="#list-processing">List Processing</span>)).
-  </p>
-  <p>
-    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> having a key of
-    <code>@context</code> with <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> value. When processing a <a class="tref" title="local__context">local
-    context</a>, special processing rules apply:
-  </p>
-  <ol class="algorithm">
-    <li>Create a new, empty <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
-    <li>
-      If the value is a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, it <em class="rfc2119" title="must">must</em> have a lexical form of IRI and used to initialize
-      a new JSON document which replaces the value for subsequent processing.
-    </li>
-    <li>If the value is a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>, perform the following steps:
-      <ol class="algorithm">
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@base</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
-          <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of an absolute IRI. Add the base mapping to the <a class="tref" title="local__context">local
-          context</a>. <p class="issue">Turtle allows @base to be relative. If we did this, we
-          would have to add <a href="#iri-expansion">IRI Expansion</a>.</p>
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@vocab</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
-          <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of an absolute IRI. Add the vocabulary mapping to the
-          <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> after performing <a href="#iri-expansion">IRI Expansion</a> on
-          the associated value.
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@coerce</code> key, it <em class="rfc2119" title="must">must</em> have a value of a
-          <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>. Add the <code>@coerce</code> mapping to the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>
-          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value(s).
-        </li>
-        <li>
-          Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> and
-          <em class="rfc2119" title="must">must</em> have the value of a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of IRI. Merge the key-value
-          pair into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.
-        </li>
-      </ol>
-    </li>
-    <li>
-      Merge the of <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s <code>@coerce</code> mapping into  the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping as described <a href="#coerce">below</a>.
-    </li>
-    <li>
-      Merge all entries other than the <code>@coerce</code> mapping from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>to the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> overwriting any duplicate values.
-    </li>
-  </ol>
-  
-  <div id="coerce" class="section">
-    <h4><span class="secno">6.3.1 </span>Coerce</h4>
-    <p>
-      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
-      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
-      <code>@coerce</code> mapping, overwriting any duplicate values in 
-      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
-      The <code>@coerce</code> mapping has either a single <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a> or an
-      <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of CURIEs. When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-      map all CURIE values to <a class="tref internalDFN" title="array" href="#dfn-array">array</a> form and replace with the union of the value from
-      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
-      with a single CURIE, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
-    </p>
-  </div>
-
-  <div id="initial-context" class="section">
-    <h4><span class="secno">6.3.2 </span>Initial Context</h4>
-    <p>The <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> is initialized as follows:</p>
-    <ul>
-      <li>
-        <code>@base</code> is set using <cite><href="http: www.ietf.org="" rfc="" rfc2396.txt"="">section 5.1 Establishing a
-        Base URI</href="http:></cite> of [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>]. Processors <em class="rfc2119" title="may">may</em> provide a means
-        of setting the base IRI programatically.
-      </li>
-      <li><code>@coerce</code> is set with a single mapping from <code>@iri</code> to <code>@type</code>.</li>
-    </ul>
-    <pre class="example">
-{
-    "@base": <span class="diff">document-location</span>,
-    "@context": {
-      "@iri": "@type"
-    }
-}</pre>
-  </div>
-</div>
-
-<div id="iri-expansion" class="section">
-  <h3><span class="secno">6.4 </span>IRI Expansion</h3>
-  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
-    transforming a value representing an IRI into an actual IRI.</p>
-  <p>IRIs may be represented as an explicit string, or as a <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>, as a value relative to <code>@base</code>
-    or <code>@vocab</code>.</p>
-  <p>The algorithm for generating an IRI is:
-    </p><ol class="algorithm">
-      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
-      <li>If the prefix is a '_' (underscore), the IRI is unchanged.</li>
-      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
-        by prepending the mapped prefix to the (possibly empty) suffix using textual concatenation. Note that an empty
-        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
-      <li>If the IRI being processed is for a property (i.e., a key value in a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>, or a
-        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
-        join the mapped value to the suffix using textual concatenation.</li>
-      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
-        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>].</li>
-      <li>Otherwise, use the value directly as an IRI.</li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="iri-compaction" class="section">
-  <h3><span class="secno">6.5 </span>IRI Compaction</h3>
-  <p>Some keys and values are expressed using IRIs. This section defines an 
-    algorithm for transforming an IRI to a compact IRI using the
-    <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es specified in the 
-    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</p>
-
-  <p>The algorithm for generating a compacted IRI is:
-    </p><ol class="algorithm">
-      <li>Search every key-value pair in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for
-        a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that is a complete match 
-        against the IRI. If a complete match is found, the resulting compacted
-        IRI is the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> associated with the IRI in the 
-        <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
-      <li>If a complete match is not found, search for a partial match from
-        the beginning of the IRI. For all matches that are found, the resulting
-        compacted IRI is the <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> associated with the partially
-        matched IRI in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> concatenated with a 
-        colon (:) character and the unmatched part of the string. If there is
-        more than one compacted IRI produced, the final value is the 
-        lexicographically least value of the entire set of compacted IRIs.</li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="value-expansion" class="section">
-  <h3><span class="secno">6.6 </span>Value Expansion</h3>
-  <p>Some values in JSON-LD can be expressed in a compact form. These values
-    are required to be expanded at times when processing JSON-LD documents.
-  </p>
-
-  <p>The algorithm for expanding a value is:
-    </p><ol class="algorithm">
-      <li>If the key that is associated with the value has an associated
-        coercion entry in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, the resulting
-        expansion is an object populated according to the following steps:
-        <ol class="algorithm">
-          <li>If the coercion target is <code>@iri</code>, expand the value
-            by adding a new key-value pair where the key is <code>@iri</code>
-            and the value is the expanded IRI according to the
-            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-          <li>If the coercion target is a typed literal, expand the value
-            by adding two new key-value pairs. The first key-value pair 
-            will be <code>@literal</code> and the unexpanded value. The second
-            key-value pair will be <code>@datatype</code> and the associated
-            coercion datatype expanded according to the
-            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-        </ol>
-      </li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="value-compaction" class="section">
-  <h3><span class="secno">6.7 </span>Value Compaction</h3>
-  <p>Some values, such as IRIs and typed literals, may be expressed in an
-    expanded form in JSON-LD. These values are required to be compacted at 
-    times when processing JSON-LD documents.
-  </p>
-
-  <p>The algorithm for compacting a value is:
-    </p><ol class="algorithm">
-      <li>If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> contains a coercion target for the
-        key that is associated with the value, compact the value using the
-        following steps:
-        <ol class="algorithm">
-          <li>If the coercion target is an <code>@iri</code>, the compacted
-            value is the value associated with the <code>@iri</code> key,
-            processed according to the 
-            <a href="#iri-compaction">IRI Compaction</a> steps.</li>
-          <li>If the coercion target is a typed literal, the compacted
-            value is the value associated with the <code>@literal</code> key.
-          </li>
-          <li>Otherwise, the value is not modified.</li>
-        </ol>
-      </li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="expansion-1" class="section">
-<h3><span class="secno">6.8 </span>Expansion</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>As stated previously, expansion is the process of taking a JSON-LD 
-input and expanding all IRIs and typed literals to their fully-expanded form. 
-The output will not contain a single context declaration and will have all IRIs 
-and typed literals fully expanded.
-</p>
-
-<div id="expansion-algorithm" class="section">
-<h4><span class="secno">6.8.1 </span>Expansion Algorithm</h4>
-
-<ol class="algorithm">
-  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, 
-  process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> recursively using this algorithm.</li>
-  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an object, 
-  update the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> according to the steps outlined in
-  the <a href="#context">context</a> section. Process each key, expanding 
-  the key according to the <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-  <ol class="algorithm">
-    <li>Process each value associated with each key
-      <ol class="algorithm">
-        <li>If the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> 
-        recursively using this algorithm.</li>
-        <li>If the value is an object, process the object recursively
-        using this algorithm.</li>
-        <li>Otherwise, check to see the associated key has an associated 
-        coercion rule. If the value should be coerced, expand the value 
-        according to the <a href="#value-expansion">Value Expansion</a> rules. 
-        If the value does not need to be coerced, leave the value as-is.
-        </li>
-      </ol>
-    </li><li>Remove the context from the object</li>
-  </ol>
-</ol>
-</div>
-
-</div>
-
-<div id="compaction-1" class="section">
-<h3><span class="secno">6.9 </span>Compaction</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>As stated previously, compaction is the process of taking a JSON-LD 
-input and compacting all IRIs using a given context. The output
-will contain a single top-level context declaration and will only use
-<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es and will ensure that all
-typed literals are fully compacted.
-</p>
-
-<div id="compaction-algorithm" class="section">
-<h4><span class="secno">6.9.1 </span>Compaction Algorithm</h4>
-
-<ol class="algorithm">
-  <li>Perform the <a href="#expansion-algorithm">Expansion Algorithm</a> on 
-  the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>.</li>
-  <li>If the top-level item is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> 
-    recursively, starting at this step.
-  </li><li>If the top-level item is an object, compress each key using the steps
-    defined in <a href="#iri-compaction">IRI Compaction</a> and compress each
-    value using the steps defined in 
-    <a href="#value-compaction">Value Compaction</a></li>
-  
-</ol>
-</div>
-
-</div>
-
-
-<div id="framing-1" class="section">
-<h3><span class="secno">6.10 </span>Framing</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>A JSON-LD document is a representation of a directed graph. A single
-directed graph can have many different serializations, each expressing
-exactly the same information. Developers typically don't work directly with
-graphs, but rather, prefer trees when dealing with JSON. While mapping a graph 
-to a tree can be done, the layout of the end result must be specified in 
-advance. This section defines an algorithm for mapping a graph to 
-a tree given a <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>.
-</p>
-
-<div id="framing-algorithm-terms" class="section">
-<h4><span class="secno">6.10.1 </span>Framing Algorithm Terms</h4>
- <dl>
-   <dt><dfn title="input_frame" id="dfn-input_frame">input frame</dfn></dt>
-   <dd>
-     the initial <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> provided to the framing algorithm.
-   </dd>
-   <dt><dfn title="framing_context" id="dfn-framing_context">framing context</dfn></dt>
-   <dd>
-     a context containing the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, the
-     <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> and the 
-     <a class="tref" title="omit_default_flag">omit default flag</a>.
-   </dd>
-   <dt><dfn title="object_embed_flag" id="dfn-object_embed_flag">object embed flag</dfn></dt>
-   <dd>
-     a flag specifying that objects should be directly embedded in the output,
-     instead of being referred to by their IRI.
-   </dd>
-   <dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">explicit inclusion flag</dfn></dt>
-   <dd>
-     a flag specifying that for properties to be included in the output, they
-     must be explicitly declared in the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a>.
-   </dd>
-   <dt><dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">omit missing properties flag</dfn></dt>
-   <dd>
-     a flag specifying that properties that are missing from the 
-     <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> should be omitted from the output.
-   </dd>
-   <dt><dfn title="match_limit" id="dfn-match_limit">match limit</dfn></dt>
-   <dd>
-     A value specifying the maximum number of matches to accept when building
-     arrays of values during the framing algorithm. A value of -1 specifies
-     that there is no match limit.
-   </dd>
-   <dt><dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">map of embedded subjects</dfn></dt>
-   <dd>
-     A map that tracks if a subject has been embedded in the output of the
-     <a href="#framing-algorithm">Framing Algorithm</a>.
-   </dd>
- </dl>
-</div>
-
-<div id="framing-algorithm" class="section">
-<h4><span class="secno">6.10.2 </span>Framing Algorithm</h4>
-
-<p>The framing algorithm takes <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> that has been 
-normalized according to the 
-<a href="#normalization-algorithm">Normalization Algorithm</a> 
-(<strong>normalized input</strong>), an 
-<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a> that has been expanded according to the
-<a href="#expansion-algorithm">Expansion Algorithm</a> 
-(<strong>expanded frame</strong>), and a number of options and produces
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The following series of steps is the recursive
-portion of the framing algorithm:
-</p>
-
-<ol class="algorithm">
-  <li>Initialize the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> by setting the
-   <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, clearing the 
-   <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a>, and clearing the
-   <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>. Override these values
-   based on input options provided to the algorithm by the application.
-  </li>
-  <li>Generate a <dfn title="list_of_frames" id="dfn-list_of_frames">list of frames</dfn> by processing the 
-    <strong>expanded frame</strong>:
-    <ol class="algorithm">
-      <li>If the <strong>expanded frame</strong> is not an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, set 
-        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to 1, place the 
-        <strong>expanded frame</strong> into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
-        and set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to <code>null</code>.</li>
-      <li>If the <strong>expanded frame</strong> is an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, place an
-        empty object into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
-        set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and set
-        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
-      <li>If the <strong>expanded frame</strong> is a non-empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, add
-        each item in the <strong>expanded frame</strong> into the 
-        <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>, set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an
-        <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and set <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
-    </ol></li>
-  <li>Create a <dfn title="match_array" id="dfn-match_array">match array</dfn> for each <strong>expanded frame</strong> 
-    in the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> halting when either the 
-    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> is zero or the end of the 
-    <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> is reached. If an 
-    <strong>expanded frame</strong> is 
-    not an object, the processor <em class="rfc2119" title="must">must</em> throw a <code>Invalid Frame Format</code> 
-    exception. Add each matching item from the <strong>normalized input</strong>
-    to the <a class="tref" title="matches_array">matches array</a> and decrement the 
-    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> by 1 if:
-    <ol class="algorithm">
-       <li>The <strong>expanded frame</strong> has an <code>rdf:type</code> 
-         that exists in the item's list of <code>rdf:type</code>s. Note: 
-         the <code>rdf:type</code> can be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, but only one value needs 
-         to be in common between the item and the 
-         <strong>expanded frame</strong> for a match.</li>
-       <li>The <strong>expanded frame</strong> does not have an 
-         <code>rdf:type</code> property, but every property in the 
-         <strong>expanded frame</strong> exists in the item.</li>
-    </ol></li>
-  <li>Process each item in the <a class="tref internalDFN" title="match_array" href="#dfn-match_array">match array</a> with its associated
-    <dfn title="match_frame" id="dfn-match_frame">match frame</dfn>:
-    <ol class="algorithm">
-      <li>If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@embed</code>
-        keyword, set the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> to its value. 
-        If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@explicit</code>
-        keyword, set the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> to its value. 
-        Note: if the keyword exists, but the value is neither
-        <code>true</code> or <code>false</code>, set the associated flag to 
-        <code>true</code>.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is cleared and the item has
-        the <code>@subject</code> property, replace the item with the value
-        of the <code>@subject</code> property.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
-        the <code>@subject</code> property, and its IRI is in the 
-        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>, throw a
-        <code>Duplicate Embed</code> exception.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
-        the <code>@subject</code> property and its IRI is not in the
-        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>:
-        <ol class="algorithm">
-          <li>If the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> is set, 
-            then delete any key from the item that does not exist in the
-            <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except <code>@subject</code>.</li>
-          <li>For each key in the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except for
-            keywords and <code>rdf:type</code>:
-          <ol class="algorithm">
-            <li>If the key is in the item, then build a new 
-              <dfn title="recursion_input_list" id="dfn-recursion_input_list">recursion input list</dfn> using the object or objects 
-              associated with the key. If any object contains an
-              <code>@iri</code> value that exists in the 
-              <a class="tref" title="normalized_input">normalized input</a>, replace the object in the
-              <a class="tref" title="recusion_input_list">recusion input list</a> with a new object containing
-              the <code>@subject</code> key where the value is the value of
-              the <code>@iri</code>, and all of the other key-value pairs for
-              that subject. Set the <dfn title="recursion_match_frame" id="dfn-recursion_match_frame">recursion match frame</dfn> to the
-              value associated with the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>'s key. Replace
-              the value associated with the key by recursively calling this
-              algorithm using <a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">recursion input list</a>,
-              <a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">recursion match frame</a> as input.</li>
-            <li>If the key is not in the item, add the key to the item and
-              set the associated value to an empty array if the
-              <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> key's value is an array 
-              or <code>null</code> otherwise.</li>
-            <li>If value associated with the item's key is <code>null</code>,
-              process the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>:
-              <ol class="algorithm">
-                <li>If the value associated with the key in the 
-                  <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> is an array, use the first frame 
-                  from the array as the <dfn title="property_frame" id="dfn-property_frame">property frame</dfn>, otherwise
-                  set the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> to an empty object.</li>
-                <li>If the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> contains an
-                <code>@omitDefault</code> keyword, set the
-                <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> to its value.
-                Note: if the keyword exists, but the value is neither
-                <code>true</code> or <code>false</code>, set the associated
-                flag to <code>true</code>.</li>
-                <li>If the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> is set,
-                  delete the key in the item. Otherwise, if the
-                  <code>@default</code> keyword is set in the 
-                  <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> set the item's value to the value
-                  of <code>@default</code>.</li>
-              </ol></li>
-          </ol></li>
-        </ol>
-      </li><li>If the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> is <code>null</code> set it to
-        the item, otherwise, append the item to the
-        <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.
-    </li></ol>
-  </li><li>Return the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.</li>
-</ol>  
-
-The final, non-recursive step of the framing algorithm requires the 
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to be compacted according to the 
-<a href="#compaction-algorithm">Compaction Algorithm</a> by using the 
-context provided in the <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a>. The resulting value is the
-final output of the compaction algorithm and is what should be returned to the
-application.
-
-</div>
-
-</div>
-
-<div id="normalization-1" class="section">
-<h3><span class="secno">6.11 </span>Normalization</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and 
-performing a deterministic transformation on that input that results in all
-aspects of the graph being fully expanded and named in the 
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The normalized output is generated in such a way 
-that any conforming JSON-LD processor will generate identical output 
-given the same input. The problem is a fairly difficult technical 
-problem to solve because it requires a directed graph to be ordered into a 
-set of nodes and edges in a deterministic way. This is easy to do when all of 
-the nodes have unique names, but very difficult to do when some of the nodes 
-are not labeled.
-</p>
-
-<p>In time, there may be more than one normalization algorithm that will need
-to be identified. For identification purposes, this algorithm is named 
-<abbr title="Universal Graph Normalization Algorithm 2011">UGNA2011</abbr>.
-</p>
-
-<div id="normalization-algorithm-terms" class="section">
-<h4><span class="secno">6.11.1 </span>Normalization Algorithm Terms</h4>
- <dl>
-   <dt><dfn title="label" id="dfn-label">label</dfn></dt>
-   <dd>
-     The subject IRI associated with a graph node. The subject IRI is expressed
-     using a key-value pair in a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> where the key is
-     <code>@subject</code> and the value is a string that is an IRI or 
-     a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> containing the key <code>@iri</code> and
-     a value that is a string that is an IRI.
-   </dd>
-   <dt><dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">list of expanded nodes</dfn></dt>
-   <dd>
-     A list of all nodes in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> graph containing no
-     embedded objects and having all keys and values expanded according to the
-     steps in the <a href="#expansion-algorithm">Expansion Algorithm</a>.
-   </dd>
-   <dt><dfn title="alpha" id="dfn-alpha">alpha</dfn> and <dfn title="beta" id="dfn-beta">beta</dfn> values</dt>
-   <dd>
-     The words <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> refer to the first and
-     second nodes or values being examined in an algorithm. The names are
-     merely used to refer to each input value to a comparison algorithm.
-   </dd>
-   <dt><dfn title="renaming_counter" id="dfn-renaming_counter">renaming counter</dfn></dt>
-   <dd>
-     A counter that is used during the 
-     <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. The
-     counter typically starts at one (1) and counts up for every node that is
-     relabeled. There will be two such renaming counters in an implementation
-     of the normalization algorithm. The first is the
-     <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> and the second is the
-     <a class="tref" title="deterministic_labeling_counter">deterministic labeling counter</a>.
-   </dd>
-   <dt><dfn title="serialization_label" id="dfn-serialization_label">serialization label</dfn></dt>
-   <dd>
-     An identifier that is created to aid in the normalization process in the
-     <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a>. The
-     value typically takes the form of <code>s<NUMBER></code> or 
-     <code>c<NUMBER></code>.
-   </dd>
-</dl>
-</div>
-
-<div id="normalization-state" class="section">
-<h4><span class="secno">6.11.2 </span>Normalization State</h4>
-
-<p>When performing the steps required by the normalization algorithm, 
-it is helpful to track the many pieces of information in a
-data structure called the <dfn title="normalization_state" id="dfn-normalization_state">normalization state</dfn>. Many of these
-pieces simply provide indexes into the graph. The information
-contained in the <a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a> is described below.</p>
-
-<dl>
-   <dt><dfn title="node_state" id="dfn-node_state">node state</dfn></dt>
-   <dd>
-     Each node in the graph will be assigned a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>. This
-     state contains the information necessary to deterministically
-     <a class="tref internalDFN" title="label" href="#dfn-label">label</a> all nodes in the graph. A <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>
-     includes:
-     <dl>
-        <dt><dfn title="node_reference" id="dfn-node_reference">node reference</dfn></dt>
-        <dd>
-          A <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> is a reference to a node in the graph.
-          For a given <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>
-          refers to the node that the state is for. When a
-          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> is created, its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>
-          should be to the node it is created for.
-        </dd>
-        <dt><dfn title="outgoing_list" id="dfn-outgoing_list">outgoing list</dfn></dt>
-        <dd>
-          Lists the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s for all nodes that are properties of
-          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>. This list should be initialized
-          by iterating over every object associated with a property in the
-          <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> adding its label if it is another node.
-        </dd>
-        <dt><dfn title="incoming_list" id="dfn-incoming_list">incoming list</dfn></dt>
-        <dd>
-          Lists the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s for all nodes in the graph for which
-          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> is a property. This list is 
-          initialized to an empty list.
-        </dd>
-        <dt><dfn title="outgoing_serialization_map" id="dfn-outgoing_serialization_map">outgoing serialization map</dfn></dt>
-        <dd>
-          Maps node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s to <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s.
-          This map is initialized to an empty map. When this map is populated,
-          it will be filled with keys that are the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of every node in the
-          graph with a label that begins with <code>_:</code> and that has a
-          path, via properties, that starts with the
-          <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
-        </dd>
-        <dt><dfn title="outgoing_serialization" id="dfn-outgoing_serialization">outgoing serialization</dfn></dt>
-        <dd>
-          A string that can be lexicographically compared to the
-          <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a>s of other
-          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>s. It is a representation of the
-          <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> and other related
-          information. This string is initialized to an empty string.
-        </dd>
-        <dt><dfn title="incoming_serialization_map" id="dfn-incoming_serialization_map">incoming serialization map</dfn></dt>
-        <dd>
-          Maps node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s to <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s.
-          This map is initialized to an empty map. When this map is populated,
-          it will be filled with keys that are the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of every
-          node in the graph with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that begins with
-          <code>_:</code> and that has a path, via properties, that ends with
-          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
-        </dd>
-        <dt><dfn title="incoming_serialization" id="dfn-incoming_serialization">incoming serialization</dfn></dt>
-        <dd>
-          A string that can be lexicographically compared to the
-          <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a>s of other
-          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>s. It is a representation of the
-          <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> and other related
-          information. This string is initialized to an empty string.
-        </dd>
-     </dl>
-   </dd>
-   <dt><dfn title="node_state_map" id="dfn-node_state_map">node state map</dfn></dt>
-   <dd>
-     A mapping from a node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>.
-     It is initialized to an empty map.
-   </dd>
-   <dt><dfn title="labeling_prefix" id="dfn-labeling_prefix">labeling prefix</dfn></dt>
-   <dd>
-     The labeling prefix is a string that is used as the beginning of a node
-     <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. It should be initialized to a random base string that
-     starts with the characters <code>_:</code>, is not used by any other
-     node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>, and does not
-     start with the characters <code>_:c14n</code>. The prefix has two uses.
-     First it is used to temporarily name nodes during the normalization
-     algorithm in a way that doesn't collide with the names that already
-     exist as well as the names that will be generated by the normalization
-     algorithm. Second, it will eventually be set to <code>_:c14n</code> to
-     generate the final, deterministic labels for nodes in the graph. This
-     prefix will be concatenated with the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> to
-     produce a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. For example, <code>_:j8r3k</code> is
-     a proper initial value for the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a>.
-   </dd>
-   <dt><dfn title="labeling_counter" id="dfn-labeling_counter">labeling counter</dfn></dt>
-   <dd>
-     A counter that is used to label nodes. It is appended to the
-     <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> to create a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. It is
-     initialized to <code>1</code>.
-   </dd>
-   <dt><dfn title="map_of_flattened_nodes" id="dfn-map_of_flattened_nodes">map of flattened nodes</dfn></dt>
-   <dd>
-     A map containing a representation of all nodes in the graph where the
-     key is a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a> and the value is a single
-     <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that has no nested sub-objects 
-     and has had all properties for the same node merged into a single
-     <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
-   </dd>
-</dl>
-
-</div>
-
-<div id="normalization-algorithm" class="section">
-<h4><span class="secno">6.11.3 </span>Normalization Algorithm</h4>
-
-<p>The normalization algorithm expands the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>,
-flattens the data structure, and creates an initial set of names for all
-nodes in the graph. The flattened data structure is then processed by a
-node labeling algorithm in order to get a fully expanded and named list of
-nodes which is then sorted. The result is a deterministically named and
-ordered list of graph nodes.
-</p>
-
-<ol class="algorithm">
-<li>Expand the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> according to the steps in
-the <a href="#expansion-algorithm">Expansion Algorithm</a> and store the
-result as the <strong>expanded input</strong>.</li>
-<li>Create a <a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a>.</li>
-<li>Initialize the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> by recursively 
-processing every <dfn title="expanded_node" id="dfn-expanded_node">expanded node</dfn> in the 
-<strong>expanded input</strong> in depth-first order:
-  <ol class="algorithm">
-    <li>If the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> is an unlabeled node, add a 
-      new key-value pair to the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>
-      where the key is <code>@subject</code> and the value is the 
-      concatenation of the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> 
-      and the string value of the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.
-      Increment the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.</li>
-    <li>Add the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> to the 
-      <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>:
-      <ol class="algorithm">
-        <li>If the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is already 
-          in the 
-          <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> merge all properties from the 
-          entry in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> into the 
-          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>.</li>
-        <li>Go through every property associated with an array in the 
-          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> and remove any duplicate IRI entries from
-          the array. If the resulting array only has one IRI entry, change it 
-          from an array to an object.</li>
-        <li>Set the entry for the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
-          in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> to the
-          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>.
-        </li></ol></li>
-    <li>After exiting the recursive step, replace the reference to the
-      <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> with an object containing a single
-       key-value pair where the key is <code>@iri</code> and the value is
-       the value of the <code>@subject</code> key in the node.</li>
-  </ol></li>
-<li>For every entry in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>, insert a
-  key-value pair into the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> where the key is the
-  key from the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> and the value is a
-  <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> where its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> refers to
-  the value from the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>.
-</li><li>Populate the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> for each <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>
-  by iterating over every node in the graph and adding its <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
-  to the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> associated with each node found in its
-  properties.</li>
-<li>For every entry in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> that has a 
-<a class="tref internalDFN" title="label" href="#dfn-label">label</a> that begins with <code>_:c14n</code>, relabel the node
-using the <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>.
-</li><li>Label all of the nodes that contain a <code>@subject</code> key associated
-with a value starting with <code>_:</code> according to the steps in the 
-<a href="#deterministic-labeling-algorithm">Deterministic Labeling Algorithm</a>.
-</li>
-</ol>
-</div>
-
-<div id="node-relabeling-algorithm" class="section">
-<h4><span class="secno">6.11.4 </span>Node Relabeling Algorithm</h4>
-
-<p>This algorithm renames a node by generating a unique 
-<dfn title="new_label" id="dfn-new_label">new label</dfn> and updating all references to that <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
-in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>. The <dfn title="old_label" id="dfn-old_label">old label</dfn> and the
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a> must be given as an input to the
-algorithm. The <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> is the current <a class="tref internalDFN" title="label" href="#dfn-label">label</a> of
-the node that is to be relabeled.
-
-</p><p>The node relabeling algorithm is as follows:</p>
-
-<ol class="algorithm">
-  <li>If the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> is <code>_:c14n</code> and the
-    <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> begins with <code>_:c14n</code> then return as
-    the node has already been renamed.
-  </li>
-  <li>Generate the <dfn title="new_label" id="dfn-new_label-1">new label</dfn> by concatenating the
-    <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> with the string value of the 
-    <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>. Increment the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.
-  </li>
-  <li>For the <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> associated with the
-  <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a>, update every node in the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>
-  by changing all the properties that reference the <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> to
-  the <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a>.
-  </li>
-  <li>Change the <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> key in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> 
-    to the <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a> and set the associated
-    <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the
-    <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a>.
-  </li>
-</ol>
-</div>
-
-<div id="deterministic-labeling-algorithm" class="section">
-<h4><span class="secno">6.11.5 </span>Deterministic Labeling Algorithm</h4>
-
-<p>The deterministic labeling algorithm takes the 
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a>
-and produces a <dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes">list of finished nodes</dfn> that is sorted and
-contains deterministically named and expanded nodes from the graph.
-
-</p><ol class="algorithm">
-  <li>Set the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> to <code>_:c14n</code>, the
-    <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> to <code>1</code>,
-    the <dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes-1">list of finished nodes</dfn> to an empty array, and create
-    an empty array, the <dfn title="list_of_unfinished_nodes" id="dfn-list_of_unfinished_nodes">list of unfinished nodes</dfn>.</li>
-  <li>For each <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>:
-    <ol class="algorithm">
-      <li>If the node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> does not start with <code>_:</code>
-        then put the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the
-        <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a>.
-      </li>
-      <li>If the node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> does start with <code>_:</code>
-        then put the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the
-        <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a>.
-      </li>
-    </ol>
-  </li>
-  <li>Append to the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a> by processing
-    the remainder of the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> until it is
-    empty:
-    <ol class="algorithm">
-      <li>Sort the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> in descending order 
-        according to the 
-        <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
-        determine the sort order.</li>
-      <li>Create a <dfn title="list_of_labels" id="dfn-list_of_labels">list of labels</dfn> and initialize it to an
-        empty array.</li>
-      <li>For the first node from the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a>:
-        <ol class="algorithm">
-          <li>Add its <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the <a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">list of labels</a>.
-          </li>
-          <li>For each key-value pair from its associated
-            <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, add the key to a list and
-            then sort the list according to the lexicographical order of the
-            keys' associated values. Append the list to the
-            <a class="tref" title="list_of_nodes_to_label">list of nodes to label</a>.
-          </li>
-          <li>For each key-value pair from its associated
-            <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a>, add the key to a list and
-            then sort the list according to the lexicographical order of the
-            keys' associated values. Append the list to the
-            <a class="tref" title="list_of_nodes_to_label">list of nodes to label</a>.
-          </li></ol></li>
-      <li>For each <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the <a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">list of labels</a>,
-        relabel the associated node according to the 
-        <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. If
-        any <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> contains a key that
-        matches the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, clear the map and set the associated
-        <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> to an empty string. If any
-        <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> contains a key that
-        matches the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, clear the map and set the associated
-        <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> to an empty string.
-      </li>
-      <li>
-        Remove each node with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that starts with
-        <code>_:c14n</code> from the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> and
-        add it to the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a>.
-      </li>
-    </ol>
-  </li>
-  <li>Sort the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a> in descending order 
-    according to the 
-    <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
-    determine the sort order.</li>
-</ol>
-</div>
-
-<div id="shallow-comparison-algorithm" class="section">
-<h4><span class="secno">6.11.6 </span>Shallow Comparison Algorithm</h4>
-
-<p>
-The shallow comparison algorithm takes two unlabeled nodes,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, as input and
-determines which one should come first in a sorted list. The following
-algorithm determines the steps that are executed in order to determine the
-node that should come first in a list:
-</p>
-
-<ol class="algorithm">
-  <li>Compare the total number of node properties. The node with fewer 
-    properties is first.</li>
-  <li>Lexicographically sort the property IRIs for each node and compare
-    the sorted lists. If an IRI is found to be lexicographically smaller, the
-    node containing that IRI is first.</li>
-  <li>Compare the property values against one another:
-    <ol class="algorithm">
-      <li>Create an <dfn title="alpha_list" id="dfn-alpha_list">alpha list</dfn> by adding all values associated 
-        with the <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> property that is not an unlabeled node.
-        Track the number of unlabeled nodes not added to the list using an
-        <dfn title="alpha_unlabeled_counter" id="dfn-alpha_unlabeled_counter">alpha unlabeled counter</dfn>.</li>
-      <li>Create a <dfn title="beta_list" id="dfn-beta_list">beta list</dfn> by adding all values associated 
-        with the <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> property that is not an unlabeled node. 
-        Track the number of unlabeled nodes not added to the list using an
-        <dfn title="beta_unlabeled_counter" id="dfn-beta_unlabeled_counter">beta unlabeled counter</dfn>.
-      </li><li>Compare the length of <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and 
-        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a>. The node associated with the list containing the
-        lesser number of items is first.</li>
-      <li>Compare the <a class="tref internalDFN" title="alpha_unlabeled_counter" href="#dfn-alpha_unlabeled_counter">alpha unlabeled counter</a> to the 
-        <a class="tref internalDFN" title="beta_unlabeled_counter" href="#dfn-beta_unlabeled_counter">beta unlabeled counter</a>, the node associated with the lesser
-        value is first.</li>
-      <li>Sort <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> according to
-        the
-        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>
-        as the sorting comparator.
-        For each offset into the <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a>, compare the item
-        at the offset against the item at the same offset in the 
-        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> according to the
-        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
-        The node associated with the lesser item is first.
-    </li></ol></li>
-  <li>Process the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s associated with each node to
-    determine order:
-    <ol class="algorithm">
-      <li>The node with the shortest <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> is first.</li>
-      <li>Sort the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s according to incoming property
-         and then incoming <a class="tref internalDFN" title="label" href="#dfn-label">label</a>.
-      </li><li>The node associated with the least number of incoming unlabeled
-         nodes is first.</li>
-      <li>For each offset into the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s, 
-        compare the associated properties and <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s.
-        The node associated with the lexicographically lesser associated
-        property is first. The node associated with the lexicographically
-        lesser <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is first.</li>
-    </ol></li>
-  <li>Otherwise, the nodes are equivalent.</li>
-</ol></div>
-
-<div id="object-comparison-algorithm" class="section">
-<h4><span class="secno">6.11.7 </span>Object Comparison Algorithm</h4>
-
-<p>
-The object comparison algorithm is designed to compare two graph node 
-property values, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, against the other.
-The algorithm is useful when sorting two lists of graph node properties.
-</p>
-
-<ol class="algorithm">
-  <li>If one of the values is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> and the other is not, the value that is
-    a string is first.</li>
-  <li>If both values are <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s, the lexicographically lesser string is
-    first.</li>
-  <li>If one of the values is a literal and the other is not, the value that is
-    a literal is first.</li>
-  <li>If both values are literals
-    <ol class="algorithm">
-      <li>The lexicographically lesser string associated with 
-        <code>@literal</code> is first.</li>
-      <li>The lexicographically lesser string associated with 
-        <code>@datatype</code> is first.</li>
-      <li>The lexicographically lesser string associated with 
-        <code>@language</code> is first.</li>
-    </ol></li>
-  <li>If both values are expanded IRIs, the 
-    lexicographically lesser string associated with <code>@iri</code> 
-    is first.</li>
-  <li>Otherwise, the two values are equivalent.</li>
-</ol>
-
-</div>
-
-<div id="deep-comparison-algorithm" class="section">
-<h4><span class="secno">6.11.8 </span>Deep Comparison Algorithm</h4>
-
-<p>
-The deep comparison algorithm is used to compare the difference between two
-nodes, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>. 
-A deep comparison takes the incoming and outgoing node edges in
-a graph into account if the number of properties and value of those properties 
-are identical. The algorithm is helpful when sorting a list of nodes and will
-return whichever node should be placed first in a list if the two nodes are
-not truly equivalent.
-</p>
-
-<p>When performing the steps required by the deep comparison algorithm, it
-is helpful to track state information about mappings. The information
-contained in a <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> is described below.</p>
-
-<dl class="algorithm">
-   <dt><dfn title="mapping_state" id="dfn-mapping_state">mapping state</dfn></dt>
-   <dd>
-     <dl>
-        <dt><dfn title="mapping_counter" id="dfn-mapping_counter">mapping counter</dfn></dt>
-        <dd>
-          Keeps track of the number of nodes that have been mapped to
-          <a class="tref" title="serialization_labels">serialization labels</a>. It is initialized to
-          <code>1</code>.
-        </dd>
-        <dt><dfn title="processed_labels_map" id="dfn-processed_labels_map">processed labels map</dfn></dt>
-        <dd>
-          Keeps track of the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of nodes that have already
-          been assigned <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s. It is initialized
-          to an empty map.
-        </dd>
-        <dt><dfn title="serialized_labels_map" id="dfn-serialized_labels_map">serialized labels map</dfn></dt>
-        <dd>
-          Maps a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to its associated
-          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>. It is initialized to an empty map.
-        </dd>
-        <dt><dfn title="adjacent_info_map" id="dfn-adjacent_info_map">adjacent info map</dfn></dt>
-        <dd>
-          Maps a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> to the node
-          <a class="tref internalDFN" title="label" href="#dfn-label">label</a> associated with it, the list of sorted
-          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s for adjacent nodes, and the map of
-          adjacent node <a class="tref" title="serialiation_label">serialiation label</a>s to their associated
-          node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s. It is initialized to an empty map.
-        </dd>
-        <dt><dfn title="key_stack" id="dfn-key_stack">key stack</dfn></dt>
-        <dd>
-          A stack where each element contains an array of adjacent
-          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s and an index into that array. It
-          is initialized to a stack containing a single element where its
-          array contains a single string element <code>s1</code> and its
-          index is set to <code>0</code>.
-        </dd>
-        <dt><dfn title="serialized_keys" id="dfn-serialized_keys">serialized keys</dfn></dt>
-        <dd>
-          Keeps track of which <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s have already
-          been written at least once to the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
-          It is initialized to an empty map.
-        </dd>
-        <dt><dfn title="serialization_string" id="dfn-serialization_string">serialization string</dfn></dt>
-        <dd>
-          A string that is incrementally updated as a serialization is built.
-          It is initialized to an empty string.
-        </dd>
-     </dl>
-   </dd>
-</dl>
-
-<p>The deep comparison algorithm is as follows:</p>
-   
-<ol class="algorithm">
-  <li>Perform a comparison between <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-    according to the 
-    <a href="#shallow-comparison-algorithm">Shallow Comparison Algorithm</a>.
-    If the result does not show that the two nodes are equivalent, return 
-    the result.
-    </li>
-  <li>Compare incoming and outgoing edges for each node, updating their
-    associated <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> as each node is processed:
-    <ol class="algorithm">
-      <li>If the <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
-        is empty, generate the serialization according to the 
-        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-        Provide <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
-        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>,
-        <code>outgoing direction</code> to the algorithm as inputs.       
-      </li><li>If the <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        is empty, generate the serialization according to the 
-        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-        Provide <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
-        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, and
-        <code>outgoing direction</code> to the algorithm as inputs.
-      </li><li>If <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> is
-        lexicographically less than <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s, then 
-        <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> is first. If it is greater, then <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        is first.</li>
-      <li>If the <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
-        is empty, generate the serialization according to the 
-        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-        Provide <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
-        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> with its <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>
-        set to a copy of <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s
-        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, and
-        <code>incoming direction</code> to the algorithm as inputs.
-      </li><li>If the <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        is empty, generate the serialization according to the 
-        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-        Provide <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
-        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> with its <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>
-        set to a copy of <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s
-        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, and
-        <code>incoming direction</code> to the algorithm as inputs.
-      </li><li>If <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> is
-        lexicographically less than <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s, then 
-        <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> is first. If it is greater, then <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        is first.</li>
-    </ol></li>
-</ol>
-</div>
-
-<div id="node-serialization-algorithm" class="section">
-<h4><span class="secno">6.11.9 </span>Node Serialization Algorithm</h4>
-
-<p>
-The node serialization algorithm takes a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, and a <dfn title="direction" id="dfn-direction">direction</dfn> (either
-<code>outgoing direction</code> or <code>incoming direction</code>) as
-inputs and generates a deterministic serialization for the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
-</p>
-
-<ol class="algorithm">
-<li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> exists in the 
-  <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, terminate the algorithm as the 
-  <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> has already been created.
-</li>
-<li>Set the value associated with the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the
-  <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a> to <code>true</code>.
-</li>
-<li>Generate the next <dfn title="serialization_label" id="dfn-serialization_label-1">serialization label</dfn> for the 
-  <a class="tref internalDFN" title="label" href="#dfn-label">label</a> according to the
-  <a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>.
-</li>
-<li>Create an empty array called the <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>.
-</li>
-<li>For every <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in a list, where the list the <a class="tref internalDFN" title="outgoing_list" href="#dfn-outgoing_list">outgoing list</a> if
-the <a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a> is <code>outgoing direction</code> and the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> otherwise, if the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> starts with
-<code>_:</code>, it is the <dfn title="target_node_label" id="dfn-target_node_label">target node label</dfn>:
-  <ol class="algorithm">
-    <li>Look up the <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a> in the 
-      <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a> and if a mapping exists,
-      update the <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a> where the key is
-      the value in the <a class="tref" title="serialization_map">serialization map</a> and the value is the
-      <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a>.</li>
-    <li>Otherwise, add the <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a> to the 
-      <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>.
-  </li></ol>
-</li> 
-<li>Set the <dfn title="maximum_serialization_combinations" id="dfn-maximum_serialization_combinations">maximum serialization combinations</dfn> to 
-  <code>1</code> or the length of the 
-  <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>, whichever is greater.</li>
-<li>While the <a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">maximum serialization combinations</a> is greater than
-  <code>0</code>, perform the
-  <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
-  and decrement the <a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">maximum serialization combinations</a> by
-  <code>1</code> for each iteration.
-</li></ol>
-
-</div>
-
-<div id="serialization-label-generation-algorithm" class="section">
-<h4><span class="secno">6.11.10 </span>Serialization Label Generation Algorithm</h4>
-
-<p>
-The algorithm generates a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> given a 
-<a class="tref internalDFN" title="label" href="#dfn-label">label</a> and a <a class="tref" title="mapping_count">mapping count</a>.
-</p>
-
-<li>
-  <ol class="algorithm">
-    <li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> starts with the string <code>_:c14n</code>,
-      the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> is the letter <code>c</code>
-      followed by the number that follows <code>_:c14n</code> in the
-      <a class="tref internalDFN" title="label" href="#dfn-label">label</a>.</li>
-    <li>Otherwise, the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> is the
-      letter <code>s</code> followed by the string value of 
-      <a class="tref" title="mapping_count">mapping count</a>. Increment the <a class="tref" title="mapping_count">mapping count</a> by
-      <code>1</code> ensuring that the value persists across multiple
-      invocations of this algorithm.</li>
-  </ol>
-</li>
-</div>
-
-<div id="combinatorial-serialization-algorithm" class="section">
-<h4><span class="secno">6.11.11 </span>Combinatorial Serialization Algorithm</h4>
-
-<p>
-SerializeCombos() takes a <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, 
-a <a class="tref" title="serialization_map">serialization map</a>, a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, a
-<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, a <a class="tref" title="serialization_map">serialization map</a>, 
-a <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>, and a 
-<a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a> as inputs and generates
-deterministic serializations for all possible combinations of graphs.
-</p>
-
-<ol class="algorithm">
-  <li>If the <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a> is not empty:
-    <ol class="algorithm">
-      <li>Copy the <a class="tref" title="serialization_map">serialization map</a> to the 
-        <dfn title="serialization_map_copy" id="dfn-serialization_map_copy">serialization map copy</dfn>.</li>
-      <li>Remove the first <a class="tref" title="unserialized_label">unserialized label</a> from the
-        <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a> and create a new 
-        <dfn title="new_serialization_label" id="dfn-new_serialization_label">new serialization label</dfn> according to the
-        <a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>
-        passing the <a class="tref" title="unserialized_label">unserialized label</a> and the 
-        <a class="tref internalDFN" title="mapping_counter" href="#dfn-mapping_counter">mapping counter</a> as parameters.
-      </li><li>Create a new key-value mapping in the 
-        <a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy">serialization map copy</a> 
-        where the key is the <a class="tref internalDFN" title="new_serialization_label" href="#dfn-new_serialization_label">new serialization label</a> and the value
-        is the <a class="tref" title="unserialized_label">unserialized label</a>.
-</li><li>Set the <dfn title="maximum_serialization_rotations" id="dfn-maximum_serialization_rotations">maximum serialization rotations</dfn> to 
-  <code>1</code> or the length of the 
-  <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>, whichever is greater.</li>
-<li>While the <a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">maximum serialization rotations</a> is greater than
-  <code>0</code>:
-  <ol class="algorithm">
-    <li>If this is the first iteration in the loop, perform the
-      <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
-      passing in the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, the <a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy">serialization map copy</a>,
-      the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, the
-      <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, 
-      <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>, and the
-      <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>.</li>
-    <li>If this is not the first iteration in the loop, perform the
-      <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
-      passing in the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, the <a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy">serialization map copy</a>,
-      the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, and temporary copies of the
-      <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, 
-      <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>, and the
-      <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>.</li>
-    <li>Decrement the <a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">maximum serialization rotations</a> by
-    <code>1</code> for each iteration.
-  </li></ol></li>
-  <li>If the <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a> is empty:
-    <ol class="algorithm">
-      <li>???Save an entry mapping from the bnode's 
-serialization name to the reverse mapping (mapped) and its sorted keys then do SerializeMapping:
-    <ol class="algorithm">
-      <li>???If the serialization is lexicographically less than the current 
-serialization or the current serialization is null, then iterate over the 
-sorted keys, get the reverse-mapped adjacent bnode and recursively call 
-SerializeNode on each iteration.</li>
-      <li>???Do SerializeMapping then if the serialization is lexicographically 
-less than the current serialization or the current serialization is null, then 
-set it as the least serialization for the bnode in the given edge direction 
-('property' or 'reference').</li>
-    </ol>
-  </li>
-</ol>
-
-</li></ol></li></ol></div>
-
-<div id="mapping-serialization-algorithm" class="section">
-<h4><span class="secno">6.11.12 </span>Mapping Serialization Algorithm</h4>
-
-<p>
-<a class="tref" title="map_of_all_labels">map of all labels</a>, <a class="tref" title="map_of_all_properties">map of all properties</a>,
-<dfn title="key_stack" id="dfn-key_stack-1">key stack</dfn>, <dfn title="serialization_string_" id="dfn-serialization_string_">serialization string
-</dfn></p>
-
-<p>
-SerializeMapping(mapping):
-(This function incrementally updates the relation serialization for a mapping)
-</p>
-
-<ol class="algorithm">
-  <li>If the <a class="tref" title="serialization_keys_stack">serialization keys stack</a> is not empty
-    <ol class="algorithm">
-      <li>Pop the <dfn title="list_of_serialization_keys" id="dfn-list_of_serialization_keys">list of serialization keys</dfn> off of the 
-        <a class="tref" title="serialization_keys_stack">serialization keys stack</a>.</li>
-      <li>For each <dfn title="serialization_key" id="dfn-serialization_key">serialization key</dfn> in the 
-        <a class="tref internalDFN" title="list_of_serialization_keys" href="#dfn-list_of_serialization_keys">list of serialization keys</a>:
-        <ol class="algorithm">
-          <li>If the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> is not in the
-            ???list of adjacent nodes???, push the 
-            <a class="tref internalDFN" title="list_of_serialization_keys" href="#dfn-list_of_serialization_keys">list of serialization keys</a> onto the
-            <a class="tref" title="serialization_keys_stack">serialization keys stack</a> and exit from this loop.</li>
-          <li>If the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> is a key in the
-            <a class="tref" title="completed_serialization_key_map">completed serialization key map</a>, a cycle has
-            been detected. Append the concatenation of the <code>_</code> 
-            character and the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> to the 
-            <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
-          </li><li>Otherwise, serialize all outgoing and incoming edges in the
-            graph by performing the following steps:
-            <ol class="algorithm">
-              <li>Mark the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> as being processed
-                by adding a new key-value pair to the 
-                <a class="tref" title="completed_serialization_key_map">completed serialization key map</a> where the key
-                is the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> and the value is
-                <code>true</code>.
-                </li>
-              <li>Set the <a class="tref" title="serialization_fragment">serialization fragment</a> to the value of
-                the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a>.</li>
-              <li>Set the <a class="tref" title="list_of_adjacent_node_keys">list of adjacent node keys</a> by using the
-                <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> to look up the list in the
-                <a class="tref" title="adjacent_node_keys_map">adjacent node keys map</a>.</li>
-              <li>Set the <a class="tref" title="adjacent_node_label">adjacent node label</a> ???somehow???.</li>
-              <li>If a mapping for the <a class="tref" title="adjacent_node_label">adjacent node label</a>
-                exists in the <a class="tref" title="map_of_all_labels">map of all labels</a>:
-                <ol class="algorithm">
-                  <li>Append the result of the
-                    <a href="">Label Serialization Algorithm</a> to the
-                    <a class="tref" title="serialization_fragment">serialization fragment</a>.</li>
-                </ol>
-        </li></ol></li>
-    </ol></li>
-  
-<!-- li>If there is an entry on the mapping's key stack, pop it and iterate over every key.</li>
-  <li>For each key, if an entry for the key hasn't been added to the mapping yet, break out of the loop.</li>
-  <li>Update the key stack entry's index.</li>
-  <li>If the key has already been serialized, output "'_' + key" and continue.</li>
-  <li>For each key, serialize the key then its associated bnode properties, then its bnode references. The entire property list is surrounded by '[' and ']' and so is the reference list. Individual properties/references are seperated by '|'. If a property is an array, all of the serializations are concatenated together with no joining delimiter. The '@subject' property is skipped. The property IRI is turtle-serialized. If a property or reference object is a bnode, it is serialized to '_:', otherwise the turtle serialization is used.</li>
-  <li>Join all of the adjacent keys and add them to the serialization.</li>
-  <li>Push the adjacent keys onto the key stack.</li>
-  <li>Do SerializeMapping.</li  -->
-
-</ol>
-
-</li></ol></div>
-
-<div id="label-serialization-algorithm" class="section">
-<h4><span class="secno">6.11.13 </span>Label Serialization Algorithm</h4>
-
-<p>
-<a class="tref" title="map_of_properties">map of properties</a>, <dfn title="label_serialization" id="dfn-label_serialization">label serialization</dfn>,
-<a class="tref internalDFN" title="label" href="#dfn-label">label</a>, <a class="tref" title="incoming_map">incoming map</a>, 
-<dfn title="adjacent_node_labels" id="dfn-adjacent_node_labels">adjacent node labels</dfn>, <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack-1">key stack</a>.
-</p>
-
-<ol class="algorithm">
-  <li>Initialize the <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a> to an empty string.</li>
-  <li>Append the <code>[</code> character to the 
-    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-  <li>Append all properties to the <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a> by 
-    processing each key-value pair in the <a class="tref" title="map_of_properties">map of properties</a>, 
-    excluding the
-    <code>@subject</code> property ???do the map keys need to be sorted???:
-    <ol class="algorithm">
-      <li>Build a string using the pattern <code><</code><strong>KEY</strong><code>></code> 
-        where <strong>KEY</strong> is the current key. Append string to the
-        <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-      <li>The value may be a single object or an array of objects.
-        Process all of the objects that are associated with the key, building
-        an <dfn title="object_string" id="dfn-object_string">object string</dfn> for each item:
-        <ol class="algorithm">
-          <li>If the object contains an <code>@iri</code> key with a
-            value that starts
-            with <code>_:</code>, set the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> to
-            the value <code>_:</code>. If the value does not
-            start with <code>_:</code>, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> 
-            using the pattern 
-            <code><</code><strong>IRI</strong><code>></code> 
-            where <strong>IRI</strong> is the value associated with the
-            <code>@iri</code> key.</li>
-          <li>If the object contains a <code>@literal</code> key and a
-            <code>@datatype</code> key, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> 
-            using the pattern 
-            <code>"</code><strong>LITERAL</strong><code>"^^<</code><strong>DATATYPE</strong><code>></code>
-            where <strong>LITERAL</strong> is the value associated with the
-            <code>@literal</code> key and <strong>DATATYPE</strong> is the
-            value associated with the <code>@datatype</code> key.</li>
-          <li>If the object contains a <code>@literal</code> key and a
-            <code>@language</code> key, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> 
-            using the pattern 
-            <code>"</code><strong>LITERAL</strong><code>"@</code><strong>LANGUAGE</strong>
-            where <strong>LITERAL</strong> is the value associated with the
-            <code>@literal</code> key and <strong>LANGUAGE</strong> is the
-            value associated with the <code>@language</code> key.</li>
-          <li>Otherwise, the value is a string. Build the 
-            <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> using the pattern 
-            <code>"</code><strong>LITERAL</strong><code>"</code> 
-            where <strong>LITERAL</strong> is the value associated with the
-            current key.</li>
-          <li>If this is the second iteration of the loop,
-            append a <code>|</code> separator character to the
-            <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-          <li>Append the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> to the 
-            <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-        </ol>
-    </li></ol>
-  </li>
-  <li>Append the <code>]</code> character to the 
-    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-  <li>Append the <code>[</code> character to the 
-    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-  <li>Append all incoming references for the current
-    <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a> by 
-    processing all of the items associated with the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
-    in the <a class="tref" title="incoming_map">incoming map</a>:
-    <ol class="algorithm">
-      <li>Build a <dfn title="reference_string" id="dfn-reference_string">reference string</dfn> 
-        using the pattern <code><</code><strong>PROPERTY</strong><code>></code><code><</code><strong>REFERER</strong><code>></code>
-        where <strong>PROPERTY</strong> is the property associated with the
-        incoming reference and <strong>REFERER</strong> is either the subject of
-        the node referring to the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the incoming reference
-        or <code>_:</code> if <strong>REFERER</strong> begins with
-        <code>_:</code>.
-      </li><li>If this is the second iteration of the loop,
-        append a <code>|</code> separator character to the
-        <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-      <li>Append the <a class="tref internalDFN" title="reference_string" href="#dfn-reference_string">reference string</a> to the 
-        <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-    </ol>
-  </li><li>Append the <code>]</code> character to the 
-    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-  <li>Append all <a class="tref internalDFN" title="adjacent_node_labels" href="#dfn-adjacent_node_labels">adjacent node labels</a> to the
-    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a> by concatenating the string value
-    for all of them, one after the other, to the 
-    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
-  <li>Push the <a class="tref internalDFN" title="adjacent_node_labels" href="#dfn-adjacent_node_labels">adjacent node labels</a> onto the 
-    <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack-1">key stack</a> and append the result of the
-    <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a> 
-    to the <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.
-</li></ol>
-
-</div>
-
-</div>
-
-<div id="data-round-tripping" class="section">
-
-<h3><span class="secno">6.12 </span>Data Round Tripping</h3>
-
-<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
-ensure that the normalized value is a string. In order to generate the
-string from a <strong>double</strong> value, output equivalent to the
-<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
-<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
-is the value to be converted.</p>
-
-<p>To convert the a double value in JavaScript, implementers can use the 
-following snippet of code:</p>
-
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
-
-<p class="note">When data needs to be normalized, JSON-LD authors should
-not use values that are going to undergo automatic conversion. This is due
-to the lossy nature of <strong>xsd:double</strong> values.</p>
-
-<p class="issue">Round-tripping data can be problematic if we mix and
-match @coerce rules with JSON-native datatypes, like integers. Consider the 
-following code example:</p>
-
-<pre class="example">
-var myObj = { "@context" : { 
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-
-// Convert the normalized object back to a JavaScript object
-var myObj2 = jsonld.parse(jsonldText);</pre>
-
-<p class="issue">At this point, myObj2 and myObj will have different
-values for the "number" value. myObj will be the number 42, while
-myObj2 will be the string "42". This type of data round-tripping
-error can bite developers. We are currently wondering if having a
-"coerce validation" phase in the parsing/normalization phases would be a 
-good idea. It would prevent data round-tripping issues like the
-one mentioned above.</p>
-
-</div>
-
-<div id="rdf-conversion" class="section">
-<h3><span class="secno">6.13 </span>RDF Conversion</h3>
-
-<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted to any other RDF-compatible document
-format using the algorithm specified in this section.</p>
-
-<p>
-  The JSON-LD Processing Model describes processing rules for extracting RDF
-  from a JSON-LD document. Note that many uses of JSON-LD may not require 
-  generation of RDF.
-</p>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD to RDF processor. 
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to 
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The RDF Conversion Algorithm is a work in progress.</p>
-
-<div class="informative section" id="overview">
-  <h4><span class="secno">6.13.1 </span>Overview</h4><p><em>This section is non-normative.</em></p>
-  <p>
-    JSON-LD is intended to have an easy to parse grammar that closely models existing
-    practice in using JSON for describing object representations. This allows the use
-    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
-    for stream-based parsing similar to SAX.
-  </p>
-  <p>
-    As with other grammars used for describing <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
-    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
-    externally named entities, <em>BNodes</em>, resources for which an external name does not
-    exist, or is not known, and Literals, which describe terminal entities such as strings,
-    dates and other representations having a lexical representation possibly including
-    an explicit language or datatype.
-  </p>
-  <p>
-    Data described with JSON-LD may be considered to be the representation of a graph made
-    up of <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> resources related via a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> resource.
-    However, specific implementations may choose to operate on the document as a normal
-    JSON description of objects having attributes.
-  </p>
-</div>
-
-<div id="rdf-conversion-algorithm-terms" class="section">
-  <h4><span class="secno">6.13.2 </span>RDF Conversion Algorithm Terms</h4>
-  <dl>
-    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
-    <dd>
-      the destination graph for all triples generated by JSON-LD markup.
-    </dd>
-  </dl>
-</div>
-
-<div id="rdf-conversion-algorithm" class="section">
-  <h4><span class="secno">6.13.3 </span>RDF Conversion Algorithm</h4>
-  <p>
-    The algorithm below is designed for in-memory implementations with random access to <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> elements.
-  </p>
-  <p>
-    A conforming JSON-LD processor implementing RDF conversion <em class="rfc2119" title="must">must</em> implement a
-    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
-    algorithm generates:
-  </p>
-
-  <ol class="algorithm">
-    <li id="processing-step-default-context">
-      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
-      <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      initialized to NULL.
-    </li>
-
-    <li id="processing-step-associative">
-      If a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> is detected, perform the following steps:
-      <ol class="algorithm">
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@context</code> key, process the local context as
-          described in <a href="#context">Context</a>.
-        </li>
-        <li>
-          Create a new <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> by mapping the keys from the current <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> using the
-          <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to new keys using the associated value from the current <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
-          Repeat the mapping until no entry is found within the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for the key. Use the new
-          <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> in subsequent steps.
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
-          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. Generate a
-          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-          <p class="issue"><code>@iri</code> really just behaves the same as <code>@subject</code>, consider consolidating them.</p>
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-          to a literal value as follows:
-          <ol class="algorithm">
-            <li>
-              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> contains a <code>@datatype</code> key
-              after performing <a href="#iri-expansion">IRI Expansion</a> on the specified<code>@datatype</code>.
-            </li>
-            <li>
-              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> contains
-              a <code>@language</code> key, use it's value to set the language of the plain literal.
-            </li>
-            <li>
-              Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-            </li>
-          </ol>
-        </li>
-        <li id="processing-step-subject">If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@subject</code> key:
-          <ol class="algorithm">
-            <li>
-              If the value is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
-              <a href="#iri-expansion">IRI Expansion</a>. Generate a
-              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
-            </li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
-              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> does not have a <code>@subject</code> key, set the <a class="tref" title="active__object">active
-          object</a> to newly generated <dfn title="blank_node_identifier" id="dfn-blank_node_identifier">blank node identifier</dfn>. Generate a triple
-          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
-          object</a>.
-        </li>
-        <li>
-          For each key in the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that has not already been processed, perform
-          the following steps:
-          <ol class="algorithm">
-            <li>
-              If the key is <code>@type</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
-              to <code>rdf:type</code>.
-            </li>
-            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
-            <a href="#iri-expansion">IRI Expansion</a> on the key.</li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
-              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-      </ol>
-    </li>
-
-    <li>
-      If a regular <a class="tref internalDFN" title="array" href="#dfn-array">array</a> is detected, process each value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> by doing the following
-      returning the result of processing the last value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>:
-
-      <ol class="algorithm">
-        <li>
-          Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref" title="active__context">active
-          context</a>, <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-          starting at <a href="#processing-step-associative">Step 2</a> then proceed using the previous
-          <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-        </li>
-      </ol>
-    </li>
-    
-    <li>
-      If a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> is detected:
-      <ol class="algorithm">
-        <li>
-          If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@iri</code> coercion,
-          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
-          performing <a href="#iri-expansion">IRI Expansion</a> on the string.
-        </li>
-        <li>
-          Otherwise, if the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of coercion,
-          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by creating a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using
-          the string and the coercion key as the datatype IRI.
-        </li>
-        <li>
-          Otherwise, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from
-          the string.
-        </li>
-      </ol>
-      Generate a
-      triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
-    </li>
-    
-    <li>
-      If a <a class="tref internalDFN" title="number" href="#dfn-number">number</a> is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
-      the value with datatype set to either <code>xsd:integer</code> or
-      <code>xsd:double</code>, depending on if the value contains a
-      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
-      subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the generated typed literal.
-    </li>
-    
-    <li>
-      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
-      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
-      value with datatype set to <code>xsd:boolean</code>.
-    </li>
-  </ol>
-</div>
-
-
-<!--  THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT 
-
-<section>
-<h1>Best Practices</h1>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be 
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<section>
-<h2>JavaScript</h2>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in 
-JavaScript environments, however, features like the expanded form for
-object values mean that using JSON-LD directly in JavaScript may be 
-annoying without a middleware layer such as a simple library that 
-converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDF API, which enables a variety of RDF-based
-Web Applications, but some don't want to require that level of functionality 
-just to use JSON-LD. The group is still discussing the best way to proceed, 
-so input on how JSON-LD could more easily be utilized in JavaScript 
-environments would be very much appreciated.
-</p>
-</section>
-
-<section>
-<h2>Schema-less Databases</h2>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from 
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-
-<p class="issue">MongoDB does not allow the '.' character to be used in
-key names. This prevents developers from storing IRIs as keys, which also
-prevents storage of the data in normalized form. While this issue can
-be avoided by using <tref>CURIE</tref>s for key values, it is not known if this
-mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
-is useful to developers.
-</p>
-
- -->
-
-</div>
-
-</div>
-
-<div id="experimental-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">7. </span>Experimental Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear 
-whether or not the JSON-LD specification is going to support the complexity 
-necessary to support each concept. The entire section on Advanced Concepts 
-should be considered as discussion points; it is merely a list of 
-possibilities where all of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">7.1 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt; 
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
-single graph:</p>
-
-<pre class="example">
-{
-  "@context": {
-    "Person": "http://xmlns.com/foaf/0.1/Person"
-  },
-  "@subject": 
-  [
-    {
-      "@subject": "http://example.org/people#john",
-      "@type": "Person"
-    },
-    {
-      "@subject": "http://example.org/people#jane",
-      "@type": "Person"
-    }
-  ]
-}</pre>
-
-<p>A disjoint graph could also be expressed like so:</p>
-
-<pre class="example">
-[
-  {
-    "@subject": "http://example.org/people#john",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  },
-  {
-    "@subject": "http://example.org/people#jane",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  }
-]</pre>
-
-</div>
-
-<div id="lists" class="section">
-  <h3><span class="secno">7.2 </span>Lists</h3>
-  <p>
-    Because graphs do not describe ordering for links between nodes, multi-valued properties
-    in JSON do not provide an ordering of the listed objects. For example, consider the following
-    simple document:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-  <p>
-    This results in three triples being generated, each relating the subject to an individual
-    object, with no inherent order. To address this issue, RDF-based languages, such as [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>]
-    use the concept of an <code>rdf:List</code> (as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">RDF-SCHEMA</a></cite>]). This uses a sequence
-    of unlabeled nodes with properties describing a value, a null-terminated next property. Without
-    specific syntactical support, this could be represented in JSON-LD as follows:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">{</span>,
-    <span class="diff">"@first": "joe"</span>,
-    <span class="diff">"@rest": {</span>
-      <span class="diff">"@first": "bob"</span>,
-      <span class="diff">"@rest": {</span>
-        <span class="diff">"@first": "jaybee"</span>,
-        <span class="diff">"@rest": "@nil"</span>
-        <span class="diff">}</span>
-      <span class="diff">}</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-}</pre>
-  <p>
-    As this notation is rather unwieldy and the notion of ordered collections is rather important
-    in data modeling, it is useful to have specific language support. In JSON-LD, a list may
-    be represented using the <code>@list</code> keyword as follows:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
-...
-}</pre>
-  <p>
-    This describes the use of this <a class="tref internalDFN" title="array" href="#dfn-array">array</a> as being ordered, and order is maintained through
-    normalization and RDF conversion. If every use of a given multi-valued property is a
-    list, this may be abbreviated by adding an <code>@coerce</code> term:
-  </p>
-  <pre class="example">
-{
-  <span class="diff">"@context": {</span>
-    ...
-    <span class="diff">"@context": {</span>
-      <span class="diff">"@list": ["foaf:nick"]</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-  <div id="expansion-2" class="section"><h4 id="list-expansion"><span class="secno">7.2.1 </span>Expansion</h4>
-    <p class="issue">TBD.</p>
-  </div>
-  <div id="normalization-2" class="section"><h4 id="list-normalization"><span class="secno">7.2.2 </span>Normalization</h4>
-    <p class="issue">TBD.</p>
-  </div>
-  <div id="rdf-conversion-1" class="section"><h4 id="list-rdf"><span class="secno">7.2.3 </span>RDF Conversion</h4>
-    <p>
-      To support RDF Conversion of lists, <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>
-      is updated as follows:
-    </p>
-    <ol class="algorithm update">
-      <li>
-        <span class="list-number">2.4a.</span>
-        If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@list</code> key and the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
-        process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
-      </li>
-      <li>
-        <span class="list-number">2.7.3.</span>
-        Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
-        <ol class="algorithm">
-          <li>
-            If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@list</code> coercion,
-            and the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
-            process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
-          </li>
-          <li>
-            Otherwise, process the value starting at
-            <a href="#processing-step-associative">Step 2</a>.
-          </li>
-          <li>Proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-        </ol>
-      </li>
-      <li id="processing-step-list">
-        <span class="list-number">3a.</span>
-        Generate an RDF List by linking
-        each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
-        using the following sequence:
-        <ol class="algorithm">
-          <li>
-            If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-            and <code>rdf:nil</code>.
-          </li>
-          <li>
-            Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-            and a newly generated BNode identified as <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">blank node identifier</dfn></em>.
-          </li>
-          <li>
-            For each element other than the last element in the list:
-            <ol class="algorithm">
-              <li>Create a processor state using the active context, <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">blank node identifier</dfn></em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
-              <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">blank node identifier</dfn></em>, otherwise use <code>rdf:nil</code>.</li>
-              <li>Generate a new triple using <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">blank node identifier</dfn></em>, <code>rdf:rest</code> and <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">blank node identifier</dfn></em>.</li>
-              <li>Set <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">blank node identifier</dfn></em> to <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">blank node identifier</dfn></em>.</li>
-            </ol>
-          </li>
-        </ol>
-      </li>
-    </ol>
-  </div>
-</div>
-
-</div>
-
-<div class="appendix section" id="markup-examples">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">A.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-{
-  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
-  "@subject": [
-   {
-     "@subject": "_:bnode1",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/bob/",
-     "foaf:name": "Bob"
-   },
-   {
-     "@subject": "_:bnode2",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/eve/",
-     "foaf:name": "Eve"
-   },
-   {
-     "@subject": "_:bnode3",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/manu/",
-     "foaf:name": "Manu"
-   }
-  ]
-}</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">A.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has 
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "@context": 
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "xsd:anyURI": "url" }
-  },
-  "@subject": "_:bnode1",
-  "@type": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">A.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "@type": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization": 
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]</pre>
-</div>
-
-<div class="appendix section" id="mashing-up-vocabularies">
-<h3><span class="secno">A.4 </span>Mashing Up Vocabularies</h3>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200 
-Vocabulary Documents that are available for use on the Web today. Some
-of these vocabularies are:
-</p>
-
-<ul>
-   <li>RDF - for describing information about objects on the semantic web.</li>
-   <li>RDFS - for expressing things like labels and comments.</li>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>You can use these vocabularies in combination, like so:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the 
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword, 
-like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "@type": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}</pre>
-
-<p>The <code>@context</code> keyword is used to change how the JSON-LD
-processor evaluates key-value pairs. In this case, it was used to
-map one string ('myvocab') to another string, which is interpreted as
-a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced 
-with "<code>http://example.org/myvocab#</code>" when it
-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 for RDF, called a <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>, and provides
-developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div class="appendix section" id="acknowledgements">
-<h3><span class="secno">A.5 </span>Acknowledgements</h3>
-
-<p>The editors would like to thank Mark Birbeck, who provided a great deal of 
-the initial push behind the JSON-LD work via his work on RDFj, 
-Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and 
-performed several implementations of the specification, and Ian Davis, who 
-created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
-Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
-Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard 
-Cyganiak for their input on the specification. Another huge thank you goes out
-to Dave Longley who designed many of the algorithms used in this specification,
-including the normalization algorithm which was a monumentally difficult 
-design challenge.
-</p>
-</div>
-
-
-
-
-</div><div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd>T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 
-</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a> 
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification, Third Edition.</cite></a> December 1999. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 
-</dd><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd>Dan Brickley; Ramanathan V. Guha. <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite>RDF Vocabulary Description Language 1.0: RDF Schema.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">http://www.w3.org/TR/2004/REC-rdf-schema-20040210</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
-</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd>David Beckett, Tim Berners-Lee. <a href="http://www.w3.org/TeamSubmission/turtle/"><cite>Turtle: Terse RDF Triple Language.</cite></a> January 2008. W3C Team Submission. URL: <a href="http://www.w3.org/TeamSubmission/turtle/">http://www.w3.org/TeamSubmission/turtle/</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20110817/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- a/spec/ED/20110911/diff-20110817.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25913 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!-- 
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-ol.algorithm.update { margin-left: 2em; }
-ol.algorithm.update>li { list-style-type: none; }
-ol.algorithm.update>li>span.list-number {
-  display:block;
-  float: left;
-  margin-left: -3.5em;
-}
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  1px dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-    }
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
-.diff-old-a {
-  font-size: smaller;
-  color: red;
-}
-
-.diff-new { background-color: yellow; }
-.diff-chg { background-color: lime; }
-.diff-new:before,
-.diff-new:after
-    { content: "\2191" }
-.diff-chg:before, .diff-chg:after
-    { content: "\2195" }
-.diff-old { text-decoration: line-through; background-color: #FBB; }
-.diff-old:before,
-.diff-old:after
-    { content: "\2193" }
-:focus { border: thin red solid}
-</style>
-</head>
-
-
-<body style="display: inherit; ">
-<div class="head">
-<p>
-</p>
-<h1 class="title" id="title">
-JSON-LD
-1.0
-</h1>
-<h2 id="subtitle">
-A
-Context-based
-JSON
-Serialization
-for
-Linking
-Data
-</h2>
-<h2 id="unofficial-draft-12-september-2011">
-Unofficial
-Draft
-<del class="diff-old">17
-August
-</del>
-<ins class="diff-chg">12
-September
-</ins>
-2011
-</h2>
-<dl>
-<dt>
-Editors:
-</dt>
-<dd>
-<a href="http://manu.sporny.org/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</a>
-</dd>
-<dd>
-<a href="http://greggkellogg.net/">
-Gregg
-Kellogg
-</a>,
-Kellogg
-Associates
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Dave
-Longley
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</a>
-</dd>
-<dt>
-Authors:
-</dt>
-<dd>
-<a href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</a>
-</dd>
-<dd>
-<a href="http://greggkellogg.net/">
-Gregg
-Kellogg
-</a>,
-Kellogg
-Associates
-</dd>
-<dd>
-<a href="http://digitalbazaar.com/">
-Dave
-Longley
-</a>,
-<a href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</a>
-</dd>
-<dd>
-<a href="http://webbackplane.com/">
-Mark
-Birbeck
-</a>,
-<a href="http://webbackplane.com/">
-Backplane
-Ltd.
-</a>
-</dd>
-</dl>
-<p>
-This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-<a href="diff-20110808.html">
-diff
-to
-previous
-version
-</a>.
-</p>
-<p class="copyright">
-This
-document
-is
-licensed
-under
-a
-<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
-Creative
-Commons
-Attribution
-3.0
-License
-</a>.
-</p>
-<hr />
-</div>
-<div id="abstract" class="introductory section">
-<h2>
-Abstract
-</h2>
-<p>
-JSON
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-]
-has
-proven
-to
-be
-a
-highly
-useful
-object
-serialization
-and
-messaging
-format.
-In
-an
-attempt
-to
-harmonize
-the
-representation
-of
-Linked
-Data
-in
-JSON,
-this
-specification
-outlines
-a
-common
-JSON
-representation
-format
-for
-expressing
-directed
-graphs;
-mixing
-both
-Linked
-Data
-and
-non-Linked
-Data
-in
-a
-single
-document.
-</p>
-</div>
-<div id="sotd" class="introductory section">
-<h2>
-Status
-of
-This
-Document
-</h2>
-<p>
-This
-document
-is
-merely
-a
-public
-working
-draft
-of
-a
-potential
-specification.
-It
-has
-no
-official
-standing
-of
-any
-kind
-and
-does
-not
-represent
-the
-support
-or
-consensus
-of
-any
-standards
-organisation.
-</p>
-<p>
-This
-document
-is
-an
-experimental
-work
-in
-progress.
-</p>
-</div>
-<div id="toc" class="section">
-<h2 class="introductory">
-Table
-of
-Contents
-</h2>
-<ul class="toc">
-<li class="tocline">
-<a href="#introduction" class="tocxref">
-<span class="secno">
-1.
-</span>
-Introduction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#how-to-read-this-document" class="tocxref">
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</a>
-</li>
-<li class="tocline">
-<a href="#contributing" class="tocxref">
-<span class="secno">
-1.2
-</span>
-Contributing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#design" class="tocxref">
-<span class="secno">
-2.
-</span>
-Design
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#goals-and-rationale" class="tocxref">
-<span class="secno">
-2.1
-</span>
-Goals
-and
-Rationale
-</a>
-</li>
-<li class="tocline">
-<a href="#linked-data" class="tocxref">
-<span class="secno">
-2.2
-</span>
-Linked
-Data
-</a>
-</li>
-<li class="tocline">
-<a href="#linking-data" class="tocxref">
-<span class="secno">
-2.3
-</span>
-Linking
-Data
-</a>
-</li>
-<li class="tocline">
-<a href="#the-context" class="tocxref">
-<span class="secno">
-2.4
-</span>
-The
-Context
-</a>
-<del class="diff-old">2.4.1
-Inside
-a
-Context
-</del>
-</li>
-<li class="tocline">
-<a href="#from-json-to-json-ld" class="tocxref">
-<span class="secno">
-2.5
-</span>
-From
-JSON
-to
-JSON-LD
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#basic-concepts" class="tocxref">
-<span class="secno">
-3.
-</span>
-Basic
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#iris" class="tocxref">
-<span class="secno">
-3.1
-</span>
-IRIs
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-the-subject" class="tocxref">
-<span class="secno">
-3.2
-</span>
-Identifying
-the
-Subject
-</a>
-</li>
-<li class="tocline">
-<a href="#specifying-the-type" class="tocxref">
-<span class="secno">
-3.3
-</span>
-Specifying
-the
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#strings" class="tocxref">
-<span class="secno">
-3.4
-</span>
-Strings
-</a>
-</li>
-<li class="tocline">
-<a href="#string-internationalization" class="tocxref">
-<span class="secno">
-3.5
-</span>
-String
-Internationalization
-</a>
-</li>
-<li class="tocline">
-<a href="#datatypes" class="tocxref">
-<span class="secno">
-3.6
-</span>
-Datatypes
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-objects-for-a-single-property" class="tocxref">
-<span class="secno">
-3.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
-<span class="secno">
-3.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</a>
-</li>
-<li class="tocline">
-<a href="#expansion" class="tocxref">
-<span class="secno">
-3.9
-</span>
-Expansion
-</a>
-</li>
-<li class="tocline">
-<a href="#compaction" class="tocxref">
-<span class="secno">
-3.10
-</span>
-Compaction
-</a>
-</li>
-<li class="tocline">
-<a href="#framing" class="tocxref">
-<span class="secno">
-3.11
-</span>
-Framing
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#advanced-concepts" class="tocxref">
-<span class="secno">
-4.
-</span>
-Advanced
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#vocabulary-prefixes" class="tocxref">
-<span class="secno">
-4.1
-</span>
-<del class="diff-old">CURIEs
-</del>
-<ins class="diff-chg">Vocabulary
-Prefixes
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#automatic-typing" class="tocxref">
-<span class="secno">
-4.2
-</span>
-Automatic
-Typing
-</a>
-</li>
-<li class="tocline">
-<a href="#type-coercion" class="tocxref">
-<span class="secno">
-4.3
-</span>
-Type
-Coercion
-</a>
-</li>
-<li class="tocline">
-<a href="#chaining" class="tocxref">
-<span class="secno">
-4.4
-</span>
-Chaining
-</a>
-</li>
-<li class="tocline">
-<a href="#identifying-unlabeled-nodes" class="tocxref">
-<span class="secno">
-4.5
-</span>
-Identifying
-Unlabeled
-Nodes
-</a>
-</li>
-<li class="tocline">
-<a href="#aliasing-keywords" class="tocxref">
-<span class="secno">
-4.6
-</span>
-<del class="diff-old">Overriding
-</del>
-<ins class="diff-chg">Aliasing
-</ins>
-Keywords
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization" class="tocxref">
-<span class="secno">
-4.7
-</span>
-Normalization
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-application-programming-interface" class="tocxref">
-<span class="secno">
-5.
-</span>
-The
-Application
-Programming
-Interface
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#jsonldprocessor" class="tocxref">
-<span class="secno">
-5.1
-</span>
-<del class="diff-old">JSONLDProcessor
-</del>
-<ins class="diff-chg">JsonLdProcessor
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#methods" class="tocxref">
-<span class="secno">
-5.1.1
-</span>
-Methods
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#jsonldtriplecallback" class="tocxref">
-<span class="secno">
-5.2
-</span>
-<del class="diff-old">JSONLDProcessorCallback
-</del>
-<ins class="diff-chg">JsonLdTripleCallback
-</ins>
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#methods-1" class="tocxref">
-<span class="secno">
-5.2.1
-</span>
-Methods
-</a>
-</li>
-</ul>
-</li>
-<del class="diff-old">5.3
-JSONLDTripleCallback
-5.3.1
-Methods
-</del>
-</ul>
-</li>
-<li class="tocline">
-<a href="#algorithms" class="tocxref">
-<span class="secno">
-6.
-</span>
-Algorithms
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#syntax-tokens-and-keywords" class="tocxref">
-<span class="secno">
-6.1
-</span>
-Syntax
-Tokens
-and
-Keywords
-</a>
-</li>
-<li class="tocline">
-<a href="#algorithm-terms" class="tocxref">
-<span class="secno">
-6.2
-</span>
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#context-1" class="tocxref">
-<span class="secno">
-6.3
-</span>
-Context
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#coerce" class="tocxref">
-<span class="secno">
-6.3.1
-</span>
-Coerce
-</a>
-</li>
-<li class="tocline">
-<a href="#initial-context" class="tocxref">
-<span class="secno">
-6.3.2
-</span>
-Initial
-Context
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#iri-expansion" class="tocxref">
-<span class="secno">
-6.4
-</span>
-IRI
-Expansion
-</a>
-</li>
-<li class="tocline">
-<a href="#iri-compaction" class="tocxref">
-<span class="secno">
-6.5
-</span>
-IRI
-Compaction
-</a>
-</li>
-<li class="tocline">
-<a href="#value-expansion" class="tocxref">
-<span class="secno">
-6.6
-</span>
-Value
-Expansion
-</a>
-</li>
-<li class="tocline">
-<a href="#value-compaction" class="tocxref">
-<span class="secno">
-6.7
-</span>
-Value
-Compaction
-</a>
-</li>
-<li class="tocline">
-<a href="#expansion-1" class="tocxref">
-<span class="secno">
-6.8
-</span>
-Expansion
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#expansion-algorithm" class="tocxref">
-<span class="secno">
-6.8.1
-</span>
-Expansion
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#compaction-1" class="tocxref">
-<span class="secno">
-6.9
-</span>
-Compaction
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#compaction-algorithm" class="tocxref">
-<span class="secno">
-6.9.1
-</span>
-Compaction
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#framing-1" class="tocxref">
-<span class="secno">
-6.10
-</span>
-Framing
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#framing-algorithm-terms" class="tocxref">
-<span class="secno">
-6.10.1
-</span>
-Framing
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#framing-algorithm" class="tocxref">
-<span class="secno">
-6.10.2
-</span>
-Framing
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#normalization-1" class="tocxref">
-<span class="secno">
-6.11
-</span>
-Normalization
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normalization-algorithm-terms" class="tocxref">
-<span class="secno">
-6.11.1
-</span>
-Normalization
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization-state" class="tocxref">
-<span class="secno">
-6.11.2
-</span>
-Normalization
-State
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization-algorithm" class="tocxref">
-<span class="secno">
-6.11.3
-</span>
-Normalization
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#node-relabeling-algorithm" class="tocxref">
-<span class="secno">
-6.11.4
-</span>
-Node
-Relabeling
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#deterministic-labeling-algorithm" class="tocxref">
-<span class="secno">
-6.11.5
-</span>
-Deterministic
-Labeling
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#shallow-comparison-algorithm" class="tocxref">
-<span class="secno">
-6.11.6
-</span>
-Shallow
-Comparison
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#object-comparison-algorithm" class="tocxref">
-<span class="secno">
-6.11.7
-</span>
-Object
-Comparison
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#deep-comparison-algorithm" class="tocxref">
-<span class="secno">
-6.11.8
-</span>
-Deep
-Comparison
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#node-serialization-algorithm" class="tocxref">
-<span class="secno">
-6.11.9
-</span>
-Node
-Serialization
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#serialization-label-generation-algorithm" class="tocxref">
-<span class="secno">
-6.11.10
-</span>
-Serialization
-Label
-Generation
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#combinatorial-serialization-algorithm" class="tocxref">
-<span class="secno">
-6.11.11
-</span>
-Combinatorial
-Serialization
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#serialization-comparison-algorithm" class="tocxref">
-<span class="secno">
-6.11.12
-</span>
-<ins class="diff-new">Serialization
-Comparison
-Algorithm
-</ins></a></li><li class="tocline"><a href="#mapping-serialization-algorithm" class="tocxref"><span class="secno"><ins class="diff-new">
-6.11.13
-</ins></span>
-Mapping
-Serialization
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#label-serialization-algorithm" class="tocxref">
-<span class="secno">
-<del class="diff-old">6.11.13
-</del>
-<ins class="diff-chg">6.11.14
-</ins>
-</span>
-Label
-Serialization
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#data-round-tripping" class="tocxref">
-<span class="secno">
-6.12
-</span>
-Data
-Round
-Tripping
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion" class="tocxref">
-<span class="secno">
-6.13
-</span>
-RDF
-Conversion
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#overview" class="tocxref">
-<span class="secno">
-6.13.1
-</span>
-Overview
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion-algorithm-terms" class="tocxref">
-<span class="secno">
-6.13.2
-</span>
-RDF
-Conversion
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion-algorithm" class="tocxref">
-<span class="secno">
-6.13.3
-</span>
-RDF
-Conversion
-Algorithm
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#experimental-concepts" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">A.
-</ins>
-</span>
-Experimental
-Concepts
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#disjoint-graphs" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.1
-</del>
-<ins class="diff-chg">A.1
-</ins>
-</span>
-Disjoint
-Graphs
-</a>
-</li>
-<li class="tocline">
-<a href="#lists" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.2
-</del>
-<ins class="diff-chg">A.2
-</ins>
-</span>
-Lists
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#expansion-2" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.2.1
-</del>
-<ins class="diff-chg">A.2.1
-</ins>
-</span>
-Expansion
-</a>
-</li>
-<li class="tocline">
-<a href="#normalization-2" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.2.2
-</del>
-<ins class="diff-chg">A.2.2
-</ins>
-</span>
-Normalization
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-conversion-1" class="tocxref">
-<span class="secno">
-<del class="diff-old">7.2.3
-</del>
-<ins class="diff-chg">A.2.3
-</ins>
-</span>
-RDF
-Conversion
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#markup-examples" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.
-</del>
-<ins class="diff-chg">B.
-</ins>
-</span>
-Markup
-Examples
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#rdfa" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.1
-</del>
-<ins class="diff-chg">B.1
-</ins>
-</span>
-RDFa
-</a>
-</li>
-<li class="tocline">
-<a href="#microformats" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.2
-</del>
-<ins class="diff-chg">B.2
-</ins>
-</span>
-Microformats
-</a>
-</li>
-<li class="tocline">
-<a href="#microdata" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.3
-</del>
-<ins class="diff-chg">B.3
-</ins>
-</span>
-Microdata
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#mashing-up-vocabularies" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.4
-</del>
-<ins class="diff-chg">C.
-</ins>
-</span>
-Mashing
-Up
-Vocabularies
-</a>
-</li>
-<li class="tocline">
-<a href="#iana-considerations" class="tocxref">
-<span class="secno">
-<del class="diff-old">A.5
-</del>
-<ins class="diff-chg">D.
-</ins>
-</span>
-<del class="diff-old">Acknowledgements
-</del>
-<ins class="diff-chg">IANA
-Considerations
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-<ins class="diff-chg">E.
-</ins></span><ins class="diff-chg">
-Acknowledgements
-</ins></a>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">F.
-</ins>
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.1
-</del>
-<ins class="diff-chg">F.1
-</ins>
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-<del class="diff-old">B.2
-</del>
-<ins class="diff-chg">F.2
-</ins>
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</div>
-<div id="introduction" class="section">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<p>
-JSON,
-as
-specified
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-],
-is
-a
-simple
-language
-for
-representing
-data
-on
-the
-Web.
-Linked
-Data
-is
-a
-technique
-for
-<del class="diff-old">describing
-content
-</del>
-<ins class="diff-chg">creating
-a
-graph
-of
-interlinked
-data
-</ins>
-across
-different
-documents
-or
-Web
-sites.
-<del class="diff-old">Web
-resources
-</del>
-<ins class="diff-chg">Data
-entities
-</ins>
-are
-described
-using
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s,
-<del class="diff-old">and
-typically
-</del>
-<ins class="diff-chg">which
-</ins>
-are
-<ins class="diff-new">typically
-</ins>
-dereferencable
-<del class="diff-old">entities
-that
-</del>
-<ins class="diff-chg">and
-thus
-</ins>
-may
-be
-used
-to
-find
-more
-<del class="diff-old">information,
-</del>
-<ins class="diff-chg">information
-about
-an
-entity,
-</ins>
-creating
-a
-"Web
-of
-Knowledge".
-JSON-LD
-is
-intended
-to
-be
-a
-simple
-publishing
-method
-for
-expressing
-not
-only
-Linked
-Data
-in
-JSON,
-but
-<ins class="diff-new">also
-</ins>
-for
-adding
-semantics
-to
-existing
-JSON.
-</p>
-<p>
-JSON-LD
-is
-designed
-as
-a
-light-weight
-syntax
-that
-can
-be
-used
-to
-express
-Linked
-Data.
-It
-is
-primarily
-intended
-to
-be
-a
-way
-to
-<del class="diff-old">express
-</del>
-<ins class="diff-chg">use
-</ins>
-Linked
-Data
-in
-Javascript
-and
-other
-Web-based
-programming
-environments.
-It
-is
-also
-useful
-when
-building
-interoperable
-Web
-<del class="diff-old">Services
-</del>
-<ins class="diff-chg">services
-</ins>
-and
-when
-storing
-Linked
-Data
-in
-JSON-based
-document
-storage
-engines.
-It
-is
-practical
-and
-designed
-to
-be
-as
-simple
-as
-possible,
-utilizing
-the
-large
-number
-of
-JSON
-parsers
-and
-<del class="diff-old">existing
-code
-that
-is
-in
-use
-</del>
-<ins class="diff-chg">libraries
-available
-</ins>
-today.
-It
-is
-designed
-to
-be
-able
-to
-express
-key-value
-pairs,
-RDF
-data,
-RDFa
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
-RDFA-CORE
-</a>
-</cite>
-]
-data,
-Microformats
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
-MICROFORMATS
-</a>
-</cite>
-]
-data,
-and
-Microdata
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
-MICRODATA
-</a>
-</cite>
-].
-That
-is,
-it
-supports
-every
-major
-Web-based
-structured
-data
-model
-in
-use
-today.
-</p>
-<p>
-The
-syntax
-does
-not
-<ins class="diff-new">necessarily
-</ins>
-require
-<del class="diff-old">many
-</del>
-applications
-to
-change
-their
-JSON,
-but
-<ins class="diff-new">allows
-to
-</ins>
-easily
-add
-meaning
-by
-adding
-context
-in
-a
-way
-that
-is
-either
-in-band
-or
-out-of-band.
-The
-syntax
-is
-designed
-to
-not
-disturb
-already
-deployed
-systems
-running
-on
-JSON,
-but
-provide
-a
-smooth
-<del class="diff-old">migration
-</del>
-<ins class="diff-chg">upgrade
-</ins>
-path
-from
-JSON
-to
-JSON
-with
-added
-semantics.
-Finally,
-the
-format
-is
-intended
-to
-be
-<del class="diff-old">fast
-</del>
-<ins class="diff-chg">easy
-</ins>
-to
-parse,
-<del class="diff-old">fast
-</del>
-<ins class="diff-chg">efficient
-</ins>
-to
-generate,
-stream-based
-and
-document-based
-processing
-compatible,
-and
-require
-a
-very
-small
-memory
-footprint
-in
-order
-to
-operate.
-</p>
-<div id="how-to-read-this-document" class="section">
-<h3>
-<span class="secno">
-1.1
-</span>
-How
-to
-Read
-this
-Document
-</h3>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-a
-serialization
-of
-<del class="diff-old">JSON
-for
-</del>
-Linked
-<del class="diff-old">data.
-</del>
-<ins class="diff-chg">Data
-in
-JSON.
-</ins>
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Web
-developers
-that
-want
-to
-understand
-the
-design
-decisions
-and
-language
-syntax
-for
-JSON-LD.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-encode
-Microformats,
-RDFa,
-or
-Microdata
-in
-a
-way
-that
-is
-cross-language
-compatible
-via
-JSON.
-</li>
-<li>
-Software
-developers
-that
-want
-to
-implement
-processors
-and
-APIs
-for
-JSON-LD.
-</li>
-</ul>
-<p>
-To
-understand
-the
-basics
-in
-this
-specification
-you
-must
-first
-be
-familiar
-with
-JSON,
-which
-is
-detailed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-].
-To
-understand
-the
-API
-and
-how
-it
-is
-intended
-to
-operate
-in
-a
-programming
-environment,
-it
-is
-useful
-to
-have
-working
-knowledge
-of
-the
-JavaScript
-programming
-language
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-ECMA-262">
-ECMA-262
-</a>
-</cite>
-]
-and
-WebIDL
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-WEBIDL">
-WEBIDL
-</a>
-</cite>
-].
-To
-understand
-how
-JSON-LD
-maps
-to
-RDF,
-it
-is
-helpful
-to
-be
-familiar
-with
-the
-basic
-RDF
-concepts
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
-RDF-CONCEPTS
-</a>
-</cite>
-].
-</p>
-<p>
-Examples
-may
-contain
-references
-to
-existing
-vocabularies
-and
-use
-<del class="diff-old">abbreviations
-in
-CURIE
-</del>
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-<ins class="diff-chg">prefix
-</ins>
-</a>
-<del class="diff-old">s
-and
-source
-code.
-</del>
-<ins class="diff-chg">es
-to
-refer
-to
-Web
-Vocabularies.
-</ins>
-The
-following
-is
-a
-list
-of
-all
-vocabularies
-and
-their
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-<ins class="diff-new">prefix
-</ins></a>
-abbreviations,
-as
-used
-in
-this
-document:
-</p>
-<ul>
-<li>
-The
-<a href="http://purl.org/dc/terms/">
-Dublin
-Core
-</a>
-vocabulary
-(abbreviation:
-<code>
-dc
-</code>,
-e.g.,
-<code>
-dc:title
-</code>
-)
-</li>
-<li>
-The
-<a href="http://xmlns.com/foaf/0.1/">
-Friend
-of
-a
-Friend
-</a>
-vocabulary
-(abbreviation:
-<code>
-foaf
-</code>,
-e.g.,
-<code>
-foaf:knows
-</code>
-)
-</li>
-<li>
-The
-<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-RDF
-</a>
-vocabulary
-(abbreviation:
-<code>
-rdf
-</code>,
-e.g.,
-<code>
-rdf:type
-</code>
-)
-</li>
-<li>
-The
-<a href="http://www.w3.org/2001/XMLSchema#">
-XSD
-</a>
-vocabulary
-(abbreviation:
-<code>
-xsd
-</code>,
-e.g.,
-<code>
-xsd:integer
-</code>
-)
-</li>
-</ul>
-<p>
-JSON
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-]
-defines
-several
-terms
-which
-are
-used
-throughout
-this
-document:
-</p>
-<dl>
-<dt>
-<dfn title="JSON_Object" id="dfn-json_object">
-JSON
-Object
-</dfn>
-</dt>
-<dd>
-An
-object
-structure
-is
-represented
-as
-a
-pair
-of
-curly
-brackets
-surrounding
-zero
-or
-more
-name/value
-pairs
-(or
-members).
-A
-name
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>.
-A
-single
-colon
-comes
-after
-each
-name,
-separating
-the
-name
-from
-the
-value.
-A
-single
-comma
-separates
-a
-value
-from
-a
-following
-name.
-The
-names
-within
-an
-object
-<em class="rfc2119" title="should">
-should
-</em>
-be
-unique.
-</dd>
-<dt>
-<dfn title="array" id="dfn-array">
-array
-</dfn>
-</dt>
-<dd>
-An
-array
-is
-an
-ordered
-collection
-of
-values.
-An
-array
-<del class="diff-old">begins
-with
-[
-(left
-bracket)
-and
-ends
-with
-]
-(right
-bracket).
-Values
-</del>
-<ins class="diff-chg">structure
-is
-represented
-as
-square
-brackets
-surrounding
-zero
-or
-more
-values
-(or
-elements).
-Elements
-</ins>
-are
-separated
-by
-<del class="diff-old">,
-(comma).
-</del>
-<ins class="diff-chg">commas.
-</ins>
-Within
-JSON-LD,
-array
-order
-is
-not
-<del class="diff-old">preserved,
-</del>
-<ins class="diff-chg">preserved
-by
-default,
-</ins>
-unless
-specific
-markup
-is
-provided
-(see
-<a href="#lists">
-Lists
-</a>
-).
-This
-is
-because
-the
-basic
-data
-model
-of
-JSON-LD
-<del class="diff-old">linked
-data
-</del>
-<ins class="diff-chg">is
-a
-directed
-</ins><a class="tref" title="graph">
-graph
-</a>,
-which
-is
-inherently
-unordered.
-</dd>
-<dt>
-<dfn title="string" id="dfn-string">
-string
-</dfn>
-</dt>
-<dd>
-A
-string
-is
-a
-sequence
-of
-zero
-or
-more
-Unicode
-characters,
-wrapped
-in
-double
-quotes,
-using
-backslash
-escapes.
-A
-character
-is
-represented
-as
-a
-single
-character
-string.
-<del class="diff-old">A
-string
-is
-very
-much
-like
-a
-C
-or
-Java
-string.
-</del>
-</dd>
-<dt>
-<dfn title="number" id="dfn-number">
-number
-</dfn>
-</dt>
-<dd>
-A
-number
-is
-<del class="diff-old">very
-much
-like
-a
-C
-or
-Java
-number,
-</del>
-<ins class="diff-chg">is
-similar
-to
-that
-used
-in
-most
-programming
-languages,
-</ins>
-except
-that
-the
-octal
-and
-hexadecimal
-formats
-are
-not
-<del class="diff-old">used.
-</del>
-<ins class="diff-chg">used
-and
-that
-leading
-zeros
-are
-not
-allowed.
-</ins>
-</dd>
-<dt>
-<dfn title="true" id="dfn-true">
-true
-</dfn>
-and
-<dfn title="false" id="dfn-false">
-false
-</dfn>
-</dt>
-<dd>
-Boolean
-values.
-</dd>
-<dt>
-<dfn title="null" id="dfn-null">
-null
-</dfn>
-</dt>
-<dd>
-The
-use
-of
-the
-<em>
-null
-</em>
-value
-is
-undefined
-within
-JSON-LD.
-<div class="issue">
-<ins class="diff-new">Supporting
-</ins><em><ins class="diff-new">
-null
-</ins></em><ins class="diff-new">
-in
-JSON-LD
-might
-have
-a
-number
-of
-advantages
-and
-should
-be
-evaluated.
-This
-is
-currently
-an
-</ins><a href="https://github.com/json-ld/json-ld.org/issues/11"><ins class="diff-new">
-open
-issue
-</ins></a>.</div>
-</dd>
-</dl>
-<p>
-</p>
-</div>
-<div id="contributing" class="section">
-<h3>
-<span class="secno">
-1.2
-</span>
-Contributing
-</h3>
-<p>
-There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-</p>
-<ul>
-<li>
-Technical
-discussion
-typically
-occurs
-on
-the
-public
-mailing
-list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
-public-linked-json@w3.org
-</a>
-</li>
-<li>
-<a href="http://json-ld.org/minutes/">
-Public
-teleconferences
-</a>
-are
-held
-on
-Tuesdays
-at
-1500UTC
-on
-the
-second
-and
-fourth
-week
-of
-each
-month.
-</li>
-<li>
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-<a href="https://github.com/json-ld/json-ld.org/issues">
-issue
-tracker
-</a>.
-</li>
-<li>
-<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
-Source
-code
-</a>
-for
-the
-specification
-can
-be
-found
-on
-Github.
-</li>
-<li>
-The
-<a href="http://webchat.freenode.net/?channels=#json-ld">
-#json-ld
-</a>
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-</li>
-</ul>
-</div>
-</div>
-<div id="design" class="section">
-<h2>
-<span class="secno">
-2.
-</span>
-Design
-</h2>
-<p>
-The
-following
-section
-outlines
-the
-design
-goals
-and
-rationale
-behind
-the
-JSON-LD
-markup
-language.
-</p>
-<div id="goals-and-rationale" class="section">
-<h3>
-<span class="secno">
-2.1
-</span>
-Goals
-and
-Rationale
-</h3>
-<p>
-A
-number
-of
-design
-considerations
-were
-explored
-during
-the
-creation
-of
-this
-markup
-language:
-</p>
-<dl>
-<dt>
-Simplicity
-</dt>
-<dd>
-Developers
-need
-only
-know
-JSON
-and
-three
-keywords
-to
-use
-the
-basic
-functionality
-in
-JSON-LD.
-No
-extra
-processors
-or
-software
-libraries
-are
-necessary
-to
-use
-JSON-LD
-in
-its
-most
-basic
-form.
-The
-language
-attempts
-to
-ensure
-that
-developers
-have
-an
-easy
-learning
-curve.
-</dd>
-<dt>
-Compatibility
-</dt>
-<dd>
-The
-JSON-LD
-markup
-must
-be
-100%
-compatible
-with
-JSON.
-This
-ensures
-that
-all
-of
-the
-standard
-JSON
-libraries
-work
-seamlessly
-with
-JSON-LD
-documents.
-</dd>
-<dt>
-Expressiveness
-</dt>
-<dd>
-The
-syntax
-must
-be
-able
-to
-express
-directed
-graphs,
-which
-have
-been
-proven
-to
-be
-able
-to
-simply
-express
-almost
-every
-real
-world
-data
-model.
-</dd>
-<dt>
-Terseness
-</dt>
-<dd>
-The
-JSON-LD
-syntax
-must
-be
-very
-terse
-and
-human
-readable,
-requiring
-as
-little
-as
-possible
-<ins class="diff-new">effort
-</ins>
-from
-the
-developer.
-</dd>
-<dt>
-Zero
-Edits,
-most
-of
-the
-time
-</dt>
-<dd>
-JSON-LD
-provides
-a
-mechanism
-that
-allows
-developers
-to
-specify
-context
-in
-a
-way
-that
-is
-out-of-band.
-This
-allows
-organizations
-that
-have
-already
-deployed
-large
-JSON-based
-infrastructure
-to
-add
-meaning
-to
-their
-JSON
-<ins class="diff-new">documents
-</ins>
-in
-a
-way
-that
-is
-not
-disruptive
-to
-their
-day-to-day
-operations
-and
-is
-transparent
-to
-their
-current
-customers.
-At
-times,
-mapping
-JSON
-to
-a
-graph
-representation
-can
-become
-difficult.
-In
-these
-instances,
-rather
-than
-having
-JSON-LD
-support
-esoteric
-markup,
-we
-chose
-not
-to
-support
-the
-use
-case
-and
-support
-a
-simplified
-syntax
-instead.
-So,
-while
-Zero
-Edits
-<del class="diff-old">was
-</del>
-<ins class="diff-chg">is
-</ins>
-a
-goal,
-it
-<del class="diff-old">was
-</del>
-<ins class="diff-chg">is
-</ins>
-not
-always
-possible
-without
-adding
-great
-complexity
-to
-the
-language.
-</dd>
-<dt>
-Streaming
-</dt>
-<dd>
-The
-format
-supports
-both
-document-based
-and
-stream-based
-processing.
-</dd>
-</dl>
-</div>
-<div id="linked-data" class="section">
-<h3>
-<span class="secno">
-2.2
-</span>
-Linked
-Data
-</h3>
-<p>
-The
-following
-definition
-for
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>
-is
-the
-one
-that
-will
-be
-used
-for
-this
-specification.
-</p>
-<ol>
-<li>
-<dfn title="Linked_Data" id="dfn-linked_data">
-Linked
-Data
-</dfn>
-is
-a
-set
-of
-documents,
-each
-containing
-a
-representation
-of
-a
-linked
-data
-graph.
-</li>
-<li>
-A
-<dfn title="linked_data_graph" id="dfn-linked_data_graph">
-linked
-data
-graph
-</dfn>
-is
-an
-unordered
-labeled
-directed
-graph,
-where
-nodes
-are
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>
-s
-or
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-s,
-and
-edges
-are
-properties.
-</li>
-<li>
-A
-<dfn title="subject" id="dfn-subject">
-subject
-</dfn>
-is
-any
-node
-in
-a
-<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
-linked
-data
-graph
-</a>
-with
-at
-least
-one
-outgoing
-edge.
-</li>
-<li>
-A
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>
-<em class="rfc2119" title="should">
-should
-</em>
-be
-labeled
-with
-an
-<del class="diff-old">IRI.
-A
-property
-is
-an
-edge
-of
-the
-linked
-data
-graph
-.
-A
-property
-</del>
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-<ins class="diff-chg">IRI
-</ins>
-</a>
-<del class="diff-old">should
-be
-labeled
-with
-an
-IRI.
-</del>
-<ins class="diff-chg">(an
-Internationalized
-Resource
-Identifier
-as
-described
-in
-[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-chg">
-RFC3987
-</ins></a></cite><ins class="diff-chg">
-]).
-</ins>
-</li>
-<li>
-An
-<dfn title="object" id="dfn-object">
-object
-</dfn>
-is
-a
-node
-in
-a
-<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
-linked
-data
-graph
-</a>
-with
-at
-least
-one
-incoming
-edge.
-</li>
-<li>
-An
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-<em class="rfc2119" title="may">
-may
-</em>
-be
-labeled
-with
-an
-<del class="diff-old">IRI.
-</del>
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-<ins class="diff-chg">IRI
-</ins></a>.</li><li><ins class="diff-chg">
-An
-object
-</ins><em class="rfc2119" title="may"><ins class="diff-chg">
-may
-</ins></em><ins class="diff-chg">
-be
-a
-</ins><dfn title="subject" id="dfn-subject-1"><ins class="diff-chg">
-subject
-</ins></dfn><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
-object
-</ins></a><ins class="diff-chg">
-at
-the
-same
-time.
-</ins></li><li><ins class="diff-chg">
-A
-</ins><dfn title="property" id="dfn-property"><ins class="diff-chg">
-property
-</ins></dfn><ins class="diff-chg">
-is
-an
-edge
-of
-the
-</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
-linked
-data
-graph
-</ins></a>.</li><li><ins class="diff-chg">
-A
-</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
-property
-</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
-should
-</ins></em><ins class="diff-chg">
-be
-labeled
-with
-an
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
-IRI
-</ins></a>.
-</li>
-<li>
-An
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-that
-is
-a
-label
-in
-a
-<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
-linked
-data
-graph
-</a>
-<em class="rfc2119" title="should">
-should
-</em>
-be
-dereferencable
-to
-a
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>
-document
-describing
-the
-labeled
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>,
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-or
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>.
-</li>
-<li>
-A
-<dfn title="literal" id="dfn-literal">
-literal
-</dfn>
-is
-an
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-with
-a
-label
-that
-is
-not
-an
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-</li>
-</ol>
-<p>
-Note
-that
-the
-definition
-for
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>
-above
-is
-silent
-on
-the
-topic
-of
-unlabeled
-nodes.
-Unlabeled
-nodes
-are
-not
-considered
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>.
-However,
-this
-specification
-allows
-for
-the
-expression
-of
-unlabled
-nodes,
-as
-most
-graph-based
-data
-sets
-on
-the
-Web
-contain
-a
-number
-of
-associated
-nodes
-that
-are
-not
-named
-and
-thus
-are
-not
-directly
-de-referenceable.
-</p>
-</div>
-<div id="linking-data" class="section">
-<h3>
-<span class="secno">
-2.3
-</span>
-Linking
-Data
-</h3>
-<p>
-An
-Internationalized
-Resource
-Identifier
-(
-<dfn title="IRI" id="dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>
-),
-as
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-],
-is
-a
-mechanism
-for
-representing
-unique
-identifiers
-on
-the
-web.
-In
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>,
-an
-IRI
-is
-commonly
-used
-for
-expressing
-a
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>,
-a
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>
-or
-an
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>.
-</p>
-<p>
-JSON-LD
-defines
-a
-mechanism
-to
-map
-JSON
-<del class="diff-old">values
-</del>
-<ins class="diff-chg">terms,
-i.e.,
-keys
-and
-values,
-</ins>
-to
-IRIs.
-This
-does
-not
-mean
-that
-JSON-LD
-requires
-every
-key
-or
-value
-to
-be
-an
-IRI,
-but
-rather
-ensures
-that
-keys
-and
-values
-can
-be
-mapped
-to
-IRIs
-if
-the
-developer
-<del class="diff-old">so
-</del>
-desires
-to
-transform
-their
-data
-into
-Linked
-Data.
-There
-are
-a
-few
-techniques
-that
-can
-ensure
-that
-developers
-will
-generate
-good
-Linked
-Data
-for
-the
-Web.
-JSON-LD
-formalizes
-those
-techniques.
-</p>
-<p>
-We
-will
-be
-using
-the
-following
-JSON
-markup
-as
-the
-example
-for
-the
-rest
-of
-this
-section:
-</p>
-<pre class="example">
-{
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-</div>
-<div id="the-context" class="section">
-<h3>
-<span class="secno">
-2.4
-</span>
-The
-Context
-</h3>
-<p>
-In
-JSON-LD,
-a
-context
-is
-used
-to
-<del class="diff-old">allow
-developers
-to
-</del>
-map
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-<del class="diff-old">s
-</del>
-<ins class="diff-chg">s,
-i.e.,
-keys
-and
-values
-in
-an
-JSON
-document,
-</ins>
-to
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s.
-A
-<dfn title="term" id="dfn-term">
-term
-</dfn>
-is
-a
-short
-word
-that
-<em class="rfc2119" title="may">
-may
-</em>
-be
-expanded
-to
-an
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>.
-The
-<del class="diff-old">semantic
-web,
-just
-like
-the
-document-based
-web,
-</del>
-<ins class="diff-chg">Web
-</ins>
-uses
-IRIs
-for
-unambiguous
-identification.
-The
-idea
-is
-that
-these
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-mean
-something
-that
-may
-be
-of
-use
-to
-other
-<del class="diff-old">developers.
-</del>
-<ins class="diff-chg">developers
-and
-that
-it
-is
-useful
-to
-give
-them
-an
-unambiguous
-identifier.
-That
-is,
-it
-is
-useful
-for
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-s
-to
-expand
-to
-IRIs
-so
-that
-developers
-don't
-accidentally
-step
-on
-each
-other's
-Web
-Vocabulary
-terms.
-</ins>
-For
-example,
-the
-term
-<code>
-name
-</code>
-may
-map
-directly
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-allows
-JSON-LD
-documents
-to
-be
-constructed
-using
-the
-common
-JSON
-practice
-of
-simple
-name/value
-pairs
-while
-ensuring
-that
-the
-data
-is
-useful
-outside
-of
-the
-<del class="diff-old">database
-</del>
-<ins class="diff-chg">page,
-API
-</ins>
-or
-<del class="diff-old">page
-</del>
-<ins class="diff-chg">database
-</ins>
-in
-which
-it
-resides.
-</p>
-<p>
-These
-Linked
-Data
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-are
-typically
-collected
-in
-a
-context
-<del class="diff-old">and
-</del>
-<ins class="diff-chg">document
-that
-would
-look
-something
-like
-this:
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-}
-</ins></pre><p><ins class="diff-chg">
-This
-context
-document
-can
-</ins>
-then
-<ins class="diff-new">be
-</ins>
-used
-<ins class="diff-new">in
-an
-JSON-LD
-document
-</ins>
-by
-adding
-a
-single
-<del class="diff-old">line
-to
-the
-</del>
-<ins class="diff-chg">line.
-The
-</ins>
-JSON
-markup
-<del class="diff-old">above:
-</del>
-<ins class="diff-chg">as
-shown
-in
-the
-previous
-section
-could
-be
-changed
-as
-follows
-to
-link
-to
-the
-context
-document:
-</ins>
-</p>
-<pre class="example">
-{
-  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-<p>
-The
-addition
-above
-transforms
-the
-previous
-JSON
-document
-into
-a
-JSON
-document
-with
-added
-semantics
-because
-the
-<code>
-@context
-</code>
-specifies
-how
-the
-<strong>
-name
-</strong>,
-<strong>
-homepage
-</strong>,
-and
-<strong>
-avatar
-</strong>
-terms
-map
-to
-IRIs.
-Mapping
-those
-keys
-to
-IRIs
-gives
-the
-data
-global
-context.
-If
-two
-developers
-use
-the
-same
-IRI
-to
-describe
-a
-property,
-they
-are
-more
-than
-likely
-expressing
-the
-same
-concept.
-This
-allows
-both
-developers
-to
-re-use
-each
-others
-data
-without
-having
-to
-agree
-to
-how
-their
-data
-will
-inter-operate
-on
-a
-site-by-site
-basis.
-<ins class="diff-new">Contexts
-may
-also
-contain
-datatype
-information
-for
-certain
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
-term
-</ins></a><ins class="diff-new">
-s
-as
-well
-as
-other
-processing
-instructions
-for
-the
-JSON-LD
-processor.
-</ins>
-</p>
-<p>
-<del class="diff-old">The
-semantic
-web
-</del>
-<ins class="diff-chg">Contexts
-may
-be
-specified
-in-line.
-This
-ensures
-that
-JSON-LD
-documents
-can
-be
-processed
-when
-a
-JSON-LD
-processor
-does
-not
-have
-access
-to
-the
-Web.
-</ins></p><pre class="example"><ins class="diff-chg">
-{
-</ins>  <span class="diff">"@context": {<ins class="diff-chg">
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-  },</span>
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}
-</ins></pre><p><ins class="diff-chg">
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-APIs.
-This
-means
-that
-developers
-can
-also
-specify
-a
-context
-for
-JSON
-data
-in
-an
-out-of-band
-fashion.
-This
-is
-described
-later
-in
-this
-document.
-</ins></p><p><ins class="diff-chg">
-JSON-LD
-</ins>
-uses
-a
-special
-type
-of
-<ins class="diff-new">machine-readable
-</ins>
-document
-called
-a
-<dfn title="Web_Vocabulary" id="dfn-web_vocabulary">
-Web
-Vocabulary
-</dfn>
-to
-define
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-<del class="diff-old">s.
-A
-context
-is
-a
-type
-of
-Web
-vocabulary.
-</del>
-<ins class="diff-chg">s
-that
-are
-then
-used
-to
-describe
-concepts
-and
-"things"
-in
-the
-world.
-</ins>
-Typically,
-these
-Web
-Vocabulary
-documents
-have
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-prefix
-</a>
-es
-associated
-with
-them
-and
-contain
-a
-number
-of
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-declarations.
-A
-<dfn title="prefix" id="dfn-prefix">
-prefix
-</dfn>,
-like
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>,
-is
-a
-short
-word
-that
-expands
-to
-a
-Web
-Vocabulary
-<ins class="diff-new">base
-</ins>
-IRI.
-<a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">
-Prefix
-</a>
-es
-are
-helpful
-when
-a
-developer
-wants
-to
-mix
-multiple
-vocabularies
-together
-in
-a
-context,
-but
-does
-not
-want
-to
-go
-to
-the
-trouble
-of
-defining
-every
-single
-term
-in
-every
-single
-vocabulary.
-Some
-Web
-Vocabularies
-may
-have
-<del class="diff-old">10-20
-</del>
-<ins class="diff-chg">dozens
-of
-</ins>
-terms
-defined.
-If
-a
-developer
-wants
-to
-use
-3-4
-different
-vocabularies,
-the
-number
-of
-terms
-that
-would
-have
-to
-be
-declared
-in
-a
-single
-context
-<del class="diff-old">would
-</del>
-<ins class="diff-chg">could
-</ins>
-become
-quite
-large.
-To
-reduce
-the
-number
-of
-different
-terms
-that
-must
-be
-defined,
-JSON-LD
-also
-allows
-prefixes
-to
-be
-used
-to
-compact
-IRIs.
-</p>
-<p>
-</p>
-<p>
-For
-example,
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/
-</code>
-specifies
-a
-<a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">
-Web
-Vocabulary
-</a>
-which
-may
-be
-represented
-using
-the
-<code>
-foaf
-</code>
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-prefix
-</a>.
-The
-<code>
-foaf
-</code>
-Web
-Vocabulary
-contains
-a
-term
-called
-<strong>
-name
-</strong>.
-If
-you
-join
-the
-<code>
-foaf
-</code>
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-prefix
-</a>
-with
-the
-<strong>
-name
-</strong>
-suffix,
-you
-can
-build
-a
-compact
-IRI
-that
-will
-expand
-out
-into
-an
-absolute
-IRI
-for
-the
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-vocabulary
-term.
-That
-is,
-the
-compact
-IRI,
-or
-short-form,
-is
-<code>
-foaf:name
-</code>
-and
-the
-expanded-form
-is
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-This
-vocabulary
-term
-is
-used
-to
-specify
-a
-person's
-name.
-</p>
-<p>
-Developers,
-and
-machines,
-are
-able
-to
-use
-this
-IRI
-(plugging
-it
-directly
-into
-a
-web
-browser,
-for
-instance)
-to
-go
-to
-the
-term
-and
-get
-a
-definition
-of
-what
-the
-term
-means.
-Much
-like
-we
-can
-use
-<a href="http://wordnet.princeton.edu/">
-WordNet
-</a>
-today
-to
-see
-the
-definition
-of
-words
-in
-the
-English
-language.
-Developers
-and
-machines
-need
-the
-same
-sort
-of
-<del class="diff-old">dictionary
-</del>
-<ins class="diff-chg">definition
-</ins>
-of
-terms.
-IRIs
-provide
-a
-way
-to
-ensure
-that
-these
-terms
-are
-unambiguous.
-</p>
-<p>
-The
-context
-provides
-a
-collection
-of
-vocabulary
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-prefix
-</a>
-es
-that
-can
-be
-used
-to
-expand
-JSON
-keys
-and
-values
-into
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s.
-</p>
-<del class="diff-old">2.4.1
-Inside
-a
-Context
-In
-the
-previous
-section,
-the
-developer
-used
-the
-@context
-keyword
-to
-pull
-in
-an
-external
-context.
-That
-context
-document,
-if
-de-referenced,
-would
-look
-something
-like
-this:
-{
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-}
-A
-JSON-LD
-context
-document
-is
-a
-simple
-mapping
-from
-term
-s
-and
-prefix
-es
-to
-expanded
-values
-such
-as
-IRIs
-or
-keywords.
-Contexts
-may
-also
-contain
-datatype
-information
-for
-certain
-term
-s
-as
-well
-as
-other
-processing
-instructions
-for
-the
-JSON-LD
-processor.
-Contexts
-may
-be
-specified
-in-line.
-This
-ensures
-that
-JSON-LD
-documents
-can
-be
-processed
-when
-a
-JSON-LD
-processor
-does
-not
-have
-access
-to
-the
-Web.
-JSON-LD
-strives
-to
-ensure
-that
-developers
-don't
-have
-to
-change
-the
-JSON
-that
-is
-going
-into
-and
-being
-returned
-from
-their
-Web
-applications.
-This
-means
-that
-developers
-can
-also
-specify
-a
-context
-for
-JSON
-data
-in
-an
-out-of-band
-fashion
-via
-the
-API.
-The
-API
-is
-described
-later
-in
-this
-document.
-A
-JSON-LD
-aware
-Web
-Service
-may
-also
-define
-a
-context
-that
-will
-be
-pre-loaded
-for
-all
-calls
-to
-the
-service.
-This
-allows
-services
-that
-have
-previously
-been
-publishing
-and
-receiving
-JSON
-data
-to
-accept
-JSON-LD
-data
-without
-requiring
-client
-software
-to
-change.
-</del>
-</div>
-<div id="from-json-to-json-ld" class="section">
-<h3>
-<span class="secno">
-2.5
-</span>
-From
-JSON
-to
-JSON-LD
-</h3>
-<p>
-If
-a
-set
-of
-terms
-such
-as,
-<strong>
-name
-</strong>,
-<strong>
-homepage
-</strong>,
-and
-<strong>
-avatar
-</strong>,
-are
-defined
-in
-a
-context,
-and
-that
-context
-is
-used
-to
-resolve
-the
-names
-in
-JSON
-objects,
-machines
-are
-able
-to
-automatically
-expand
-the
-terms
-to
-something
-meaningful
-and
-unambiguous,
-like
-this:
-</p>
-<pre class="example">
-{
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-<p>
-Doing
-this
-allows
-JSON
-to
-be
-unambiguously
-machine-readable
-without
-requiring
-developers
-<del class="diff-old">that
-use
-JSON
-</del>
-to
-drastically
-change
-their
-workflow.
-</p>
-<p class="note">
-<ins class="diff-new">Please
-note
-that
-this
-JSON-LD
-document
-doesn't
-define
-the
-subject
-and
-will
-thus
-result
-in
-an
-unlabeled
-or
-blank
-node.
-</ins></p>
-</div>
-</div>
-<div id="basic-concepts" class="section">
-<h2>
-<span class="secno">
-3.
-</span>
-Basic
-Concepts
-</h2>
-<p>
-JSON-LD
-is
-designed
-to
-ensure
-that
-Linked
-Data
-concepts
-can
-be
-marked
-up
-in
-a
-way
-that
-is
-simple
-to
-understand
-and
-author
-by
-Web
-developers.
-In
-many
-cases,
-regular
-JSON
-markup
-can
-become
-Linked
-Data
-with
-the
-simple
-addition
-of
-a
-context.
-As
-more
-JSON-LD
-features
-are
-used,
-more
-semantics
-are
-added
-to
-the
-JSON
-markup.
-</p>
-<div id="iris" class="section">
-<h3>
-<span class="secno">
-3.1
-</span>
-IRIs
-</h3>
-<p>
-Expressing
-IRIs
-are
-fundamental
-to
-Linked
-Data
-as
-that
-is
-how
-most
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>
-s
-and
-many
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-are
-named.
-IRIs
-can
-be
-expressed
-in
-a
-variety
-of
-different
-ways
-in
-JSON-LD.
-</p>
-<ol>
-<li>
-In
-general,
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-in
-the
-key
-position
-in
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-that
-have
-a
-mapping
-to
-an
-IRI
-or
-another
-key
-in
-the
-context
-are
-expanded
-to
-an
-IRI
-by
-JSON-LD
-processors.
-There
-are
-special
-rules
-for
-processing
-keys
-in
-<code>
-@context
-</code>
-and
-when
-dealing
-with
-keys
-that
-start
-with
-the
-<code>
-@subject
-</code>
-character.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-@subject
-</code>,
-if
-it
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-<code>
-@type
-</code>.
-</li>
-<li>
-An
-IRI
-is
-generated
-for
-the
-value
-specified
-using
-the
-<code>
-@iri
-</code>
-keyword.
-</li>
-<li>
-An
-IRI
-is
-generated
-when
-there
-are
-<code>
-@coerce
-</code>
-rules
-in
-effect
-for
-a
-key
-named
-<code>
-@iri
-</code>.
-</li>
-</ol>
-<p>
-IRIs
-can
-be
-expressed
-directly
-in
-the
-key
-position
-like
-so:
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-In
-the
-example
-above,
-the
-key
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-is
-interpreted
-as
-an
-IRI,
-as
-opposed
-to
-being
-interpreted
-as
-a
-string.
-</p>
-<p>
-Term
-expansion
-occurs
-for
-IRIs
-if
-a
-term
-is
-defined
-within
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>:
-</p>
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}
-</pre>
-<p>
-<a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">
-Prefix
-</a>
-es
-are
-expanded
-when
-used
-in
-keys:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  ""},
-</del>
-<ins class="diff-chg">  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
-</ins>
-...
-<del class="diff-old">  "": "Manu Sporny",
-</del>
-<ins class="diff-chg">  "<span class="diff">foaf:name</span>": "Manu Sporny",
-</ins>
-...
-}
-</pre>
-<p>
-<code>
-<del class="diff-old">name
-</del>
-<ins class="diff-chg">foaf:name
-</ins>
-</code>
-above
-will
-automatically
-expand
-out
-to
-the
-IRI
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>.
-</p>
-<p>
-An
-IRI
-is
-generated
-when
-a
-value
-is
-associated
-with
-a
-key
-using
-the
-<code>
-@iri
-</code>
-keyword:
-</p>
-<pre class="example">
-{
-...
-  "homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}
-</pre>
-<p>
-If
-type
-coercion
-rules
-are
-specified
-in
-the
-<code>
-@context
-</code>
-for
-a
-particular
-vocabulary
-term,
-an
-IRI
-is
-generated:
-</p>
-<pre class="example">
-{<span class="diff">
-<del class="diff-old">  "@context": 
-</del>
-<ins class="diff-chg">  "@context":
-</ins>
-  {
-    ...
-<del class="diff-old">    "@coerce": 
-</del>
-<ins class="diff-chg">    "@coerce":
-</ins>
-    {
-      "@iri": "homepage"
-    }
-  }</span>
-...
-  "homepage": "http://manu.sporny.org/",
-...
-}
-</pre>
-<p>
-Even
-though
-the
-value
-<code>
-http://manu.sporny.org/
-</code>
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-the
-type
-coercion
-rules
-will
-transform
-the
-value
-into
-an
-IRI
-when
-processed
-by
-a
-JSON-LD
-Processor
-</p>
-</div>
-<div id="identifying-the-subject" class="section">
-<h3>
-<span class="secno">
-3.2
-</span>
-Identifying
-the
-Subject
-</h3>
-<p>
-<ins class="diff-new">To
-be
-able
-to
-externally
-reference
-nodes,
-it
-is
-important
-that
-each
-node
-has
-an
-unambiguous
-identifier.
-</ins>
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>
-s
-are
-a
-fundamental
-concept
-of
-Linked
-Data,
-and
-nodes
-should
-have
-a
-de-referencable
-identifier
-used
-to
-name
-and
-locate
-them.
-For
-nodes
-to
-be
-truely
-linked,
-de-referencing
-the
-identifier
-should
-result
-in
-a
-representation
-of
-that
-node.
-Associating
-an
-IRI
-with
-a
-node
-tells
-an
-application
-that
-the
-returned
-document
-contains
-a
-description
-of
-<del class="diff-old">of
-</del>
-the
-<del class="diff-old">identifier
-</del>
-<ins class="diff-chg">node
-</ins>
-requested.
-</p>
-<p>
-JSON-LD
-documents
-may
-also
-contain
-descriptions
-of
-other
-nodes,
-so
-it
-is
-necessary
-to
-be
-able
-to
-uniquely
-identify
-each
-node
-which
-may
-be
-externally
-referenced.
-</p>
-<p>
-A
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>
-of
-<del class="diff-old">a
-node
-</del>
-<ins class="diff-chg">an
-object
-in
-JSON
-</ins>
-is
-declared
-using
-the
-<code>
-@subject
-</code>
-key.
-The
-subject
-is
-the
-first
-piece
-of
-information
-needed
-by
-the
-JSON-LD
-processor
-in
-order
-to
-create
-the
-(subject,
-property,
-object)
-tuple,
-also
-known
-as
-a
-triple.
-</p>
-<pre class="example">
-{
-...
-  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-the
-IRI
-<code>
-http://example.org/people#joebob
-</code>.
-</p>
-</div>
-<div id="specifying-the-type" class="section">
-<h3>
-<span class="secno">
-3.3
-</span>
-Specifying
-the
-Type
-</h3>
-<p>
-The
-type
-of
-a
-particular
-subject
-can
-be
-specified
-using
-the
-<code>
-@type
-</code>
-key.
-Specifying
-the
-type
-in
-this
-way
-will
-generate
-a
-triple
-of
-the
-form
-(subject,
-type,
-<del class="diff-old">type-uri).
-</del>
-<ins class="diff-chg">type-iri).
-</ins>
-</p>
-<p>
-To
-be
-Linked
-Data,
-types
-<del class="diff-old">should
-</del>
-<em class="rfc2119" title="must">
-<ins class="diff-chg">must
-</ins></em>
-be
-uniquely
-identified
-by
-an
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>.
-</p>
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple
-if
-the
-JSON-LD
-document
-is
-mapped
-to
-RDF
-(in
-N-Triples
-notation):
-</p>
-<pre class="example">
-<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
-</ins>
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-</div>
-<div id="strings" class="section">
-<h3>
-<span class="secno">
-3.4
-</span>
-Strings
-</h3>
-<p>
-Regular
-text
-strings,
-also
-referred
-to
-as
-<dfn title="plain_literal" id="dfn-plain_literal">
-plain
-literal
-</dfn>
-s,
-are
-easily
-expressed
-using
-regular
-JSON
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-s.
-</p>
-<pre class="example">
-{
-...
-  "name": "<span class="diff">Mark Birbeck</span>",
-...
-}
-</pre>
-</div>
-<div id="string-internationalization" class="section">
-<h3>
-<span class="secno">
-3.5
-</span>
-String
-Internationalization
-</h3>
-<p>
-JSON-LD
-makes
-an
-assumption
-that
-strings
-with
-associated
-language
-encoding
-information
-are
-not
-very
-common
-when
-used
-in
-JavaScript
-and
-Web
-Services.
-Thus,
-it
-takes
-a
-little
-more
-effort
-to
-express
-strings
-with
-associated
-language
-information.
-</p>
-<pre class="example">
-{
-...
-  "name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-for
-<em>
-花澄
-</em>
-and
-associate
-the
-<code>
-ja
-</code>
-language
-code
-with
-the
-triple
-that
-is
-generated.
-Languages
-<em class="rfc2119" title="must">
-must
-</em>
-be
-expressed
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-]
-format.
-</p>
-</div>
-<div id="datatypes" class="section">
-<h3>
-<span class="secno">
-3.6
-</span>
-Datatypes
-</h3>
-<p>
-A
-value
-with
-an
-associated
-datatype,
-also
-known
-as
-a
-<dfn title="typed_literal" id="dfn-typed_literal">
-typed
-literal
-</dfn>,
-is
-indicated
-by
-associating
-a
-literal
-with
-an
-IRI
-which
-indicates
-the
-<del class="diff-old">typed
-</del>
-literal's
-datatype.
-Typed
-literals
-may
-be
-expressed
-in
-JSON-LD
-in
-three
-ways:
-</p>
-<ol>
-<li>
-By
-utilizing
-the
-<code>
-@coerce
-</code>
-keyword.
-</li>
-<li>
-By
-utilizing
-the
-expanded
-form
-for
-specifying
-objects.
-</li>
-<li>
-By
-using
-a
-native
-JSON
-datatype.
-</li>
-</ol>
-<p>
-The
-first
-example
-uses
-the
-<code>
-@coerce
-</code>
-keyword
-to
-express
-a
-typed
-literal:
-</p>
-<pre class="example">
-{<span class="diff">
-<del class="diff-old">  "@context": 
-</del>
-<ins class="diff-chg">  "@context":
-</ins>
-  {
-    "modified":  "http://purl.org/dc/terms/modified",
-    "dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
-<del class="diff-old">    "@coerce": 
-</del>
-<ins class="diff-chg">    "@coerce":
-</ins>
-    {
-      "dateTime": "modified"
-    }
-  }</span>
-...
-  "modified": "2010-05-29T14:17:39+02:00",
-...
-}
-</pre>
-<p>
-The
-second
-example
-uses
-the
-expanded
-form
-for
-specifying
-objects:
-</p>
-<pre class="example">
-{
-...
-  "modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "dateTime"
-  }</span>
-...
-}
-</pre>
-<p>
-Both
-examples
-above
-would
-generate
-an
-object
-with
-the
-literal
-value
-of
-<code>
-2010-05-29T14:17:39+02:00
-</code>
-and
-the
-datatype
-of
-<code>
-http://www.w3.org/2001/XMLSchema#dateTime
-</code>.
-</p>
-<p>
-The
-third
-example
-uses
-a
-built-in
-native
-JSON
-type,
-a
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>,
-to
-express
-a
-datatype:
-</p>
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "age": <span class="diff">31</span>
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triple:
-</p>
-<pre class="example">
-<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
-   &lt;http://xmlns.com/foaf/0.1/age&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-</ins>
-"31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
-.
-</pre>
-</div>
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-3.7
-</span>
-Multiple
-Objects
-for
-a
-Single
-Property
-</h3>
-<p>
-A
-JSON-LD
-author
-can
-express
-multiple
-triples
-in
-a
-compact
-way
-by
-using
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-s.
-If
-a
-subject
-has
-multiple
-values
-for
-the
-same
-property,
-the
-author
-<em class="rfc2119" title="may">
-may
-</em>
-express
-each
-property
-as
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>.
-</p>
-<p class="note">
-In
-JSON-LD,
-<del class="diff-old">Multiple
-</del>
-<ins class="diff-chg">multiple
-</ins>
-objects
-on
-a
-property
-are
-not
-ordered.
-This
-is
-because
-typically
-graphs
-are
-not
-inherently
-ordered
-data
-structures.
-To
-see
-more
-on
-creating
-ordered
-collections
-in
-JSON-LD,
-see
-<a href="#lists">
-Lists
-</a>.
-</p>
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
-</ins>
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
-</ins>
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
-</ins>
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-"jaybee"
-.
-</pre>
-</div>
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3>
-<span class="secno">
-3.8
-</span>
-Multiple
-Typed
-Literals
-for
-a
-Single
-Property
-</h3>
-<p>
-Multiple
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s
-may
-also
-be
-expressed
-using
-the
-expanded
-form
-for
-objects:
-</p>
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/articles/8",
-  "modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "dateTime"
-    }
-  ]</span>
-...
-}
-</pre>
-<p>
-The
-markup
-shown
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-<del class="diff-old">&lt;http://example.org/articles/8&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/articles/8&gt;
-</ins>
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-<del class="diff-old">&lt;http://example.org/articles/8&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/articles/8&gt;
-</ins>
-   &lt;http://purl.org/dc/terms/modified&gt;
-"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
-.
-</pre>
-</div>
-<div id="expansion" class="section">
-<h3>
-<span class="secno">
-3.9
-</span>
-Expansion
-</h3>
-<p>
-Expansion
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document
-and
-applying
-a
-context
-such
-that
-all
-IRI,
-datatypes,
-and
-literal
-values
-are
-expanded
-so
-that
-the
-context
-is
-no
-longer
-necessary.
-JSON-LD
-document
-expansion
-is
-typically
-used
-<del class="diff-old">when
-re-mapping
-JSON-LD
-documents
-to
-application-specific
-JSON
-documents
-or
-</del>
-as
-a
-part
-of
-<del class="diff-old">the
-</del>
-<a href="#normalization">
-<del class="diff-old">Normalization
-</del>
-<ins class="diff-chg">Framing
-</ins>
-</a>
-<del class="diff-old">process.
-</del>
-<ins class="diff-chg">or
-</ins><a href="#normalization"><ins class="diff-chg">
-Normalization
-</ins></a>.
-</p>
-<p>
-For
-example,
-assume
-the
-following
-JSON-LD
-input
-document:
-</p>
-<pre class="example">
-{
-<del class="diff-old">   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-</del>
-<ins class="diff-chg">   "@context":
-</ins>
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<del class="diff-old">      "@coerce": 
-</del>
-<ins class="diff-chg">      "@coerce":
-</ins>
-      {
-         "@iri": "homepage"
-      }
-<del class="diff-old">   }
-</del>
-<ins class="diff-chg">   },
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/"
-</ins>
-}
-</pre>
-<p>
-Running
-the
-JSON-LD
-Expansion
-algorithm
-against
-the
-JSON-LD
-input
-document
-provided
-above
-would
-result
-in
-the
-following
-output:
-</p>
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-<del class="diff-old">   "http://xmlns.com/foaf/0.1/homepage": 
-</del>
-<ins class="diff-chg">   "http://xmlns.com/foaf/0.1/homepage":
-</ins>
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}
-</pre>
-</div>
-<div id="compaction" class="section">
-<h3>
-<span class="secno">
-3.10
-</span>
-Compaction
-</h3>
-<p>
-Compaction
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document
-and
-applying
-a
-context
-such
-that
-the
-most
-compact
-form
-of
-the
-document
-is
-generated.
-JSON
-is
-typically
-expressed
-in
-a
-very
-compact,
-key-value
-format.
-That
-is,
-full
-IRIs
-are
-rarely
-used
-as
-keys.
-At
-times,
-a
-JSON-LD
-document
-may
-be
-received
-that
-is
-not
-in
-its
-most
-compact
-form.
-JSON-LD,
-via
-the
-API,
-provides
-a
-way
-to
-compact
-a
-JSON-LD
-document.
-</p>
-<p>
-For
-example,
-assume
-the
-following
-JSON-LD
-input
-document:
-</p>
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-<del class="diff-old">   "http://xmlns.com/foaf/0.1/homepage": 
-</del>
-<ins class="diff-chg">   "http://xmlns.com/foaf/0.1/homepage":
-</ins>
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}
-</pre>
-<p>
-Additionally,
-assume
-the
-following
-developer-supplied
-JSON-LD
-context:
-</p>
-<pre class="example">
-{
-   "name": "http://xmlns.com/foaf/0.1/name",
-   "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<del class="diff-old">   "@coerce": 
-</del>
-<ins class="diff-chg">   "@coerce":
-</ins>
-   {
-<del class="diff-old">      "@iri": ["homepage"]
-</del>
-<ins class="diff-chg">      "@iri": "homepage"
-</ins>
-   }
-}
-</pre>
-<p>
-Running
-the
-JSON-LD
-Compaction
-algorithm
-given
-the
-context
-supplied
-above
-against
-the
-JSON-LD
-input
-document
-provided
-above
-would
-result
-in
-the
-following
-output:
-</p>
-<pre class="example">
-{
-<del class="diff-old">   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-</del>
-<ins class="diff-chg">   "@context":
-</ins>
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<del class="diff-old">      "@coerce": 
-</del>
-<ins class="diff-chg">      "@coerce":
-</ins>
-      {
-         "@iri": "homepage"
-      }
-<del class="diff-old">   }
-</del>
-<ins class="diff-chg">   },
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/"
-</ins>
-}
-</pre>
-<p>
-The
-compaction
-algorithm
-also
-enables
-the
-developer
-to
-map
-any
-expanded
-format
-into
-an
-application-specific
-compacted
-format.
-While
-the
-context
-provided
-above
-mapped
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-to
-<strong>
-name
-</strong>,
-it
-could
-have
-also
-mapped
-it
-to
-any
-arbitrary
-string
-provided
-by
-the
-developer.
-</p>
-</div>
-<div id="framing" class="section">
-<h3>
-<span class="secno">
-3.11
-</span>
-Framing
-</h3>
-<p>
-A
-JSON-LD
-document
-is
-a
-representation
-of
-a
-directed
-graph.
-A
-single
-directed
-graph
-can
-have
-many
-different
-serializations,
-each
-expressing
-exactly
-the
-same
-information.
-Developers
-typically
-work
-with
-trees,
-represented
-as
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-s.
-While
-mapping
-a
-graph
-to
-a
-tree
-can
-be
-done,
-the
-layout
-of
-the
-end
-result
-must
-be
-specified
-in
-advance.
-A
-<dfn title="Frame" id="dfn-frame">
-Frame
-</dfn>
-can
-be
-used
-by
-a
-developer
-on
-a
-JSON-LD
-document
-to
-specify
-a
-deterministic
-layout
-for
-a
-graph.
-</p>
-<p>
-Framing
-is
-the
-process
-of
-taking
-a
-JSON-LD
-document,
-which
-expresses
-a
-graph
-of
-information,
-and
-applying
-a
-specific
-graph
-layout
-(called
-a
-<a class="tref internalDFN" title="Frame" href="#dfn-frame">
-Frame
-</a>
-).
-</p>
-<p>
-The
-JSON-LD
-document
-below
-expresses
-a
-library,
-a
-book
-and
-a
-chapter:
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "@coerce": {
-</del>
-<ins class="diff-chg">  "@context": {
-</ins>
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title",
-<del class="diff-old">    "@coerce": 
-</del>
-<ins class="diff-chg">    "@coerce":
-</ins>
-    {
-<del class="diff-old">      "@iri": "ex:contains"
-</del>
-<ins class="diff-chg">      "@iri": "contains"
-</ins>
-    },
-  },
-<del class="diff-old">  "@subject": 
-</del>
-<ins class="diff-chg">  "@subject":
-</ins>
-  [{
-    "@subject": "http://example.com/library",
-    "@type": "Library",
-    "contains": "http://example.org/library/the-republic"
-<del class="diff-old">  }, 
-</del>
-<ins class="diff-chg">  },
-</ins>
-  {
-    "@subject": "http://example.org/library/the-republic",
-    "@type": "Book",
-    "creator": "Plato",
-    "title": "The Republic",
-    "contains": "http://example.org/library/the-republic#introduction"
-<del class="diff-old">  }, 
-</del>
-<ins class="diff-chg">  },
-</ins>
-  {
-    "@subject": "http://example.org/library/the-republic#introduction",
-    "@type": "Chapter",
-    "description": "An introductory chapter on The Republic.",
-    "title": "The Introduction"
-  }]
-}
-</pre>
-<p>
-Developers
-typically
-like
-to
-operate
-on
-items
-in
-a
-hierarchical,
-tree-based
-fashion.
-Ideally,
-a
-developer
-would
-want
-the
-data
-above
-sorted
-into
-top-level
-libraries,
-then
-the
-books
-that
-are
-contained
-in
-each
-library,
-and
-then
-the
-chapters
-contained
-in
-each
-book.
-To
-achieve
-that
-layout,
-the
-developer
-can
-define
-the
-following
-<a class="tref internalDFN" title="frame" href="#dfn-frame">
-frame
-</a>:
-</p>
-<pre class="example">
-{
-  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title"
-  },
-  "@type": "Library",
-  "contains": {
-    "@type": "Book",
-    "contains": {
-      "@type": "Chapter"
-    }
-  }
-}
-</pre>
-<p>
-When
-the
-framing
-algorithm
-is
-run
-against
-the
-previously
-defined
-JSON-LD
-document,
-paired
-with
-the
-<a class="tref internalDFN" title="frame" href="#dfn-frame">
-frame
-</a>
-above,
-the
-following
-JSON-LD
-document
-is
-the
-end
-result:
-</p>
-<pre class="example">
-{
-  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title"
-  },
-  "@subject": "http://example.org/library",
-  "@type": "Library",
-  "contains": {
-    <span class="diff">"@subject": "http://example.org/library/the-republic",</span>
-    "@type": "Book",
-    <span class="diff">"creator": "Plato",</span>
-    <span class="diff">"title": "The Republic",</span>
-    "contains": {
-      <span class="diff">"@subject": "http://example.org/library/the-republic#introduction",</span>
-      "@type": "Chapter",
-      <span class="diff">"description": "An introductory chapter on The Republic.",</span>
-      <span class="diff">"title": "The Introduction"</span>
-    },
-  },
-}
-</pre>
-<p>
-The
-JSON-LD
-framing
-algorithm
-allows
-developers
-to
-query
-by
-example
-and
-force
-a
-specific
-tree
-layout
-to
-a
-JSON-LD
-document.
-</p>
-</div>
-</div>
-<div id="advanced-concepts" class="section">
-<h2>
-<span class="secno">
-4.
-</span>
-Advanced
-Concepts
-</h2>
-<p>
-JSON-LD
-has
-a
-number
-of
-features
-that
-provide
-functionality
-above
-and
-beyond
-the
-core
-functionality
-described
-above.
-The
-following
-sections
-outline
-the
-features
-that
-are
-specific
-to
-JSON-LD.
-</p>
-<div id="vocabulary-prefixes" class="section">
-<h3>
-<span class="secno">
-4.1
-</span>
-<del class="diff-old">CURIEs
-</del>
-<ins class="diff-chg">Vocabulary
-Prefixes
-</ins>
-</h3>
-<p>
-<del class="diff-old">Concepts
-</del>
-<ins class="diff-chg">Vocabulary
-terms
-</ins>
-in
-Linked
-Data
-documents
-may
-draw
-<del class="diff-old">on
-</del>
-<ins class="diff-chg">from
-</ins>
-a
-number
-of
-different
-<ins class="diff-new">Web
-</ins>
-vocabularies.
-<del class="diff-old">The
-@vocab
-</del>
-<ins class="diff-chg">At
-times,
-declaring
-every
-single
-term
-that
-a
-document
-uses
-can
-require
-the
-developer
-to
-declare
-tens,
-if
-not
-hundreds
-of
-potential
-vocabulary
-terms
-that
-may
-be
-used
-across
-an
-application.
-This
-is
-a
-concern
-for
-at
-least
-three
-reasons;
-the
-first
-is
-the
-cognitive
-load
-on
-the
-developer,
-the
-second
-is
-the
-serialized
-size
-of
-the
-context,
-the
-third
-is
-future-proofing
-application
-contexts.
-In
-order
-to
-address
-these
-issues,
-the
-concept
-of
-a
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-chg">
-prefix
-</ins></a>
-mechanism
-is
-<del class="diff-old">useful
-</del>
-<ins class="diff-chg">introduced.
-</ins></p><p><ins class="diff-chg">
-A
-</ins><dfn title="prefix" id="dfn-prefix-1"><ins class="diff-chg">
-prefix
-</ins></dfn><ins class="diff-chg">
-is
-a
-compact
-way
-of
-expressing
-a
-base
-</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
-IRI
-</ins></a>
-to
-<del class="diff-old">easily
-associate
-types
-</del>
-<ins class="diff-chg">a
-</ins><a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary"><ins class="diff-chg">
-Web
-Vocabulary
-</ins></a>.<ins class="diff-chg">
-Generally,
-these
-prefixes
-are
-used
-by
-concatenating
-the
-</ins><em><ins class="diff-chg">
-prefix
-</ins></em>
-and
-<del class="diff-old">properties
-</del>
-<ins class="diff-chg">a
-</ins><em><ins class="diff-chg">
-term
-</ins></em><ins class="diff-chg">
-separated
-by
-a
-colon
-(
-</ins><code>:</code><ins class="diff-chg">
-).
-The
-prefix
-is
-a
-short
-string
-that
-identifies
-a
-particular
-Web
-vocabulary.
-For
-example,
-the
-prefix
-</ins><code><ins class="diff-chg">
-foaf
-</ins></code><ins class="diff-chg">
-may
-be
-used
-as
-a
-short
-hand
-for
-the
-Friend-of-a-Friend
-Web
-Vocabulary,
-which
-is
-identified
-using
-the
-IRI
-</ins><code><ins class="diff-chg">
-http://xmlns.com/foaf/0.1/
-</ins></code>.<ins class="diff-chg">
-A
-developer
-may
-append
-any
-of
-the
-FOAF
-Vocabulary
-terms
-to
-the
-end
-of
-the
-prefix
-to
-specify
-a
-short-hand
-version
-of
-the
-full
-IRI
-for
-the
-vocabulary
-term.
-For
-example,
-</ins><code><ins class="diff-chg">
-foaf:name
-</ins></code><ins class="diff-chg">
-would
-be
-expanded
-out
-to
-the
-IRI
-</ins><code><ins class="diff-chg">
-http://xmlns.com/foaf/0.1/name
-</ins></code>.<ins class="diff-chg">
-Instead
-of
-having
-to
-remember
-and
-type
-out
-the
-entire
-IRI,
-the
-developer
-can
-instead
-use
-the
-prefix
-in
-their
-JSON-LD
-markup.
-</ins></p><p><ins class="diff-chg">
-The
-ability
-to
-use
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-chg">
-prefix
-</ins></a><ins class="diff-chg">
-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.
-</ins><a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1"><ins class="diff-chg">
-Prefix
-</ins></a><ins class="diff-chg">
-also
-reduce
-the
-cognitive
-load
-on
-the
-developer.
-It
-is
-far
-easier
-to
-remember
-</ins><code><ins class="diff-chg">
-foaf:name
-</ins></code><ins class="diff-chg">
-than
-it
-is
-to
-remember
-</ins><code><ins class="diff-chg">
-http://xmlns.com/foaf/0.1/name
-</ins></code>.<ins class="diff-chg">
-The
-use
-of
-prefixes
-also
-ensures
-that
-a
-context
-document
-does
-not
-have
-to
-be
-updated
-in
-lock-step
-</ins>
-with
-<ins class="diff-new">an
-externally
-defined
-</ins><a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary"><ins class="diff-new">
-Web
-Vocabulary
-</ins></a>.<ins class="diff-new">
-Without
-prefixes,
-</ins>
-a
-<del class="diff-old">specific
-vocabulary,
-but
-when
-many
-vocabularies
-are
-used,
-this
-becomes
-difficult.
-</del>
-<ins class="diff-chg">developer
-would
-need
-to
-keep
-their
-application
-context
-terms
-in
-lock-step
-with
-an
-externally
-defined
-Web
-Vocabulary.
-Rather,
-by
-just
-declaring
-the
-Web
-Vocabulary
-prefix,
-one
-can
-use
-new
-terms
-as
-they're
-declared
-without
-having
-to
-update
-the
-application's
-JSON-LD
-context.
-</ins></p><p>
-Consider
-the
-following
-example:
-</p>
-  <pre class="example">
-{
-  "@context": {
-    <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>
-    <span class="diff">"ex": "http://example.org/vocab#"</span>
-  },
-  "@subject": "http://example.org/library",
-  "@type": <span class="diff">"ex:Library"</span>,
-  <span class="diff">"ex:contains"</span>: {
-    "@subject": "http://example.org/library/the-republic",
-    "@type": <span class="diff">"ex:Book"</span>,
-    <span class="diff">"dc:creator"</span>: "Plato",
-    <span class="diff">"dc:title"</span>: "The Republic",
-    <span class="diff">"ex:contains"</span>: {
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": <span class="diff">"ex:Chapter"</span>,
-      <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",
-      <span class="diff">"dc:title"</span>: "The Introduction"
-    },
-  },
-}
-</pre>
-<p>
-In
-this
-example,
-two
-different
-vocabularies
-are
-<del class="diff-old">identified
-with
-prefixes,
-and
-</del>
-<ins class="diff-chg">referred
-to
-using
-prefixes.
-Those
-prefixes
-are
-then
-</ins>
-used
-as
-type
-and
-property
-values
-using
-the
-<del class="diff-old">CURIE
-</del>
-<code>
-<ins class="diff-chg">prefix:term
-</ins></code>
-notation.
-</p>
-<p>
-<del class="diff-old">A
-CURIE
-is
-a
-compact
-way
-of
-describing
-an
-IRI
-.
-The
-term
-actually
-comes
-from
-Compact
-URI.
-Generally,
-a
-CURIE
-is
-composed
-of
-a
-prefix
-and
-a
-suffix
-separated
-by
-a
-':'.
-In
-JSON-LD,
-the
-prefix
-may
-be
-the
-empty
-string,
-denoting
-the
-default
-prefix
-.
-CURIEs
-</del>
-<ins class="diff-chg">Prefixes,
-also
-known
-as
-CURIEs,
-</ins>
-are
-defined
-more
-formally
-in
-<del class="diff-old">[
-RDFA-CORE
-]
-</del>
-<ins class="diff-chg">RDFa
-Core
-1.1,
-</ins>
-<cite>
-<a href="http://www.w3.org/TR/rdfa-core/#s_curies">
-<del class="diff-old">section
-</del>
-<ins class="diff-chg">Section
-</ins>
-6
-"CURIE
-Syntax
-Definition"
-</a>
-<del class="diff-old">.
-</del>
-</cite>
-<ins class="diff-chg">[
-</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-chg">
-RDFA-CORE
-</ins></a></cite><ins class="diff-chg">
-].
-JSON-LD
-does
-not
-support
-the
-square-bracketed
-CURIE
-syntax
-as
-the
-mechanism
-is
-not
-required
-to
-disambiguate
-IRIs
-in
-a
-JSON-LD
-document
-like
-it
-is
-in
-HTML
-documents.
-</ins>
-</p>
-</div>
-<div id="automatic-typing" class="section">
-<h3>
-<span class="secno">
-4.2
-</span>
-Automatic
-Typing
-</h3>
-<p>
-Since
-JSON
-is
-capable
-of
-expressing
-typed
-information
-such
-as
-doubles,
-integers,
-and
-boolean
-values.
-As
-demonstrated
-below,
-JSON-LD
-utilizes
-that
-information
-to
-create
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s:
-</p>
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}
-</pre>
-<p class="note">
-When
-dealing
-with
-a
-number
-of
-modern
-programming
-languages,
-including
-JavaScript
-ECMA-262,
-there
-is
-no
-distinction
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>
-values.
-That
-is,
-the
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>
-<code>
-5.3
-</code>
-and
-the
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>
-<code>
-5.3e0
-</code>
-are
-treated
-as
-if
-they
-were
-the
-same.
-When
-converting
-from
-JSON-LD
-to
-a
-language-native
-format
-and
-back,
-datatype
-information
-is
-lost
-in
-a
-number
-of
-these
-languages.
-Thus,
-one
-could
-say
-that
-<code>
-5.3
-</code>
-is
-a
-<strong>
-xsd:decimal
-</strong>
-and
-<code>
-5.3e0
-</code>
-is
-an
-<strong>
-xsd:double
-</strong>
-in
-JSON-LD,
-but
-when
-both
-values
-are
-converted
-to
-a
-language-native
-format
-the
-datatype
-difference
-between
-the
-two
-is
-lost
-because
-the
-machine-level
-representation
-will
-almost
-always
-be
-a
-<strong>
-double
-</strong>.
-Implementers
-should
-be
-aware
-of
-this
-potential
-round-tripping
-issue
-between
-<strong>
-xsd:decimal
-</strong>
-and
-<strong>
-xsd:double
-</strong>.
-Specifically
-objects
-with
-a
-datatype
-of
-<strong>
-xsd:decimal
-</strong>
-<em class="rfc2119" title="must not">
-must
-not
-</em>
-be
-converted
-to
-a
-language
-native
-type.
-</p>
-</div>
-<div id="type-coercion" class="section">
-<h3>
-<span class="secno">
-4.3
-</span>
-Type
-Coercion
-</h3>
-<p>
-JSON-LD
-supports
-the
-coercion
-of
-values
-to
-particular
-data
-types.
-Type
-coercion
-allows
-someone
-deploying
-JSON-LD
-to
-coerce
-the
-incoming
-or
-outgoing
-types
-to
-the
-proper
-data
-type
-based
-on
-a
-mapping
-of
-data
-type
-IRIs
-to
-property
-types.
-Using
-type
-coercion,
-one
-may
-convert
-simple
-JSON
-data
-to
-properly
-typed
-RDF
-data.
-</p>
-<p>
-The
-example
-below
-demonstrates
-how
-a
-JSON-LD
-author
-can
-coerce
-values
-to
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-s,
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-s
-and
-IRIs.
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "@context": 
-  {  
-</del>
-<ins class="diff-chg">  "@context":
-  {
-</ins>
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-        "@iri": "homepage"
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}
-</pre>
-<p>
-The
-example
-above
-would
-generate
-the
-following
-triples:
-</p>
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://example.org/home/&gt;
-.
-</pre>
-</div>
-<div id="chaining" class="section">
-<h3>
-<span class="secno">
-4.4
-</span>
-Chaining
-</h3>
-<p>
-Object
-<dfn title="chaining" id="dfn-chaining">
-chaining
-</dfn>
-is
-a
-JSON-LD
-feature
-that
-allows
-an
-author
-to
-use
-the
-definition
-of
-JSON-LD
-objects
-as
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>
-values.
-This
-is
-a
-commonly
-used
-mechanism
-for
-creating
-a
-parent-child
-relationship
-between
-two
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>
-s.
-</p>
-<p>
-The
-example
-shows
-an
-two
-subjects
-related
-by
-a
-property
-from
-the
-first
-subject:
-</p>
-  <pre class="example">
-{
-...
-  "name": "Manu Sporny",
-  "<span class="diff">knows</span>": {
-    "<span class="diff">@type</span>": "<span class="diff">Person</span>",
-    "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}
-</pre>
-<p>
-An
-object
-definition,
-like
-the
-one
-used
-above,
-<em class="rfc2119" title="may">
-may
-</em>
-be
-used
-as
-a
-JSON
-value
-at
-any
-point
-in
-JSON-LD.
-</p>
-</div>
-<div id="identifying-unlabeled-nodes" class="section">
-<h3>
-<span class="secno">
-4.5
-</span>
-Identifying
-Unlabeled
-Nodes
-</h3>
-<p>
-At
-times,
-it
-becomes
-necessary
-to
-be
-able
-to
-express
-information
-without
-being
-able
-to
-specify
-the
-subject.
-Typically,
-this
-type
-of
-node
-is
-called
-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)
-<del class="diff-old">CURIE
-prefix.
-</del>
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-<ins class="diff-chg">prefix
-</ins></a>.<ins class="diff-chg">
-This
-allows
-to
-reference
-the
-node
-locally
-within
-the
-document
-but
-not
-in
-an
-external
-document.
-</ins>
-</p>
-<pre class="example">
-{
-...
-  "@subject": "<span class="diff">_:foo</span>",
-...
-}
-</pre>
-<p>
-The
-example
-above
-would
-set
-the
-subject
-to
-<code>
-_:foo
-</code>,
-which
-can
-then
-be
-used
-later
-on
-in
-the
-JSON-LD
-markup
-to
-refer
-back
-to
-the
-unlabeled
-node.
-This
-practice,
-however,
-is
-usually
-frowned
-upon
-when
-generating
-Linked
-Data.
-If
-a
-developer
-finds
-that
-they
-refer
-to
-the
-unlabeled
-node
-more
-than
-once,
-they
-should
-consider
-naming
-the
-node
-using
-a
-resolve-able
-IRI.
-</p>
-</div>
-<div id="aliasing-keywords" class="section">
-<h3>
-<span class="secno">
-4.6
-</span>
-<del class="diff-old">Overriding
-</del>
-<ins class="diff-chg">Aliasing
-</ins>
-Keywords
-</h3>
-<p>
-JSON-LD
-allows
-all
-of
-the
-syntax
-keywords,
-except
-for
-<code>
-@context
-</code>,
-to
-be
-<del class="diff-old">overridden.
-</del>
-<ins class="diff-chg">aliased.
-</ins>
-This
-feature
-allows
-more
-legacy
-JSON
-content
-to
-be
-supported
-by
-JSON-LD.
-It
-also
-allows
-developers
-to
-design
-domain-specific
-implementations
-using
-only
-the
-JSON-LD
-context.
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "@context": 
-  {  
-</del>
-<ins class="diff-chg">  "@context":
-  {
-</ins>
-     <span class="diff">"url": "@subject"</span>,
-     <span class="diff">"a": "@type"</span>,
-     "name": "http://schema.org/name"
-  },
-  "url": "http://example.com/about#gregg",
-  "a": "http://schema.org/Person",
-  "name": "Gregg Kellogg"
-}
-</pre>
-<p>
-In
-the
-example
-above,
-the
-<code>
-@subject
-</code>
-and
-<code>
-@type
-</code>
-keywords
-have
-been
-<del class="diff-old">overridden
-by
-</del>
-<ins class="diff-chg">given
-the
-aliases
-</ins>
-<strong>
-url
-</strong>
-and
-<strong>
-a
-</strong>,
-respectively.
-</p>
-</div>
-<div id="normalization" class="section">
-<h3>
-<span class="secno">
-4.7
-</span>
-Normalization
-</h3>
-<p>
-Normalization
-is
-the
-process
-of
-taking
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-and
-performing
-a
-deterministic
-transformation
-on
-that
-input
-that
-results
-in
-a
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-that
-any
-conforming
-JSON-LD
-processor
-would
-have
-generated
-given
-the
-same
-input.
-The
-problem
-is
-a
-fairly
-difficult
-technical
-problem
-to
-solve
-because
-it
-requires
-a
-directed
-graph
-to
-be
-ordered
-into
-a
-set
-of
-nodes
-and
-edges
-in
-a
-deterministic
-way.
-This
-is
-easy
-to
-do
-when
-all
-of
-the
-nodes
-have
-unique
-names,
-but
-very
-difficult
-to
-do
-when
-some
-of
-the
-nodes
-are
-not
-labeled.
-</p>
-<p>
-Normalization
-is
-useful
-when
-comparing
-two
-graphs
-against
-one
-another,
-when
-generating
-a
-detailed
-list
-of
-differences
-between
-two
-graphs,
-and
-when
-generating
-a
-cryptographic
-digital
-signature
-for
-information
-contained
-in
-a
-graph
-or
-when
-generating
-a
-hash
-of
-the
-information
-contained
-in
-a
-graph.
-</p>
-<p>
-The
-example
-below
-is
-an
-un-normalized
-JSON-LD
-document:
-</p>
-<pre class="example">
-{
-<del class="diff-old">   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/",
-   "@context": 
-</del>
-<ins class="diff-chg">   "@context":
-</ins>
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-<del class="diff-old">      "@coerce": 
-</del>
-<ins class="diff-chg">      "@coerce":
-</ins>
-      {
-         "@iri": ["homepage"]
-      }
-<del class="diff-old">   }
-</del>
-<ins class="diff-chg">   },
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/"
-</ins>
-}
-</pre>
-<p>
-The
-example
-below
-is
-the
-normalized
-form
-of
-the
-JSON-LD
-document
-above:
-</p>
-<p class="note">
-Whitespace
-is
-used
-below
-to
-aid
-readability.
-The
-normalization
-algorithm
-for
-JSON-LD
-<del class="diff-old">remove
-</del>
-<ins class="diff-chg">removes
-</ins>
-all
-unnecessary
-whitespace
-in
-the
-fully
-normalized
-form.
-</p>
-<pre class="example">
-[{
-<del class="diff-old">    "@subject": 
-</del>
-<ins class="diff-chg">    "@subject":
-</ins>
-    {
-        "@iri": "_:c14n0"
-    },
-<del class="diff-old">    "http://xmlns.com/foaf/0.1/homepage": 
-</del>
-<ins class="diff-chg">    "http://xmlns.com/foaf/0.1/homepage":
-</ins>
-    {
-        "@iri": "http://manu.sporny.org/"
-    },
-    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
-}]
-</pre>
-<p>
-Notice
-how
-all
-of
-the
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-have
-been
-expanded
-and
-sorted
-in
-alphabetical
-order.
-Also,
-notice
-how
-the
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>
-has
-been
-labeled
-with
-a
-<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">
-blank
-node
-identifier
-</a>.
-Normalization
-ensures
-that
-any
-arbitrary
-graph
-containing
-exactly
-the
-same
-information
-would
-be
-normalized
-to
-exactly
-the
-same
-form
-shown
-above.
-</p>
-</div>
-</div>
-<div id="the-application-programming-interface" class="section">
-<h2>
-<span class="secno">
-5.
-</span>
-The
-Application
-Programming
-Interface
-</h2>
-<p>
-This
-API
-provides
-a
-clean
-mechanism
-that
-enables
-developers
-to
-convert
-JSON-LD
-data
-into
-a
-a
-variety
-of
-output
-formats
-that
-are
-easier
-to
-work
-with
-in
-various
-programming
-languages.
-If
-<del class="diff-old">an
-</del>
-<ins class="diff-chg">a
-JSON-LD
-</ins>
-API
-is
-provided
-in
-a
-programming
-environment,
-the
-<del class="diff-old">entire
-</del>
-<ins class="diff-chg">entirety
-of
-the
-following
-</ins>
-API
-<em class="rfc2119" title="must">
-must
-</em>
-be
-implemented.
-</p>
-<div id="jsonldprocessor" class="section">
-<h3>
-<span class="secno">
-5.1
-</span>
-<del class="diff-old">JSONLDProcessor
-</del>
-<ins class="diff-chg">JsonLdProcessor
-</ins>
-</h3>
-<pre class="idl">
-<del class="diff-old">]
-interface  {
-</del>
-<span class="idlInterface" id="idl-def-JsonLdProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-<ins class="diff-chg">interface <span class="idlInterfaceID">JsonLdProcessor</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-expand-object-object-input-object-context">expand</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-compact-object-object-input-object-context">compact</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>, <span class="idlRaises"><a>ProcessingError</a></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-frame-object-object-input-object-frame-object-options">frame</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">frame</span></span>, <span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">options</span></span>) raises (<span class="idlRaises"><a>InvalidFrame</a></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-normalize-object-object-input-object-context">normalize</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-triples-object-object-input-JsonLdTripleCallback-tripleCallback-object-context">triples</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdTripleCallback" class="idlType"><code>JsonLdTripleCallback</code></a></span> <span class="idlParamName">tripleCallback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span>
-};</span>
-</pre>
-<div id="methods" class="section">
-<h4>
-<span class="secno">
-5.1.1
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JsonLdProcessor-compact-object-object-input-object-context">
-<code>
-compact
-</code>
-</dt>
-<dd>
-<a href="#compaction">
-Compacts
-</a>
-the
-given
-<code>
-input
-</code>
-according
-to
-the
-steps
-in
-the
-<a href="#compaction-algorithm">
-Compaction
-Algorithm
-</a>.
-The
-<code>
-input
-</code>
-<em class="rfc2119" title="must">
-must
-</em>
-be
-copied,
-compacted
-and
-returned
-if
-there
-are
-no
-errors.
-If
-the
-compaction
-fails,
-<del class="diff-old">null
-</del>
-<ins class="diff-chg">an
-appropirate
-exception
-</ins>
-<em class="rfc2119" title="must">
-must
-</em>
-be
-<del class="diff-old">returned.
-</del>
-<ins class="diff-chg">thrown.
-</ins>
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-input
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-object
-to
-perform
-compaction
-on.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-context
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<del class="diff-old">✘
-</del>
-<td class="prmNullTrue">
-<ins class="diff-chg">✔
-</ins>
-</td>
-<del class="diff-old">✘
-</del>
-<td class="prmOptTrue">
-<ins class="diff-chg">✔
-</ins>
-</td>
-<td class="prmDesc">
-The
-base
-context
-to
-use
-when
-compacting
-the
-<code>
-input
-</code>.
-</td>
-</tr>
-</table>
-<table class="exceptions">
-<tr>
-<del class="diff-old">callback
-</del>
-<th>
-<ins class="diff-chg">Exception
-</ins></th><th><ins class="diff-chg">
-Description
-</ins></th></tr><tr><td class="excName"><a><ins class="diff-chg">
-InvalidContext
-</ins></a>
-</td>
-<td class="excDesc">
-<table class="exceptionCodes">
-<tr>
-<td class="excCodeName">
-<code>
-<ins class="diff-new">INVALID_SYNTAX
-</ins></code>
-</td>
-<td class="excCodeDesc">
-<ins class="diff-new">A
-general
-syntax
-error
-was
-detected
-in
-the
-</ins>
-<code>
-<del class="diff-old">JSONLDProcessorCallback
-</del>
-<ins class="diff-chg">@context
-</ins></code>.<ins class="diff-chg">
-For
-example,
-if
-a
-</ins><code><ins class="diff-chg">
-@coerce
-</ins>
-</code>
-<ins class="diff-new">key
-maps
-to
-anything
-other
-than
-a
-string
-or
-an
-array
-of
-strings,
-this
-exception
-would
-be
-raised.
-</ins></td>
-</tr>
-<tr>
-<td class="excCodeName">
-<code>
-<ins class="diff-new">MULTIPLE_DATATYPES
-</ins>
-</code>
-</td>
-<del class="diff-old">✔
-</del>
-<td class="excCodeDesc">
-<ins class="diff-chg">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.
-</ins>
-</td>
-<del class="diff-old">✔
-</del>
-</tr>
-</table>
-</td>
-<del class="diff-old">A
-callback
-that
-is
-called
-whenever
-</del>
-</tr>
-<tr>
-<td class="excName">
-<a>
-<ins class="diff-chg">ProcessingError
-</ins></a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code><ins class="diff-chg">
-LOSSY_COMPACTION
-</ins></code></td><td class="excCodeDesc"><ins class="diff-chg">
-The
-compaction
-would
-lead
-to
-a
-loss
-of
-information,
-such
-as
-</ins>
-a
-<del class="diff-old">processing
-error
-occurs
-on
-the
-given
-</del>
-<code>
-<del class="diff-old">input
-.
-</del>
-<ins class="diff-chg">@language
-</ins></code><ins class="diff-chg">
-value.
-</ins></td></tr><tr><td class="excCodeName"><code><ins class="diff-chg">
-CONFLICTING_DATATYPES
-</ins></code></td><td class="excCodeDesc"><ins class="diff-chg">
-The
-target
-datatype
-specified
-in
-the
-coercion
-rule
-and
-the
-datatype
-for
-the
-typed
-literal
-do
-not
-match.
-</ins>
-</td>
-</tr>
-</table>
-</td>
-<del class="diff-old">No
-exceptions.
-</del>
-</tr>
-</table>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-object
-</a>
-</code>
-</div>
-</dd>
-<dt id="widl-JsonLdProcessor-expand-object-object-input-object-context">
-<code>
-expand
-</code>
-</dt>
-<dd>
-<a href="#expansion">
-Expands
-</a>
-the
-given
-<code>
-input
-</code>
-according
-to
-the
-steps
-in
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>.
-The
-<code>
-input
-</code>
-<em class="rfc2119" title="must">
-must
-</em>
-be
-copied,
-expanded
-and
-returned
-if
-there
-are
-no
-errors.
-If
-the
-expansion
-fails,
-<del class="diff-old">null
-</del>
-<ins class="diff-chg">an
-appropriate
-exception
-</ins>
-<em class="rfc2119" title="must">
-must
-</em>
-be
-<del class="diff-old">returned.
-How
-do
-we
-generate
-warning
-messages
-during
-this
-process?
-For
-example,
-what
-happens
-when
-a
-key
-that
-doesn't
-have
-a
-mapping
-is
-discovered?
-</del>
-<ins class="diff-chg">thrown.
-</ins>
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-input
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-object
-to
-copy
-and
-perform
-the
-expansion
-upon.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-<del class="diff-old">callback
-</del>
-<ins class="diff-chg">context
-</ins>
-</td>
-<td class="prmType">
-<code>
-<del class="diff-old">JSONLDProcessorCallback
-</del>
-<a>
-<ins class="diff-chg">object
-</ins>
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptTrue">
-✔
-</td>
-<td class="prmDesc">
-<ins class="diff-new">An
-external
-context
-to
-use
-additionally
-to
-the
-context
-embedded
-in
-</ins><code><ins class="diff-new">
-input
-</ins></code><ins class="diff-new">
-when
-expanding
-the
-</ins><code><ins class="diff-new">
-input
-</ins></code>.</td></tr></table><table class="exceptions"><tr><th><ins class="diff-new">
-Exception
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="excName"><a><ins class="diff-new">
-InvalidContext
-</ins></a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code><ins class="diff-new">
-INVALID_SYNTAX
-</ins></code></td><td class="excCodeDesc">
-A
-<del class="diff-old">callback
-that
-is
-called
-whenever
-a
-processing
-</del>
-<ins class="diff-chg">general
-syntax
-</ins>
-error
-<del class="diff-old">occurs
-on
-</del>
-<ins class="diff-chg">was
-detected
-in
-</ins>
-the
-<code>
-<del class="diff-old">input
-</del>
-<ins class="diff-chg">@context
-</ins>
-</code>.
-<ins class="diff-new">For
-example,
-if
-a
-</ins><code><ins class="diff-new">
-@coerce
-</ins></code><ins class="diff-new">
-key
-maps
-to
-anything
-other
-than
-a
-string
-or
-an
-array
-of
-strings,
-this
-exception
-would
-be
-raised.
-</ins></td></tr><tr><td class="excCodeName"><code><ins class="diff-new">
-MULTIPLE_DATATYPES
-</ins></code></td><td class="excCodeDesc"><ins class="diff-new">
-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.
-</ins>
-</td>
-</tr>
-</table>
-</td>
-<del class="diff-old">No
-exceptions.
-</del>
-</tr>
-</table>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-object
-</a>
-</code>
-</div>
-</dd>
-<dt id="widl-JsonLdProcessor-frame-object-object-input-object-frame-object-options">
-<code>
-frame
-</code>
-</dt>
-<dd>
-<a href="#framing">
-Frames
-</a>
-the
-given
-<code>
-input
-</code>
-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.
-<del class="diff-old">Exceptions
-</del>
-<ins class="diff-chg">If
-there
-</ins>
-are
-<ins class="diff-new">no
-matches
-for
-the
-frame,
-</ins><code><ins class="diff-new">
-null
-</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-returned.
-Exceptions
-</ins><em class="rfc2119" title="must"><ins class="diff-new">
-must
-</ins></em><ins class="diff-new">
-be
-</ins>
-thrown
-if
-there
-are
-errors.
-<del class="diff-old">Define
-what
-the
-exceptions
-are.
-We
-need
-to
-specify
-whether
-or
-not
-we
-want
-exceptions
-thrown,
-or
-errors
-returned
-to
-the
-error
-callback?
-</del>
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-input
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-object
-to
-perform
-framing
-on.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-frame
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-frame
-to
-use
-when
-re-arranging
-the
-data.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-options
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-A
-set
-of
-options
-that
-will
-affect
-the
-framing
-algorithm.
-</td>
-</tr>
-</table>
-<table class="exceptions">
-<tr>
-<del class="diff-old">callback
-</del>
-<th>
-<ins class="diff-chg">Exception
-</ins></th>
-<th>
-<ins class="diff-chg">Description
-</ins></th>
-</tr>
-<tr>
-<del class="diff-old">JSONLDProcessorCallback
-</del>
-<td class="excName">
-<a>
-<ins class="diff-new">InvalidFrame
-</ins>
-</a>
-</td>
-<td class="excDesc">
-<table class="exceptionCodes">
-<tr>
-<td class="excCodeName">
-<code>
-<ins class="diff-new">INVALID_SYNTAX
-</ins>
-</code>
-</td>
-<del class="diff-old">✔
-</del>
-<td class="excCodeDesc">
-<ins class="diff-chg">A
-frame
-must
-be
-either
-an
-object
-or
-an
-array
-of
-objects,
-if
-the
-frame
-is
-neither
-of
-these
-types,
-this
-exception
-is
-thrown.
-</ins>
-</td>
-<del class="diff-old">✔
-</del>
-</tr>
-<tr>
-<td class="excCodeName">
-<code>
-<ins class="diff-chg">MULTIPLE_EMBEDS
-</ins></code>
-</td>
-<td class="excCodeDesc">
-A
-<del class="diff-old">callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-</del>
-<ins class="diff-chg">subject
-IRI
-was
-specified
-in
-more
-than
-one
-place
-in
-</ins>
-the
-<del class="diff-old">given
-</del>
-input
-<del class="diff-old">.
-</del>
-<ins class="diff-chg">frame.
-More
-than
-one
-embed
-of
-a
-given
-subject
-IRI
-is
-not
-allowed,
-and
-if
-requested,
-</ins><em class="rfc2119" title="must"><ins class="diff-chg">
-must
-</ins></em><ins class="diff-chg">
-result
-in
-this
-exception.
-</ins>
-</td>
-</tr>
-</table>
-</td>
-<del class="diff-old">No
-exceptions.
-</del>
-</tr>
-</table>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-object
-</a>
-</code>
-</div>
-</dd>
-<dt id="widl-JsonLdProcessor-normalize-object-object-input-object-context">
-<code>
-normalize
-</code>
-</dt>
-<dd>
-<a href="#normalization">
-Normalizes
-</a>
-the
-given
-<code>
-input
-</code>
-according
-to
-the
-steps
-in
-the
-<a href="#normalization-algorithm">
-Normalization
-Algorithm
-</a>.
-The
-<code>
-input
-</code>
-<em class="rfc2119" title="must">
-must
-</em>
-be
-copied,
-normalized
-and
-returned
-if
-there
-are
-no
-errors.
-If
-the
-compaction
-fails,
-<code>
-null
-</code>
-<em class="rfc2119" title="must">
-must
-</em>
-be
-returned.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-input
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-object
-to
-perform
-normalization
-upon.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-<del class="diff-old">callback
-</del>
-<ins class="diff-chg">context
-</ins>
-</td>
-<td class="prmType">
-<code>
-<del class="diff-old">JSONLDProcessorCallback
-</del>
-<a>
-<ins class="diff-chg">object
-</ins>
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptTrue">
-✔
-</td>
-<td class="prmDesc">
-<ins class="diff-new">An
-external
-context
-to
-use
-additionally
-to
-the
-context
-embedded
-in
-</ins><code><ins class="diff-new">
-input
-</ins></code><ins class="diff-new">
-when
-expanding
-the
-</ins><code><ins class="diff-new">
-input
-</ins></code>.</td></tr></table><table class="exceptions"><tr><th><ins class="diff-new">
-Exception
-</ins></th><th><ins class="diff-new">
-Description
-</ins></th></tr><tr><td class="excName"><a><ins class="diff-new">
-InvalidContext
-</ins></a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code><ins class="diff-new">
-INVALID_SYNTAX
-</ins></code></td><td class="excCodeDesc">
-A
-<del class="diff-old">callback
-that
-</del>
-<ins class="diff-chg">general
-syntax
-error
-was
-detected
-in
-the
-</ins><code><ins class="diff-chg">
-@context
-</ins></code>.<ins class="diff-chg">
-For
-example,
-if
-a
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-key
-maps
-to
-anything
-other
-than
-a
-string
-or
-an
-array
-of
-strings,
-this
-exception
-would
-be
-raised.
-</ins></td></tr><tr><td class="excCodeName"><code><ins class="diff-chg">
-MULTIPLE_DATATYPES
-</ins></code></td><td class="excCodeDesc"><ins class="diff-chg">
-There
-</ins>
-is
-<del class="diff-old">called
-whenever
-</del>
-<ins class="diff-chg">more
-than
-one
-target
-datatype
-specified
-for
-</ins>
-a
-<del class="diff-old">processing
-error
-occurs
-on
-</del>
-<ins class="diff-chg">single
-property
-in
-</ins>
-the
-<del class="diff-old">given
-JSON-LD
-string.
-</del>
-<ins class="diff-chg">list
-of
-coercion
-rules.
-This
-means
-that
-the
-processor
-does
-not
-know
-what
-the
-developer
-intended
-for
-the
-target
-datatype
-for
-a
-property.
-</ins>
-</td>
-</tr>
-</table>
-</td>
-<del class="diff-old">No
-exceptions.
-</del>
-</tr>
-</table>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-object
-</a>
-</code>
-</div>
-</dd>
-<dt id="widl-JsonLdProcessor-triples-object-object-input-JsonLdTripleCallback-tripleCallback-object-context">
-<code>
-triples
-</code>
-</dt>
-<dd>
-Processes
-the
-<code>
-input
-</code>
-according
-to
-the
-<a href="#rdf-conversion-algorithm">
-RDF
-Conversion
-Algorithm
-</a>,
-calling
-the
-provided
-<code>
-tripleCallback
-</code>
-for
-each
-triple
-generated.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-input
-</td>
-<td class="prmType">
-<code>
-<a>
-object
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-JSON-LD
-object
-to
-process
-when
-outputting
-triples.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-tripleCallback
-</td>
-<td class="prmType">
-<code>
-<a href="#idl-def-JsonLdTripleCallback" class="idlType">
-<code>
-<del class="diff-old">JSONLDTripleCallback
-</del>
-<ins class="diff-chg">JsonLdTripleCallback
-</ins>
-</code>
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-the
-given
-<code>
-input
-</code>.
-<div class="issue">
-This
-callback
-should
-be
-aligned
-with
-the
-RDF
-API.
-</div>
-</td>
-</tr>
-<tr>
-<td class="prmName">
-<del class="diff-old">parserCallback
-</del>
-<ins class="diff-chg">context
-</ins>
-</td>
-<td class="prmType">
-<code>
-<del class="diff-old">JSONLDProcessorCallback
-</del>
-<a>
-<ins class="diff-chg">object
-</ins>
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptTrue">
-✔
-</td>
-<td class="prmDesc">
-<del class="diff-old">A
-callback
-that
-is
-called
-whenever
-a
-processing
-error
-occurs
-on
-</del>
-<ins class="diff-chg">An
-external
-context
-to
-use
-additionally
-to
-the
-context
-embedded
-in
-</ins><code><ins class="diff-chg">
-input
-</ins></code><ins class="diff-chg">
-when
-expanding
-</ins>
-the
-<del class="diff-old">given
-</del>
-<code>
-input
-</code>.
-</td>
-</tr>
-</table>
-<table class="exceptions">
-<del class="diff-old">No
-exceptions.
-</del>
-<tr>
-<th>
-<ins class="diff-chg">Exception
-</ins></th>
-<th>
-<ins class="diff-chg">Description
-</ins></th>
-<del class="diff-old">Return
-type:
-</del>
-</tr>
-<tr>
-<td class="excName">
-<a>
-<del class="diff-old">object
-</del>
-<ins class="diff-chg">InvalidContext
-</ins>
-</a>
-<del class="diff-old">5.2
-JSONLDProcessorCallback
-The
-JSONLDProcessorCallback
-is
-called
-whenever
-a
-processing
-error
-occurs
-while
-processing
-the
-JSON-LD
-input
-.
-]
-interface  {
-};
-</del>
-</td>
-<td class="excDesc">
-<del class="diff-old">5.2.1
-Methods
-</del>
-<table class="exceptionCodes">
-<tr>
-<td class="excCodeName">
-<code>
-<del class="diff-old">error
-</del>
-<ins class="diff-chg">INVALID_SYNTAX
-</ins>
-</code>
-</td>
-<del class="diff-old">This
-callback
-is
-invoked
-whenever
-an
-</del>
-<td class="excCodeDesc">
-<ins class="diff-chg">A
-general
-syntax
-</ins>
-error
-<del class="diff-old">occurs
-during
-processing.
-Parameter
-Type
-Nullable
-Optional
-Description
-</del>
-<ins class="diff-chg">was
-detected
-in
-the
-</ins><code><ins class="diff-chg">
-@context
-</ins></code>.<ins class="diff-chg">
-For
-example,
-if
-a
-</ins><code><ins class="diff-chg">
-@coerce
-</ins></code><ins class="diff-chg">
-key
-maps
-to
-anything
-other
-than
-a
-string
-or
-an
-array
-of
-strings,
-this
-exception
-would
-be
-raised.
-</ins></td>
-</tr>
-<tr>
-<del class="diff-old">error
-</del>
-<td class="excCodeName">
-<code>
-<del class="diff-old">DOMString
-</del>
-<ins class="diff-chg">MULTIPLE_DATATYPES
-</ins>
-</code>
-</td>
-<del class="diff-old">✘
-✘
-A
-descriptive
-error
-string
-returned
-by
-</del>
-<td class="excCodeDesc">
-<ins class="diff-chg">There
-is
-more
-than
-one
-target
-datatype
-specified
-for
-a
-single
-property
-in
-</ins>
-the
-<del class="diff-old">processor.
-</del>
-<ins class="diff-chg">list
-of
-coercion
-rules.
-This
-means
-that
-the
-processor
-does
-not
-know
-what
-the
-developer
-intended
-for
-the
-target
-datatype
-for
-a
-property.
-</ins>
-</td>
-</tr>
-</table>
-</td>
-<del class="diff-old">No
-exceptions.
-</del>
-</tr>
-</table>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-<del class="diff-old">void
-</del>
-<ins class="diff-chg">object
-</ins>
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-</div>
-<div id="jsonldtriplecallback" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">5.3
-</del>
-<ins class="diff-chg">5.2
-</ins>
-</span>
-<del class="diff-old">JSONLDTripleCallback
-</del>
-<ins class="diff-chg">JsonLdTripleCallback
-</ins>
-</h3>
-<p>
-The
-<del class="diff-old">JSONLDTripleCallback
-</del>
-<ins class="diff-chg">JsonLdTripleCallback
-</ins>
-is
-called
-whenever
-the
-processor
-generates
-a
-triple
-during
-the
-<code>
-triple()
-</code>
-call.
-</p>
-<pre class="idl">
-<del class="diff-old">]
-interface  {
-</del>
-<span class="idlInterface" id="idl-def-JsonLdTripleCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-<ins class="diff-chg">interface <span class="idlInterfaceID">JsonLdTripleCallback</span> {
-</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">triple</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">subject</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">objectType</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">object</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">datatype</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">language</span></span>);</span>
-};</span>
-</pre>
-<div id="methods-1" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">5.3.1
-</del>
-<ins class="diff-chg">5.2.1
-</ins>
-</span>
-Methods
-</h4>
-<dl class="methods">
-<dt id="widl-JsonLdTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">
-<code>
-triple
-</code>
-</dt>
-<dd>
-This
-callback
-is
-invoked
-whenever
-a
-triple
-is
-generated
-by
-the
-processor.
-<table class="parameters">
-<tr>
-<th>
-Parameter
-</th>
-<th>
-Type
-</th>
-<th>
-Nullable
-</th>
-<th>
-Optional
-</th>
-<th>
-Description
-</th>
-</tr>
-<tr>
-<td class="prmName">
-subject
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-subject
-IRI
-that
-is
-associated
-with
-the
-triple.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-property
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-property
-IRI
-that
-is
-associated
-with
-the
-triple.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-objectType
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-type
-of
-object
-that
-is
-associated
-with
-the
-triple.
-Valid
-values
-are
-<code>
-IRI
-</code>
-and
-<code>
-literal
-</code>.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-object
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullFalse">
-✘
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-object
-value
-associated
-with
-the
-subject
-and
-the
-property.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-datatype
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-datatype
-associated
-with
-the
-object.
-</td>
-</tr>
-<tr>
-<td class="prmName">
-language
-</td>
-<td class="prmType">
-<code>
-<a>
-DOMString
-</a>
-</code>
-</td>
-<td class="prmNullTrue">
-✔
-</td>
-<td class="prmOptFalse">
-✘
-</td>
-<td class="prmDesc">
-The
-language
-associated
-with
-the
-object
-in
-BCP47
-format.
-</td>
-</tr>
-</table>
-<div>
-<em>
-No
-exceptions.
-</em>
-</div>
-<div>
-<em>
-Return
-type:
-</em>
-<code>
-<a>
-void
-</a>
-</code>
-</div>
-</dd>
-</dl>
-</div>
-</div>
-</div>
-<div id="algorithms" class="section">
-<h2>
-<span class="secno">
-6.
-</span>
-Algorithms
-</h2>
-<p>
-All
-algorithms
-described
-in
-this
-section
-are
-intended
-to
-operate
-on
-language-native
-data
-structures.
-That
-is,
-the
-serialization
-to
-a
-text-based
-JSON
-document
-isn't
-required
-as
-input
-or
-output
-to
-any
-of
-these
-algorithms
-and
-language-native
-data
-structures
-<em class="rfc2119" title="must">
-must
-</em>
-be
-used
-where
-applicable.
-</p>
-<div id="syntax-tokens-and-keywords" class="section">
-<h3>
-<span class="secno">
-6.1
-</span>
-Syntax
-Tokens
-and
-Keywords
-</h3>
-<p>
-JSON-LD
-specifies
-a
-number
-of
-syntax
-tokens
-and
-keywords
-that
-are
-using
-in
-all
-algorithms
-described
-in
-this
-section:
-</p>
-<dl>
-<dt>
-<code>
-@context
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</dd>
-<dt>
-<code>
-@base
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-base
-IRI
-for
-all
-object
-IRIs
-affected
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</dd>
-<dt>
-<code>
-@vocab
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-base
-IRI
-for
-all
-property
-IRIs
-affected
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</dd>
-<dt>
-<code>
-@coerce
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-type
-coercion
-rules.
-</dd>
-<dt>
-<code>
-@literal
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-a
-literal
-value.
-</dd>
-<dt>
-<code>
-@iri
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-an
-IRI
-value.
-</dd>
-<dt>
-<code>
-@language
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-the
-language
-for
-a
-literal.
-</dd>
-<dt>
-<code>
-@datatype
-</code>
-</dt>
-<dd>
-Used
-to
-specify
-the
-datatype
-for
-a
-literal.
-</dd>
-<dt>
-<code>:
-</code>
-</dt>
-<dd>
-The
-separator
-for
-<del class="diff-old">CURIE
-s
-when
-used
-in
-</del>
-JSON
-keys
-<del class="diff-old">or
-JSON
-values.
-</del>
-<ins class="diff-chg">and
-values
-that
-use
-the
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-chg">
-prefix
-</ins></a><ins class="diff-chg">
-mechanism.
-</ins>
-</dd>
-<dt>
-<code>
-@subject
-</code>
-</dt>
-<dd>
-Sets
-the
-active
-subjects.
-</dd>
-<dt>
-<code>
-@type
-</code>
-</dt>
-<dd>
-Used
-to
-set
-the
-type
-of
-the
-active
-subjects.
-</dd>
-</dl>
-</div>
-<div id="algorithm-terms" class="section">
-<h3>
-<span class="secno">
-6.2
-</span>
-Algorithm
-Terms
-</h3>
-<dl>
-<dt>
-<dfn title="initial_context" id="dfn-initial_context">
-initial
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-specified
-to
-the
-algorithm
-before
-processing
-begins.
-</dd>
-<dt>
-<dfn title="active_subject" id="dfn-active_subject">
-active
-subject
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active_property" id="dfn-active_property">
-active
-property
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-property
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active_object" id="dfn-active_object">
-active
-object
-</dfn>
-</dt>
-<dd>
-the
-currently
-active
-object
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active_context" id="dfn-active_context">
-active
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-used
-to
-resolve
-<del class="diff-old">CURIE
-</del>
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-<ins class="diff-chg">prefix
-</ins></a><ins class="diff-chg">
-es
-and
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins>
-</a>
-s
-while
-the
-processing
-algorithm
-is
-running.
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-the
-context
-contained
-within
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</dd>
-<dt>
-<dfn title="local_context" id="dfn-local_context">
-local
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-that
-is
-specified
-within
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>,
-specified
-via
-the
-<code>
-@context
-</code>
-keyword.
-</dd>
-<dt>
-<dfn title="processor_state" id="dfn-processor_state">
-processor
-state
-</dfn>
-</dt>
-<dd>
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>,
-which
-includes
-the
-<a class="tref" title="active__context">
-active
-context
-</a>,
-<a class="tref" title="current_subject">
-current
-subject
-</a>,
-and
-<a class="tref" title="current_property">
-current
-property
-</a>.
-The
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-is
-managed
-as
-a
-stack
-with
-elements
-from
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copied
-into
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-when
-entering
-a
-new
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>.
-</dd>
-<dt>
-<dfn title="JSON-LD_input" id="dfn-json-ld_input">
-JSON-LD
-input
-</dfn>
-</dt>
-<dd>
-The
-JSON-LD
-data
-structure
-that
-is
-provided
-as
-input
-to
-the
-algorithm.
-</dd>
-<dt>
-<dfn title="JSON-LD_output" id="dfn-json-ld_output">
-JSON-LD
-output
-</dfn>
-</dt>
-<dd>
-The
-JSON-LD
-data
-structure
-that
-is
-produced
-as
-output
-by
-the
-algorithm.
-</dd>
-</dl>
-</div>
-<div id="context-1" class="section">
-<h3 id="context">
-<span class="secno">
-6.3
-</span>
-Context
-</h3>
-<p>
-Processing
-of
-JSON-LD
-data
-structure
-is
-managed
-recursively.
-During
-processing,
-each
-rule
-is
-applied
-using
-information
-provided
-by
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-Processing
-begins
-by
-pushing
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-onto
-the
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-stack
-and
-initializing
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-with
-the
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-initial
-context
-</a>.
-If
-a
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-encountered,
-information
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-merged
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</p>
-<p>
-The
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-is
-used
-for
-expanding
-keys
-and
-values
-of
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-(or
-elements
-of
-a
-list
-(see
-<span a="#list-processing">
-List
-Processing
-</span>
-)).
-</p>
-<p>
-A
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-is
-identified
-within
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-having
-a
-key
-of
-<code>
-@context
-</code>
-with
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-or
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-value.
-When
-processing
-a
-<a class="tref" title="local__context">
-local
-context
-</a>,
-special
-processing
-rules
-apply:
-</p>
-<ol class="algorithm">
-<li>
-Create
-a
-new,
-empty
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</li>
-<li>
-If
-the
-value
-is
-a
-simple
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-it
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-lexical
-form
-of
-IRI
-and
-used
-to
-initialize
-a
-new
-JSON
-document
-which
-replaces
-the
-value
-for
-subsequent
-processing.
-</li>
-<li>
-If
-the
-value
-is
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-has
-a
-<code>
-@base
-</code>
-key,
-it
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-simple
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-with
-the
-lexical
-form
-of
-an
-absolute
-IRI.
-Add
-the
-base
-mapping
-to
-the
-<a class="tref" title="local__context">
-local
-context
-</a>.
-<p class="issue">
-Turtle
-allows
-@base
-to
-be
-relative.
-If
-we
-did
-this,
-we
-would
-have
-to
-add
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>.
-</p>
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-has
-a
-<code>
-@vocab
-</code>
-key,
-it
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-simple
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-with
-the
-lexical
-form
-of
-an
-absolute
-IRI.
-Add
-the
-vocabulary
-mapping
-to
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-after
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-associated
-value.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-has
-a
-<code>
-@coerce
-</code>
-key,
-it
-<em class="rfc2119" title="must">
-must
-</em>
-have
-a
-value
-of
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>.
-Add
-the
-<code>
-@coerce
-</code>
-mapping
-to
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-associated
-value(s).
-</li>
-<li>
-Otherwise,
-the
-key
-<em class="rfc2119" title="must">
-must
-</em>
-have
-the
-lexical
-form
-of
-<cite>
-<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">
-NCName
-</a>
-</cite>
-and
-<em class="rfc2119" title="must">
-must
-</em>
-have
-the
-value
-of
-a
-simple
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-with
-the
-lexical
-form
-of
-IRI.
-Merge
-the
-key-value
-pair
-into
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Merge
-the
-of
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping
-as
-described
-<a href="#coerce">
-below
-</a>.
-</li>
-<li>
-Merge
-all
-entries
-other
-than
-the
-<code>
-@coerce
-</code>
-mapping
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-to
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-overwriting
-any
-duplicate
-values.
-</li>
-</ol>
-<div id="coerce" class="section">
-<h4>
-<span class="secno">
-6.3.1
-</span>
-Coerce
-</h4>
-<p>
-Map
-each
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping
-into
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping,
-overwriting
-any
-duplicate
-values
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-'s
-<code>
-@coerce
-</code>
-mapping.
-The
-<code>
-@coerce
-</code>
-mapping
-has
-either
-a
-single
-<del class="diff-old">CURIE
-</del>
-<code>
-<ins class="diff-chg">prefix:term
-</ins></code><ins class="diff-chg">
-value,
-a
-single
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins>
-</a>
-<ins class="diff-new">value
-</ins>
-or
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-of
-<del class="diff-old">CURIEs.
-</del>
-<code>
-<ins class="diff-chg">prefix:term
-</ins></code><ins class="diff-chg">
-or
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a><ins class="diff-chg">
-values.
-</ins>
-When
-merging
-with
-an
-existing
-mapping
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-map
-all
-<del class="diff-old">CURIE
-</del>
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-<ins class="diff-chg">prefix
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
-term
-</ins></a>
-values
-to
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-form
-and
-replace
-with
-the
-union
-of
-the
-value
-from
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-and
-the
-value
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-If
-the
-result
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-with
-a
-single
-<del class="diff-old">CURIE,
-</del>
-<ins class="diff-chg">value,
-</ins>
-the
-processor
-<em class="rfc2119" title="may">
-may
-</em>
-represent
-this
-as
-a
-string
-value.
-</p>
-</div>
-<div id="initial-context" class="section">
-<h4>
-<span class="secno">
-6.3.2
-</span>
-Initial
-Context
-</h4>
-<p>
-The
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-initial
-context
-</a>
-is
-initialized
-as
-follows:
-</p>
-<ul>
-<li>
-<code>
-@base
-</code>
-is
-set
-using
-<cite>
-<href="http: www.ietf.org="" rfc="" rfc2396.txt"="">
-section
-5.1
-Establishing
-a
-Base
-URI
-</href="http:>
-</cite>
-of
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
-RFC3986
-</a>
-</cite>
-].
-Processors
-<em class="rfc2119" title="may">
-may
-</em>
-provide
-a
-means
-of
-setting
-the
-base
-IRI
-programatically.
-</li>
-<li>
-<code>
-@coerce
-</code>
-is
-set
-with
-a
-single
-mapping
-from
-<code>
-@iri
-</code>
-to
-<code>
-@type
-</code>.
-</li>
-</ul>
-    <pre class="example">
-{
-    "@base": <span class="diff">document-location</span>,
-    "@context": {
-      "@iri": "@type"
-    }
-}
-</pre>
-</div>
-</div>
-<div id="iri-expansion" class="section">
-<h3>
-<span class="secno">
-6.4
-</span>
-IRI
-Expansion
-</h3>
-<p>
-Keys
-and
-some
-values
-are
-evaluated
-to
-produce
-an
-IRI.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-a
-value
-representing
-an
-IRI
-into
-an
-actual
-IRI.
-</p>
-<p>
-IRIs
-may
-be
-represented
-as
-an
-<del class="diff-old">explicit
-string,
-or
-as
-</del>
-<ins class="diff-chg">absolute
-IRI,
-</ins>
-a
-<del class="diff-old">CURIE
-</del>
-<a class="tref internalDFN" title="term" href="#dfn-term">
-<ins class="diff-chg">term
-</ins>
-</a>,
-<ins class="diff-new">a
-</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-new">
-prefix
-</ins></a>:<a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
-term
-</ins></a><ins class="diff-new">
-construct,
-or
-</ins>
-as
-a
-value
-relative
-to
-<code>
-@base
-</code>
-or
-<code>
-@vocab
-</code>.
-</p>
-<p>
-The
-algorithm
-for
-generating
-an
-IRI
-is:
-</p>
-<ol class="algorithm">
-<li>
-Split
-the
-value
-into
-a
-<em>
-prefix
-</em>
-and
-<em>
-suffix
-</em>
-from
-the
-first
-occurrence
-of
-':'.
-</li>
-<li>
-If
-the
-prefix
-is
-a
-'_'
-(underscore),
-the
-IRI
-is
-unchanged.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-contains
-a
-mapping
-for
-<em>
-prefix
-</em>,
-generate
-an
-IRI
-by
-prepending
-the
-mapped
-prefix
-to
-the
-(possibly
-empty)
-suffix
-using
-textual
-concatenation.
-Note
-that
-an
-empty
-suffix
-and
-no
-suffix
-(meaning
-the
-value
-contains
-no
-':'
-string
-at
-all)
-are
-treated
-equivalently.
-</li>
-<li>
-If
-the
-IRI
-being
-processed
-is
-for
-a
-property
-(i.e.,
-a
-<del class="diff-old">key
-</del>
-<ins class="diff-chg">key's
-</ins>
-value
-in
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>,
-or
-a
-value
-in
-a
-<code>
-@coerce
-</code>
-mapping)
-and
-the
-active
-context
-has
-a
-<code>
-@vocab
-</code>
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-textual
-concatenation.
-</li>
-<li>
-If
-the
-IRI
-being
-processed
-is
-for
-a
-subject
-or
-object
-(i.e.,
-not
-a
-property)
-and
-the
-active
-context
-has
-a
-<code>
-@base
-</code>
-mapping,
-join
-the
-mapped
-value
-to
-the
-suffix
-using
-the
-method
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
-RFC3986
-</a>
-</cite>
-].
-</li>
-<li>
-Otherwise,
-use
-the
-value
-directly
-as
-an
-IRI.
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="iri-compaction" class="section">
-<h3>
-<span class="secno">
-6.5
-</span>
-IRI
-Compaction
-</h3>
-<p>
-Some
-keys
-and
-values
-are
-expressed
-using
-IRIs.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-an
-IRI
-to
-a
-compact
-IRI
-using
-the
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-prefix
-</a>
-es
-specified
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>.
-</p>
-<p>
-The
-algorithm
-for
-generating
-a
-compacted
-IRI
-is:
-</p>
-<ol class="algorithm">
-<li>
-Search
-every
-key-value
-pair
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-for
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-that
-is
-a
-complete
-match
-against
-the
-IRI.
-If
-a
-complete
-match
-is
-found,
-the
-resulting
-compacted
-IRI
-is
-the
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-associated
-with
-the
-IRI
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>.
-</li>
-<li>
-If
-a
-complete
-match
-is
-not
-found,
-search
-for
-a
-partial
-match
-from
-the
-beginning
-of
-the
-IRI.
-For
-all
-matches
-that
-are
-found,
-the
-resulting
-compacted
-IRI
-is
-the
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-prefix
-</a>
-associated
-with
-the
-partially
-matched
-IRI
-in
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-concatenated
-with
-a
-colon
-(:)
-character
-and
-the
-unmatched
-part
-of
-the
-string.
-If
-there
-is
-more
-than
-one
-compacted
-IRI
-produced,
-the
-final
-value
-is
-the
-<ins class="diff-new">shortest
-and
-</ins>
-lexicographically
-least
-value
-of
-the
-entire
-set
-of
-compacted
-IRIs.
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="value-expansion" class="section">
-<h3>
-<span class="secno">
-6.6
-</span>
-Value
-Expansion
-</h3>
-<p>
-Some
-values
-in
-JSON-LD
-can
-be
-expressed
-in
-a
-compact
-form.
-These
-values
-are
-required
-to
-be
-expanded
-at
-times
-when
-processing
-JSON-LD
-documents.
-</p>
-<p>
-The
-algorithm
-for
-expanding
-a
-value
-is:
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-key
-that
-is
-associated
-with
-the
-value
-has
-an
-associated
-coercion
-entry
-in
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>,
-the
-resulting
-expansion
-is
-an
-object
-populated
-according
-to
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-coercion
-target
-is
-<code>
-@iri
-</code>,
-expand
-the
-value
-by
-adding
-a
-new
-key-value
-pair
-where
-the
-key
-is
-<code>
-@iri
-</code>
-and
-the
-value
-is
-the
-expanded
-IRI
-according
-to
-the
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-rules.
-</li>
-<li>
-If
-the
-coercion
-target
-is
-a
-typed
-literal,
-expand
-the
-value
-by
-adding
-two
-new
-key-value
-pairs.
-The
-first
-key-value
-pair
-will
-be
-<code>
-@literal
-</code>
-and
-the
-unexpanded
-value.
-The
-second
-key-value
-pair
-will
-be
-<code>
-@datatype
-</code>
-and
-the
-associated
-coercion
-datatype
-expanded
-according
-to
-the
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-rules.
-</li>
-</ol>
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="value-compaction" class="section">
-<h3>
-<span class="secno">
-6.7
-</span>
-Value
-Compaction
-</h3>
-<p>
-Some
-values,
-such
-as
-IRIs
-and
-typed
-literals,
-may
-be
-expressed
-in
-an
-expanded
-form
-in
-JSON-LD.
-These
-values
-are
-required
-to
-be
-compacted
-at
-times
-when
-processing
-JSON-LD
-documents.
-</p>
-<p>
-The
-algorithm
-for
-compacting
-a
-value
-is:
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-contains
-a
-coercion
-target
-for
-the
-key
-that
-is
-associated
-with
-the
-value,
-compact
-the
-value
-using
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-coercion
-target
-is
-an
-<code>
-@iri
-</code>,
-the
-compacted
-value
-is
-the
-value
-associated
-with
-the
-<code>
-@iri
-</code>
-key,
-processed
-according
-to
-the
-<a href="#iri-compaction">
-IRI
-Compaction
-</a>
-steps.
-</li>
-<li>
-If
-the
-coercion
-target
-is
-a
-typed
-literal,
-the
-compacted
-value
-is
-the
-value
-associated
-with
-the
-<code>
-@literal
-</code>
-key.
-</li>
-<li>
-Otherwise,
-the
-value
-is
-not
-modified.
-</li>
-</ol>
-</li>
-</ol>
-<p>
-</p>
-</div>
-<div id="expansion-1" class="section">
-<h3>
-<span class="secno">
-6.8
-</span>
-Expansion
-</h3>
-<p class="issue">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</p>
-<p>
-As
-stated
-previously,
-expansion
-is
-the
-process
-of
-taking
-a
-JSON-LD
-input
-and
-expanding
-all
-IRIs
-and
-typed
-literals
-to
-their
-fully-expanded
-form.
-The
-output
-will
-not
-contain
-a
-single
-context
-declaration
-and
-will
-have
-all
-IRIs
-and
-typed
-literals
-fully
-expanded.
-</p>
-<div id="expansion-algorithm" class="section">
-<h4>
-<span class="secno">
-6.8.1
-</span>
-Expansion
-Algorithm
-</h4>
-<ol class="algorithm">
-<li>
-If
-the
-top-level
-item
-in
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-process
-each
-item
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-recursively
-using
-this
-algorithm.
-</li>
-<li>
-If
-the
-top-level
-item
-in
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-is
-an
-object,
-update
-the
-<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
-local
-context
-</a>
-according
-to
-the
-steps
-outlined
-in
-the
-<a href="#context">
-context
-</a>
-section.
-Process
-each
-key,
-expanding
-the
-key
-according
-to
-the
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-rules.
-</li>
-<ol class="algorithm">
-<li>
-Process
-each
-value
-associated
-with
-each
-<del class="diff-old">key
-</del>
-<ins class="diff-chg">key:
-</ins>
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-process
-each
-item
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-recursively
-using
-this
-algorithm.
-</li>
-<li>
-If
-the
-value
-is
-an
-object,
-process
-the
-object
-recursively
-using
-this
-algorithm.
-</li>
-<li>
-Otherwise,
-check
-to
-see
-the
-associated
-key
-has
-an
-associated
-coercion
-rule.
-If
-the
-value
-should
-be
-coerced,
-expand
-the
-value
-according
-to
-the
-<a href="#value-expansion">
-Value
-Expansion
-</a>
-rules.
-If
-the
-value
-does
-not
-need
-to
-be
-coerced,
-leave
-the
-value
-as-is.
-</li>
-</ol>
-</li>
-<li>
-Remove
-the
-context
-from
-the
-<del class="diff-old">object
-</del>
-<ins class="diff-chg">object.
-</ins>
-</li>
-</ol>
-</ol>
-</div>
-</div>
-<div id="compaction-1" class="section">
-<h3>
-<span class="secno">
-6.9
-</span>
-Compaction
-</h3>
-<p class="issue">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</p>
-<p>
-As
-stated
-previously,
-compaction
-is
-the
-process
-of
-taking
-a
-JSON-LD
-input
-and
-compacting
-all
-IRIs
-using
-a
-given
-context.
-The
-output
-will
-contain
-a
-single
-top-level
-context
-declaration
-and
-will
-only
-use
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-s
-and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
-prefix
-</a>
-es
-and
-will
-ensure
-that
-all
-typed
-literals
-are
-fully
-compacted.
-</p>
-<div id="compaction-algorithm" class="section">
-<h4>
-<span class="secno">
-6.9.1
-</span>
-Compaction
-Algorithm
-</h4>
-<ol class="algorithm">
-<li>
-Perform
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>
-on
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>.
-<ins class="diff-new">This
-removes
-any
-existing
-context
-to
-allow
-the
-given
-context
-to
-be
-cleanly
-applied.
-</ins></li><li><ins class="diff-new">
-Set
-the
-</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
-active
-context
-</ins></a><ins class="diff-new">
-to
-the
-given
-context.
-</ins>
-</li>
-<li>
-If
-the
-top-level
-item
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-process
-each
-item
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-recursively,
-starting
-at
-this
-step.
-</li>
-<li>
-If
-the
-top-level
-item
-is
-an
-object,
-compress
-each
-key
-using
-the
-steps
-defined
-in
-<a href="#iri-compaction">
-IRI
-Compaction
-</a>
-and
-compress
-each
-value
-using
-the
-steps
-defined
-in
-<a href="#value-compaction">
-Value
-Compaction
-</a>.
-</li>
-</ol>
-</div>
-</div>
-<div id="framing-1" class="section">
-<h3>
-<span class="secno">
-6.10
-</span>
-Framing
-</h3>
-<p class="issue">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</p>
-<p>
-A
-JSON-LD
-document
-is
-a
-representation
-of
-a
-directed
-graph.
-A
-single
-directed
-graph
-can
-have
-many
-different
-serializations,
-each
-expressing
-exactly
-the
-same
-information.
-Developers
-typically
-don't
-work
-directly
-with
-graphs,
-but
-rather,
-prefer
-trees
-when
-dealing
-with
-JSON.
-While
-mapping
-a
-graph
-to
-a
-tree
-can
-be
-done,
-the
-layout
-of
-the
-end
-result
-must
-be
-specified
-in
-advance.
-This
-section
-defines
-an
-algorithm
-for
-mapping
-a
-graph
-to
-a
-tree
-given
-a
-<a class="tref internalDFN" title="frame" href="#dfn-frame">
-frame
-</a>.
-</p>
-<div id="framing-algorithm-terms" class="section">
-<h4>
-<span class="secno">
-6.10.1
-</span>
-Framing
-Algorithm
-Terms
-</h4>
-<dl>
-<dt>
-<dfn title="input_frame" id="dfn-input_frame">
-input
-frame
-</dfn>
-</dt>
-<dd>
-the
-initial
-<a class="tref internalDFN" title="frame" href="#dfn-frame">
-frame
-</a>
-provided
-to
-the
-framing
-algorithm.
-</dd>
-<dt>
-<dfn title="framing_context" id="dfn-framing_context">
-framing
-context
-</dfn>
-</dt>
-<dd>
-a
-context
-containing
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>,
-the
-<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</a>
-and
-the
-<a class="tref" title="omit_default_flag">
-omit
-default
-flag
-</a>.
-</dd>
-<dt>
-<dfn title="object_embed_flag" id="dfn-object_embed_flag">
-object
-embed
-flag
-</dfn>
-</dt>
-<dd>
-a
-flag
-specifying
-that
-objects
-should
-be
-directly
-embedded
-in
-the
-output,
-instead
-of
-being
-referred
-to
-by
-their
-IRI.
-</dd>
-<dt>
-<dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</dfn>
-</dt>
-<dd>
-a
-flag
-specifying
-that
-for
-properties
-to
-be
-included
-in
-the
-output,
-they
-must
-be
-explicitly
-declared
-in
-the
-<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
-framing
-context
-</a>.
-</dd>
-<dt>
-<dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</dfn>
-</dt>
-<dd>
-a
-flag
-specifying
-that
-properties
-that
-are
-missing
-from
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-should
-be
-omitted
-from
-the
-output.
-</dd>
-<dt>
-<dfn title="match_limit" id="dfn-match_limit">
-match
-limit
-</dfn>
-</dt>
-<dd>
-A
-value
-specifying
-the
-maximum
-number
-of
-matches
-to
-accept
-when
-building
-arrays
-of
-values
-during
-the
-framing
-algorithm.
-A
-value
-of
--1
-specifies
-that
-there
-is
-no
-match
-limit.
-</dd>
-<dt>
-<dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">
-map
-of
-embedded
-subjects
-</dfn>
-</dt>
-<dd>
-A
-map
-that
-tracks
-if
-a
-subject
-has
-been
-embedded
-in
-the
-output
-of
-the
-<a href="#framing-algorithm">
-Framing
-Algorithm
-</a>.
-</dd>
-</dl>
-</div>
-<div id="framing-algorithm" class="section">
-<h4>
-<span class="secno">
-6.10.2
-</span>
-Framing
-Algorithm
-</h4>
-<p>
-The
-framing
-algorithm
-takes
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-that
-has
-been
-normalized
-according
-to
-the
-<a href="#normalization-algorithm">
-Normalization
-Algorithm
-</a>
-(
-<strong>
-normalized
-input
-</strong>
-),
-an
-<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
-input
-frame
-</a>
-that
-has
-been
-expanded
-according
-to
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>
-(
-<strong>
-expanded
-frame
-</strong>
-),
-and
-a
-number
-of
-options
-and
-produces
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>.
-The
-following
-series
-of
-steps
-is
-the
-recursive
-portion
-of
-the
-framing
-algorithm:
-</p>
-<ol class="algorithm">
-<li>
-Initialize
-the
-<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
-framing
-context
-</a>
-by
-setting
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>,
-clearing
-the
-<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</a>,
-and
-clearing
-the
-<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</a>.
-Override
-these
-values
-based
-on
-input
-options
-provided
-to
-the
-algorithm
-by
-the
-application.
-</li>
-<li>
-Generate
-a
-<dfn title="list_of_frames" id="dfn-list_of_frames">
-list
-of
-frames
-</dfn>
-by
-processing
-the
-<strong>
-expanded
-frame
-</strong>:
-<ol class="algorithm">
-<li>
-If
-the
-<strong>
-expanded
-frame
-</strong>
-is
-not
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-set
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-to
-1,
-place
-the
-<strong>
-expanded
-frame
-</strong>
-into
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>,
-and
-set
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-to
-<code>
-null
-</code>.
-</li>
-<li>
-If
-the
-<strong>
-expanded
-frame
-</strong>
-is
-an
-empty
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-place
-an
-empty
-object
-into
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>,
-set
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-to
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-and
-set
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-to
--1.
-</li>
-<li>
-If
-the
-<strong>
-expanded
-frame
-</strong>
-is
-a
-non-empty
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-add
-each
-item
-in
-the
-<strong>
-expanded
-frame
-</strong>
-into
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>,
-set
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-to
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-and
-set
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-to
--1.
-</li>
-</ol>
-</li>
-<li>
-Create
-a
-<dfn title="match_array" id="dfn-match_array">
-match
-array
-</dfn>
-for
-each
-<strong>
-expanded
-frame
-</strong>
-in
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>
-halting
-when
-either
-the
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-is
-zero
-or
-the
-end
-of
-the
-<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
-list
-of
-frames
-</a>
-is
-reached.
-If
-an
-<strong>
-expanded
-frame
-</strong>
-is
-not
-an
-object,
-the
-processor
-<em class="rfc2119" title="must">
-must
-</em>
-throw
-a
-<code>
-Invalid
-Frame
-Format
-</code>
-exception.
-Add
-each
-matching
-item
-from
-the
-<strong>
-normalized
-input
-</strong>
-to
-the
-<a class="tref" title="matches_array">
-matches
-array
-</a>
-and
-decrement
-the
-<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
-match
-limit
-</a>
-by
-1
-if:
-<ol class="algorithm">
-<li>
-The
-<strong>
-expanded
-frame
-</strong>
-has
-an
-<code>
-rdf:type
-</code>
-that
-exists
-in
-the
-item's
-list
-of
-<code>
-rdf:type
-</code>
-s.
-Note:
-the
-<code>
-rdf:type
-</code>
-can
-be
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-but
-only
-one
-value
-needs
-to
-be
-in
-common
-between
-the
-item
-and
-the
-<strong>
-expanded
-frame
-</strong>
-for
-a
-match.
-</li>
-<li>
-The
-<strong>
-expanded
-frame
-</strong>
-does
-not
-have
-an
-<code>
-rdf:type
-</code>
-property,
-but
-every
-property
-in
-the
-<strong>
-expanded
-frame
-</strong>
-exists
-in
-the
-item.
-</li>
-</ol>
-</li>
-<li>
-Process
-each
-item
-in
-the
-<a class="tref internalDFN" title="match_array" href="#dfn-match_array">
-match
-array
-</a>
-with
-its
-associated
-<dfn title="match_frame" id="dfn-match_frame">
-match
-frame
-</dfn>:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-contains
-an
-<code>
-@embed
-</code>
-keyword,
-set
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>
-to
-its
-value.
-If
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-contains
-an
-<code>
-@explicit
-</code>
-keyword,
-set
-the
-<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</a>
-to
-its
-value.
-Note:
-if
-the
-keyword
-exists,
-but
-the
-value
-is
-neither
-<code>
-true
-</code>
-or
-<code>
-false
-</code>,
-set
-the
-associated
-flag
-to
-<code>
-true
-</code>.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>
-is
-cleared
-and
-the
-item
-has
-the
-<code>
-@subject
-</code>
-property,
-replace
-the
-item
-with
-the
-value
-of
-the
-<code>
-@subject
-</code>
-property.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>
-is
-set
-and
-the
-item
-has
-the
-<code>
-@subject
-</code>
-property,
-and
-its
-IRI
-is
-in
-the
-<a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">
-map
-of
-embedded
-subjects
-</a>,
-throw
-a
-<code>
-Duplicate
-Embed
-</code>
-exception.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
-object
-embed
-flag
-</a>
-is
-set
-and
-the
-item
-has
-the
-<code>
-@subject
-</code>
-property
-and
-its
-IRI
-is
-not
-in
-the
-<a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">
-map
-of
-embedded
-subjects
-</a>:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
-explicit
-inclusion
-flag
-</a>
-is
-set,
-then
-delete
-any
-key
-from
-the
-item
-that
-does
-not
-exist
-in
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>,
-except
-<code>
-@subject
-</code>.
-</li>
-<li>
-For
-each
-key
-in
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>,
-except
-for
-keywords
-and
-<code>
-rdf:type
-</code>:
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-in
-the
-item,
-then
-build
-a
-new
-<dfn title="recursion_input_list" id="dfn-recursion_input_list">
-recursion
-input
-list
-</dfn>
-using
-the
-object
-or
-objects
-associated
-with
-the
-key.
-If
-any
-object
-contains
-an
-<code>
-@iri
-</code>
-value
-that
-exists
-in
-the
-<a class="tref" title="normalized_input">
-normalized
-input
-</a>,
-replace
-the
-object
-in
-the
-<a class="tref" title="recusion_input_list">
-recusion
-input
-list
-</a>
-with
-a
-new
-object
-containing
-the
-<code>
-@subject
-</code>
-key
-where
-the
-value
-is
-the
-value
-of
-the
-<code>
-@iri
-</code>,
-and
-all
-of
-the
-other
-key-value
-pairs
-for
-that
-subject.
-Set
-the
-<dfn title="recursion_match_frame" id="dfn-recursion_match_frame">
-recursion
-match
-frame
-</dfn>
-to
-the
-value
-associated
-with
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-'s
-key.
-Replace
-the
-value
-associated
-with
-the
-key
-by
-recursively
-calling
-this
-algorithm
-using
-<a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">
-recursion
-input
-list
-</a>,
-<a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">
-recursion
-match
-frame
-</a>
-as
-input.
-</li>
-<li>
-If
-the
-key
-is
-not
-in
-the
-item,
-add
-the
-key
-to
-the
-item
-and
-set
-the
-associated
-value
-to
-an
-empty
-array
-if
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-key's
-value
-is
-an
-array
-or
-<code>
-null
-</code>
-otherwise.
-</li>
-<li>
-If
-value
-associated
-with
-the
-item's
-key
-is
-<code>
-null
-</code>,
-process
-the
-<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</a>:
-<ol class="algorithm">
-<li>
-If
-the
-value
-associated
-with
-the
-key
-in
-the
-<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
-match
-frame
-</a>
-is
-an
-array,
-use
-the
-first
-frame
-from
-the
-array
-as
-the
-<dfn title="property_frame" id="dfn-property_frame">
-property
-frame
-</dfn>,
-otherwise
-set
-the
-<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
-property
-frame
-</a>
-to
-an
-empty
-object.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
-property
-frame
-</a>
-contains
-an
-<code>
-@omitDefault
-</code>
-keyword,
-set
-the
-<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</a>
-to
-its
-value.
-Note:
-if
-the
-keyword
-exists,
-but
-the
-value
-is
-neither
-<code>
-true
-</code>
-or
-<code>
-false
-</code>,
-set
-the
-associated
-flag
-to
-<code>
-true
-</code>.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
-omit
-missing
-properties
-flag
-</a>
-is
-set,
-delete
-the
-key
-in
-the
-item.
-Otherwise,
-if
-the
-<code>
-@default
-</code>
-keyword
-is
-set
-in
-the
-<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
-property
-frame
-</a>
-set
-the
-item's
-value
-to
-the
-value
-of
-<code>
-@default
-</code>.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-is
-<code>
-null
-</code>
-set
-it
-to
-the
-item,
-otherwise,
-append
-the
-item
-to
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Return
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>.
-</li>
-</ol>
-The
-final,
-non-recursive
-step
-of
-the
-framing
-algorithm
-requires
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>
-to
-be
-compacted
-according
-to
-the
-<a href="#compaction-algorithm">
-Compaction
-Algorithm
-</a>
-by
-using
-the
-context
-provided
-in
-the
-<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
-input
-frame
-</a>.
-The
-resulting
-value
-is
-the
-final
-output
-of
-the
-compaction
-algorithm
-and
-is
-what
-should
-be
-returned
-to
-the
-application.
-</div>
-</div>
-<div id="normalization-1" class="section">
-<h3>
-<span class="secno">
-6.11
-</span>
-Normalization
-</h3>
-<p class="issue">
-This
-algorithm
-is
-a
-work
-in
-progress,
-do
-not
-implement
-it.
-</p>
-<p>
-Normalization
-is
-the
-process
-of
-taking
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-and
-performing
-a
-deterministic
-transformation
-on
-that
-input
-that
-results
-in
-all
-aspects
-of
-the
-graph
-being
-fully
-expanded
-and
-named
-in
-the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
-JSON-LD
-output
-</a>.
-The
-normalized
-output
-is
-generated
-in
-such
-a
-way
-that
-any
-conforming
-JSON-LD
-processor
-will
-generate
-identical
-output
-given
-the
-same
-input.
-The
-problem
-is
-a
-fairly
-difficult
-technical
-problem
-to
-solve
-because
-it
-requires
-a
-directed
-graph
-to
-be
-ordered
-into
-a
-set
-of
-nodes
-and
-edges
-in
-a
-deterministic
-way.
-This
-is
-easy
-to
-do
-when
-all
-of
-the
-nodes
-have
-unique
-names,
-but
-very
-difficult
-to
-do
-when
-some
-of
-the
-nodes
-are
-not
-labeled.
-</p>
-<p>
-In
-time,
-there
-may
-be
-more
-than
-one
-normalization
-algorithm
-that
-will
-need
-to
-be
-identified.
-For
-identification
-purposes,
-this
-algorithm
-is
-named
-<abbr title="Universal Graph Normalization Algorithm 2011">
-UGNA2011
-</abbr>.
-</p>
-<div id="normalization-algorithm-terms" class="section">
-<h4>
-<span class="secno">
-6.11.1
-</span>
-Normalization
-Algorithm
-Terms
-</h4>
-<dl>
-<dt>
-<dfn title="label" id="dfn-label">
-label
-</dfn>
-</dt>
-<dd>
-The
-subject
-IRI
-associated
-with
-a
-graph
-node.
-The
-subject
-IRI
-is
-expressed
-using
-a
-key-value
-pair
-in
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-where
-the
-key
-is
-<code>
-@subject
-</code>
-and
-the
-value
-is
-a
-string
-that
-is
-an
-IRI
-or
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-containing
-the
-key
-<code>
-@iri
-</code>
-and
-a
-value
-that
-is
-a
-string
-that
-is
-an
-IRI.
-</dd>
-<dt>
-<dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">
-list
-of
-expanded
-nodes
-</dfn>
-</dt>
-<dd>
-A
-list
-of
-all
-nodes
-in
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-graph
-containing
-no
-embedded
-objects
-and
-having
-all
-keys
-and
-values
-expanded
-according
-to
-the
-steps
-in
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>.
-</dd>
-<dt>
-<dfn title="alpha" id="dfn-alpha">
-alpha
-</dfn>
-and
-<dfn title="beta" id="dfn-beta">
-beta
-</dfn>
-values
-</dt>
-<dd>
-The
-words
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-and
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-refer
-to
-the
-first
-and
-second
-nodes
-or
-values
-being
-examined
-in
-an
-algorithm.
-The
-names
-are
-merely
-used
-to
-refer
-to
-each
-input
-value
-to
-a
-comparison
-algorithm.
-</dd>
-<dt>
-<dfn title="renaming_counter" id="dfn-renaming_counter">
-renaming
-counter
-</dfn>
-</dt>
-<dd>
-A
-counter
-that
-is
-used
-during
-the
-<a href="#node-relabeling-algorithm">
-Node
-Relabeling
-Algorithm
-</a>.
-The
-counter
-typically
-starts
-at
-one
-(1)
-and
-counts
-up
-for
-every
-node
-that
-is
-relabeled.
-There
-will
-be
-two
-such
-renaming
-counters
-in
-an
-implementation
-of
-the
-normalization
-algorithm.
-The
-first
-is
-the
-<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
-labeling
-counter
-</a>
-and
-the
-second
-is
-the
-<a class="tref" title="deterministic_labeling_counter">
-deterministic
-labeling
-counter
-</a>.
-</dd>
-<dt>
-<dfn title="serialization_label" id="dfn-serialization_label">
-serialization
-label
-</dfn>
-</dt>
-<dd>
-An
-identifier
-that
-is
-created
-to
-aid
-in
-the
-normalization
-process
-in
-the
-<a href="#deep-comparison-algorithm">
-Deep
-Comparison
-Algorithm
-</a>.
-The
-value
-typically
-takes
-the
-form
-of
-<code>
-s
-<NUMBER>
-</code>
-or
-<code>
-c
-<NUMBER>
-</code>.
-</dd>
-</dl>
-</div>
-<div id="normalization-state" class="section">
-<h4>
-<span class="secno">
-6.11.2
-</span>
-Normalization
-State
-</h4>
-<p>
-When
-performing
-the
-steps
-required
-by
-the
-normalization
-algorithm,
-it
-is
-helpful
-to
-track
-the
-many
-pieces
-of
-information
-in
-a
-data
-structure
-called
-the
-<dfn title="normalization_state" id="dfn-normalization_state">
-normalization
-state
-</dfn>.
-Many
-of
-these
-pieces
-simply
-provide
-indexes
-into
-the
-graph.
-The
-information
-contained
-in
-the
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
-normalization
-state
-</a>
-is
-described
-below.
-</p>
-<dl>
-<dt>
-<dfn title="node_state" id="dfn-node_state">
-node
-state
-</dfn>
-</dt>
-<dd>
-Each
-node
-in
-the
-graph
-will
-be
-assigned
-a
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>.
-This
-state
-contains
-the
-information
-necessary
-to
-deterministically
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-all
-nodes
-in
-the
-graph.
-A
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>
-includes:
-<dl>
-<dt>
-<dfn title="node_reference" id="dfn-node_reference">
-node
-reference
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-is
-a
-reference
-to
-a
-node
-in
-the
-graph.
-For
-a
-given
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>,
-its
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-refers
-to
-the
-node
-that
-the
-state
-is
-for.
-When
-a
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>
-is
-created,
-its
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-should
-be
-to
-the
-node
-it
-is
-created
-for.
-</dd>
-<dt>
-<dfn title="outgoing_list" id="dfn-outgoing_list">
-outgoing
-list
-</dfn>
-</dt>
-<dd>
-Lists
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-s
-for
-all
-nodes
-that
-are
-properties
-of
-the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>.
-This
-list
-should
-be
-initialized
-by
-iterating
-over
-every
-object
-associated
-with
-a
-property
-in
-the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-adding
-its
-label
-if
-it
-is
-another
-node.
-</dd>
-<dt>
-<dfn title="incoming_list" id="dfn-incoming_list">
-incoming
-list
-</dfn>
-</dt>
-<dd>
-Lists
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-s
-for
-all
-nodes
-in
-the
-graph
-for
-which
-the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-is
-a
-property.
-This
-list
-is
-initialized
-to
-an
-empty
-list.
-</dd>
-<dt>
-<dfn title="outgoing_serialization_map" id="dfn-outgoing_serialization_map">
-outgoing
-serialization
-map
-</dfn>
-</dt>
-<dd>
-Maps
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-s
-to
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-s.
-This
-map
-is
-initialized
-to
-an
-empty
-map.
-When
-this
-map
-is
-populated,
-it
-will
-be
-filled
-with
-keys
-that
-are
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-s
-of
-every
-node
-in
-the
-graph
-with
-a
-label
-that
-begins
-with
-<code>
-_:
-</code>
-and
-that
-has
-a
-path,
-via
-properties,
-that
-starts
-with
-the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>.
-</dd>
-<dt>
-<dfn title="outgoing_serialization" id="dfn-outgoing_serialization">
-outgoing
-serialization
-</dfn>
-</dt>
-<dd>
-A
-string
-that
-can
-be
-lexicographically
-compared
-to
-the
-<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
-outgoing
-serialization
-</a>
-s
-of
-other
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>
-s.
-It
-is
-a
-representation
-of
-the
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-outgoing
-serialization
-map
-</a>
-and
-other
-related
-information.
-This
-string
-is
-initialized
-to
-an
-empty
-string.
-</dd>
-<dt>
-<dfn title="incoming_serialization_map" id="dfn-incoming_serialization_map">
-incoming
-serialization
-map
-</dfn>
-</dt>
-<dd>
-Maps
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-s
-to
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-s.
-This
-map
-is
-initialized
-to
-an
-empty
-map.
-When
-this
-map
-is
-populated,
-it
-will
-be
-filled
-with
-keys
-that
-are
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-s
-of
-every
-node
-in
-the
-graph
-with
-a
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-that
-begins
-with
-<code>
-_:
-</code>
-and
-that
-has
-a
-path,
-via
-properties,
-that
-ends
-with
-the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>.
-</dd>
-<dt>
-<dfn title="incoming_serialization" id="dfn-incoming_serialization">
-incoming
-serialization
-</dfn>
-</dt>
-<dd>
-A
-string
-that
-can
-be
-lexicographically
-compared
-to
-the
-<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
-outgoing
-serialization
-</a>
-s
-of
-other
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>
-s.
-It
-is
-a
-representation
-of
-the
-<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
-incoming
-serialization
-map
-</a>
-and
-other
-related
-information.
-This
-string
-is
-initialized
-to
-an
-empty
-string.
-</dd>
-</dl>
-</dd>
-<dt>
-<dfn title="node_state_map" id="dfn-node_state_map">
-node
-state
-map
-</dfn>
-</dt>
-<dd>
-A
-mapping
-from
-a
-node's
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-to
-a
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>.
-It
-is
-initialized
-to
-an
-empty
-map.
-</dd>
-<dt>
-<dfn title="labeling_prefix" id="dfn-labeling_prefix">
-labeling
-prefix
-</dfn>
-</dt>
-<dd>
-The
-labeling
-prefix
-is
-a
-string
-that
-is
-used
-as
-the
-beginning
-of
-a
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>.
-It
-should
-be
-initialized
-to
-a
-random
-base
-string
-that
-starts
-with
-the
-characters
-<code>
-_:
-</code>,
-is
-not
-used
-by
-any
-other
-node's
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-in
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>,
-and
-does
-not
-start
-with
-the
-characters
-<code>
-_:c14n
-</code>.
-The
-prefix
-has
-two
-uses.
-First
-it
-is
-used
-to
-temporarily
-name
-nodes
-during
-the
-normalization
-algorithm
-in
-a
-way
-that
-doesn't
-collide
-with
-the
-names
-that
-already
-exist
-as
-well
-as
-the
-names
-that
-will
-be
-generated
-by
-the
-normalization
-algorithm.
-Second,
-it
-will
-eventually
-be
-set
-to
-<code>
-_:c14n
-</code>
-to
-generate
-the
-final,
-deterministic
-labels
-for
-nodes
-in
-the
-graph.
-This
-prefix
-will
-be
-concatenated
-with
-the
-<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
-labeling
-counter
-</a>
-to
-produce
-a
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>.
-For
-example,
-<code>
-_:j8r3k
-</code>
-is
-a
-proper
-initial
-value
-for
-the
-<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
-labeling
-prefix
-</a>.
-</dd>
-<dt>
-<dfn title="labeling_counter" id="dfn-labeling_counter">
-labeling
-counter
-</dfn>
-</dt>
-<dd>
-A
-counter
-that
-is
-used
-to
-label
-nodes.
-It
-is
-appended
-to
-the
-<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
-labeling
-prefix
-</a>
-to
-create
-a
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>.
-It
-is
-initialized
-to
-<code>
-1
-</code>.
-</dd>
-<dt>
-<dfn title="map_of_flattened_nodes" id="dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</dfn>
-</dt>
-<dd>
-A
-map
-containing
-a
-representation
-of
-all
-nodes
-in
-the
-graph
-where
-the
-key
-is
-a
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-and
-the
-value
-is
-a
-single
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-that
-has
-no
-nested
-sub-objects
-and
-has
-had
-all
-properties
-for
-the
-same
-node
-merged
-into
-a
-single
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>.
-</dd>
-</dl>
-</div>
-<div id="normalization-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.3
-</span>
-Normalization
-Algorithm
-</h4>
-<p>
-The
-normalization
-algorithm
-expands
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>,
-flattens
-the
-data
-structure,
-and
-creates
-an
-initial
-set
-of
-names
-for
-all
-nodes
-in
-the
-graph.
-The
-flattened
-data
-structure
-is
-then
-processed
-by
-a
-node
-labeling
-algorithm
-in
-order
-to
-get
-a
-fully
-expanded
-and
-named
-list
-of
-nodes
-which
-is
-then
-sorted.
-The
-result
-is
-a
-deterministically
-named
-and
-ordered
-list
-of
-graph
-nodes.
-</p>
-<ol class="algorithm">
-<li>
-Expand
-the
-<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
-JSON-LD
-input
-</a>
-according
-to
-the
-steps
-in
-the
-<a href="#expansion-algorithm">
-Expansion
-Algorithm
-</a>
-and
-store
-the
-result
-as
-the
-<strong>
-expanded
-input
-</strong>.
-</li>
-<li>
-Create
-a
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
-normalization
-state
-</a>.
-</li>
-<li>
-Initialize
-the
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</a>
-by
-recursively
-processing
-every
-<dfn title="expanded_node" id="dfn-expanded_node">
-expanded
-node
-</dfn>
-in
-the
-<strong>
-expanded
-input
-</strong>
-in
-depth-first
-order:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>
-is
-an
-unlabeled
-node,
-add
-a
-new
-key-value
-pair
-to
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>
-where
-the
-key
-is
-<code>
-@subject
-</code>
-and
-the
-value
-is
-the
-concatenation
-of
-the
-<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
-labeling
-prefix
-</a>
-and
-the
-string
-value
-of
-the
-<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
-labeling
-counter
-</a>.
-Increment
-the
-<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
-labeling
-counter
-</a>.
-</li>
-<li>
-Add
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>
-to
-the
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</a>:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>
-'s
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-is
-already
-in
-the
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</a>
-merge
-all
-properties
-from
-the
-entry
-in
-the
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</a>
-into
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>.
-</li>
-<li>
-Go
-through
-every
-property
-associated
-with
-an
-array
-in
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>
-and
-remove
-any
-duplicate
-IRI
-entries
-from
-the
-array.
-If
-the
-resulting
-array
-only
-has
-one
-IRI
-entry,
-change
-it
-from
-an
-array
-to
-an
-object.
-</li>
-<li>
-Set
-the
-entry
-for
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>
-'s
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-in
-the
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</a>
-to
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>.
-</li>
-</ol>
-</li>
-<li>
-After
-exiting
-the
-recursive
-step,
-replace
-the
-reference
-to
-the
-<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
-expanded
-node
-</a>
-with
-an
-object
-containing
-a
-single
-key-value
-pair
-where
-the
-key
-is
-<code>
-@iri
-</code>
-and
-the
-value
-is
-the
-value
-of
-the
-<code>
-@subject
-</code>
-key
-in
-the
-node.
-</li>
-</ol>
-</li>
-<li>
-For
-every
-entry
-in
-the
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</a>,
-insert
-a
-key-value
-pair
-into
-the
-<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
-node
-state
-map
-</a>
-where
-the
-key
-is
-the
-key
-from
-the
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</a>
-and
-the
-value
-is
-a
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>
-where
-its
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-refers
-to
-the
-value
-from
-the
-<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
-map
-of
-flattened
-nodes
-</a>.
-</li>
-<li>
-Populate
-the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-list
-</a>
-for
-each
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>
-by
-iterating
-over
-every
-node
-in
-the
-graph
-and
-adding
-its
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-to
-the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-list
-</a>
-associated
-with
-each
-node
-found
-in
-its
-properties.
-</li>
-<li>
-For
-every
-entry
-in
-the
-<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
-node
-state
-map
-</a>
-that
-has
-a
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-that
-begins
-with
-<code>
-_:c14n
-</code>,
-relabel
-the
-node
-using
-the
-<a href="#node-relabeling-algorithm">
-Node
-Relabeling
-Algorithm
-</a>.
-</li>
-<li>
-Label
-all
-of
-the
-nodes
-that
-contain
-a
-<code>
-@subject
-</code>
-key
-associated
-with
-a
-value
-starting
-with
-<code>
-_:
-</code>
-according
-to
-the
-steps
-in
-the
-<a href="#deterministic-labeling-algorithm">
-Deterministic
-Labeling
-Algorithm
-</a>.
-</li>
-</ol>
-</div>
-<div id="node-relabeling-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.4
-</span>
-Node
-Relabeling
-Algorithm
-</h4>
-<p>
-This
-algorithm
-renames
-a
-node
-by
-generating
-a
-unique
-<dfn title="new_label" id="dfn-new_label">
-new
-label
-</dfn>
-and
-updating
-all
-references
-to
-that
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-in
-the
-<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
-node
-state
-map
-</a>.
-The
-<dfn title="old_label" id="dfn-old_label">
-old
-label
-</dfn>
-and
-the
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
-normalization
-state
-</a>
-must
-be
-given
-as
-an
-input
-to
-the
-algorithm.
-The
-<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
-old
-label
-</a>
-is
-the
-current
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-of
-the
-node
-that
-is
-to
-be
-relabeled.
-</p>
-<p>
-The
-node
-relabeling
-algorithm
-is
-as
-follows:
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
-labeling
-prefix
-</a>
-is
-<code>
-_:c14n
-</code>
-and
-the
-<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
-old
-label
-</a>
-begins
-with
-<code>
-_:c14n
-</code>
-then
-return
-as
-the
-node
-has
-already
-been
-renamed.
-</li>
-<li>
-Generate
-the
-<dfn title="new_label" id="dfn-new_label-1">
-new
-label
-</dfn>
-by
-concatenating
-the
-<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
-labeling
-prefix
-</a>
-with
-the
-string
-value
-of
-the
-<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
-labeling
-counter
-</a>.
-Increment
-the
-<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
-labeling
-counter
-</a>.
-</li>
-<li>
-For
-the
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>
-associated
-with
-the
-<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
-old
-label
-</a>,
-update
-every
-node
-in
-the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-list
-</a>
-by
-changing
-all
-the
-properties
-that
-reference
-the
-<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
-old
-label
-</a>
-to
-the
-<a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">
-new
-label
-</a>.
-</li>
-<li>
-Change
-the
-<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
-old
-label
-</a>
-key
-in
-the
-<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
-node
-state
-map
-</a>
-to
-the
-<a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">
-new
-label
-</a>
-and
-set
-the
-associated
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-'s
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-to
-the
-<a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">
-new
-label
-</a>.
-</li>
-</ol>
-</div>
-<div id="deterministic-labeling-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.5
-</span>
-Deterministic
-Labeling
-Algorithm
-</h4>
-<p>
-The
-deterministic
-labeling
-algorithm
-takes
-the
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
-normalization
-state
-</a>
-and
-produces
-a
-<dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes">
-list
-of
-finished
-nodes
-</dfn>
-that
-is
-sorted
-and
-contains
-deterministically
-named
-and
-expanded
-nodes
-from
-the
-graph.
-</p>
-<ol class="algorithm">
-<li>
-Set
-the
-<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
-labeling
-prefix
-</a>
-to
-<code>
-_:c14n
-</code>,
-the
-<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
-labeling
-counter
-</a>
-to
-<code>
-1
-</code>,
-the
-<dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes-1">
-list
-of
-finished
-nodes
-</dfn>
-to
-an
-empty
-array,
-and
-create
-an
-empty
-array,
-the
-<dfn title="list_of_unfinished_nodes" id="dfn-list_of_unfinished_nodes">
-list
-of
-unfinished
-nodes
-</dfn>.
-</li>
-<li>
-For
-each
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-in
-the
-<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
-node
-state
-map
-</a>:
-<ol class="algorithm">
-<li>
-If
-the
-node's
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-does
-not
-start
-with
-<code>
-_:
-</code>
-then
-put
-the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-in
-the
-<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
-list
-of
-finished
-nodes
-</a>.
-</li>
-<li>
-If
-the
-node's
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-does
-start
-with
-<code>
-_:
-</code>
-then
-put
-the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>
-in
-the
-<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
-list
-of
-unfinished
-nodes
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Append
-to
-the
-<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
-list
-of
-finished
-nodes
-</a>
-by
-processing
-the
-remainder
-of
-the
-<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
-list
-of
-unfinished
-nodes
-</a>
-until
-it
-is
-empty:
-<ol class="algorithm">
-<li>
-Sort
-the
-<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
-list
-of
-unfinished
-nodes
-</a>
-in
-descending
-order
-according
-to
-the
-<a href="#deep-comparison-algorithm">
-Deep
-Comparison
-Algorithm
-</a>
-to
-determine
-the
-sort
-order.
-</li>
-<li>
-Create
-a
-<dfn title="list_of_labels" id="dfn-list_of_labels">
-list
-of
-labels
-</dfn>
-and
-initialize
-it
-to
-an
-empty
-array.
-</li>
-<li>
-For
-the
-first
-node
-from
-the
-<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
-list
-of
-unfinished
-nodes
-</a>:
-<ol class="algorithm">
-<li>
-Add
-its
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-to
-the
-<a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">
-list
-of
-labels
-</a>.
-</li>
-<li>
-For
-each
-key-value
-pair
-from
-its
-associated
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-outgoing
-serialization
-map
-</a>,
-add
-the
-key
-to
-a
-list
-and
-then
-sort
-the
-list
-according
-to
-the
-lexicographical
-order
-of
-the
-keys'
-associated
-values.
-Append
-the
-list
-to
-the
-<a class="tref" title="list_of_nodes_to_label">
-list
-of
-nodes
-to
-label
-</a>.
-</li>
-<li>
-For
-each
-key-value
-pair
-from
-its
-associated
-<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
-incoming
-serialization
-map
-</a>,
-add
-the
-key
-to
-a
-list
-and
-then
-sort
-the
-list
-according
-to
-the
-lexicographical
-order
-of
-the
-keys'
-associated
-values.
-Append
-the
-list
-to
-the
-<a class="tref" title="list_of_nodes_to_label">
-list
-of
-nodes
-to
-label
-</a>.
-</li>
-</ol>
-</li>
-<li>
-For
-each
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-in
-the
-<a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">
-list
-of
-labels
-</a>,
-relabel
-the
-associated
-node
-according
-to
-the
-<a href="#node-relabeling-algorithm">
-Node
-Relabeling
-Algorithm
-</a>.
-If
-any
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-outgoing
-serialization
-map
-</a>
-contains
-a
-key
-that
-matches
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>,
-clear
-the
-map
-and
-set
-the
-associated
-<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
-outgoing
-serialization
-</a>
-to
-an
-empty
-string.
-If
-any
-<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
-incoming
-serialization
-map
-</a>
-contains
-a
-key
-that
-matches
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>,
-clear
-the
-map
-and
-set
-the
-associated
-<a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">
-incoming
-serialization
-</a>
-to
-an
-empty
-string.
-</li>
-<li>
-Remove
-each
-node
-with
-a
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-that
-starts
-with
-<code>
-_:c14n
-</code>
-from
-the
-<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
-list
-of
-unfinished
-nodes
-</a>
-and
-add
-it
-to
-the
-<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
-list
-of
-finished
-nodes
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Sort
-the
-<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
-list
-of
-finished
-nodes
-</a>
-in
-descending
-order
-according
-to
-the
-<a href="#deep-comparison-algorithm">
-Deep
-Comparison
-Algorithm
-</a>
-to
-determine
-the
-sort
-order.
-</li>
-</ol>
-</div>
-<div id="shallow-comparison-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.6
-</span>
-Shallow
-Comparison
-Algorithm
-</h4>
-<p>
-The
-shallow
-comparison
-algorithm
-takes
-two
-unlabeled
-nodes,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-and
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>,
-as
-input
-and
-determines
-which
-one
-should
-come
-first
-in
-a
-sorted
-list.
-The
-following
-algorithm
-determines
-the
-steps
-that
-are
-executed
-in
-order
-to
-determine
-the
-node
-that
-should
-come
-first
-in
-a
-list:
-</p>
-<ol class="algorithm">
-<li>
-Compare
-the
-total
-number
-of
-node
-properties.
-The
-node
-with
-fewer
-properties
-is
-first.
-</li>
-<li>
-Lexicographically
-sort
-the
-property
-IRIs
-for
-each
-node
-and
-compare
-the
-sorted
-lists.
-If
-an
-IRI
-is
-found
-to
-be
-lexicographically
-smaller,
-the
-node
-containing
-that
-IRI
-is
-first.
-</li>
-<li>
-Compare
-the
-<del class="diff-old">property
-</del>
-values
-<ins class="diff-new">of
-each
-property
-</ins>
-against
-one
-another:
-<ol class="algorithm">
-<li>
-<ins class="diff-new">The
-node
-associated
-with
-fewer
-property
-values
-is
-first.
-</ins></li><li>
-Create
-an
-<dfn title="alpha_list" id="dfn-alpha_list">
-alpha
-list
-</dfn>
-by
-adding
-all
-values
-associated
-with
-the
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-property
-that
-<del class="diff-old">is
-not
-an
-unlabeled
-node.
-Track
-the
-number
-of
-unlabeled
-nodes
-</del>
-<ins class="diff-chg">are
-</ins>
-not
-<del class="diff-old">added
-to
-the
-list
-using
-an
-alpha
-</del>
-unlabeled
-<del class="diff-old">counter
-.
-</del>
-<ins class="diff-chg">nodes.
-</ins>
-</li>
-<li>
-Create
-a
-<dfn title="beta_list" id="dfn-beta_list">
-beta
-list
-</dfn>
-by
-adding
-all
-values
-associated
-with
-the
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-property
-that
-is
-not
-an
-unlabeled
-node.
-<del class="diff-old">Track
-the
-number
-of
-unlabeled
-nodes
-not
-added
-to
-the
-list
-using
-an
-beta
-unlabeled
-counter
-.
-</del>
-</li>
-<li>
-Compare
-the
-length
-of
-<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
-alpha
-list
-</a>
-and
-<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
-beta
-list
-</a>.
-The
-node
-associated
-with
-the
-list
-containing
-the
-<del class="diff-old">lesser
-</del>
-<ins class="diff-chg">fewer
-</ins>
-number
-of
-items
-is
-first.
-</li>
-<li>
-<del class="diff-old">Compare
-the
-alpha
-unlabeled
-counter
-to
-the
-beta
-unlabeled
-counter
-,
-the
-node
-associated
-with
-the
-lesser
-value
-is
-first.
-</del>
-Sort
-<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
-alpha
-list
-</a>
-and
-<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
-beta
-list
-</a>
-according
-to
-the
-<a href="#object-comparison-algorithm">
-Object
-Comparison
-Algorithm
-<del class="diff-old">as
-the
-sorting
-comparator.
-</del>
-</a>.
-For
-each
-offset
-into
-the
-<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
-alpha
-list
-</a>,
-compare
-the
-item
-at
-the
-offset
-against
-the
-item
-at
-the
-same
-offset
-in
-the
-<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
-beta
-list
-</a>
-according
-to
-the
-<a href="#object-comparison-algorithm">
-Object
-Comparison
-Algorithm
-</a>.
-The
-node
-associated
-with
-the
-lesser
-item
-is
-first.
-</li>
-</ol>
-</li>
-<li>
-Process
-the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-list
-</a>
-s
-associated
-with
-each
-node
-to
-determine
-order:
-<ol class="algorithm">
-<li>
-The
-node
-with
-the
-shortest
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-list
-</a>
-is
-first.
-</li>
-<li>
-Sort
-the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-list
-</a>
-s
-according
-to
-incoming
-property
-and
-then
-incoming
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>.
-</li>
-<li>
-The
-node
-associated
-with
-the
-<del class="diff-old">least
-</del>
-<ins class="diff-chg">fewest
-</ins>
-number
-of
-incoming
-<del class="diff-old">unlabeled
-</del>
-nodes
-is
-first.
-</li>
-<li>
-For
-each
-offset
-into
-the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-list
-</a>
-s,
-compare
-the
-associated
-properties
-and
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-<del class="diff-old">s.
-</del>
-<ins class="diff-chg">s:
-</ins><ol class="algorithm"><li><ins class="diff-chg">
-The
-node
-associated
-with
-a
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-that
-does
-not
-begin
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code><ins class="diff-chg">
-is
-first.
-</ins></li><li><ins class="diff-chg">
-If
-the
-nodes'
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-do
-not
-begin
-with
-</ins><code><ins class="diff-chg">
-_:
-</ins></code>,<ins class="diff-chg">
-then
-the
-node
-associated
-with
-the
-lexicographically
-lesser
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-is
-first.
-</ins></li><li>
-The
-node
-associated
-with
-the
-lexicographically
-lesser
-associated
-property
-is
-first.
-</li>
-<li>
-<ins class="diff-new">The
-node
-with
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-that
-does
-not
-begin
-with
-</ins><code><ins class="diff-new">
-_:c14n
-</ins></code><ins class="diff-new">
-is
-first.
-</ins></li><li>
-The
-node
-<del class="diff-old">associated
-</del>
-with
-the
-lexicographically
-lesser
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-is
-first.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-<li>
-Otherwise,
-the
-nodes
-are
-equivalent.
-</li>
-</ol>
-</div>
-<div id="object-comparison-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.7
-</span>
-Object
-Comparison
-Algorithm
-</h4>
-<p>
-The
-object
-comparison
-algorithm
-is
-designed
-to
-compare
-two
-graph
-node
-property
-values,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-and
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>,
-against
-the
-other.
-The
-algorithm
-is
-useful
-when
-sorting
-two
-lists
-of
-graph
-node
-properties.
-</p>
-<ol class="algorithm">
-<li>
-If
-one
-of
-the
-values
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-and
-the
-other
-is
-not,
-the
-value
-that
-is
-a
-string
-is
-first.
-</li>
-<li>
-If
-both
-values
-are
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-s,
-the
-lexicographically
-lesser
-string
-is
-first.
-</li>
-<li>
-If
-one
-of
-the
-values
-is
-a
-literal
-and
-the
-other
-is
-not,
-the
-value
-that
-is
-a
-literal
-is
-first.
-</li>
-<li>
-If
-both
-values
-are
-<del class="diff-old">literals
-</del>
-<ins class="diff-chg">literals:
-</ins>
-<ol class="algorithm">
-<li>
-The
-lexicographically
-lesser
-string
-associated
-with
-<code>
-@literal
-</code>
-is
-first.
-</li>
-<li>
-The
-lexicographically
-lesser
-string
-associated
-with
-<code>
-@datatype
-</code>
-is
-first.
-</li>
-<li>
-The
-lexicographically
-lesser
-string
-associated
-with
-<code>
-@language
-</code>
-is
-first.
-</li>
-</ol>
-</li>
-<li>
-If
-both
-values
-are
-expanded
-IRIs,
-the
-lexicographically
-lesser
-string
-associated
-with
-<code>
-@iri
-</code>
-is
-first.
-</li>
-<li>
-Otherwise,
-the
-two
-values
-are
-equivalent.
-</li>
-</ol>
-</div>
-<div id="deep-comparison-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.8
-</span>
-Deep
-Comparison
-Algorithm
-</h4>
-<p>
-The
-deep
-comparison
-algorithm
-is
-used
-to
-compare
-the
-difference
-between
-two
-nodes,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-and
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>.
-A
-deep
-comparison
-takes
-the
-incoming
-and
-outgoing
-node
-edges
-in
-a
-graph
-into
-account
-if
-the
-number
-of
-properties
-and
-value
-of
-those
-properties
-are
-identical.
-The
-algorithm
-is
-helpful
-when
-sorting
-a
-list
-of
-nodes
-and
-will
-return
-whichever
-node
-should
-be
-placed
-first
-in
-a
-list
-if
-the
-two
-nodes
-are
-not
-truly
-equivalent.
-</p>
-<p>
-When
-performing
-the
-steps
-required
-by
-the
-deep
-comparison
-algorithm,
-it
-is
-helpful
-to
-track
-state
-information
-about
-mappings.
-The
-information
-contained
-in
-a
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-mapping
-state
-</a>
-is
-described
-below.
-</p>
-<dl class="algorithm">
-<dt>
-<dfn title="mapping_state" id="dfn-mapping_state">
-mapping
-state
-</dfn>
-</dt>
-<dd>
-<dl>
-<dt>
-<dfn title="mapping_counter" id="dfn-mapping_counter">
-mapping
-counter
-</dfn>
-</dt>
-<dd>
-Keeps
-track
-of
-the
-number
-of
-nodes
-that
-have
-been
-mapped
-to
-<a class="tref" title="serialization_labels">
-serialization
-labels
-</a>.
-It
-is
-initialized
-to
-<code>
-1
-</code>.
-</dd>
-<dt>
-<dfn title="processed_labels_map" id="dfn-processed_labels_map">
-processed
-labels
-map
-</dfn>
-</dt>
-<dd>
-Keeps
-track
-of
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-s
-of
-nodes
-that
-have
-already
-been
-assigned
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-s.
-It
-is
-initialized
-to
-an
-empty
-map.
-</dd>
-<dt>
-<dfn title="serialized_labels_map" id="dfn-serialized_labels_map">
-serialized
-labels
-map
-</dfn>
-</dt>
-<dd>
-Maps
-a
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-to
-its
-associated
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>.
-It
-is
-initialized
-to
-an
-empty
-map.
-</dd>
-<dt>
-<dfn title="adjacent_info_map" id="dfn-adjacent_info_map">
-adjacent
-info
-map
-</dfn>
-</dt>
-<dd>
-Maps
-a
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-to
-the
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-associated
-with
-it,
-the
-list
-of
-sorted
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-s
-for
-adjacent
-nodes,
-and
-the
-map
-of
-adjacent
-node
-<a class="tref" title="serialiation_label">
-serialiation
-label
-</a>
-s
-to
-their
-associated
-node
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-s.
-It
-is
-initialized
-to
-an
-empty
-map.
-</dd>
-<dt>
-<dfn title="key_stack" id="dfn-key_stack">
-key
-stack
-</dfn>
-</dt>
-<dd>
-A
-stack
-where
-each
-element
-contains
-an
-array
-of
-adjacent
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-s
-and
-an
-index
-into
-that
-array.
-It
-is
-initialized
-to
-a
-stack
-containing
-a
-single
-element
-where
-its
-array
-contains
-a
-single
-string
-element
-<code>
-s1
-</code>
-and
-its
-index
-is
-set
-to
-<code>
-0
-</code>.
-</dd>
-<dt>
-<dfn title="serialized_keys" id="dfn-serialized_keys">
-serialized
-keys
-</dfn>
-</dt>
-<dd>
-Keeps
-track
-of
-which
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-s
-have
-already
-been
-written
-at
-least
-once
-to
-the
-<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
-serialization
-string
-</a>.
-It
-is
-initialized
-to
-an
-empty
-map.
-</dd>
-<dt>
-<dfn title="serialization_string" id="dfn-serialization_string">
-serialization
-string
-</dfn>
-</dt>
-<dd>
-A
-string
-that
-is
-incrementally
-updated
-as
-a
-serialization
-is
-built.
-It
-is
-initialized
-to
-an
-empty
-string.
-</dd>
-</dl>
-</dd>
-</dl>
-<p>
-The
-deep
-comparison
-algorithm
-is
-as
-follows:
-</p>
-<ol class="algorithm">
-<li>
-Perform
-a
-comparison
-between
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-and
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-according
-to
-the
-<a href="#shallow-comparison-algorithm">
-Shallow
-Comparison
-Algorithm
-</a>.
-If
-the
-result
-does
-not
-show
-that
-the
-two
-nodes
-are
-equivalent,
-return
-the
-result.
-</li>
-<li>
-Compare
-incoming
-and
-outgoing
-edges
-for
-each
-node,
-updating
-their
-associated
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>
-as
-each
-node
-is
-processed:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-outgoing
-serialization
-map
-</a>
-for
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-is
-empty,
-generate
-the
-serialization
-according
-to
-the
-<a href="#node-serialization-algorithm">
-Node
-Serialization
-Algorithm
-</a>.
-Provide
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-'s
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>,
-a
-new
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-mapping
-state
-</a>,
-<code>
-outgoing
-direction
-</code>
-to
-the
-algorithm
-as
-inputs.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-outgoing
-serialization
-map
-</a>
-for
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-is
-empty,
-generate
-the
-serialization
-according
-to
-the
-<a href="#node-serialization-algorithm">
-Node
-Serialization
-Algorithm
-</a>.
-Provide
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-'s
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>,
-a
-new
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-mapping
-state
-</a>,
-and
-<code>
-outgoing
-direction
-</code>
-to
-the
-algorithm
-as
-inputs.
-</li>
-<li>
-If
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-'s
-<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
-outgoing
-serialization
-</a>
-is
-lexicographically
-less
-than
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-'s,
-then
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-is
-first.
-If
-it
-is
-greater,
-then
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-is
-first.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
-incoming
-serialization
-map
-</a>
-for
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-is
-empty,
-generate
-the
-serialization
-according
-to
-the
-<a href="#node-serialization-algorithm">
-Node
-Serialization
-Algorithm
-</a>.
-Provide
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-'s
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>,
-a
-new
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-mapping
-state
-</a>
-with
-its
-<a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">
-serialized
-labels
-map
-</a>
-set
-to
-a
-copy
-of
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-'s
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-outgoing
-serialization
-map
-</a>,
-and
-<code>
-incoming
-direction
-</code>
-to
-the
-algorithm
-as
-inputs.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
-incoming
-serialization
-map
-</a>
-for
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-is
-empty,
-generate
-the
-serialization
-according
-to
-the
-<a href="#node-serialization-algorithm">
-Node
-Serialization
-Algorithm
-</a>.
-Provide
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-'s
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>,
-a
-new
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-mapping
-state
-</a>
-with
-its
-<a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">
-serialized
-labels
-map
-</a>
-set
-to
-a
-copy
-of
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-'s
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-outgoing
-serialization
-map
-</a>,
-and
-<code>
-incoming
-direction
-</code>
-to
-the
-algorithm
-as
-inputs.
-</li>
-<li>
-If
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-'s
-<a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">
-incoming
-serialization
-</a>
-is
-lexicographically
-less
-than
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-'s,
-then
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
-alpha
-</a>
-is
-first.
-If
-it
-is
-greater,
-then
-<a class="tref internalDFN" title="beta" href="#dfn-beta">
-beta
-</a>
-is
-first.
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<div id="node-serialization-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.9
-</span>
-Node
-Serialization
-Algorithm
-</h4>
-<p>
-The
-node
-serialization
-algorithm
-takes
-a
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-node
-state
-</a>,
-a
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-mapping
-state
-</a>,
-and
-a
-<dfn title="direction" id="dfn-direction">
-direction
-</dfn>
-(either
-<code>
-outgoing
-direction
-</code>
-or
-<code>
-incoming
-direction
-</code>
-)
-as
-inputs
-and
-generates
-a
-deterministic
-serialization
-for
-the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-node
-reference
-</a>.
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-exists
-in
-the
-<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">
-processed
-labels
-map
-</a>,
-terminate
-the
-algorithm
-as
-the
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-has
-already
-been
-created.
-</li>
-<li>
-Set
-the
-value
-associated
-with
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-in
-the
-<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">
-processed
-labels
-map
-</a>
-to
-<code>
-true
-</code>.
-</li>
-<li>
-Generate
-the
-next
-<dfn title="serialization_label" id="dfn-serialization_label-1">
-serialization
-label
-</dfn>
-for
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-according
-to
-the
-<a href="#serialization-label-generation-algorithm">
-Serialization
-Label
-Generation
-Algorithm
-</a>.
-</li>
-<li>
-Create
-an
-empty
-<ins class="diff-new">map
-called
-the
-</ins><dfn title="adjacent_serialized_labels_map" id="dfn-adjacent_serialized_labels_map"><ins class="diff-new">
-adjacent
-serialized
-labels
-map
-</ins></dfn><ins class="diff-new">
-that
-will
-store
-mappings
-from
-</ins><a class="tref" title="serialized_label"><ins class="diff-new">
-serialized
-label
-</ins></a><ins class="diff-new">
-s
-to
-adjacent
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a><ins class="diff-new">
-s.
-</ins></li><li><ins class="diff-new">
-Create
-an
-empty
-</ins>
-array
-called
-the
-<del class="diff-old">list
-of
-</del>
-<dfn title="adjacent_unserialized_labels_list" id="dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-</ins>
-unserialized
-labels
-<del class="diff-old">.
-</del>
-<ins class="diff-chg">list
-</ins></dfn><ins class="diff-chg">
-that
-will
-store
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-s
-of
-adjacent
-nodes
-that
-haven't
-been
-assigned
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a><ins class="diff-chg">
-s
-yet.
-</ins>
-</li>
-<li>
-For
-every
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-in
-a
-list,
-where
-the
-list
-the
-<a class="tref internalDFN" title="outgoing_list" href="#dfn-outgoing_list">
-outgoing
-list
-</a>
-if
-the
-<a class="tref internalDFN" title="direction" href="#dfn-direction">
-direction
-</a>
-is
-<code>
-outgoing
-direction
-</code>
-and
-the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-list
-</a>
-otherwise,
-if
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-starts
-with
-<code>
-_:
-</code>,
-it
-is
-the
-<dfn title="target_node_label" id="dfn-target_node_label">
-target
-node
-label
-</dfn>:
-<ol class="algorithm">
-<li>
-Look
-up
-the
-<a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">
-target
-node
-label
-</a>
-in
-the
-<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">
-processed
-labels
-map
-</a>
-and
-if
-a
-mapping
-exists,
-update
-the
-<a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">
-<ins class="diff-chg">adjacent
-</ins>
-serialized
-labels
-map
-</a>
-where
-the
-key
-is
-the
-value
-in
-the
-<a class="tref" title="serialization_map">
-serialization
-map
-</a>
-and
-the
-value
-is
-the
-<a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">
-target
-node
-label
-</a>.
-</li>
-<li>
-Otherwise,
-add
-the
-<a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">
-target
-node
-label
-</a>
-to
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-</ins>
-unserialized
-labels
-<ins class="diff-new">list
-</ins>
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Set
-the
-<dfn title="maximum_serialization_combinations" id="dfn-maximum_serialization_combinations">
-maximum
-serialization
-combinations
-</dfn>
-to
-<code>
-1
-</code>
-or
-the
-length
-of
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-</ins>
-unserialized
-labels
-<ins class="diff-new">list
-</ins>
-</a>,
-whichever
-is
-greater.
-</li>
-<li>
-While
-the
-<a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">
-maximum
-serialization
-combinations
-</a>
-is
-greater
-than
-<code>
-0
-</code>,
-perform
-the
-<a href="#combinatorial-serialization-algorithm">
-Combinatorial
-Serialization
-Algorithm
-</a>
-<ins class="diff-new">passing
-the
-</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-new">
-node
-state
-</ins></a>,<ins class="diff-new">
-the
-</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-new">
-mapping
-state
-</ins></a><ins class="diff-new">
-for
-the
-first
-iteration
-</ins>
-and
-<del class="diff-old">decrement
-</del>
-<ins class="diff-chg">a
-copy
-of
-it
-for
-each
-subsequent
-iteration,
-the
-generated
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a>,<ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="direction" href="#dfn-direction"><ins class="diff-chg">
-direction
-</ins></a>,<ins class="diff-chg">
-the
-</ins><a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map"><ins class="diff-chg">
-adjacent
-serialized
-labels
-map
-</ins></a>,<ins class="diff-chg">
-and
-the
-</ins><a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list"><ins class="diff-chg">
-adjacent
-unserialized
-labels
-list
-</ins></a>.<ins class="diff-chg">
-Decrement
-</ins>
-the
-<a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">
-maximum
-serialization
-combinations
-</a>
-by
-<code>
-1
-</code>
-for
-each
-iteration.
-</li>
-</ol>
-</div>
-<div id="serialization-label-generation-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.10
-</span>
-Serialization
-Label
-Generation
-Algorithm
-</h4>
-<p>
-The
-algorithm
-generates
-a
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-given
-a
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-and
-a
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-mapping
-<del class="diff-old">count
-</del>
-<ins class="diff-chg">state
-</ins></a><ins class="diff-chg">
-and
-returns
-the
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins>
-</a>.
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-<ins class="diff-new">is
-already
-in
-the
-</ins><a class="tref" title="serialization_labels_map"><ins class="diff-new">
-serialization
-labels
-map
-</ins></a>,<ins class="diff-new">
-return
-its
-associated
-value.
-</ins></li><li><ins class="diff-new">
-If
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
-label
-</ins></a>
-starts
-with
-the
-string
-<code>
-_:c14n
-</code>,
-the
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-is
-the
-letter
-<code>
-c
-</code>
-followed
-by
-the
-number
-that
-follows
-<code>
-_:c14n
-</code>
-in
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>.
-</li>
-<li>
-Otherwise,
-the
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>
-is
-the
-letter
-<code>
-s
-</code>
-followed
-by
-the
-string
-value
-of
-<a class="tref" title="mapping_count">
-mapping
-count
-</a>.
-Increment
-the
-<a class="tref" title="mapping_count">
-mapping
-count
-</a>
-by
-<code>
-1
-<del class="diff-old">ensuring
-that
-</del>
-</code>.
-</li>
-<li>
-<ins class="diff-chg">Create
-a
-new
-key-value
-pair
-in
-the
-</ins><a class="tref" title="serialization_labels_map"><ins class="diff-chg">
-serialization
-labels
-map
-</ins></a><ins class="diff-chg">
-where
-the
-key
-is
-the
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-and
-</ins>
-the
-value
-<del class="diff-old">persists
-across
-multiple
-invocations
-of
-this
-algorithm.
-</del>
-<ins class="diff-chg">is
-the
-generated
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a>.
-</li>
-</ol>
-</div>
-<div id="combinatorial-serialization-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.11
-</span>
-Combinatorial
-Serialization
-Algorithm
-</h4>
-<p>
-<del class="diff-old">SerializeCombos()
-</del>
-<ins class="diff-chg">The
-combinatorial
-serialization
-algorithm
-</ins>
-takes
-a
-<del class="diff-old">label
-</del>
-<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
-<ins class="diff-chg">node
-state
-</ins>
-</a>,
-a
-<del class="diff-old">serialization
-map
-</del>
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-<ins class="diff-chg">mapping
-state
-</ins>
-</a>,
-a
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
-serialization
-label
-</a>,
-a
-<del class="diff-old">processed
-labels
-map
-,
-a
-serialization
-map
-</del>
-<a class="tref internalDFN" title="direction" href="#dfn-direction">
-<ins class="diff-chg">direction
-</ins>
-</a>,
-a
-<a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">
-<ins class="diff-chg">adjacent
-</ins>
-serialized
-labels
-map
-</a>,
-and
-a
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-</ins>
-unserialized
-labels
-<ins class="diff-new">list
-</ins>
-</a>
-as
-inputs
-and
-generates
-<del class="diff-old">deterministic
-serializations
-for
-all
-possible
-combinations
-</del>
-<ins class="diff-chg">the
-lexicographically
-least
-serialization
-</ins>
-of
-<del class="diff-old">graphs.
-</del>
-<ins class="diff-chg">nodes
-relating
-to
-the
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a>.
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-</ins>
-unserialized
-labels
-<ins class="diff-new">list
-</ins>
-</a>
-is
-not
-empty:
-<ol class="algorithm">
-<li>
-Copy
-the
-<del class="diff-old">serialization
-</del>
-<a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">
-<ins class="diff-chg">adjacent
-serialized
-labels
-</ins>
-map
-</a>
-to
-the
-<del class="diff-old">serialization
-</del>
-<dfn title="adjacent_serialized_labels_map_copy" id="dfn-adjacent_serialized_labels_map_copy">
-<ins class="diff-chg">adjacent
-serialized
-labels
-</ins>
-map
-copy
-</dfn>.
-</li>
-<li>
-Remove
-the
-first
-<a class="tref" title="unserialized_label">
-unserialized
-label
-</a>
-from
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-</ins>
-unserialized
-labels
-<ins class="diff-new">list
-</ins>
-</a>
-and
-create
-a
-new
-<dfn title="new_serialization_label" id="dfn-new_serialization_label">
-new
-serialization
-label
-</dfn>
-according
-to
-the
-<a href="#serialization-label-generation-algorithm">
-Serialization
-Label
-Generation
-Algorithm
-<del class="diff-old">passing
-the
-unserialized
-label
-and
-the
-mapping
-counter
-as
-parameters.
-</del>
-</a>.
-</li>
-<li>
-Create
-a
-new
-key-value
-mapping
-in
-the
-<del class="diff-old">serialization
-</del>
-<a class="tref internalDFN" title="adjacent_serialized_labels_map_copy" href="#dfn-adjacent_serialized_labels_map_copy">
-<ins class="diff-chg">adjacent
-serialized
-labels
-</ins>
-map
-copy
-</a>
-where
-the
-key
-is
-the
-<a class="tref internalDFN" title="new_serialization_label" href="#dfn-new_serialization_label">
-new
-serialization
-label
-</a>
-and
-the
-value
-is
-the
-<a class="tref" title="unserialized_label">
-unserialized
-label
-</a>.
-</li>
-<li>
-Set
-the
-<dfn title="maximum_serialization_rotations" id="dfn-maximum_serialization_rotations">
-maximum
-serialization
-rotations
-</dfn>
-to
-<code>
-1
-</code>
-or
-the
-length
-of
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-</ins>
-unserialized
-labels
-<ins class="diff-new">list
-</ins>
-</a>,
-whichever
-is
-greater.
-</li>
-<li>
-While
-the
-<a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">
-maximum
-serialization
-rotations
-</a>
-is
-greater
-than
-<code>
-0
-</code>:
-<ol class="algorithm">
-<li>
-<del class="diff-old">If
-this
-is
-the
-first
-iteration
-in
-the
-loop,
-</del>
-<ins class="diff-chg">Recursively
-</ins>
-perform
-the
-<a href="#combinatorial-serialization-algorithm">
-Combinatorial
-Serialization
-Algorithm
-</a>
-passing
-<del class="diff-old">in
-the
-label
-,
-</del>
-the
-<del class="diff-old">serialization
-map
-copy
-,
-</del>
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-<ins class="diff-chg">mapping
-state
-</ins></a><ins class="diff-chg">
-for
-</ins>
-the
-<del class="diff-old">serialization
-label
-,
-</del>
-<ins class="diff-chg">first
-iteration
-of
-</ins>
-the
-<del class="diff-old">processed
-labels
-map
-,
-serialized
-labels
-map
-,
-</del>
-<ins class="diff-chg">loop,
-</ins>
-and
-<del class="diff-old">the
-list
-</del>
-<ins class="diff-chg">a
-copy
-</ins>
-of
-<del class="diff-old">unserialized
-labels
-.
-</del>
-<ins class="diff-chg">it
-for
-each
-subsequent
-iteration.
-</ins>
-</li>
-<li>
-<del class="diff-old">If
-this
-is
-not
-</del>
-<ins class="diff-chg">Rotate
-</ins>
-the
-<del class="diff-old">first
-iteration
-</del>
-<ins class="diff-chg">elements
-</ins>
-in
-the
-<del class="diff-old">loop,
-perform
-the
-Combinatorial
-Serialization
-Algorithm
-</del>
-<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-unserialized
-labels
-list
-</ins>
-</a>
-<del class="diff-old">passing
-in
-</del>
-<ins class="diff-chg">by
-shifting
-each
-of
-them
-once
-to
-</ins>
-the
-<del class="diff-old">label
-,
-</del>
-<ins class="diff-chg">right,
-moving
-</ins>
-the
-<del class="diff-old">serialization
-map
-copy
-,
-</del>
-<ins class="diff-chg">element
-at
-</ins>
-the
-<del class="diff-old">serialization
-label
-,
-and
-temporary
-copies
-</del>
-<ins class="diff-chg">end
-</ins>
-of
-the
-<del class="diff-old">processed
-labels
-map
-,
-serialized
-labels
-map
-,
-and
-the
-</del>
-list
-<ins class="diff-new">to
-the
-beginning
-</ins>
-of
-<del class="diff-old">unserialized
-labels
-.
-</del>
-<ins class="diff-chg">the
-list.
-</ins>
-</li>
-<li>
-Decrement
-the
-<a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">
-maximum
-serialization
-rotations
-</a>
-by
-<code>
-1
-</code>
-for
-each
-iteration.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-<li>
-If
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
-<ins class="diff-chg">adjacent
-</ins>
-unserialized
-labels
-<ins class="diff-new">list
-</ins>
-</a>
-is
-empty:
-<ol class="algorithm">
-<li>
-<del class="diff-old">???Save
-an
-entry
-mapping
-</del>
-<ins class="diff-chg">Create
-a
-</ins><dfn title="list_of_keys" id="dfn-list_of_keys"><ins class="diff-chg">
-list
-of
-keys
-</ins></dfn>
-from
-the
-<del class="diff-old">bnode's
-serialization
-name
-</del>
-<ins class="diff-chg">keys
-in
-the
-</ins><a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map"><ins class="diff-chg">
-adjacent
-serialized
-labels
-map
-</ins></a><ins class="diff-chg">
-and
-sort
-it
-lexicographically.
-</ins></li><li><ins class="diff-chg">
-Add
-a
-key-value
-pair
-</ins>
-to
-the
-<del class="diff-old">reverse
-mapping
-(mapped)
-</del>
-<a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">
-<ins class="diff-chg">adjacent
-info
-map
-</ins></a><ins class="diff-chg">
-where
-the
-key
-is
-the
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins></a>
-and
-<del class="diff-old">its
-sorted
-</del>
-<ins class="diff-chg">the
-value
-is
-an
-object
-containing
-the
-</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
-node
-reference
-</ins></a><ins class="diff-chg">
-'s
-label,
-the
-</ins><a class="tref internalDFN" title="list_of_keys" href="#dfn-list_of_keys"><ins class="diff-chg">
-list
-of
-</ins>
-keys
-<del class="diff-old">then
-do
-SerializeMapping:
-</del>
-</a>
-<ins class="diff-chg">and
-the
-</ins><a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map"><ins class="diff-chg">
-adjacent
-serialized
-labels
-map
-</ins></a>.</li>
-<li>
-<del class="diff-old">???If
-</del>
-<ins class="diff-chg">Update
-</ins>
-the
-<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
-serialization
-<ins class="diff-new">string
-</ins></a><ins class="diff-new">
-according
-to
-the
-</ins><a href="#mapping-serialization-algorithm"><ins class="diff-new">
-Mapping
-Serialization
-Algorithm
-</ins></a>.</li><li><ins class="diff-new">
-If
-the
-</ins><a class="tref internalDFN" title="direction" href="#dfn-direction"><ins class="diff-new">
-direction
-</ins></a>
-is
-<del class="diff-old">lexicographically
-less
-than
-</del>
-<code>
-<ins class="diff-chg">outgoing
-direction
-</ins></code><ins class="diff-chg">
-then
-</ins><dfn title="directed_serialization" id="dfn-directed_serialization"><ins class="diff-chg">
-directed
-serialization
-</ins></dfn><ins class="diff-chg">
-refers
-to
-</ins>
-the
-<del class="diff-old">current
-</del>
-<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
-<ins class="diff-chg">outgoing
-</ins>
-serialization
-<del class="diff-old">or
-</del>
-</a>
-<ins class="diff-chg">and
-</ins>
-the
-<del class="diff-old">current
-</del>
-<dfn title="directed_serialization_map" id="dfn-directed_serialization_map">
-<ins class="diff-chg">directed
-</ins>
-serialization
-<del class="diff-old">is
-null,
-then
-iterate
-over
-</del>
-<ins class="diff-chg">map
-</ins></dfn><ins class="diff-chg">
-refers
-to
-</ins>
-the
-<del class="diff-old">sorted
-keys,
-get
-</del>
-<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
-<ins class="diff-chg">outgoing
-serialization
-map
-</ins></a>,<ins class="diff-chg">
-otherwise
-it
-refers
-to
-</ins>
-the
-<del class="diff-old">reverse-mapped
-adjacent
-bnode
-</del>
-<a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">
-<ins class="diff-chg">incoming
-serialization
-</ins></a>
-and
-<del class="diff-old">recursively
-call
-SerializeNode
-on
-</del>
-<ins class="diff-chg">the
-</ins><a class="tref internalDFN" title="directed_serialization_map" href="#dfn-directed_serialization_map"><ins class="diff-chg">
-directed
-serialization
-map
-</ins></a><ins class="diff-chg">
-refers
-to
-the
-</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-chg">
-incoming
-serialization
-map
-</ins></a>.<ins class="diff-chg">
-Compare
-the
-</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
-serialization
-string
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization"><ins class="diff-chg">
-directed
-serialization
-</ins></a><ins class="diff-chg">
-according
-to
-the
-</ins><a href="#mapping-serialization-algorithm"><ins class="diff-chg">
-Serialization
-Comparison
-Algorithm
-</ins></a>.<ins class="diff-chg">
-If
-the
-</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
-serialization
-string
-</ins></a><ins class="diff-chg">
-is
-less
-than
-or
-equal
-to
-the
-</ins><a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization"><ins class="diff-chg">
-directed
-serialization
-</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
-For
-</ins>
-each
-<del class="diff-old">iteration.
-</del>
-<ins class="diff-chg">value
-in
-the
-</ins><a class="tref internalDFN" title="list_of_keys" href="#dfn-list_of_keys"><ins class="diff-chg">
-list
-of
-keys
-</ins></a>,<ins class="diff-chg">
-run
-the
-</ins><a href="#node-serialization-algorithm"><ins class="diff-chg">
-Node
-Serialization
-Algorithm
-</ins></a>.
-</li>
-<li>
-<del class="diff-old">???Do
-SerializeMapping
-then
-if
-</del>
-<ins class="diff-chg">Update
-</ins>
-the
-<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
-serialization
-<ins class="diff-new">string
-</ins></a><ins class="diff-new">
-according
-to
-the
-</ins><a href="#mapping-serialization-algorithm"><ins class="diff-new">
-Mapping
-Serialization
-Algorithm
-</ins></a>.</li><li><ins class="diff-new">
-Compare
-the
-</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-new">
-serialization
-string
-</ins></a><ins class="diff-new">
-to
-the
-</ins><a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization"><ins class="diff-new">
-directed
-serialization
-</ins></a><ins class="diff-new">
-again
-and
-if
-it
-</ins>
-is
-<del class="diff-old">lexicographically
-</del>
-less
-than
-<ins class="diff-new">or
-equal
-and
-</ins>
-the
-<del class="diff-old">current
-</del>
-<ins class="diff-chg">length
-of
-the
-</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
-serialization
-<ins class="diff-new">string
-</ins></a><ins class="diff-new">
-is
-greater
-than
-</ins>
-or
-<ins class="diff-new">equal
-to
-</ins>
-the
-<del class="diff-old">current
-</del>
-<ins class="diff-chg">length
-of
-the
-</ins><a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization"><ins class="diff-chg">
-directed
-</ins>
-serialization
-<del class="diff-old">is
-null,
-</del>
-</a>,
-then
-set
-<del class="diff-old">it
-as
-</del>
-the
-<del class="diff-old">least
-</del>
-<a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">
-<ins class="diff-chg">directed
-</ins>
-serialization
-<del class="diff-old">for
-</del>
-</a>
-<ins class="diff-chg">to
-</ins>
-the
-<del class="diff-old">bnode
-in
-</del>
-<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
-<ins class="diff-chg">serialization
-string
-</ins></a><ins class="diff-chg">
-and
-set
-</ins>
-the
-<del class="diff-old">given
-edge
-direction
-('property'
-or
-'reference').
-</del>
-<a class="tref internalDFN" title="directed_serialization_map" href="#dfn-directed_serialization_map">
-<ins class="diff-chg">directed
-serialization
-map
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
-serialized
-labels
-map
-</ins></a>.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<div id="serialization-comparison-algorithm" class="section">
-<h4>
-<span class="secno">
-6.11.12
-</span>
-<del class="diff-old">Mapping
-</del>
-Serialization
-<ins class="diff-new">Comparison
-</ins>
-Algorithm
-</h4>
-<p>
-<del class="diff-old">map
-of
-all
-labels
-,
-map
-</del>
-<ins class="diff-chg">The
-serialization
-comparison
-algorithm
-takes
-two
-serializations,
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-and
-returns
-either
-which
-</ins>
-of
-<del class="diff-old">all
-properties
-,
-key
-stack
-,
-</del>
-<ins class="diff-chg">the
-two
-is
-less
-than
-the
-other
-or
-that
-they
-are
-equal.
-</ins></p><ol class="algorithm"><li><ins class="diff-chg">
-Whichever
-</ins>
-serialization
-<ins class="diff-new">is
-an
-empty
-</ins>
-string
-<ins class="diff-chg">is
-greater.
-If
-they
-are
-both
-empty
-strings,
-they
-are
-equal.
-</ins></li><li><ins class="diff-chg">
-Return
-the
-result
-of
-a
-lexicographical
-comparison
-of
-</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
-alpha
-</ins></a><ins class="diff-chg">
-and
-</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
-beta
-</ins></a><ins class="diff-chg">
-up
-to
-the
-number
-of
-characters
-in
-the
-shortest
-of
-the
-two
-serializations.
-</ins></li></ol></div><div id="mapping-serialization-algorithm" class="section"><h4>
-<span class="secno">
-<ins class="diff-chg">6.11.13
-</ins></span><ins class="diff-chg">
-Mapping
-Serialization
-Algorithm
-</ins></h4>
-<p>
-<del class="diff-old">SerializeMapping(mapping):
-(This
-function
-</del>
-<ins class="diff-chg">The
-mapping
-serialization
-algorithm
-</ins>
-incrementally
-updates
-the
-<del class="diff-old">relation
-</del>
-<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
-serialization
-<del class="diff-old">for
-</del>
-<ins class="diff-chg">string
-</ins></a><ins class="diff-chg">
-in
-</ins>
-a
-<del class="diff-old">mapping)
-</del>
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
-<ins class="diff-chg">mapping
-state
-</ins></a>.
-</p>
-<ol class="algorithm">
-<li>
-If
-the
-<del class="diff-old">serialization
-keys
-</del>
-<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">
-<ins class="diff-chg">key
-</ins>
-stack
-</a>
-is
-not
-<del class="diff-old">empty
-</del>
-<ins class="diff-chg">empty:
-</ins>
-<ol class="algorithm">
-<li>
-Pop
-the
-<del class="diff-old">list
-of
-</del>
-<dfn title="serialization_key_info" id="dfn-serialization_key_info">
-serialization
-<del class="diff-old">keys
-</del>
-<ins class="diff-chg">key
-info
-</ins>
-</dfn>
-off
-of
-the
-<del class="diff-old">serialization
-keys
-</del>
-<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">
-<ins class="diff-chg">key
-</ins>
-stack
-</a>.
-</li>
-<li>
-For
-each
-<dfn title="serialization_key" id="dfn-serialization_key">
-serialization
-key
-</dfn>
-in
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">
-serialization
-<del class="diff-old">keys
-</del>
-<ins class="diff-chg">key
-info
-</ins></a><ins class="diff-chg">
-array,
-starting
-at
-the
-</ins><dfn title="serialization_key_index" id="dfn-serialization_key_index"><ins class="diff-chg">
-serialization
-key
-index
-</ins></dfn><ins class="diff-chg">
-from
-the
-</ins><a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info"><ins class="diff-chg">
-serialization
-key
-info
-</ins>
-</a>:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-serialization
-key
-</a>
-is
-not
-in
-the
-<del class="diff-old">???list
-of
-</del>
-<a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">
-adjacent
-<del class="diff-old">nodes???,
-</del>
-<ins class="diff-chg">info
-map
-</ins></a>,
-push
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">
-serialization
-<del class="diff-old">keys
-</del>
-<ins class="diff-chg">key
-info
-</ins>
-</a>
-onto
-the
-<del class="diff-old">serialization
-keys
-</del>
-<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">
-<ins class="diff-chg">key
-</ins>
-stack
-</a>
-and
-exit
-from
-this
-loop.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-serialization
-key
-</a>
-is
-a
-key
-in
-<del class="diff-old">the
-completed
-serialization
-key
-map
-</del>
-<a class="tref internalDFN" title="serialized_keys" href="#dfn-serialized_keys">
-<ins class="diff-chg">serialized
-keys
-</ins>
-</a>,
-a
-cycle
-has
-been
-detected.
-Append
-the
-concatenation
-of
-the
-<code>
-_
-</code>
-character
-and
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-serialization
-key
-</a>
-to
-the
-<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
-serialization
-string
-</a>.
-</li>
-<li>
-Otherwise,
-serialize
-all
-outgoing
-and
-incoming
-edges
-in
-the
-<del class="diff-old">graph
-</del>
-<ins class="diff-chg">related
-node
-</ins>
-by
-performing
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-Mark
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-serialization
-key
-</a>
-as
-<del class="diff-old">being
-</del>
-<ins class="diff-chg">having
-been
-</ins>
-processed
-by
-adding
-a
-new
-key-value
-pair
-to
-<del class="diff-old">the
-completed
-serialization
-key
-map
-</del>
-<a class="tref internalDFN" title="serialized_keys" href="#dfn-serialized_keys">
-<ins class="diff-chg">serialized
-keys
-</ins>
-</a>
-where
-the
-key
-is
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-serialization
-key
-</a>
-and
-the
-value
-is
-<code>
-true
-</code>.
-</li>
-<li>
-Set
-the
-<dfn title="serialization_fragment" id="dfn-serialization_fragment">
-serialization
-fragment
-</dfn>
-to
-the
-value
-of
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-serialization
-key
-</a>.
-</li>
-<li>
-Set
-the
-<del class="diff-old">list
-of
-</del>
-<a class="tref" title="adjacent_info">
-adjacent
-<del class="diff-old">node
-keys
-</del>
-<ins class="diff-chg">info
-</ins>
-</a>
-<del class="diff-old">by
-using
-</del>
-<ins class="diff-chg">to
-the
-value
-of
-</ins>
-the
-<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
-serialization
-key
-</a>
-<del class="diff-old">to
-look
-up
-the
-list
-</del>
-in
-the
-<a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">
-adjacent
-<del class="diff-old">node
-keys
-</del>
-<ins class="diff-chg">info
-</ins>
-map
-</a>.
-</li>
-<li>
-Set
-the
-<a class="tref" title="adjacent_node_label">
-adjacent
-node
-label
-</a>
-<del class="diff-old">???somehow???.
-</del>
-<ins class="diff-chg">to
-the
-node
-</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
-label
-</ins></a><ins class="diff-chg">
-from
-the
-</ins><a class="tref" title="adjacent_info"><ins class="diff-chg">
-adjacent
-info
-</ins></a>.
-</li>
-<li>
-If
-a
-mapping
-for
-the
-<a class="tref" title="adjacent_node_label">
-adjacent
-node
-label
-</a>
-exists
-in
-the
-<a class="tref" title="map_of_all_labels">
-map
-of
-all
-labels
-</a>:
-<ol class="algorithm">
-<li>
-Append
-the
-result
-of
-the
-<a href="">
-Label
-Serialization
-Algorithm
-</a>
-to
-the
-<a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment">
-serialization
-fragment
-</a>.
-</li>
-</ol>
-</li>
-<li>
-<ins class="diff-chg">Append
-all
-of
-the
-keys
-in
-the
-</ins><a class="tref" title="adjacent_info"><ins class="diff-chg">
-adjacent
-info
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment"><ins class="diff-chg">
-serialization
-fragment
-</ins></a>.</li><li><ins class="diff-chg">
-Append
-the
-</ins><a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment"><ins class="diff-chg">
-serialization
-fragment
-</ins></a><ins class="diff-chg">
-to
-the
-</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
-serialization
-string
-</ins></a>.</li><li><ins class="diff-chg">
-Push
-a
-new
-key
-info
-object
-containing
-the
-keys
-from
-the
-</ins><a class="tref" title="adjacent_info"><ins class="diff-chg">
-adjacent
-info
-</ins></a><ins class="diff-chg">
-and
-an
-index
-of
-</ins><code><ins class="diff-chg">
-0
-</ins></code><ins class="diff-chg">
-onto
-the
-</ins><a class="tref internalDFN" title="key_stack" href="#dfn-key_stack"><ins class="diff-chg">
-key
-stack
-</ins></a>.</li><li><ins class="diff-chg">
-Recursively
-update
-the
-</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
-serialization
-string
-</ins></a><ins class="diff-chg">
-according
-to
-the
-</ins><a href="#mapping-serialization-algorithm"><ins class="diff-chg">
-Mapping
-Serialization
-Algorithm
-</ins></a>.</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-<div id="label-serialization-algorithm" class="section">
-<h4>
-<span class="secno">
-<del class="diff-old">6.11.13
-</del>
-<ins class="diff-chg">6.11.14
-</ins>
-</span>
-Label
-Serialization
-Algorithm
-</h4>
-<p>
-<del class="diff-old">map
-of
-properties
-,
-</del>
-<ins class="diff-chg">The
-</ins>
-label
-serialization
-<del class="diff-old">,
-label
-,
-incoming
-map
-,
-adjacent
-</del>
-<ins class="diff-chg">algorithm
-serializes
-information
-about
-a
-</ins>
-node
-<del class="diff-old">labels
-,
-key
-stack
-</del>
-<ins class="diff-chg">that
-has
-been
-assigned
-a
-particular
-</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
-serialization
-label
-</ins>
-</a>.
-</p>
-<ol class="algorithm">
-<li>
-Initialize
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>
-to
-an
-empty
-string.
-</li>
-<li>
-Append
-the
-<code>
-[
-</code>
-character
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-<li>
-Append
-all
-properties
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>
-by
-processing
-each
-key-value
-pair
-in
-the
-<del class="diff-old">map
-of
-properties
-</del>
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
-<ins class="diff-chg">node
-reference
-</ins>
-</a>,
-excluding
-the
-<code>
-@subject
-</code>
-<del class="diff-old">property
-???do
-the
-map
-</del>
-<ins class="diff-chg">property.
-The
-</ins>
-keys
-<del class="diff-old">need
-to
-</del>
-<ins class="diff-chg">should
-</ins>
-be
-<del class="diff-old">sorted???:
-</del>
-<ins class="diff-chg">processed
-in
-lexicographical
-order
-and
-their
-associated
-values
-should
-be
-processed
-in
-the
-order
-produced
-by
-the
-</ins><a href="#object-comparison-algorithm"><ins class="diff-chg">
-Object
-Comparison
-Algorithm
-</ins></a>:
-<ol class="algorithm">
-<li>
-Build
-a
-string
-using
-the
-pattern
-<code>
-<
-</code>
-<strong>
-KEY
-</strong>
-<code>
->
-</code>
-where
-<strong>
-KEY
-</strong>
-is
-the
-current
-key.
-Append
-string
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-<li>
-The
-value
-may
-be
-a
-single
-object
-or
-an
-array
-of
-objects.
-Process
-all
-of
-the
-objects
-that
-are
-associated
-with
-the
-key,
-building
-an
-<dfn title="object_string" id="dfn-object_string">
-object
-string
-</dfn>
-for
-each
-item:
-<ol class="algorithm">
-<li>
-If
-the
-object
-contains
-an
-<code>
-@iri
-</code>
-key
-with
-a
-value
-that
-starts
-with
-<code>
-_:
-</code>,
-set
-the
-<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
-object
-string
-</a>
-to
-the
-value
-<code>
-_:
-</code>.
-If
-the
-value
-does
-not
-start
-with
-<code>
-_:
-</code>,
-build
-the
-<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
-object
-string
-</a>
-using
-the
-pattern
-<code>
-<
-</code>
-<strong>
-IRI
-</strong>
-<code>
->
-</code>
-where
-<strong>
-IRI
-</strong>
-is
-the
-value
-associated
-with
-the
-<code>
-@iri
-</code>
-key.
-</li>
-<li>
-If
-the
-object
-contains
-a
-<code>
-@literal
-</code>
-key
-and
-a
-<code>
-@datatype
-</code>
-key,
-build
-the
-<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
-object
-string
-</a>
-using
-the
-pattern
-<code>
-"
-</code>
-<strong>
-LITERAL
-</strong>
-<code>
-"^^
-<
-</code>
-<strong>
-DATATYPE
-</strong>
-<code>
->
-</code>
-where
-<strong>
-LITERAL
-</strong>
-is
-the
-value
-associated
-with
-the
-<code>
-@literal
-</code>
-key
-and
-<strong>
-DATATYPE
-</strong>
-is
-the
-value
-associated
-with
-the
-<code>
-@datatype
-</code>
-key.
-</li>
-<li>
-If
-the
-object
-contains
-a
-<code>
-@literal
-</code>
-key
-and
-a
-<code>
-@language
-</code>
-key,
-build
-the
-<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
-object
-string
-</a>
-using
-the
-pattern
-<code>
-"
-</code>
-<strong>
-LITERAL
-</strong>
-<code>
-"@
-</code>
-<strong>
-LANGUAGE
-</strong>
-where
-<strong>
-LITERAL
-</strong>
-is
-the
-value
-associated
-with
-the
-<code>
-@literal
-</code>
-key
-and
-<strong>
-LANGUAGE
-</strong>
-is
-the
-value
-associated
-with
-the
-<code>
-@language
-</code>
-key.
-</li>
-<li>
-Otherwise,
-the
-value
-is
-a
-string.
-Build
-the
-<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
-object
-string
-</a>
-using
-the
-pattern
-<code>
-"
-</code>
-<strong>
-LITERAL
-</strong>
-<code>
-"
-</code>
-where
-<strong>
-LITERAL
-</strong>
-is
-the
-value
-associated
-with
-the
-current
-key.
-</li>
-<li>
-If
-this
-is
-the
-second
-iteration
-of
-the
-loop,
-append
-a
-<code>
-|
-</code>
-separator
-character
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-<li>
-Append
-the
-<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
-object
-string
-</a>
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-<li>
-Append
-the
-<code>
-]
-</code>
-character
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-<li>
-Append
-the
-<code>
-[
-</code>
-character
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-<li>
-Append
-all
-incoming
-references
-for
-the
-current
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>
-by
-processing
-all
-of
-the
-items
-associated
-with
-the
-<del class="diff-old">label
-in
-the
-</del>
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
-incoming
-<del class="diff-old">map
-</del>
-<ins class="diff-chg">list
-</ins>
-</a>:
-<ol class="algorithm">
-<li>
-Build
-a
-<dfn title="reference_string" id="dfn-reference_string">
-reference
-string
-</dfn>
-using
-the
-pattern
-<code>
-<
-</code>
-<strong>
-PROPERTY
-</strong>
-<code>
->
-</code>
-<code>
-<
-</code>
-<strong>
-REFERER
-</strong>
-<code>
->
-</code>
-where
-<strong>
-PROPERTY
-</strong>
-is
-the
-property
-associated
-with
-the
-incoming
-reference
-and
-<strong>
-REFERER
-</strong>
-is
-either
-the
-subject
-of
-the
-node
-referring
-to
-the
-<a class="tref internalDFN" title="label" href="#dfn-label">
-label
-</a>
-in
-the
-incoming
-reference
-or
-<code>
-_:
-</code>
-if
-<strong>
-REFERER
-</strong>
-begins
-with
-<code>
-_:
-</code>.
-</li>
-<li>
-If
-this
-is
-the
-second
-iteration
-of
-the
-loop,
-append
-a
-<code>
-|
-</code>
-separator
-character
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-<li>
-Append
-the
-<a class="tref internalDFN" title="reference_string" href="#dfn-reference_string">
-reference
-string
-</a>
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Append
-the
-<code>
-]
-</code>
-character
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-<li>
-Append
-all
-<a class="tref" title="adjacent_node_labels">
-adjacent
-node
-labels
-</a>
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>
-by
-concatenating
-the
-string
-value
-for
-all
-of
-them,
-one
-after
-the
-other,
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-<li>
-Push
-the
-<a class="tref" title="adjacent_node_labels">
-adjacent
-node
-labels
-</a>
-onto
-the
-<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">
-key
-stack
-</a>
-and
-append
-the
-result
-of
-the
-<a href="#mapping-serialization-algorithm">
-Mapping
-Serialization
-Algorithm
-</a>
-to
-the
-<a class="tref" title="label_serialization">
-label
-serialization
-</a>.
-</li>
-</ol>
-</div>
-</div>
-<div id="data-round-tripping" class="section">
-<h3>
-<span class="secno">
-6.12
-</span>
-Data
-Round
-Tripping
-</h3>
-<p>
-When
-normalizing
-<strong>
-xsd:double
-</strong>
-values,
-implementers
-<em class="rfc2119" title="must">
-must
-</em>
-ensure
-that
-the
-normalized
-value
-is
-a
-string.
-In
-order
-to
-generate
-the
-string
-from
-a
-<strong>
-double
-</strong>
-value,
-output
-equivalent
-to
-the
-<code>
-printf("%1.6e",
-value)
-</code>
-function
-in
-C
-<em class="rfc2119" title="must">
-must
-</em>
-be
-used
-where
-<strong>
-"%1.6e"
-</strong>
-is
-the
-string
-formatter
-and
-<strong>
-value
-</strong>
-is
-the
-value
-to
-be
-converted.
-</p>
-<p>
-To
-convert
-the
-a
-double
-value
-in
-JavaScript,
-implementers
-can
-use
-the
-following
-snippet
-of
-code:
-</p>
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
-'$10$2')
-</pre>
-<p class="note">
-When
-data
-needs
-to
-be
-normalized,
-JSON-LD
-authors
-should
-not
-use
-values
-that
-are
-going
-to
-undergo
-automatic
-conversion.
-This
-is
-due
-to
-the
-lossy
-nature
-of
-<strong>
-xsd:double
-</strong>
-values.
-</p>
-<p class="note">
-<ins class="diff-new">Some
-JSON
-serializers,
-such
-as
-PHP's
-native
-implementation,
-backslash-escapes
-the
-forward
-slash
-character.
-For
-example,
-the
-value
-</ins><code><ins class="diff-new">
-http://example.com/
-</ins></code><ins class="diff-new">
-would
-be
-serialized
-as
-</ins><code><ins class="diff-new">
-http:\/\/example.com\/
-</ins></code><ins class="diff-new">
-in
-some
-versions
-of
-PHP.
-This
-is
-problematic
-when
-generating
-a
-byte
-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
-</ins><em class="rfc2119" title="must not"><ins class="diff-new">
-must
-not
-</ins></em><ins class="diff-new">
-backslash-escape
-forward
-slashes.
-</ins></p>
-<p class="issue">
-Round-tripping
-data
-can
-be
-problematic
-if
-we
-mix
-and
-match
-@coerce
-rules
-with
-JSON-native
-datatypes,
-like
-integers.
-Consider
-the
-following
-code
-example:
-</p>
-<pre class="example">
-<del class="diff-old">var myObj = { "@context" : { 
-</del>
-<ins class="diff-chg">var myObj = { "@context" : {
-</ins>
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-// Convert the normalized object back to a JavaScript object
-var
-myObj2
-=
-jsonld.parse(jsonldText);
-</pre>
-<p class="issue">
-At
-this
-point,
-myObj2
-and
-myObj
-will
-have
-different
-values
-for
-the
-"number"
-value.
-myObj
-will
-be
-the
-number
-42,
-while
-myObj2
-will
-be
-the
-string
-"42".
-This
-type
-of
-data
-round-tripping
-error
-can
-bite
-developers.
-We
-are
-currently
-wondering
-if
-having
-a
-"coerce
-validation"
-phase
-in
-the
-parsing/normalization
-phases
-would
-be
-a
-good
-idea.
-It
-would
-prevent
-data
-round-tripping
-issues
-like
-the
-one
-mentioned
-above.
-</p>
-</div>
-<div id="rdf-conversion" class="section">
-<h3>
-<span class="secno">
-6.13
-</span>
-RDF
-Conversion
-</h3>
-<p>
-A
-JSON-LD
-document
-<em class="rfc2119" title="may">
-may
-</em>
-be
-converted
-to
-any
-other
-RDF-compatible
-document
-format
-using
-the
-algorithm
-specified
-in
-this
-section.
-</p>
-<p>
-The
-JSON-LD
-Processing
-Model
-describes
-processing
-rules
-for
-extracting
-RDF
-from
-a
-JSON-LD
-document.
-Note
-that
-many
-uses
-of
-JSON-LD
-may
-not
-require
-generation
-of
-RDF.
-</p>
-<p>
-The
-processing
-algorithm
-described
-in
-this
-section
-is
-provided
-in
-order
-to
-demonstrate
-how
-one
-might
-implement
-a
-JSON-LD
-to
-RDF
-processor.
-Conformant
-implementations
-are
-only
-required
-to
-produce
-the
-same
-type
-and
-number
-of
-triples
-during
-the
-output
-process
-and
-are
-not
-required
-to
-implement
-the
-algorithm
-exactly
-as
-described.
-</p>
-<p class="issue">
-The
-RDF
-Conversion
-Algorithm
-is
-a
-work
-in
-progress.
-</p>
-<div class="informative section" id="overview">
-<h4>
-<span class="secno">
-6.13.1
-</span>
-Overview
-</h4>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-JSON-LD
-is
-intended
-to
-have
-an
-easy
-to
-parse
-grammar
-that
-closely
-models
-existing
-practice
-in
-using
-JSON
-for
-describing
-object
-representations.
-This
-allows
-the
-use
-of
-existing
-libraries
-for
-parsing
-JSON
-in
-a
-document-oriented
-fashion,
-or
-can
-allow
-for
-stream-based
-parsing
-similar
-to
-SAX.
-</p>
-<p>
-As
-with
-other
-grammars
-used
-for
-describing
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
-Linked
-Data
-</a>,
-a
-key
-concept
-is
-that
-of
-a
-<em>
-resource
-</em>.
-Resources
-may
-be
-of
-three
-basic
-types:
-<em>
-IRI
-</em>
-s,
-for
-describing
-externally
-named
-entities,
-<em>
-BNodes
-</em>,
-resources
-for
-which
-an
-external
-name
-does
-not
-exist,
-or
-is
-not
-known,
-and
-Literals,
-which
-describe
-terminal
-entities
-such
-as
-strings,
-dates
-and
-other
-representations
-having
-a
-lexical
-representation
-possibly
-including
-an
-explicit
-language
-or
-datatype.
-</p>
-<p>
-Data
-described
-with
-JSON-LD
-may
-be
-considered
-to
-be
-the
-representation
-of
-a
-graph
-made
-up
-of
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
-subject
-</a>
-and
-<a class="tref internalDFN" title="object" href="#dfn-object">
-object
-</a>
-resources
-related
-via
-a
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>
-resource.
-However,
-specific
-implementations
-may
-choose
-to
-operate
-on
-the
-document
-as
-a
-normal
-JSON
-description
-of
-objects
-having
-attributes.
-</p>
-</div>
-<div id="rdf-conversion-algorithm-terms" class="section">
-<h4>
-<span class="secno">
-6.13.2
-</span>
-RDF
-Conversion
-Algorithm
-Terms
-</h4>
-<dl>
-<dt>
-<dfn title="default_graph" id="dfn-default_graph">
-default
-graph
-</dfn>
-</dt>
-<dd>
-the
-destination
-graph
-for
-all
-triples
-generated
-by
-JSON-LD
-markup.
-</dd>
-</dl>
-</div>
-<div id="rdf-conversion-algorithm" class="section">
-<h4>
-<span class="secno">
-6.13.3
-</span>
-RDF
-Conversion
-Algorithm
-</h4>
-<p>
-The
-algorithm
-below
-is
-designed
-for
-in-memory
-implementations
-with
-random
-access
-to
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-elements.
-</p>
-<p>
-A
-conforming
-JSON-LD
-processor
-implementing
-RDF
-conversion
-<em class="rfc2119" title="must">
-must
-</em>
-implement
-a
-processing
-algorithm
-that
-results
-in
-the
-same
-<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
-default
-graph
-</a>
-that
-the
-following
-algorithm
-generates:
-</p>
-<ol class="algorithm">
-<li id="processing-step-default-context">
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-with
-with
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-set
-to
-the
-<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
-initial
-context
-</a>
-and
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-initialized
-to
-NULL.
-</li>
-<li id="processing-step-associative">
-If
-a
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-is
-detected,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-has
-a
-<code>
-@context
-</code>
-key,
-process
-the
-local
-context
-as
-described
-in
-<a href="#context">
-Context
-</a>.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-by
-mapping
-the
-keys
-from
-the
-current
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-using
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-to
-new
-keys
-using
-the
-associated
-value
-from
-the
-current
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>.
-Repeat
-the
-mapping
-until
-no
-entry
-is
-found
-within
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-for
-the
-key.
-Use
-the
-new
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-in
-subsequent
-steps.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-has
-an
-<code>
-@iri
-</code>
-key,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-associated
-value.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-<p class="issue">
-<code>
-@iri
-</code>
-really
-just
-behaves
-the
-same
-as
-<code>
-@subject
-</code>,
-consider
-consolidating
-them.
-</p>
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-has
-a
-<code>
-@literal
-</code>
-key,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-a
-literal
-value
-as
-follows:
-<ol class="algorithm">
-<li>
-as
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-if
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-contains
-a
-<code>
-@datatype
-</code>
-key
-after
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-specified
-<code>
-@datatype
-</code>.
-</li>
-<li>
-otherwise,
-as
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>.
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-contains
-a
-<code>
-@language
-</code>
-key,
-use
-it's
-value
-to
-set
-the
-language
-of
-the
-plain
-literal.
-</li>
-<li>
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-</ol>
-</li>
-<li id="processing-step-subject">
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-has
-a
-<code>
-@subject
-</code>
-key:
-<ol class="algorithm">
-<li>
-If
-the
-value
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-result
-of
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Set
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-using
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>,
-set
-the
-<a class="tref" title="active__subject">
-active
-subject
-</a>
-to
-the
-result
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-does
-not
-have
-a
-<code>
-@subject
-</code>
-key,
-set
-the
-<a class="tref" title="active__object">
-active
-object
-</a>
-to
-newly
-generated
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier">
-blank
-node
-identifier
-</dfn>.
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-Set
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-to
-the
-<a class="tref" title="active__object">
-active
-object
-</a>.
-</li>
-<li>
-For
-each
-key
-in
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-that
-has
-not
-already
-been
-processed,
-perform
-the
-following
-steps:
-<ol class="algorithm">
-<li>
-If
-the
-key
-is
-<code>
-@type
-</code>,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-<code>
-rdf:type
-</code>.
-</li>
-<li>
-Otherwise,
-set
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-to
-the
-result
-of
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-key.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>
-and
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-Return
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-the
-calling
-location.
-</li>
-</ol>
-</li>
-<li>
-If
-a
-regular
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-is
-detected,
-process
-each
-value
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-by
-doing
-the
-following
-returning
-the
-result
-of
-processing
-the
-last
-value
-in
-the
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>:
-<ol class="algorithm">
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-using
-copies
-of
-the
-<a class="tref" title="active__context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>
-then
-proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-is
-detected:
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-is
-the
-target
-of
-a
-<code>
-@iri
-</code>
-coercion,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-performing
-<a href="#iri-expansion">
-IRI
-Expansion
-</a>
-on
-the
-string.
-</li>
-<li>
-Otherwise,
-if
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-is
-the
-target
-of
-coercion,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-by
-creating
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-using
-the
-string
-and
-the
-coercion
-key
-as
-the
-datatype
-IRI.
-</li>
-<li>
-Otherwise,
-set
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>
-to
-a
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
-plain
-literal
-</a>
-value
-created
-from
-the
-string.
-</li>
-</ol>
-Generate
-a
-triple
-representing
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
-active
-object
-</a>.
-</li>
-<li>
-If
-a
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>
-is
-detected,
-generate
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-using
-a
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-either
-<code>
-xsd:integer
-</code>
-or
-<code>
-xsd:double
-</code>,
-depending
-on
-if
-the
-value
-contains
-a
-fractional
-and/or
-an
-exponential
-component.
-Generate
-a
-triple
-using
-the
-<a class="tref" title="active__subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-the
-generated
-typed
-literal.
-</li>
-<li>
-Otherwise,
-if
-<strong>
-true
-</strong>
-or
-<strong>
-false
-</strong>
-is
-detected,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-a
-<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
-typed
-literal
-</a>
-value
-created
-from
-the
-string
-representation
-of
-the
-value
-with
-datatype
-set
-to
-<code>
-xsd:boolean
-</code>.
-</li>
-</ol>
-</div>
-</div>
-</div>
-<div class="appendix section" id="experimental-concepts">
-<h2>
-<span class="secno">
-<del class="diff-old">7.
-</del>
-<ins class="diff-chg">A.
-</ins>
-</span>
-Experimental
-Concepts
-</h2>
-<p class="issue">
-There
-are
-a
-few
-advanced
-concepts
-where
-it
-is
-not
-clear
-whether
-or
-not
-the
-JSON-LD
-specification
-is
-going
-to
-support
-the
-complexity
-necessary
-to
-support
-each
-concept.
-The
-entire
-section
-on
-Advanced
-Concepts
-should
-be
-considered
-as
-discussion
-points;
-it
-is
-merely
-a
-list
-of
-possibilities
-where
-all
-of
-the
-benefits
-and
-drawbacks
-have
-not
-been
-explored.
-</p>
-<div id="disjoint-graphs" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">7.1
-</del>
-<ins class="diff-chg">A.1
-</ins>
-</span>
-Disjoint
-Graphs
-</h3>
-<p>
-When
-serializing
-an
-RDF
-graph
-that
-contains
-two
-or
-more
-sections
-of
-the
-graph
-which
-are
-entirely
-disjoint,
-one
-must
-use
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-to
-express
-the
-graph
-as
-two
-graphs.
-This
-may
-not
-be
-acceptable
-to
-some
-authors,
-who
-would
-rather
-express
-the
-information
-as
-one
-graph.
-Since,
-by
-definition,
-disjoint
-graphs
-require
-there
-to
-be
-two
-top-level
-objects,
-JSON-LD
-utilizes
-a
-mechanism
-that
-allows
-disjoint
-graphs
-to
-be
-expressed
-using
-a
-single
-graph.
-</p>
-<p>
-Assume
-the
-following
-RDF
-graph:
-</p>
-<pre class="example">
-<del class="diff-old">&lt;http://example.org/people#john&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/people#john&gt;
-</ins>
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-<del class="diff-old">&lt;http://example.org/people#jane&gt; 
-</del>
-<ins class="diff-chg">&lt;http://example.org/people#jane&gt;
-</ins>
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-&lt;http://xmlns.com/foaf/0.1/Person&gt;
-.
-</pre>
-<p>
-Since
-the
-two
-subjects
-are
-entirely
-disjoint
-with
-one
-another,
-it
-is
-impossible
-to
-express
-the
-RDF
-graph
-above
-using
-a
-single
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>.
-</p>
-<p>
-In
-JSON-LD,
-one
-can
-use
-the
-subject
-to
-express
-disjoint
-graphs
-as
-a
-single
-graph:
-</p>
-<pre class="example">
-{
-  "@context": {
-    "Person": "http://xmlns.com/foaf/0.1/Person"
-  },
-<del class="diff-old">  "@subject": 
-</del>
-<ins class="diff-chg">  "@subject":
-</ins>
-  [
-    {
-      "@subject": "http://example.org/people#john",
-      "@type": "Person"
-    },
-    {
-      "@subject": "http://example.org/people#jane",
-      "@type": "Person"
-    }
-  ]
-}
-</pre>
-<p>
-A
-disjoint
-graph
-could
-also
-be
-expressed
-like
-so:
-</p>
-<pre class="example">
-[
-  {
-    "@subject": "http://example.org/people#john",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  },
-  {
-    "@subject": "http://example.org/people#jane",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  }
-]
-</pre>
-<p class="note">
-<ins class="diff-new">Warning:
-Using
-this
-serialisation
-format
-it
-is
-impossible
-to
-include
-</ins><code><ins class="diff-new">
-@context
-</ins></code><ins class="diff-new">
-given
-that
-the
-document's
-data
-structure
-is
-an
-array
-and
-not
-an
-object.
-</ins></p>
-</div>
-<div id="lists" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">7.2
-</del>
-<ins class="diff-chg">A.2
-</ins>
-</span>
-Lists
-</h3>
-<p>
-Because
-graphs
-do
-not
-describe
-ordering
-for
-links
-between
-nodes,
-<ins class="diff-new">in
-contrast
-to
-plain
-JSON,
-</ins>
-multi-valued
-properties
-in
-<del class="diff-old">JSON
-</del>
-<ins class="diff-chg">JSON-LD
-</ins>
-do
-not
-provide
-an
-ordering
-of
-the
-listed
-objects.
-For
-example,
-consider
-the
-following
-simple
-document:
-</p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}
-</pre>
-<p>
-This
-results
-in
-three
-triples
-being
-generated,
-each
-relating
-the
-subject
-to
-an
-individual
-object,
-with
-no
-inherent
-order.
-</p>
-<p>
-To
-<del class="diff-old">address
-this
-issue,
-</del>
-<ins class="diff-chg">preserve
-the
-order
-of
-the
-objects,
-</ins>
-RDF-based
-languages,
-such
-as
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-TURTLE">
-TURTLE
-</a>
-</cite>
-]
-use
-the
-concept
-of
-an
-<code>
-rdf:List
-</code>
-(as
-described
-in
-[
-<cite>
-<a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">
-RDF-SCHEMA
-</a>
-</cite>
-]).
-This
-uses
-a
-sequence
-of
-unlabeled
-nodes
-with
-properties
-describing
-a
-value,
-a
-null-terminated
-next
-property.
-Without
-specific
-syntactical
-support,
-this
-could
-be
-represented
-in
-JSON-LD
-as
-follows:
-</p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">{</span>,
-    <span class="diff">"@first": "joe"</span>,
-    <span class="diff">"@rest": {</span>
-      <span class="diff">"@first": "bob"</span>,
-      <span class="diff">"@rest": {</span>
-        <span class="diff">"@first": "jaybee"</span>,
-        <span class="diff">"@rest": "@nil"</span>
-        <span class="diff">}</span>
-      <span class="diff">}</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-}
-</pre>
-<p>
-As
-this
-notation
-is
-rather
-unwieldy
-and
-the
-notion
-of
-ordered
-collections
-is
-rather
-important
-in
-data
-modeling,
-it
-is
-useful
-to
-have
-specific
-language
-support.
-In
-JSON-LD,
-a
-list
-may
-be
-represented
-using
-the
-<code>
-@list
-</code>
-keyword
-as
-follows:
-</p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
-...
-}
-</pre>
-<p>
-This
-describes
-the
-use
-of
-this
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-as
-being
-ordered,
-and
-order
-is
-maintained
-through
-normalization
-and
-RDF
-conversion.
-If
-every
-use
-of
-a
-given
-multi-valued
-property
-is
-a
-list,
-this
-may
-be
-abbreviated
-by
-adding
-an
-<code>
-@coerce
-</code>
-term:
-</p>
-  <pre class="example">
-{
-  <span class="diff">"@context": {</span>
-    ...
-<del class="diff-old">    
-</del>
-    <span class="diff">"@coerce": {</span>
-      <span class="diff">"@list": ["foaf:nick"]</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}
-</pre>
-<p class="issue">
-<ins class="diff-new">There
-is
-an
-ongoing
-discussion
-about
-this
-issue.
-One
-of
-the
-</ins><a href="https://github.com/json-ld/json-ld.org/issues/12"><ins class="diff-new">
-proposed
-solutions
-</ins></a><ins class="diff-new">
-is
-allowing
-to
-change
-the
-default
-behaviour
-so
-that
-arrays
-are
-considered
-as
-ordered
-lists
-by
-default.
-</ins></p>
-<div id="expansion-2" class="section">
-<h4 id="list-expansion">
-<span class="secno">
-<del class="diff-old">7.2.1
-</del>
-<ins class="diff-chg">A.2.1
-</ins>
-</span>
-Expansion
-</h4>
-<p class="issue">
-TBD.
-</p>
-</div>
-<div id="normalization-2" class="section">
-<h4 id="list-normalization">
-<span class="secno">
-<del class="diff-old">7.2.2
-</del>
-<ins class="diff-chg">A.2.2
-</ins>
-</span>
-Normalization
-</h4>
-<p class="issue">
-TBD.
-</p>
-</div>
-<div id="rdf-conversion-1" class="section">
-<h4 id="list-rdf">
-<span class="secno">
-<del class="diff-old">7.2.3
-</del>
-<ins class="diff-chg">A.2.3
-</ins>
-</span>
-RDF
-Conversion
-</h4>
-<p>
-To
-support
-RDF
-Conversion
-of
-lists,
-<a href="#rdf-conversion-algorithm">
-RDF
-Conversion
-Algorithm
-</a>
-is
-updated
-as
-follows:
-</p>
-<ol class="algorithm update">
-<li>
-<span class="list-number">
-2.4a.
-</span>
-If
-the
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
-JSON
-object
-</a>
-has
-a
-<code>
-@list
-</code>
-key
-and
-the
-value
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-process
-the
-value
-as
-a
-list
-starting
-at
-<a href="#processing-step-list">
-Step
-3a
-</a>.
-</li>
-<li>
-<span class="list-number">
-2.7.3.
-</span>
-Create
-a
-new
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>
-copies
-of
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>
-and
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>.
-<ol class="algorithm">
-<li>
-If
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-is
-the
-target
-of
-a
-<code>
-@list
-</code>
-coercion,
-and
-the
-value
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-process
-the
-value
-as
-a
-list
-starting
-at
-<a href="#processing-step-list">
-Step
-3a
-</a>.
-</li>
-<li>
-Otherwise,
-process
-the
-value
-starting
-at
-<a href="#processing-step-associative">
-Step
-2
-</a>.
-</li>
-<li>
-Proceed
-using
-the
-previous
-<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
-processor
-state
-</a>.
-</li>
-</ol>
-</li>
-<li id="processing-step-list">
-<span class="list-number">
-3a.
-</span>
-Generate
-an
-RDF
-List
-by
-linking
-each
-element
-of
-the
-list
-using
-<code>
-rdf:first
-</code>
-and
-<code>
-rdf:next
-</code>,
-terminating
-the
-list
-with
-<code>
-rdf:nil
-</code>
-using
-the
-following
-sequence:
-<ol class="algorithm">
-<li>
-If
-the
-list
-has
-no
-element,
-generate
-a
-triple
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-<code>
-rdf:nil
-</code>.
-</li>
-<li>
-Otherwise,
-generate
-a
-triple
-using
-using
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>
-and
-a
-newly
-generated
-BNode
-identified
-as
-<em>
-first
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">
-blank
-node
-identifier
-</dfn>
-</em>.
-</li>
-<li>
-For
-each
-element
-other
-than
-the
-last
-element
-in
-the
-list:
-<ol class="algorithm">
-<li>
-Create
-a
-processor
-state
-using
-the
-active
-context,
-<em>
-first
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">
-blank
-node
-identifier
-</dfn>
-</em>
-as
-the
-<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
-active
-subject
-</a>,
-and
-<code>
-rdf:first
-</code>
-as
-the
-<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
-active
-property
-</a>.
-</li>
-<li>
-Unless
-this
-is
-the
-last
-element
-in
-the
-list,
-generate
-a
-new
-BNode
-identified
-as
-<em>
-rest
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">
-blank
-node
-identifier
-</dfn>
-</em>,
-otherwise
-use
-<code>
-rdf:nil
-</code>.
-</li>
-<li>
-Generate
-a
-new
-triple
-using
-<em>
-first
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">
-blank
-node
-identifier
-</dfn>
-</em>,
-<code>
-rdf:rest
-</code>
-and
-<em>
-rest
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">
-blank
-node
-identifier
-</dfn>
-</em>.
-</li>
-<li>
-Set
-<em>
-first
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">
-blank
-node
-identifier
-</dfn>
-</em>
-to
-<em>
-rest
-<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">
-blank
-node
-identifier
-</dfn>
-</em>.
-</li>
-</ol>
-</li>
-</ol>
-</li>
-</ol>
-</div>
-</div>
-</div>
-<div class="appendix section" id="markup-examples">
-<h2>
-<span class="secno">
-<del class="diff-old">A.
-</del>
-<ins class="diff-chg">B.
-</ins>
-</span>
-Markup
-Examples
-</h2>
-<p>
-The
-JSON-LD
-markup
-examples
-below
-demonstrate
-how
-JSON-LD
-can
-be
-used
-to
-express
-semantic
-data
-marked
-up
-in
-other
-languages
-such
-as
-RDFa,
-Microformats,
-and
-Microdata.
-These
-sections
-are
-merely
-provided
-as
-proof
-that
-JSON-LD
-is
-very
-flexible
-in
-what
-it
-can
-express
-across
-different
-Linked
-Data
-approaches.
-</p>
-<div id="rdfa" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">A.1
-</del>
-<ins class="diff-chg">B.1
-</ins>
-</span>
-RDFa
-</h3>
-<p>
-The
-following
-example
-describes
-three
-people
-with
-their
-respective
-names
-and
-homepages.
-</p>
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;
-</pre>
-<p>
-An
-example
-JSON-LD
-implementation
-is
-described
-below,
-however,
-there
-are
-other
-ways
-to
-mark-up
-this
-information
-such
-that
-the
-context
-is
-not
-repeated.
-</p>
-<pre class="example">
-{
-  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
-  "@subject": [
-   {
-     "@subject": "_:bnode1",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/bob/",
-     "foaf:name": "Bob"
-   },
-   {
-     "@subject": "_:bnode2",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/eve/",
-     "foaf:name": "Eve"
-   },
-   {
-     "@subject": "_:bnode3",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/manu/",
-     "foaf:name": "Manu"
-   }
-  ]
-}
-</pre>
-</div>
-<div id="microformats" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">A.2
-</del>
-<ins class="diff-chg">B.2
-</ins>
-</span>
-Microformats
-</h3>
-<p>
-The
-following
-example
-uses
-a
-simple
-Microformats
-hCard
-example
-to
-express
-how
-the
-Microformat
-is
-represented
-in
-JSON-LD.
-</p>
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;
-</pre>
-<p>
-The
-representation
-of
-the
-hCard
-expresses
-the
-Microformat
-terms
-in
-the
-context
-and
-uses
-them
-directly
-for
-the
-<code>
-url
-</code>
-and
-<code>
-fn
-</code>
-properties.
-Also
-note
-that
-the
-Microformat
-to
-JSON-LD
-processor
-has
-generated
-the
-proper
-URL
-type
-for
-<code>
-http://tantek.com
-</code>.
-</p>
-<pre class="example">
-{
-<del class="diff-old">  "@context": 
-</del>
-<ins class="diff-chg">  "@context":
-</ins>
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-<del class="diff-old">    "@coerce": { "xsd:anyURI": "url" }
-</del>
-<ins class="diff-chg">    "@coerce": { "@iri": "url" }
-</ins>
-  },
-  "@subject": "_:bnode1",
-  "@type": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}
-</pre>
-</div>
-<div id="microdata" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">A.3
-</del>
-<ins class="diff-chg">B.3
-</ins>
-</span>
-Microdata
-</h3>
-<p>
-The
-Microdata
-example
-below
-expresses
-book
-information
-as
-a
-Microdata
-Work
-item.
-</p>
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;
-</pre>
-<p>
-Note
-that
-the
-JSON-LD
-representation
-of
-the
-Microdata
-information
-stays
-true
-to
-the
-desires
-of
-the
-Microdata
-community
-to
-avoid
-contexts
-and
-instead
-refer
-to
-items
-by
-their
-full
-IRI.
-</p>
-<pre class="example">
-[
-  {
-    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "@type": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-<del class="diff-old">    "http://purl.org/vocab/frbr/core#realization": 
-</del>
-<ins class="diff-chg">    "http://purl.org/vocab/frbr/core#realization":
-</ins>
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]
-</pre>
-</div>
-</div>
-<div class="appendix section" id="mashing-up-vocabularies">
-<h2>
-<span class="secno">
-<del class="diff-old">A.4
-</del>
-<ins class="diff-chg">C.
-</ins>
-</span>
-Mashing
-Up
-Vocabularies
-</h2>
-<p>
-Developers
-would
-also
-benefit
-by
-allowing
-other
-vocabularies
-to
-be
-used
-automatically
-with
-their
-JSON
-API.
-There
-are
-over
-200
-<a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">
-<ins class="diff-new">Web
-</ins>
-Vocabulary
-</a>
-Documents
-that
-are
-available
-for
-use
-on
-the
-Web
-today.
-Some
-of
-these
-vocabularies
-are:
-</p>
-<ul>
-<li>
-RDF
--
-for
-describing
-information
-about
-objects
-<ins class="diff-new">and
-concepts
-</ins>
-on
-the
-<del class="diff-old">semantic
-web.
-</del>
-<ins class="diff-chg">Web.
-</ins>
-</li>
-<li>
-RDFS
--
-for
-expressing
-things
-like
-labels
-and
-comments.
-</li>
-<li>
-XSD
--
-for
-specifying
-basic
-types
-like
-strings,
-integers,
-dates
-and
-times.
-</li>
-<li>
-Dublin
-Core
--
-for
-describing
-creative
-works.
-</li>
-<li>
-FOAF
--
-for
-describing
-social
-networks.
-</li>
-<li>
-Calendar
--
-for
-specifying
-events.
-</li>
-<li>
-SIOC
--
-for
-describing
-discussions
-on
-blogs
-and
-websites.
-</li>
-<li>
-CCrel
--
-for
-describing
-Creative
-Commons
-and
-other
-types
-of
-licenses.
-</li>
-<li>
-GEO
--
-for
-describing
-geographic
-location.
-</li>
-<li>
-VCard
--
-for
-describing
-organizations
-and
-people.
-</li>
-<li>
-DOAP
--
-for
-describing
-projects.
-</li>
-</ul>
-<p>
-You
-can
-use
-these
-vocabularies
-in
-combination,
-like
-so:
-</p>
-<pre class="example">
-{
-  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}
-</pre>
-<p>
-Developers
-can
-also
-specify
-their
-own
-Vocabulary
-documents
-by
-modifying
-the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
-active
-context
-</a>
-in-line
-using
-the
-<code>
-@context
-</code>
-keyword,
-like
-so:
-</p>
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "@type": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}
-</pre>
-<p>
-The
-<code>
-@context
-</code>
-keyword
-is
-used
-to
-change
-how
-the
-JSON-LD
-processor
-evaluates
-key-value
-pairs.
-In
-this
-case,
-it
-was
-used
-to
-map
-one
-string
-('myvocab')
-to
-another
-string,
-which
-is
-interpreted
-as
-a
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">
-IRI
-</a>.
-In
-the
-example
-above,
-the
-<code>
-myvocab
-</code>
-string
-is
-replaced
-with
-"
-<code>
-http://example.org/myvocab#
-</code>
-"
-when
-it
-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
-<del class="diff-old">short-hand
-for
-RDF,
-</del>
-<ins class="diff-chg">short-hand,
-</ins>
-called
-a
-<del class="diff-old">CURIE
-</del>
-<a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">
-<ins class="diff-chg">Web
-Vocabulary
-</ins></a><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-chg">
-prefix
-</ins>
-</a>,
-and
-provides
-developers
-an
-unambiguous
-way
-to
-map
-any
-JSON
-value
-to
-RDF.
-</p>
-<p>
-</p>
-</div>
-<div class="appendix section" id="iana-considerations">
-<h2>
-<span class="secno">
-<ins class="diff-new">D.
-</ins></span><ins class="diff-new">
-IANA
-Considerations
-</ins></h2><p><ins class="diff-new">
-This
-section
-is
-included
-merely
-for
-standards
-community
-review
-and
-will
-be
-submitted
-to
-the
-Internet
-Engineering
-Steering
-Group
-if
-this
-specification
-becomes
-a
-W3C
-Recommendation.
-</ins></p><dl><dt><ins class="diff-new">
-Type
-name:
-</ins></dt><dd><ins class="diff-new">
-application
-</ins></dd><dt><ins class="diff-new">
-Subtype
-name:
-</ins></dt><dd><ins class="diff-new">
-ld+json
-</ins></dd><dt><ins class="diff-new">
-Required
-parameters:
-</ins></dt><dd><ins class="diff-new">
-None
-</ins></dd><dt><ins class="diff-new">
-Optional
-parameters:
-</ins></dt><dd><dl><dt><code><ins class="diff-new">
-form
-</ins></code></dt><dd><ins class="diff-new">
-Determines
-the
-serialization
-form
-for
-the
-JSON-LD
-document.
-Valid
-values
-include;
-</ins><code><ins class="diff-new">
-compacted
-</ins></code>,<code><ins class="diff-new">
-expanded
-</ins></code>,<code><ins class="diff-new">
-framed
-</ins></code>,<ins class="diff-new">
-and
-</ins><code><ins class="diff-new">
-normalized
-</ins></code>.<ins class="diff-new">
-Other
-values
-are
-allowed,
-but
-must
-be
-pre-pended
-with
-a
-</ins><code><ins class="diff-new">
-x-
-</ins></code><ins class="diff-new">
-string
-until
-they
-are
-clearly
-defined
-by
-a
-stable
-specification.
-If
-no
-form
-is
-specified
-in
-an
-HTTP
-request
-header
-to
-a
-responding
-application,
-such
-as
-a
-Web
-server,
-the
-application
-</ins><em class="rfc2119" title="may"><ins class="diff-new">
-may
-</ins></em><ins class="diff-new">
-choose
-any
-form.
-If
-no
-form
-is
-specified
-for
-a
-receiving
-application,
-the
-form
-</ins><em class="rfc2119" title="must not"><ins class="diff-new">
-must
-not
-</ins></em><ins class="diff-new">
-be
-assumed
-to
-take
-any
-particular
-form.
-</ins></dd><div class="issue"><ins class="diff-new">
-It
-is
-currently
-</ins><a href="https://github.com/json-ld/json-ld.org/issues/14"><ins class="diff-new">
-being
-discussed
-to
-remove
-form=framed
-</ins></a><ins class="diff-new">
-from
-this
-specification
-as
-there
-are
-several
-issues
-with
-it.
-</ins></div></dl></dd><dt><ins class="diff-new">
-Encoding
-considerations:
-</ins></dt><dd><ins class="diff-new">
-The
-same
-as
-the
-</ins><code><ins class="diff-new">
-application/json
-</ins></code><ins class="diff-new">
-MIME
-media
-type.
-</ins></dd><dt><ins class="diff-new">
-Security
-considerations:
-</ins></dt><dd><ins class="diff-new">
-Since
-JSON-LD
-is
-intended
-to
-be
-a
-pure
-data
-exchange
-format
-for
-directed
-graphs,
-the
-serialization
-</ins><em class="rfc2119" title="should not"><ins class="diff-new">
-should
-not
-</ins></em><ins class="diff-new">
-be
-passed
-through
-a
-code
-execution
-mechanism
-such
-as
-JavaScript's
-</ins><code><ins class="diff-new">
-eval()
-</ins></code><ins class="diff-new">
-function.
-It
-is
-</ins><em class="rfc2119" title="recommended"><ins class="diff-new">
-recommended
-</ins></em><ins class="diff-new">
-that
-a
-conforming
-parser
-does
-not
-attempt
-to
-directly
-evaluate
-the
-JSON-LD
-serialization
-and
-instead
-purely
-parse
-the
-input
-into
-a
-language-native
-data
-structure.
-</ins></dd><dt><ins class="diff-new">
-Interoperability
-considerations:
-</ins></dt><dd><ins class="diff-new">
-Not
-Applicable
-</ins></dd><dt><ins class="diff-new">
-Published
-specification:
-</ins></dt><dd><ins class="diff-new">
-The
-</ins><a href="http://json-ld/spec/latest/"><ins class="diff-new">
-JSON-LD
-</ins></a><ins class="diff-new">
-specification.
-</ins></dd><dt><ins class="diff-new">
-Applications
-that
-use
-this
-media
-type:
-</ins></dt><dd><ins class="diff-new">
-Any
-programming
-environment
-that
-requires
-the
-exchange
-of
-directed
-graphs.
-Implementations
-of
-JSON-LD
-have
-been
-created
-for
-JavaScript,
-Python,
-Ruby,
-PHP
-and
-C++.
-</ins></dd><dt><ins class="diff-new">
-Additional
-information:
-</ins></dt><dd><dl><dt><ins class="diff-new">
-Magic
-number(s):
-</ins></dt><dd><ins class="diff-new">
-Not
-Applicable
-</ins></dd><dt><ins class="diff-new">
-File
-extension(s):
-</ins></dt><dd>.jsonld</dd><dt><ins class="diff-new">
-Macintosh
-file
-type
-code(s):
-</ins></dt><dd><ins class="diff-new">
-TEXT
-</ins></dd></dl></dd><dt><ins class="diff-new">
-Person
-&
-email
-address
-to
-contact
-for
-further
-information:
-</ins></dt><dd><ins class="diff-new">
-Manu
-Sporny
-</ins><msporny@digitalbazaar.com></dd><dt><ins class="diff-new">
-Intended
-usage:
-</ins></dt><dd><ins class="diff-new">
-Common
-</ins></dd><dt><ins class="diff-new">
-Restrictions
-on
-usage:
-</ins></dt><dd><ins class="diff-new">
-None
-</ins></dd><dt><ins class="diff-new">
-Author(s):
-</ins></dt><dd><ins class="diff-new">
-Manu
-Sporny,
-Gregg
-Kellogg,
-Dave
-Longley
-</ins></dd><dt><ins class="diff-new">
-Change
-controller:
-</ins></dt><dd><ins class="diff-new">
-W3C
-</ins></dd></dl></div>
-<div class="appendix section" id="acknowledgements">
-<h2>
-<span class="secno">
-<del class="diff-old">A.5
-</del>
-<ins class="diff-chg">E.
-</ins>
-</span>
-Acknowledgements
-</h2>
-<p>
-The
-editors
-would
-like
-to
-thank
-Mark
-Birbeck,
-who
-provided
-a
-great
-deal
-of
-the
-initial
-push
-behind
-the
-JSON-LD
-work
-via
-his
-work
-on
-RDFj,
-Dave
-Longley,
-Dave
-Lehn
-and
-Mike
-Johnson
-who
-reviewed,
-provided
-feedback,
-and
-performed
-several
-implementations
-of
-the
-specification,
-and
-Ian
-Davis,
-who
-created
-RDF/JSON.
-Thanks
-also
-to
-Nathan
-Rixham,
-Bradley
-P.
-Allen,
-Kingsley
-Idehen,
-Glenn
-McDonald,
-Alexandre
-Passant,
-Danny
-Ayers,
-Ted
-Thibodeau
-Jr.,
-Olivier
-Grisel,
-Niklas
-Lindström,
-Markus
-Lanthaler,
-and
-Richard
-Cyganiak
-for
-their
-input
-on
-the
-specification.
-Another
-huge
-thank
-you
-goes
-out
-to
-Dave
-Longley
-who
-designed
-many
-of
-the
-algorithms
-used
-in
-this
-specification,
-including
-the
-normalization
-algorithm
-which
-was
-a
-monumentally
-difficult
-design
-challenge.
-</p>
-</div>
-<div id="references" class="appendix section">
-<h2>
-<span class="secno">
-<del class="diff-old">B.
-</del>
-<ins class="diff-chg">F.
-</ins>
-</span>
-References
-</h2>
-<div id="normative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">B.1
-</del>
-<ins class="diff-chg">F.1
-</ins>
-</span>
-Normative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-BCP47">
-[BCP47]
-</dt>
-<dd>
-A.
-Phillips,
-M.
-Davis.
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-<cite>
-Tags
-for
-Identifying
-Languages
-</cite>
-</a>
-September
-2009.
-IETF
-Best
-Current
-Practice.
-URL:
-<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
-http://tools.ietf.org/rfc/bcp/bcp47.txt
-</a>
-</dd>
-<dt id="bib-RDF-CONCEPTS">
-[RDF-CONCEPTS]
-</dt>
-<dd>
-Graham
-Klyne;
-Jeremy
-J.
-Carroll.
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-<cite>
-Resource
-Description
-Framework
-(RDF):
-Concepts
-and
-Abstract
-Syntax.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
-http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
-</a>
-</dd>
-<dt id="bib-RFC3986">
-[RFC3986]
-</dt>
-<dd>
-T.
-Berners-Lee;
-R.
-Fielding;
-L.
-Masinter.
-<a href="http://www.ietf.org/rfc/rfc3986.txt">
-<cite>
-Uniform
-Resource
-Identifier
-(URI):
-Generic
-Syntax.
-</cite>
-</a>
-January
-2005.
-Internet
-RFC
-3986.
-URL:
-<a href="http://www.ietf.org/rfc/rfc3986.txt">
-http://www.ietf.org/rfc/rfc3986.txt
-</a>
-</dd>
-<dt id="bib-RFC3987">
-[RFC3987]
-</dt>
-<dd>
-M.
-Dürst;
-M.
-Suignard.
-<a href="http://www.ietf.org/rfc/rfc3987.txt">
-<cite>
-Internationalized
-Resource
-Identifiers
-(IRIs).
-</cite>
-</a>
-January
-2005.
-Internet
-RFC
-3987.
-URL:
-<a href="http://www.ietf.org/rfc/rfc3987.txt">
-http://www.ietf.org/rfc/rfc3987.txt
-</a>
-</dd>
-<dt id="bib-RFC4627">
-[RFC4627]
-</dt>
-<dd>
-D.
-Crockford.
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-<cite>
-The
-application/json
-Media
-Type
-for
-JavaScript
-Object
-Notation
-(JSON)
-</cite>
-</a>
-July
-2006.
-Internet
-RFC
-4627.
-URL:
-<a href="http://www.ietf.org/rfc/rfc4627.txt">
-http://www.ietf.org/rfc/rfc4627.txt
-</a>
-</dd>
-<dt id="bib-WEBIDL">
-[WEBIDL]
-</dt>
-<dd>
-Cameron
-McCormack.
-<a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">
-<cite>
-Web
-IDL.
-</cite>
-</a>
-19
-December
-2008.
-W3C
-Working
-Draft.
-(Work
-in
-progress.)
-URL:
-<a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">
-http://www.w3.org/TR/2008/WD-WebIDL-20081219
-</a>
-</dd>
-</dl>
-</div>
-<div id="informative-references" class="section">
-<h3>
-<span class="secno">
-<del class="diff-old">B.2
-</del>
-<ins class="diff-chg">F.2
-</ins>
-</span>
-Informative
-references
-</h3>
-<dl class="bibliography">
-<dt id="bib-ECMA-262">
-[ECMA-262]
-</dt>
-<dd>
-<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
-<cite>
-ECMAScript
-Language
-Specification,
-Third
-Edition.
-</cite>
-</a>
-December
-1999.
-URL:
-<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
-http://www.ecma-international.org/publications/standards/Ecma-262.htm
-</a>
-</dd>
-<dt id="bib-MICRODATA">
-[MICRODATA]
-</dt>
-<dd>
-Ian
-Hickson;
-et
-al.
-<a href="http://www.w3.org/TR/microdata/">
-<cite>
-Microdata
-</cite>
-</a>
-04
-March
-2010.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/microdata/">
-http://www.w3.org/TR/microdata/
-</a>
-</dd>
-<dt id="bib-MICROFORMATS">
-[MICROFORMATS]
-</dt>
-<dd>
-<a href="http://microformats.org">
-<cite>
-Microformats
-</cite>
-</a>.
-URL:
-<a href="http://microformats.org">
-http://microformats.org
-</a>
-</dd>
-<dt id="bib-RDF-SCHEMA">
-[RDF-SCHEMA]
-</dt>
-<dd>
-Dan
-Brickley;
-Ramanathan
-V.
-Guha.
-<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
-<cite>
-RDF
-Vocabulary
-Description
-Language
-1.0:
-RDF
-Schema.
-</cite>
-</a>
-10
-February
-2004.
-W3C
-Recommendation.
-URL:
-<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
-http://www.w3.org/TR/2004/REC-rdf-schema-20040210
-</a>
-</dd>
-<dt id="bib-RDFA-CORE">
-[RDFA-CORE]
-</dt>
-<dd>
-Shane
-McCarron;
-et
-al.
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-<cite>
-RDFa
-Core
-1.1:
-Syntax
-and
-processing
-rules
-for
-embedding
-RDF
-through
-attributes.
-</cite>
-</a>
-31
-March
-2011.
-W3C
-Working
-Draft.
-URL:
-<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
-http://www.w3.org/TR/2011/WD-rdfa-core-20110331
-</a>
-</dd>
-<dt id="bib-TURTLE">
-[TURTLE]
-</dt>
-<dd>
-David
-Beckett,
-Tim
-Berners-Lee.
-<a href="http://www.w3.org/TeamSubmission/turtle/">
-<cite>
-Turtle:
-Terse
-RDF
-Triple
-Language.
-</cite>
-</a>
-January
-2008.
-W3C
-Team
-Submission.
-URL:
-<a href="http://www.w3.org/TeamSubmission/turtle/">
-http://www.w3.org/TeamSubmission/turtle/
-</a>
-</dd>
-</dl>
-</div>
-</div>
-</body>
-</html>
--- a/spec/ED/20110911/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4350 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
-<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>JSON-LD 1.0</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-
-<!-- 
-  === NOTA BENE ===
-  For the three scripts below, if your spec resides on dev.w3 you can check them
-  out in the same tree and use relative links so that they'll work offline,
-   -->
-
-
-
-<style>
-.diff { font-weight:bold; color:#0a3; }
-ol.algorithm.update { margin-left: 2em; }
-ol.algorithm.update>li { list-style-type: none; }
-ol.algorithm.update>li>span.list-number {
-  display:block;
-  float: left;
-  margin-left: -3.5em;
-}
-</style>
-<style type="text/css">
-/*****************************************************************
- * ReSpec CSS
- * Robin Berjon (robin at berjon dot com)
- * v0.05 - 2009-07-31
- *****************************************************************/
-
-
-/* --- INLINES --- */
-em.rfc2119 { 
-    text-transform:     lowercase;
-    font-variant:       small-caps;
-    font-style:         normal;
-    color:              #900;
-}
-
-h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
-h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
-    border: none;
-}
-
-dfn {
-    font-weight:    bold;
-}
-
-a.internalDFN {
-    color:  inherit;
-    border-bottom:  1px solid #99c;
-    text-decoration:    none;
-}
-
-a.externalDFN {
-    color:  inherit;
-    border-bottom:  1px dotted #ccc;
-    text-decoration:    none;
-}
-
-a.bibref {
-    text-decoration:    none;
-}
-
-code {
-    color:  #ff4500;
-}
-
-
-/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlConst*/
-.idlConstType {
-    color:  #005a9c;
-}
-.idlConstName {
-    color:  #ff4500;
-}
-.idlConstName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlException*/
-.idlExceptionID {
-    font-weight:    bold;
-    color:  #c00;
-}
-
-.idlTypedefID, .idlTypedefType {
-    color:  #005a9c;
-}
-
-.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
-    color:  #c00;
-    font-weight:    normal;
-}
-
-.excName a {
-    font-family:    monospace;
-}
-
-.idlRaises a.idlType, .excName a.idlType {
-    border-bottom:  1px dotted #c00;
-}
-
-.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
-    width:  45px;
-    text-align: center;
-}
-.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
-.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
-
-.idlImplements a {
-    font-weight:    bold;
-}
-
-dl.attributes, dl.methods, dl.constants, dl.fields {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .fields dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
-    font-weight:    bold;
-    color:  #000;
-    font-family:    monospace;
-}
-
-.attributes dt code, .fields dt code {
-    background:  #ffffd2;
-}
-
-.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
-    color:  #005a9c;
-    background:  transparent;
-    font-family:    inherit;
-    font-weight:    normal;
-    font-style: italic;
-}
-
-.methods dt code {
-    background:  #d9e6f8;
-}
-
-.constants dt code {
-    background:  #ddffd2;
-}
-
-.attributes dd, .methods dd, .constants dd, .fields dd {
-    margin-bottom:  1em;
-}
-
-table.parameters, table.exceptions {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    margin: 0.5em 0;
-    width:  100%;
-}
-table.parameters { border-bottom:  1px solid #90b8de; }
-table.exceptions { border-bottom:  1px solid #deb890; }
-
-.parameters th, .exceptions th {
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-    font-family:    initial;
-    font-weight:    normal;
-    text-shadow:    #666 1px 1px 0;
-}
-.parameters th { background: #90b8de; }
-.exceptions th { background: #deb890; }
-
-.parameters td, .exceptions td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-    vertical-align: top;
-}
-
-.parameters tr:first-child td, .exceptions tr:first-child td {
-    border-top: none;
-}
-
-.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
-    width:  100px;
-}
-
-.parameters td.prmType {
-    width:  120px;
-}
-
-table.exceptions table {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    width:  100%;
-}
-
-/* --- TOC --- */
-.toc a {
-    text-decoration:    none;
-}
-
-a .secno {
-    color:  #000;
-}
-
-/* --- TABLE --- */
-table.simple {
-    border-spacing: 0;
-    border-collapse:    collapse;
-    border-bottom:  3px solid #005a9c;
-}
-
-.simple th {
-    background: #005a9c;
-    color:  #fff;
-    padding:    3px 5px;
-    text-align: left;
-}
-
-.simple th[scope="row"] {
-    background: inherit;
-    color:  inherit;
-    border-top: 1px solid #ddd;
-}
-
-.simple td {
-    padding:    3px 10px;
-    border-top: 1px solid #ddd;
-}
-
-.simple tr:nth-child(even) {
-    background: #f0f6ff;
-}
-
-/* --- DL --- */
-.section dd > p:first-child {
-    margin-top: 0;
-}
-
-.section dd > p:last-child {
-    margin-bottom: 0;
-}
-
-.section dd {
-    margin-bottom:  1em;
-}
-
-.section dl.attrs dd, .section dl.eldef dd {
-    margin-bottom:  0;
-}
-
-/* --- EXAMPLES --- */
-pre.example {
-    border-top: 1px solid #ff4500;
-    border-bottom: 1px solid #ff4500;
-    padding:    1em;
-    margin-top: 1em;
-}
-
-pre.example::before {
-    content:    "Example";
-    display:    block;
-    width:      150px;
-    background: #ff4500;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-/* --- EDITORIAL NOTES --- */
-.issue {
-    padding:    1em;
-    margin: 1em 0em 0em;
-    border: 1px solid #f00;
-    background: #ffc;
-}
-
-.issue::before {
-    content:    "Issue";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #f00;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-.note {
-    margin: 1em 0em 0em;
-    padding:    1em;
-    border: 2px solid #cff6d9;
-    background: #e2fff0;
-}
-
-.note::before {
-    content:    "Note";
-    display:    block;
-    width:  150px;
-    margin: -1.5em 0 0.5em 0;
-    font-weight:    bold;
-    border: 1px solid #cff6d9;
-    background: #fff;
-    padding:    3px 1em;
-}
-
-/* --- Best Practices --- */
-div.practice {
-    border: solid #bebebe 1px;
-    margin: 2em 1em 1em 2em;
-}
-
-span.practicelab {
-    margin: 1.5em 0.5em 1em 1em;
-    font-weight: bold;
-    font-style: italic;
-}
-
-span.practicelab   { background: #dfffff; }
-
-span.practicelab {
-    position: relative;
-    padding: 0 0.5em;
-    top: -1.5em;
-}
-
-p.practicedesc {
-    margin: 1.5em 0.5em 1em 1em;
-}
-
-@media screen {
-    p.practicedesc {
-        position: relative;
-        top: -2em;
-        padding: 0;
-        margin: 1.5em 0.5em -1em 1em;
-    }
-}
-
-/* --- SYNTAX HIGHLIGHTING --- */
-pre.sh_sourceCode {
-  background-color: white;
-  color: black;
-  font-style: normal;
-  font-weight: normal;
-}
-
-pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
-pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
-pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
-pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
-pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
-pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
-pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
-pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
-pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
-pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
-pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
-pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
-pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
-
-/* Predefined variables and functions (for instance glsl) */
-pre.sh_sourceCode .sh_predef_var { color: #00008B; }
-pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
-
-/* for OOP */
-pre.sh_sourceCode .sh_classname { color: teal; }
-
-/* line numbers (not yet implemented) */
-pre.sh_sourceCode .sh_linenum { display: none; }
-
-/* Internet related */
-pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
-
-/* for ChangeLog and Log files */
-pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
-pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
-pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
-
-/* for Prolog, Perl... */
-pre.sh_sourceCode .sh_variable { color: #006400; }
-
-/* for LaTeX */
-pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
-pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
-pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
-pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
-pre.sh_sourceCode .sh_argument { color: #006400; }
-pre.sh_sourceCode .sh_optionalargument { color: purple; }
-pre.sh_sourceCode .sh_math { color: orange; }
-pre.sh_sourceCode .sh_bibtex { color: blue; }
-
-/* for diffs */
-pre.sh_sourceCode .sh_oldfile { color: orange; }
-pre.sh_sourceCode .sh_newfile { color: #006400; }
-pre.sh_sourceCode .sh_difflines { color: blue; }
-
-/* for css */
-pre.sh_sourceCode .sh_selector { color: purple; }
-pre.sh_sourceCode .sh_property { color: blue; }
-pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
-
-/* other */
-pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
-pre.sh_sourceCode .sh_paren { color: red; }
-pre.sh_sourceCode .sh_attribute { color: #006400; }
-
-</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
-</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
-
-<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-12-september-2011">Unofficial Draft 12 September 2011</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
-<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dt>Authors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
-<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
-<dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
-</dl><p>This document is also available in this non-normative format: <a href="diff-20110817.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
-<div id="abstract" class="introductory section"><h2>Abstract</h2>
-<p>
-JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and
-messaging format. In an attempt to harmonize the representation of Linked Data
-in JSON, this specification outlines a common JSON representation format for
-expressing directed graphs; mixing both Linked Data and non-Linked Data in
-a single document.
-</p>
-</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
-<p>This document is an experimental work in progress.</p>
-
-<!--  <p>
-This document has been reviewed by W3C Members, by software
-developers, and by other W3C groups and interested parties, and is
-endorsed by the Director as a W3C Recommendation. It is a stable
-document and may be used as reference material or cited from another
-document. W3C's role in making the Recommendation is to draw attention
-to the specification and to promote its widespread deployment. This
-enhances the functionality and interoperability of the Web.
-</p>  -->
-
-</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design" class="tocxref"><span class="secno">2. </span>Design</a><ul class="toc"><li class="tocline"><a href="#goals-and-rationale" class="tocxref"><span class="secno">2.1 </span>Goals and Rationale</a></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">2.2 </span>Linked Data</a></li><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">2.3 </span>Linking Data</a></li><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">2.4 </span>The Context</a></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">2.5 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno">3.4 </span>Strings</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">3.6 </span>Datatypes</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">3.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.9 </span>Expansion</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.10 </span>Compaction</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-prefixes" class="tocxref"><span class="secno">4.1 </span>Vocabulary Prefixes</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">4.2 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.3 </span>Type Coercion</a></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">4.4 </span>Chaining</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.5 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#aliasing-keywords" class="tocxref"><span class="secno">4.6 </span>Aliasing Keywords</a></li><li class="tocline"><a href="#normalization" class="tocxref"><span class="secno">4.7 </span>Normalization</a></li></ul></li><li class="tocline"><a href="#the-application-programming-interface" class="tocxref"><span class="secno">5. </span>The Application Programming Interface</a><ul class="toc"><li class="tocline"><a href="#jsonldprocessor" class="tocxref"><span class="secno">5.1 </span>JsonLdProcessor</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">5.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#jsonldtriplecallback" class="tocxref"><span class="secno">5.2 </span>JsonLdTripleCallback</a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">5.2.1 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">6. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">6.1 </span>Syntax Tokens and Keywords</a></li><li class="tocline"><a href="#algorithm-terms" class="tocxref"><span class="secno">6.2 </span>Algorithm Terms</a></li><li class="tocline"><a href="#context-1" class="tocxref"><span class="secno">6.3 </span>Context</a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno">6.3.1 </span>Coerce</a></li><li class="tocline"><a href="#initial-context" class="tocxref"><span class="secno">6.3.2 </span>Initial Context</a></li></ul></li><li class="tocline"><a href="#iri-expansion" class="tocxref"><span class="secno">6.4 </span>IRI Expansion</a></li><li class="tocline"><a href="#iri-compaction" class="tocxref"><span class="secno">6.5 </span>IRI Compaction</a></li><li class="tocline"><a href="#value-expansion" class="tocxref"><span class="secno">6.6 </span>Value Expansion</a></li><li class="tocline"><a href="#value-compaction" class="tocxref"><span class="secno">6.7 </span>Value Compaction</a></li><li class="tocline"><a href="#expansion-1" class="tocxref"><span class="secno">6.8 </span>Expansion</a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno">6.8.1 </span>Expansion Algorithm</a></li></ul></li><li class="tocline"><a href="#compaction-1" class="tocxref"><span class="secno">6.9 </span>Compaction</a><ul class="toc"><li class="tocline"><a href="#compaction-algorithm" class="tocxref"><span class="secno">6.9.1 </span>Compaction Algorithm</a></li></ul></li><li class="tocline"><a href="#framing-1" class="tocxref"><span class="secno">6.10 </span>Framing</a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno">6.10.1 </span>Framing Algorithm Terms</a></li><li class="tocline"><a href="#framing-algorithm" class="tocxref"><span class="secno">6.10.2 </span>Framing Algorithm</a></li></ul></li><li class="tocline"><a href="#normalization-1" class="tocxref"><span class="secno">6.11 </span>Normalization</a><ul class="toc"><li class="tocline"><a href="#normalization-algorithm-terms" class="tocxref"><span class="secno">6.11.1 </span>Normalization Algorithm Terms</a></li><li class="tocline"><a href="#normalization-state" class="tocxref"><span class="secno">6.11.2 </span>Normalization State</a></li><li class="tocline"><a href="#normalization-algorithm" class="tocxref"><span class="secno">6.11.3 </span>Normalization Algorithm</a></li><li class="tocline"><a href="#node-relabeling-algorithm" class="tocxref"><span class="secno">6.11.4 </span>Node Relabeling Algorithm</a></li><li class="tocline"><a href="#deterministic-labeling-algorithm" class="tocxref"><span class="secno">6.11.5 </span>Deterministic Labeling Algorithm</a></li><li class="tocline"><a href="#shallow-comparison-algorithm" class="tocxref"><span class="secno">6.11.6 </span>Shallow Comparison Algorithm</a></li><li class="tocline"><a href="#object-comparison-algorithm" class="tocxref"><span class="secno">6.11.7 </span>Object Comparison Algorithm</a></li><li class="tocline"><a href="#deep-comparison-algorithm" class="tocxref"><span class="secno">6.11.8 </span>Deep Comparison Algorithm</a></li><li class="tocline"><a href="#node-serialization-algorithm" class="tocxref"><span class="secno">6.11.9 </span>Node Serialization Algorithm</a></li><li class="tocline"><a href="#serialization-label-generation-algorithm" class="tocxref"><span class="secno">6.11.10 </span>Serialization Label Generation Algorithm</a></li><li class="tocline"><a href="#combinatorial-serialization-algorithm" class="tocxref"><span class="secno">6.11.11 </span>Combinatorial Serialization Algorithm</a></li><li class="tocline"><a href="#serialization-comparison-algorithm" class="tocxref"><span class="secno">6.11.12 </span>Serialization Comparison Algorithm</a></li><li class="tocline"><a href="#mapping-serialization-algorithm" class="tocxref"><span class="secno">6.11.13 </span>Mapping Serialization Algorithm</a></li><li class="tocline"><a href="#label-serialization-algorithm" class="tocxref"><span class="secno">6.11.14 </span>Label Serialization Algorithm</a></li></ul></li><li class="tocline"><a href="#data-round-tripping" class="tocxref"><span class="secno">6.12 </span>Data Round Tripping</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">6.13 </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">6.13.1 </span>Overview</a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno">6.13.2 </span>RDF Conversion Algorithm Terms</a></li><li class="tocline"><a href="#rdf-conversion-algorithm" class="tocxref"><span class="secno">6.13.3 </span>RDF Conversion Algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno">A. </span>Experimental Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">A.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#lists" class="tocxref"><span class="secno">A.2 </span>Lists</a><ul class="toc"><li class="tocline"><a href="#expansion-2" class="tocxref"><span class="secno">A.2.1 </span>Expansion</a></li><li class="tocline"><a href="#normalization-2" class="tocxref"><span class="secno">A.2.2 </span>Normalization</a></li><li class="tocline"><a href="#rdf-conversion-1" class="tocxref"><span class="secno">A.2.3 </span>RDF Conversion</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">B. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">B.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">B.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">B.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">C. </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#iana-considerations" class="tocxref"><span class="secno">D. </span>IANA Considerations</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">E. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">F. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">F.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">F.2 </span>Informative references</a></li></ul></li></ul></div>
-
-
-
-<div id="introduction" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">1. </span>Introduction</h2>
-
-<p>
-JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing
-data on the Web. Linked Data is a technique for creating a graph of interlinked data across
-different
-documents or Web sites. Data entities are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s,
-which are typically dereferencable and thus may be used to find more
-information about an entity, creating a "Web of Knowledge". JSON-LD is intended to be a simple
-publishing method for expressing not only Linked Data in JSON, but also for adding
-semantics to existing JSON.
-</p>
-
-<p>
-JSON-LD is designed as a light-weight syntax that can be used to express
-Linked Data. It is primarily intended to be a way to use Linked Data
-in Javascript and other Web-based programming environments. It is also
-useful when building interoperable Web services and when storing Linked
-Data in JSON-based document storage engines. It is practical and designed
-to be as simple as possible, utilizing the large number of JSON parsers
-and libraries available today. It is designed to be able to
-express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats
-[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports
-every major Web-based structured data model in use today.
-</p>
-
-<p>
-The syntax does not necessarily require applications to change their JSON, but
-allows to easily add meaning by adding context in a way that is either in-band or
-out-of-band. The syntax is designed to not disturb already deployed systems
-running on JSON, but provide a smooth upgrade path from JSON to JSON with
-added semantics. Finally, the format is intended to be easy to parse, efficient to
-generate, stream-based and document-based processing compatible, and require
-a very small memory footprint in order to operate.
-</p>
-
-<div id="how-to-read-this-document" class="section">
-<h3><span class="secno">1.1 </span>How to Read this Document</h3>
-
-<p>
-This document is a detailed specification for a serialization of Linked
-Data in JSON. The document is primarily intended for the following audiences:
-</p>
-
-<ul>
-  <li>Web developers that want to understand the design decisions and
-  language syntax for JSON-LD.</li>
-  <li>Software developers that want to encode Microformats, RDFa, or Microdata
-  in a way that is cross-language compatible via JSON.</li>
-  <li>Software developers that want to implement processors and APIs for
-  JSON-LD.</li>
-</ul>
-
-<p>
-To understand the basics in this specification you must first be familiar with
-JSON, which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. To understand the API and how it is
-intended to operate  in a programming environment, it is useful to have working
-knowledge of the JavaScript programming language [<cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and
-WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be
-familiar with the basic RDF concepts [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
-
-<p>
-  Examples may contain references to existing vocabularies and use <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es to refer to Web Vocabularies. The following is a list of all vocabularies and their <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> abbreviations, as used in this document:
-</p>
-<ul>
-  <li>The <a href="http://purl.org/dc/terms/">Dublin Core</a>
-  vocabulary (abbreviation: <code>dc</code>, e.g., <code>dc:title</code>)</li>
-  <li>The <a href="http://xmlns.com/foaf/0.1/">Friend of a Friend</a>
-  vocabulary (abbreviation: <code>foaf</code>, e.g., <code>foaf:knows</code>)</li>
-  <li>The <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">RDF</a>
-  vocabulary (abbreviation: <code>rdf</code>, e.g., <code>rdf:type</code>)</li>
-  <li>The <a href="http://www.w3.org/2001/XMLSchema#">XSD</a>
-  vocabulary (abbreviation: <code>xsd</code>, e.g., <code>xsd:integer</code>)</li>
-</ul>
-
-<p>
-  JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] defines several terms which are used throughout this document:
-  </p><dl>
-    <dt><dfn title="JSON_Object" id="dfn-json_object">JSON Object</dfn></dt><dd>
-      An object structure is represented as a pair of curly brackets surrounding zero or
-      more name/value pairs (or members). A name is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A single colon comes after
-      each name, separating the name from the value. A single comma separates a value
-      from a following name. The names within an object <em class="rfc2119" title="should">should</em> be unique.
-    </dd>
-    <dt><dfn title="array" id="dfn-array">array</dfn></dt>
-    <dd>
-      An array is an ordered collection of values. An array structure is represented as square brackets surrounding zero or more values (or elements). Elements are separated by commas.  Within JSON-LD, array order is not preserved by default, unless
-      specific markup is provided (see <a href="#lists">Lists</a>). This is because the basic data model of JSON-LD
-      is a directed <a class="tref" title="graph">graph</a>, which is inherently unordered.
-    </dd>
-    <dt><dfn title="string" id="dfn-string">string</dfn></dt><dd>
-      A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A
-      character is represented as a single character string.
-    </dd>
-    <dt><dfn title="number" id="dfn-number">number</dfn></dt>
-    <dd>
-      A number is is similar to that used in most programming languages, except that the octal and hexadecimal formats are not used and that leading zeros are not allowed.</dd>
-    <dt><dfn title="true" id="dfn-true">true</dfn> and <dfn title="false" id="dfn-false">false</dfn></dt><dd>
-      Boolean values.
-    </dd>
-    <dt><dfn title="null" id="dfn-null">null</dfn></dt><dd>
-      The use of the <em>null</em> value is undefined within JSON-LD.
-      <div class="issue">Supporting <em>null</em> in JSON-LD might have a number of advantages and should be evaluated. This is currently an <a href="https://github.com/json-ld/json-ld.org/issues/11">open issue</a>.</div>
-    </dd>
-  </dl>
-<p></p>
-</div>
-
-<div id="contributing" class="section">
-<h3><span class="secno">1.2 </span>Contributing</h3>
-
-<p>There are a number of ways that one may participate in the development of
-this specification:</p>
-
-<ul>
-<li>Technical discussion typically occurs on the public mailing list:
-<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
-</li>
-
-<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held
-on Tuesdays at 1500UTC on the second and fourth week of each month.
-</li>
-
-<li>Specification bugs and issues should be reported in the
-<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
-
-<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the
-specification can be found on Github.</li>
-
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a>
-IRC channel is available for real-time discussion on irc.freenode.net.</li>
-</ul>
-
-</div>
-
-</div>
-
-<div id="design" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">2. </span>Design</h2>
-
-<p>The following section outlines the design goals and rationale behind the
-JSON-LD markup language.
-</p>
-
-<div id="goals-and-rationale" class="section">
-<h3><span class="secno">2.1 </span>Goals and Rationale</h3>
-
-<p>
-A number of design considerations were explored during the creation of this
-markup language:
-</p>
-
-<dl>
- <dt>Simplicity</dt>
- <dd>Developers need only know JSON and three keywords to use the basic
- functionality in JSON-LD. No extra processors or software libraries are
- necessary to use JSON-LD in its most basic form. The language attempts to
- ensure that developers have an easy learning curve.</dd>
- <dt>Compatibility</dt>
- <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
- all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
- <dt>Expressiveness</dt>
- <dd>The syntax must be able to express directed graphs, which have been proven
- to be able to simply express almost every real world data model.</dd>
- <dt>Terseness</dt>
- <dd>The JSON-LD syntax must be very terse and human readable, requiring as
- little as possible effort from the developer.</dd>
- 
-<!-- <dt>Pragmatism</dt>
- <dd>Mixing the expression of pure Linked Data with data that is not
- linked was an approach that was driven by pragmatism. JSON-LD attempts to be
- more practical than theoretical in its approach to Linked Data.</dd> -->
-
- <dt>Zero Edits, most of the time</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify
- context in a way that is out-of-band. This allows organizations that have
- already deployed large JSON-based infrastructure to add meaning to their
- JSON documents in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers. At times, mapping JSON to
- a graph representation can become difficult. In these instances, rather than
- having JSON-LD support esoteric markup, we chose not to support the use case
- and support a simplified syntax instead. So, while Zero Edits is a goal,
- it is not always possible without adding great complexity to the language.
- </dd>
- <dt>Streaming</dt>
- <dd>The format supports both document-based and stream-based processing.</dd>
-</dl>
-</div>
-
-<div id="linked-data" class="section">
-<h3><span class="secno">2.2 </span>Linked Data</h3>
-<p>
-The following definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> is the one that will
-be used for this specification.
-</p>
-<ol>
-  <li><dfn title="Linked_Data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a representation of a linked data graph.</li>
-  <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is an unordered labeled directed graph, where nodes are <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are properties.</li>
-  <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one outgoing edge.</li>
-  <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a> <em class="rfc2119" title="should">should</em> be labeled with an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a> (an Internationalized Resource Identifier as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>]).</li>
-  <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one incoming edge.</li>
-  <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>.</li>
-  <li>An object <em class="rfc2119" title="may">may</em> be a <dfn title="subject" id="dfn-subject-1">subject</dfn> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> at the same time.</li>
-  <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>.</li>
-  <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <em class="rfc2119" title="should">should</em> be labeled with an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>.</li>
-  <li>An <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a> that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be dereferencable to a <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> document describing the labeled <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>.</li>
-  <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a></li>
-</ol>
-
-<p>
-Note that the definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> above is silent on the
-topic of unlabeled nodes. Unlabeled nodes are not considered
-<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
-of unlabled nodes, as most graph-based data sets on the Web contain a number
-of associated nodes that are not named and thus are not directly
-de-referenceable.
-</p>
-</div>
-
-<div id="linking-data" class="section">
-<h3><span class="secno">2.3 </span>Linking Data</h3>
-
-<p>
-An Internationalized Resource Identifier
-(<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
-as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique
-identifiers on the web. In <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, an IRI is commonly
-used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an
-<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
-</p>
-
-<p>JSON-LD defines a mechanism to map JSON terms, i.e., keys and values, to IRIs. This does not mean
-that JSON-LD requires every key or value to be an IRI, but rather ensures that
-keys and values can be mapped to IRIs if the developer desires to transform
-their data into Linked Data. There are a few techniques that can ensure
-that developers will generate good Linked Data for the Web. JSON-LD
-formalizes those techniques.
-</p>
-
-<p>We will be using the following JSON markup as the example for the
-rest of this section:
-</p>
-
-<pre class="example">
-{
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-</div>
-
-<div id="the-context" class="section">
-<h3><span class="secno">2.4 </span>The Context</h3>
-
-<p>In JSON-LD, a context is used to map <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s, i.e., keys and values
-  in an JSON document, to
-  <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that <em class="rfc2119" title="may">may</em> be expanded
-to an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The Web uses IRIs for unambiguous identification. The 
-idea is that these <a class="tref internalDFN" title="term" href="#dfn-term">term</a>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 <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s to expand to IRIs so that
-developers don't accidentally step on each other's Web Vocabulary terms.
-For example, the term <code>name</code> may map directly to the IRI
-<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to
-be constructed using the common JSON practice of simple name/value pairs while
-ensuring that the data is useful outside of the page, API or database in which it
-resides.
-</p>
-
-<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a context document that would look something like this:</p>
-
-<pre class="example">
-{
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-}</pre>
-
-<p>This context document can then be used in an JSON-LD document by adding a single line. The JSON markup as shown in the previous section could be changed as follows to link to the context document:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>The addition above transforms the previous JSON document into a JSON document
-with added semantics because the <code>@context</code> specifies how the
-<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong>
-terms map to IRIs.
-Mapping those keys to IRIs gives the data global context. If two
-developers use the same IRI to describe a property, they are more than likely
-expressing the same concept. This allows both developers to re-use each others
-data without having to agree to how their data will inter-operate on a
-site-by-site basis. Contexts may also contain datatype information
-for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
-the JSON-LD processor.</p>
-<p>Contexts may be specified in-line. This ensures that JSON-LD documents
-can be processed when a JSON-LD processor does not have access to the Web.</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": {
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": "http://xmlns.com/foaf/0.1/homepage",
-    "avatar": "http://xmlns.com/foaf/0.1/avatar"
-  },</span>
-  "name": "Manu Sporny",
-  "homepage": "http://manu.sporny.org/",
-  "avatar": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>JSON-LD strives to ensure that developers don't have to change the JSON
-  that is going into and being returned from their Web APIs. This means
-  that developers can also specify a context for JSON data in an out-of-band
-  fashion. This is described later in this document. </p>
-
-<p>
-  JSON-LD uses a special type of machine-readable document called a
-  <dfn title="Web_Vocabulary" id="dfn-web_vocabulary">Web Vocabulary</dfn> to define <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s that are then used
-  to describe concepts and "things" in the world.
-  Typically, these Web Vocabulary documents have <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es associated
-  with them and contain a number of <a class="tref internalDFN" title="term" href="#dfn-term">term</a> declarations. A
-  <dfn title="prefix" id="dfn-prefix">prefix</dfn>, like a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, is a short word that expands
-  to a Web Vocabulary base IRI. <a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">Prefix</a>es are helpful when a developer
-  wants to mix multiple vocabularies together in a context, but does not want
-  to go to the trouble of defining every single term in every single vocabulary.
-  Some Web Vocabularies may have dozens of terms defined. If a developer wants to use
-  3-4 different vocabularies, the number of terms that
-  would have to be declared in a single context could become quite large. To
-  reduce the number of different terms that must be defined, JSON-LD also allows
-  prefixes to be used to compact IRIs.
-</p><p>
-
-</p><p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code>
-specifies a <a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a> which may be represented using the
-<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>. The <code>foaf</code> Web Vocabulary
-contains a term called <strong>name</strong>. If you join the
-<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> with the <strong>name</strong> suffix,
-you can build a compact IRI that will expand out into an absolute IRI for the
-<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
-That is, the compact IRI, or short-form, is <code>foaf:name</code> and the
-expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary
-term is used to specify a person's name.
-</p>
-
-<p>Developers, and machines, are able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a
-definition of what the term means. Much like we can use <a href="http://wordnet.princeton.edu/">WordNet</a> today to
-see the definition
-of words in the English language. Developers and machines need the same sort of
-definition of terms. IRIs provide a way to ensure that these terms
-are unambiguous.
-</p>
-
-<p>The context provides a collection of vocabulary <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es that can be used to expand JSON keys and values into
-<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s.</p>
-
-</div>
-
-<div id="from-json-to-json-ld" class="section">
-<h3><span class="secno">2.5 </span>From JSON to JSON-LD</h3>
-
-<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>,
-and <strong>avatar</strong>,
-are defined in a context, and that context is used to resolve the
-names in JSON objects, machines are able to automatically expand the terms to
-something meaningful and unambiguous, like this:</p>
-
-<pre class="example">
-{
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
-  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Doing this allows JSON to be unambiguously machine-readable without
-requiring developers to drastically change their workflow.</p>
-<p class="note">Please note that this JSON-LD document doesn't define the
-subject and will thus result in an unlabeled or blank node.</p>
-
-</div>
-
-</div>
-
-
-
-<div id="basic-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">3. </span>Basic Concepts</h2>
-
-<p>JSON-LD is designed to ensure that Linked Data concepts can be marked
-up in a way that is simple to understand and author by Web developers. In many
-cases, regular JSON markup can become Linked Data with the simple addition
-of a context. As more JSON-LD features are used, more semantics are added
-to the JSON markup.</p>
-
-<div id="iris" class="section">
-<h3><span class="secno">3.1 </span>IRIs</h3>
-
-<p>Expressing IRIs are fundamental to Linked Data as that is how most
-<a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>s and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a> are named. IRIs can be
-expressed in a variety of different ways in JSON-LD.</p>
-
-<ol>
-  <li>In general, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in the key position in
-    a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that have a mapping to an IRI or another key in the context are
-    expanded to an IRI by JSON-LD processors. There are special rules for
-    processing keys in <code>@context</code> and when dealing with keys that
-    start with the <code>@subject</code> character.</li>
-  <li>An IRI is generated for the value specified using <code>@subject</code>,
-    if it is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>.</li>
-  <li>An IRI is generated for the value specified using <code>@type</code>.</li>
-  <li>An IRI is generated for the value specified using the <code>@iri</code>
-    keyword.</li>
-  <li>An IRI is generated when there are <code>@coerce</code> rules in
-    effect for a key named <code>@iri</code>.</li>
-</ol>
-
-<p>IRIs can be expressed directly in the key position like so:
-</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p>In the example above, the key
-<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as
-opposed to being interpreted as a string.</p>
-
-<p>Term expansion occurs for IRIs if a term is defined within the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
-...
-  "<span class="diff">name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">Prefix</a>es are expanded when used in keys:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
-...
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-...
-}</pre>
-
-<p><code>foaf:name</code> above will automatically expand out to the IRI
-<code>http://xmlns.com/foaf/0.1/name</code>.</p>
-
-<p>An IRI is generated when a value is associated with a key using
-the <code>@iri</code> keyword:</p>
-
-<pre class="example">
-{
-...
-  "homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
-...
-}</pre>
-
-<p>If type coercion rules are specified in the <code>@context</code> for
-a particular vocabulary term, an IRI is generated:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context":
-  {
-    ...
-    "@coerce":
-    {
-      "@iri": "homepage"
-    }
-  }</span>
-...
-  "homepage": "http://manu.sporny.org/",
-...
-}</pre>
-
-<p>Even though the value <code>http://manu.sporny.org/</code> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>,
-the type coercion rules will transform the value into an IRI when processed
-by a JSON-LD Processor</p>
-
-</div>
-
-<div id="identifying-the-subject" class="section">
-<h3><span class="secno">3.2 </span>Identifying the Subject</h3>
-
-<p>
-  To be able to externally reference nodes, it is important that each node has an unambiguous identifier.
-  <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s are a fundamental concept of Linked Data, and nodes should have a de-referencable
-  identifier used to name and locate them. For nodes to be truely linked, de-referencing the identifier
-  should result in a representation of that node. Associating an IRI with a node tells an application
-  that the returned document contains a description of the node requested.
-</p>
-<p>
-  JSON-LD documents may also contain descriptions of other nodes, so it is necessary to be able to
-  uniquely identify each node which may be externally referenced.
-</p>
-<p>A <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>
-   of an object in JSON is declared using the <code>@subject</code> key. The subject is the
-first piece of information needed by the JSON-LD processor in order to
-create the (subject, property, object) tuple, also known as a triple.</p>
-
-<pre class="example">
-{
-...
-  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to the IRI
-<code>http://example.org/people#joebob</code>.
-</p>
-
-</div>
-
-<div id="specifying-the-type" class="section">
-<h3><span class="secno">3.3 </span>Specifying the Type</h3>
-
-<p>The type of a particular subject can be specified using the
-<code>@type</code> key. Specifying the type in this way will generate a
-triple of the form (subject, type, type-iri).</p>
-
-<p>To be Linked Data, types <em class="rfc2119" title="must">must</em> be uniquely identified by an
-  <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>.</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
-...
-}</pre>
-
-<p>The example above would generate the following triple if the JSON-LD
-document is mapped to RDF (in N-Triples notation):</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt;
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-</div>
-
-<div id="strings" class="section">
-<h3><span class="secno">3.4 </span>Strings</h3>
-
-<p>Regular text strings, also referred to as <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn>s, are
-easily expressed using regular JSON <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s.</p>
-
-<pre class="example">
-{
-...
-  "name": "<span class="diff">Mark Birbeck</span>",
-...
-}</pre>
-
-</div>
-
-<div id="string-internationalization" class="section">
-<h3><span class="secno">3.5 </span>String Internationalization</h3>
-
-<p>JSON-LD makes an assumption that strings with associated language encoding
-information are not very common when used in JavaScript and Web Services.
-Thus, it takes a little more effort to express strings with associated
-language information.</p>
-
-<pre class="example">
-{
-...
-  "name": <span class="diff">
-  {
-    "@literal": "花澄",
-    "@language": "ja"
-  }</span>
-...
-}</pre>
-
-<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for
-<em>花澄</em> and associate the <code>ja</code> language code with the triple
-that is generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
-
-</div>
-
-<div id="datatypes" class="section">
-<h3><span class="secno">3.6 </span>Datatypes</h3>
-
-<p>
-  A value with an associated datatype, also known as a
-  <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn>, is indicated by associating a literal with
-  an IRI which indicates the literal's datatype. Typed literals may be
-  expressed in JSON-LD in three ways:
-</p>
-
-<ol>
-  <li>By utilizing the <code>@coerce</code> keyword.</li>
-  <li>By utilizing the expanded form for specifying objects.</li>
-  <li>By using a native JSON datatype.</li>
-</ol>
-
-<p>The first example uses the <code>@coerce</code> keyword to express a
-typed literal:</p>
-
-<pre class="example">
-{<span class="diff">
-  "@context":
-  {
-    "modified":  "http://purl.org/dc/terms/modified",
-    "dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
-    "@coerce":
-    {
-      "dateTime": "modified"
-    }
-  }</span>
-...
-  "modified": "2010-05-29T14:17:39+02:00",
-...
-}</pre>
-
-<p>The second example uses the expanded form for specifying objects:</p>
-
-<pre class="example">
-{
-...
-  "modified": <span class="diff">
-  {
-    "@literal": "2010-05-29T14:17:39+02:00",
-    "@datatype": "dateTime"
-  }</span>
-...
-}</pre>
-
-<p>Both examples above would generate an object with the literal value of
-<code>2010-05-29T14:17:39+02:00</code> and the datatype of
-<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-
-<p>The third example uses a built-in native JSON type, a
-  <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, to express a datatype:</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "age": <span class="diff">31</span>
-...
-}</pre>
-
-<p>The example above would generate the following triple:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt;
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .</pre>
-
-</div>
-
-<div id="multiple-objects-for-a-single-property" class="section">
-<h3><span class="secno">3.7 </span>Multiple Objects for a Single Property</h3>
-
-<p>A JSON-LD author can express multiple triples in a compact way by using
-<a class="tref internalDFN" title="array" href="#dfn-array">array</a>s. If a subject has multiple values for the same property, the author
-<em class="rfc2119" title="may">may</em> express each property as an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</p>
-
-<p class="note">In JSON-LD, multiple objects on a property are not ordered. This is because typically graphs
-are not inherently ordered data structures. To see more on creating ordered collections
-in JSON-LD, see <a href="#lists">Lists</a>.
-</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/people#joebob&gt;
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "joe" .
-&lt;http://example.org/people#joebob&gt;
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "bob" .
-&lt;http://example.org/people#joebob&gt;
-   &lt;http://xmlns.com/foaf/0.1/nick&gt;
-      "jaybee" .</pre>
-
-</div>
-
-<div id="multiple-typed-literals-for-a-single-property" class="section">
-<h3><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</h3>
-
-<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
-form for objects:</p>
-
-<pre class="example">
-{
-...
-  "@subject": "http://example.org/articles/8",
-  "modified": <span class="diff">
-  [
-    {
-      "@literal": "2010-05-29T14:17:39+02:00",
-      "@datatype": "dateTime"
-    },
-    {
-      "@literal": "2010-05-30T09:21:28-04:00",
-      "@datatype": "dateTime"
-    }
-  ]</span>
-...
-}</pre>
-
-<p>The markup shown above would generate the following triples:</p>
-
-<pre class="example">
-&lt;http://example.org/articles/8&gt;
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-&lt;http://example.org/articles/8&gt;
-   &lt;http://purl.org/dc/terms/modified&gt;
-      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
-
-</div>
-
-<div id="expansion" class="section">
-<h3><span class="secno">3.9 </span>Expansion</h3>
-
-<p>Expansion is the process of taking a JSON-LD document and applying a
-context such that all IRI, datatypes, and literal values are expanded so
-that the context is no longer necessary. JSON-LD document expansion
-is typically used as a part of <a href="#normalization">Framing</a> or
-<a href="#normalization">Normalization</a>.</p>
-
-<p>For example, assume the following JSON-LD input document:</p>
-
-<pre class="example">
-{
-   "@context":
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce":
-      {
-         "@iri": "homepage"
-      }
-   },
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/"
-}</pre>
-
-<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document
-provided above would result in the following output:</p>
-
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage":
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}</pre>
-
-</div>
-
-<div id="compaction" class="section">
-<h3><span class="secno">3.10 </span>Compaction</h3>
-
-<p>Compaction is the process of taking a JSON-LD document and applying a
-context such that the most compact form of the document is generated. JSON
-is typically expressed in a very compact, key-value format. That is, full
-IRIs are rarely used as keys. At times, a JSON-LD document may be received
-that is not in its most compact form. JSON-LD, via the API, provides a way
-to compact a JSON-LD document.
-</p>
-
-<p>For example, assume the following JSON-LD input document:</p>
-
-<pre class="example">
-{
-   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
-   "http://xmlns.com/foaf/0.1/homepage":
-   {
-      "@iri": "http://manu.sporny.org/"
-   }
-}</pre>
-
-<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
-
-<pre class="example">
-{
-   "name": "http://xmlns.com/foaf/0.1/name",
-   "homepage": "http://xmlns.com/foaf/0.1/homepage",
-   "@coerce":
-   {
-      "@iri": "homepage"
-   }
-}</pre>
-
-<p>Running the JSON-LD Compaction algorithm given the context supplied above
-against the JSON-LD input document provided above would result in the following
-output:</p>
-
-<pre class="example">
-{
-   "@context":
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "@coerce":
-      {
-         "@iri": "homepage"
-      }
-   },
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/"
-}</pre>
-
-<p>The compaction algorithm also enables the developer to map any expanded
-format into an application-specific compacted format. While the context
-provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
-<strong>name</strong>, it could have also mapped it to any arbitrary string
-provided by the developer.
-</p>
-
-</div>
-
-<div id="framing" class="section">
-<h3><span class="secno">3.11 </span>Framing</h3>
-
-<p>A JSON-LD document is a representation of a directed graph. A single
-directed graph can have many different serializations, each expressing
-exactly the same information. Developers typically work with trees, represented as
-<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>s. While mapping a graph to
-a tree can be done, the layout of the end result must be specified in advance.
-A <dfn title="Frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to
-specify a deterministic layout for a graph.
-</p>
-
-<p>Framing is the process of taking a JSON-LD document, which expresses a
-graph of information, and applying a specific graph layout
-(called a <a class="tref internalDFN" title="Frame" href="#dfn-frame">Frame</a>).
-</p>
-
-<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
-
-<pre class="example">
-{
-  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title",
-    "@coerce":
-    {
-      "@iri": "contains"
-    },
-  },
-  "@subject":
-  [{
-    "@subject": "http://example.com/library",
-    "@type": "Library",
-    "contains": "http://example.org/library/the-republic"
-  },
-  {
-    "@subject": "http://example.org/library/the-republic",
-    "@type": "Book",
-    "creator": "Plato",
-    "title": "The Republic",
-    "contains": "http://example.org/library/the-republic#introduction"
-  },
-  {
-    "@subject": "http://example.org/library/the-republic#introduction",
-    "@type": "Chapter",
-    "description": "An introductory chapter on The Republic.",
-    "title": "The Introduction"
-  }]
-}</pre>
-
-<p>Developers typically like to operate on items in a hierarchical, tree-based
-fashion. Ideally, a developer would want the data above sorted into top-level
-libraries, then the books that are contained in each library, and then the
-chapters contained in each book. To achieve that layout, the developer can
-define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
-
-<pre class="example">
-{
-  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title"
-  },
-  "@type": "Library",
-  "contains": {
-    "@type": "Book",
-    "contains": {
-      "@type": "Chapter"
-    }
-  }
-}</pre>
-
-<p>When the framing algorithm is run against the previously defined
-JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
-JSON-LD document is the end result:</p>
-
-<pre class="example">
-{
-  "@context": {
-    "Book":         "http://example.org/vocab#Book",
-    "Chapter":      "http://example.org/vocab#Chapter",
-    "contains":     "http://example.org/vocab#contains",
-    "creator":      "http://purl.org/dc/terms/creator"
-    "description":  "http://purl.org/dc/terms/description"
-    "Library":      "http://example.org/vocab#Library",
-    "title":        "http://purl.org/dc/terms/title"
-  },
-  "@subject": "http://example.org/library",
-  "@type": "Library",
-  "contains": {
-    <span class="diff">"@subject": "http://example.org/library/the-republic",</span>
-    "@type": "Book",
-    <span class="diff">"creator": "Plato",</span>
-    <span class="diff">"title": "The Republic",</span>
-    "contains": {
-      <span class="diff">"@subject": "http://example.org/library/the-republic#introduction",</span>
-      "@type": "Chapter",
-      <span class="diff">"description": "An introductory chapter on The Republic.",</span>
-      <span class="diff">"title": "The Introduction"</span>
-    },
-  },
-}</pre>
-
-<p>The JSON-LD framing algorithm allows developers to query by example and
-force a specific tree layout to a JSON-LD document.
-</p>
-
-</div>
-
-</div>
-
-<div id="advanced-concepts" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">4. </span>Advanced Concepts</h2>
-
-<p>JSON-LD has a number of features that provide functionality above and beyond
-the core functionality described above. The following sections outline the
-features that are specific to JSON-LD.
-</p>
-
-<div id="vocabulary-prefixes" class="section">
-  <h3><span class="secno">4.1 </span>Vocabulary Prefixes</h3>
-  <p>
-    Vocabulary terms in Linked Data documents may draw from a number of
-    different Web vocabularies. At times, declaring every single term that
-    a document uses can require the developer to declare tens, if not
-    hundreds of potential vocabulary terms that may be used across an
-    application. This is a concern for at least three reasons; the
-    first is the cognitive load on the developer, the second is
-    the serialized size of the context, the third is future-proofing
-    application contexts. In order to address these issues, the concept of a
-    <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> mechanism is introduced.</p>
-  <p>
-    A <dfn title="prefix" id="dfn-prefix-1">prefix</dfn> is a compact way of expressing a base 
-    <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a> to a <a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a>.
-    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
-    hand for the Friend-of-a-Friend Web Vocabulary, which is identified using
-    the IRI <code>http://xmlns.com/foaf/0.1/</code>. A developer may append any of
-    the FOAF Vocabulary terms to the end of the prefix to specify a short-hand
-    version of the full IRI for the vocabulary term. For example,
-    <code>foaf:name</code> would be expanded out to the IRI
-    <code>http://xmlns.com/foaf/0.1/name</code>. Instead of having to remember
-    and type out the entire IRI, the developer can instead use the prefix in
-    their JSON-LD markup.
-  </p>
-  <p>
-    The ability to use <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>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. 
-    <a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">Prefix</a> also
-    reduce the cognitive load on the developer. It is far easier to
-    remember <code>foaf:name</code> than it is to remember
-    <code>http://xmlns.com/foaf/0.1/name</code>. The use of prefixes also
-    ensures that a context document does not have to be updated in lock-step
-    with an externally defined <a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a>. Without prefixes, a developer
-    would need to keep their application context terms in lock-step with an
-    externally defined Web Vocabulary. Rather, by just declaring the
-    Web Vocabulary prefix, one can use new terms as they're declared
-    without having to update the application's JSON-LD context.
-  </p>
-  <p>Consider the following example:</p>
-  <pre class="example">
-{
-  "@context": {
-    <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>
-    <span class="diff">"ex": "http://example.org/vocab#"</span>
-  },
-  "@subject": "http://example.org/library",
-  "@type": <span class="diff">"ex:Library"</span>,
-  <span class="diff">"ex:contains"</span>: {
-    "@subject": "http://example.org/library/the-republic",
-    "@type": <span class="diff">"ex:Book"</span>,
-    <span class="diff">"dc:creator"</span>: "Plato",
-    <span class="diff">"dc:title"</span>: "The Republic",
-    <span class="diff">"ex:contains"</span>: {
-      "@subject": "http://example.org/library/the-republic#introduction",
-      "@type": <span class="diff">"ex:Chapter"</span>,
-      <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",
-      <span class="diff">"dc:title"</span>: "The Introduction"
-    },
-  },
-}</pre>
-  <p>
-    In this example, two different vocabularies are referred to using
-    prefixes. Those prefixes are then used as type and property values using 
-    the <code>prefix:term</code> notation.
-  </p>
-  <p>
-    Prefixes, 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
-    "CURIE Syntax Definition"</a></cite> [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>].
-    JSON-LD does not support the square-bracketed CURIE syntax as the
-    mechanism is not required to disambiguate IRIs in a JSON-LD document like
-    it is in HTML documents.
-  </p>
-</div>
-
-<div id="automatic-typing" class="section">
-<h3><span class="secno">4.2 </span>Automatic Typing</h3>
-
-<p>Since JSON is capable of expressing typed information such as doubles,
-integers, and boolean values. As demonstrated below, JSON-LD utilizes that
-information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
-
-<pre class="example">
-{
-...
-  // The following two values are automatically converted to a type of xsd:double
-  // and both values are equivalent to each other.
-  "measure:cups": <span class="diff">5.3</span>,
-  "measure:cups": <span class="diff">5.3e0</span>,
-  // The following value is automatically converted to a type of xsd:double as well
-  "space:astronomicUnits": <span class="diff">6.5e73</span>,
-  // The following value should never be converted to a language-native type
-  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
-  // This value is automatically converted to having a type of xsd:integer
-  "chem:protons": <span class="diff">12</span>,
-  // This value is automatically converted to having a type of xsd:boolean
-  "sensor:active": <span class="diff">true</span>,
-...
-}</pre>
-
-<p class="note">When dealing with a number of modern programming languages,
-including JavaScript ECMA-262, there is no distinction between
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is,
-the <a class="tref internalDFN" title="number" href="#dfn-number">number</a> <code>5.3</code> and the <a class="tref internalDFN" title="number" href="#dfn-number">number</a>
-<code>5.3e0</code> are treated as if they were the same. When converting from
-JSON-LD to a language-native format and back, datatype information is lost in a
-number of these languages. Thus, one could say that <code>5.3</code> is a
-<strong>xsd:decimal</strong> and <code>5.3e0</code> is an
-<strong>xsd:double</strong> in JSON-LD, but when both values are
-converted to a language-native format the datatype difference between the two
-is lost because the machine-level representation will almost always be a
-<strong>double</strong>.
-Implementers should be aware of this potential round-tripping issue between
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
-objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
-to a language native type.
-</p>
-
-</div>
-
-<div id="type-coercion" class="section">
-<h3><span class="secno">4.3 </span>Type Coercion</h3>
-
-<p>JSON-LD supports the coercion of values to particular data types.
-Type coercion allows someone deploying JSON-LD to coerce the incoming or
-outgoing types to the proper data type based on a mapping of data type IRIs to
-property types. Using type coercion, one may convert simple JSON data to
-properly typed RDF data.</p>
-
-<p>The example below demonstrates how a JSON-LD author can coerce values to
-<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
-
-<pre class="example">
-{
-  "@context":
-  {
-     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
-     "xsd": "http://www.w3.org/2001/XMLSchema#",
-     "name": "http://xmlns.com/foaf/0.1/name",
-     "age": "http://xmlns.com/foaf/0.1/age",
-     "homepage": "http://xmlns.com/foaf/0.1/homepage",
-<span class="diff">     "@coerce":
-     {
-        "xsd:integer": "age",
-        "@iri": "homepage"
-     }</span>
-  },
-  "name": "John Smith",
-  "age": <span class="diff">"41"</span>,
-  "homepage": <span class="diff">"http://example.org/home/"</span>
-}</pre>
-
-<p>The example above would generate the following triples:</p>
-
-<pre class="example">
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/name&gt;
-      "John Smith" .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/age&gt;
-      "41"^^http://www.w3.org/2001/XMLSchema#integer .
-_:bnode1
-   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
-      &lt;http://example.org/home/&gt; .</pre>
-
-</div>
-
-<div id="chaining" class="section">
-  <h3><span class="secno">4.4 </span>Chaining</h3>
-  <p>
-    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to
-    use the definition of JSON-LD objects as <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This
-    is a commonly used mechanism for creating a parent-child relationship
-    between two <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>s.
-  </p>
-  <p>The example shows an two subjects related by a property from the first
-  subject:</p>
-
-  <pre class="example">
-{
-...
-  "name": "Manu Sporny",
-  "<span class="diff">knows</span>": {
-    "<span class="diff">@type</span>": "<span class="diff">Person</span>",
-    "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
-  }
-...
-}</pre>
-
-  <p>
-    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a
-    JSON value at any point in JSON-LD.
-  </p>
-</div>
-
-<div id="identifying-unlabeled-nodes" class="section">
-<h3><span class="secno">4.5 </span>Identifying Unlabeled Nodes</h3>
-
-<p>At times, it becomes necessary to be able to express information without
-being able to specify the subject. Typically, this type of node is called
-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) 
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>. This allows to reference the node locally within the 
-document but not in an external document.</p>
-
-<pre class="example">
-{
-...
-  "@subject": "<span class="diff">_:foo</span>",
-...
-}</pre>
-
-<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the
-unlabeled node. This practice, however, is usually frowned upon when
-generating Linked Data. If a developer finds that they refer to the unlabeled
-node more than once, they should consider naming the node using a resolve-able
-IRI.
-</p>
-
-</div>
-
-<div id="aliasing-keywords" class="section">
-<h3><span class="secno">4.6 </span>Aliasing Keywords</h3>
-
-<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
-to be aliased. This feature allows more legacy JSON content to be supported
-by JSON-LD. It also allows developers to design domain-specific implementations
-using only the JSON-LD context.</p>
-
-<pre class="example">
-{
-  "@context":
-  {
-     <span class="diff">"url": "@subject"</span>,
-     <span class="diff">"a": "@type"</span>,
-     "name": "http://schema.org/name"
-  },
-  "url": "http://example.com/about#gregg",
-  "a": "http://schema.org/Person",
-  "name": "Gregg Kellogg"
-}</pre>
-
-<p>In the example above, the <code>@subject</code> and <code>@type</code>
-keywords have been given the aliases <strong>url</strong> and
-<strong>a</strong>, respectively.
-</p>
-
-</div>
-
-<div id="normalization" class="section">
-<h3><span class="secno">4.7 </span>Normalization</h3>
-
-<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and
-performing a deterministic transformation on that input that results in a
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> that any conforming JSON-LD processor would have
-generated given the same input. The problem is a fairly difficult technical
-problem to solve because it requires a directed graph to be ordered into a
-set of nodes and edges in a deterministic way. This is easy to do when all of
-the nodes have unique names, but very difficult to do when some of the nodes
-are not labeled.
-</p>
-
-<p>Normalization is useful when comparing two graphs against one another,
-when generating a detailed list of differences between two graphs, and
-when generating a cryptographic digital signature for information contained
-in a graph or when generating a hash of the information contained in a graph.
-</p>
-
-<p>The example below is an un-normalized JSON-LD document:</p>
-
-<pre class="example">
-{
-   "@context":
-   {
-      "name": "http://xmlns.com/foaf/0.1/name",
-      "homepage": "http://xmlns.com/foaf/0.1/homepage",
-      "xsd": "http://www.w3.org/2001/XMLSchema#",
-      "@coerce":
-      {
-         "@iri": ["homepage"]
-      }
-   },
-   "name": "Manu Sporny",
-   "homepage": "http://manu.sporny.org/"
-}</pre>
-
-<p>The example below is the normalized form of the JSON-LD document above:</p>
-
-<p class="note">Whitespace is used below to aid readability. The normalization
-algorithm for JSON-LD removes all unnecessary whitespace in the fully
-normalized form.</p>
-
-<pre class="example">
-[{
-    "@subject":
-    {
-        "@iri": "_:c14n0"
-    },
-    "http://xmlns.com/foaf/0.1/homepage":
-    {
-        "@iri": "http://manu.sporny.org/"
-    },
-    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
-}]</pre>
-
-<p>Notice how all of the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s have been expanded and sorted in
-alphabetical order. Also, notice how the <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a> has been
-labeled with a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">blank node identifier</a>. Normalization ensures that any arbitrary
-graph containing exactly the same information would be normalized to exactly
-the same form shown above.</p>
-
-</div>
-
-</div>
-
-<div id="the-application-programming-interface" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">5. </span>The Application Programming Interface</h2>
-
-<p>This API provides a clean mechanism that enables developers to convert
-JSON-LD data into a a variety of output formats that are easier to work with in
-various programming languages. If a JSON-LD API is provided in a programming
-environment, the entirety of the following API <em class="rfc2119" title="must">must</em> be implemented.
-</p>
-
-<div id="jsonldprocessor" class="section">
-<h3><span class="secno">5.1 </span>JsonLdProcessor</h3>
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JsonLdProcessor">[<span class="extAttr">NoInterfaceObject</span>]
-interface <span class="idlInterfaceID">JsonLdProcessor</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-expand-object-object-input-object-context">expand</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-compact-object-object-input-object-context">compact</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>, <span class="idlRaises"><a>ProcessingError</a></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-frame-object-object-input-object-frame-object-options">frame</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">frame</span></span>, <span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">options</span></span>) raises (<span class="idlRaises"><a>InvalidFrame</a></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-normalize-object-object-input-object-context">normalize</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span>
-<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-triples-object-object-input-JsonLdTripleCallback-tripleCallback-object-context">triples</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdTripleCallback" class="idlType"><code>JsonLdTripleCallback</code></a></span> <span class="idlParamName">tripleCallback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span>
-};</span>
-</pre><div id="methods" class="section"><h4><span class="secno">5.1.1 </span>Methods</h4><dl class="methods"><dt id="widl-JsonLdProcessor-compact-object-object-input-object-context"><code>compact</code></dt><dd><a href="#compaction">Compacts</a> the given <code>input</code>
-    according to the steps in the
-    <a href="#compaction-algorithm">Compaction Algorithm</a>. The
-    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, compacted and returned if there are
-    no errors. If the compaction fails, an appropirate exception <em class="rfc2119" title="must">must</em> be
-    thrown.
-  
-
-    
-
-    
-
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform compaction on.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">The base context to use when compacting the <code>input</code>.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidContext</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">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.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_DATATYPES</code></td><td class="excCodeDesc">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.</td></tr></table></td></tr><tr><td class="excName"><a>ProcessingError</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>LOSSY_COMPACTION</code></td><td class="excCodeDesc">The compaction would lead to a loss of information, such as a
-     <code>@language</code> value.</td></tr><tr><td class="excCodeName"><code>CONFLICTING_DATATYPES</code></td><td class="excCodeDesc">The target datatype specified in the coercion rule and the
-     datatype for the typed literal do not match.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JsonLdProcessor-expand-object-object-input-object-context"><code>expand</code></dt><dd><a href="#expansion">Expands</a> the given <code>input</code>
-    according to the steps in the
-    <a href="#expansion-algorithm">Expansion Algorithm</a>. The
-    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, expanded and returned if there are
-    no errors. If the expansion fails, an appropriate exception <em class="rfc2119" title="must">must</em> be thrown.
-    
-    
-
-    
-    
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to copy and perform the expansion upon.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidContext</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">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.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_DATATYPES</code></td><td class="excCodeDesc">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.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JsonLdProcessor-frame-object-object-input-object-frame-object-options"><code>frame</code></dt><dd><a href="#framing">Frames</a> the given <code>input</code>
-    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> <em class="rfc2119" title="must">must</em> be returned. Exceptions <em class="rfc2119" title="must">must</em> be thrown if there are 
-    errors.
-  
-
-    
-
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform framing on.</td></tr><tr><td class="prmName">frame</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The frame to use when re-arranging the data.</td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A set of options that will affect the framing algorithm.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidFrame</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">A frame must be either an object or an array of objects, if the frame
-    is neither of these types, this exception is thrown.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_EMBEDS</code></td><td class="excCodeDesc">A subject IRI was specified in more than one place in the input
-    frame. More than one embed of a given subject IRI is not allowed, and if
-    requested, <em class="rfc2119" title="must">must</em> result in this exception.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JsonLdProcessor-normalize-object-object-input-object-context"><code>normalize</code></dt><dd><a href="#normalization">Normalizes</a> the given <code>input</code>
-    according to the steps in the
-    <a href="#normalization-algorithm">Normalization Algorithm</a>. The
-    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, normalized and returned if there are
-    no errors. If the compaction fails, <code>null</code> <em class="rfc2119" title="must">must</em> be returned.
-  
-  
-    
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform normalization upon.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidContext</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">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.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_DATATYPES</code></td><td class="excCodeDesc">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.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JsonLdProcessor-triples-object-object-input-JsonLdTripleCallback-tripleCallback-object-context"><code>triples</code></dt><dd>Processes the <code>input</code> according to the
-    <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>, calling
-    the provided <code>tripleCallback</code> for each triple generated.
-  
-
-    
-
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to process when outputting triples.</td></tr><tr><td class="prmName">tripleCallback</td><td class="prmType"><code><a href="#idl-def-JsonLdTripleCallback" class="idlType"><code>JsonLdTripleCallback</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
-     the given <code>input</code>.
-     <div class="issue">This callback should be aligned with the
-       RDF API.</div></td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidContext</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">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.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_DATATYPES</code></td><td class="excCodeDesc">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.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
-
-</div>
-
-<div id="jsonldtriplecallback" class="section">
-<h3><span class="secno">5.2 </span>JsonLdTripleCallback</h3>
-<p>The JsonLdTripleCallback is called whenever the processor generates a
-triple during the <code>triple()</code> call.</p>
-
-<pre class="idl">
-<span class="idlInterface" id="idl-def-JsonLdTripleCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
-interface <span class="idlInterfaceID">JsonLdTripleCallback</span> {
-<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">triple</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">subject</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">objectType</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">object</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">datatype</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">language</span></span>);</span>
-};</span>
-</pre><div id="methods-1" class="section"><h4><span class="secno">5.2.1 </span>Methods</h4><dl class="methods"><dt id="widl-JsonLdTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language"><code>triple</code></dt><dd>This callback is invoked whenever a triple is generated by the processor.
-  
-  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject IRI that is associated with the triple.</td></tr><tr><td class="prmName">property</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The property IRI that is associated with the triple.</td></tr><tr><td class="prmName">objectType</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The type of object that is associated with the triple. Valid values
-       are <code>IRI</code> and <code>literal</code>.</td></tr><tr><td class="prmName">object</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The object value associated with the subject and the property.</td></tr><tr><td class="prmName">datatype</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The datatype associated with the object.</td></tr><tr><td class="prmName">language</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The language associated with the object in BCP47 format.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
-</div>
-
-
-</div>
-
-<div id="algorithms" class="section">
-
-<!-- OddPage -->
-<h2><span class="secno">6. </span>Algorithms</h2>
-
-<p>All algorithms described in this section are intended to operate on
-language-native data structures. That is, the serialization to a text-based
-JSON document isn't required as input or output to any of these algorithms and
-language-native data structures <em class="rfc2119" title="must">must</em> be used where applicable.</p>
-
-<div id="syntax-tokens-and-keywords" class="section">
-  <h3><span class="secno">6.1 </span>Syntax Tokens and Keywords</h3>
-
-  <p>JSON-LD specifies a number of syntax tokens and keywords that are using
-  in all algorithms described in this section:</p>
-
-  <dl>
-  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
-  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
-  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
-  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
-  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
-  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
-  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
-  <dt><code>:</code></dt><dd>The separator for JSON keys and values that use the <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> mechanism.</dd>
-  <dt><code>@subject</code></dt><dd>Sets the active subjects.</dd>
-  <dt><code>@type</code></dt><dd>Used to set the type of the active subjects.</dd>
-  </dl>
-</div>
-
-<div id="algorithm-terms" class="section">
-  <h3><span class="secno">6.2 </span>Algorithm Terms</h3>
-  <dl>
-    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
-    <dd>
-      a context that is specified to the algorithm before processing begins.
-    </dd>
-    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
-    <dd>
-      the currently active subject that the processor should use when
-      processing.
-    </dd>
-    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
-    <dd>
-      the currently active property that the processor should use when
-      processing.
-    </dd>
-    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
-    <dd>
-      the currently active object that the processor should use when
-      processing.
-    </dd>
-    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
-    <dd>
-      a context that is used to resolve <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es and
-      <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s while the processing
-      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context
-      contained within the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-    </dd>
-    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
-    <dd>
-      a context that is specified within a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>,
-      specified via the <code>@context</code> keyword.
-    </dd>
-    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
-    <dd>
-      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
-      context</a>, <a class="tref" title="current_subject">current subject</a>, and
-      <a class="tref" title="current_property">current property</a>. The <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> is managed
-      as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
-      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new
-      <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
-    </dd>
-    <dt><dfn title="JSON-LD_input" id="dfn-json-ld_input">JSON-LD input</dfn></dt>
-    <dd>
-      The JSON-LD data structure that is provided as input to the algorithm.
-    </dd>
-    <dt><dfn title="JSON-LD_output" id="dfn-json-ld_output">JSON-LD output</dfn></dt>
-    <dd>
-      The JSON-LD data structure that is produced as output by the algorithm.
-    </dd>
-
-  </dl>
-</div>
-
-<div id="context-1" class="section">
-  <h3 id="context"><span class="secno">6.3 </span>Context</h3>
-  <p>
-    Processing of JSON-LD data structure is managed recursively.
-    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
-    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
-    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
-  </p>
-  <p>
-    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> (or elements
-    of a list (see <span a="#list-processing">List Processing</span>)).
-  </p>
-  <p>
-    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> having a key of
-    <code>@context</code> with <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> value. When processing a <a class="tref" title="local__context">local
-    context</a>, special processing rules apply:
-  </p>
-  <ol class="algorithm">
-    <li>Create a new, empty <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
-    <li>
-      If the value is a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, it <em class="rfc2119" title="must">must</em> have a lexical form of IRI and used to initialize
-      a new JSON document which replaces the value for subsequent processing.
-    </li>
-    <li>If the value is a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>, perform the following steps:
-      <ol class="algorithm">
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@base</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
-          <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of an absolute IRI. Add the base mapping to the <a class="tref" title="local__context">local
-          context</a>. <p class="issue">Turtle allows @base to be relative. If we did this, we
-          would have to add <a href="#iri-expansion">IRI Expansion</a>.</p>
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@vocab</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
-          <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of an absolute IRI. Add the vocabulary mapping to the
-          <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> after performing <a href="#iri-expansion">IRI Expansion</a> on
-          the associated value.
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@coerce</code> key, it <em class="rfc2119" title="must">must</em> have a value of a
-          <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>. Add the <code>@coerce</code> mapping to the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>
-          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value(s).
-        </li>
-        <li>
-          Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> and
-          <em class="rfc2119" title="must">must</em> have the value of a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of IRI. Merge the key-value
-          pair into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.
-        </li>
-      </ol>
-    </li>
-    <li>
-      Merge the of <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s <code>@coerce</code> mapping into  the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping as described <a href="#coerce">below</a>.
-    </li>
-    <li>
-      Merge all entries other than the <code>@coerce</code> mapping from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>to the
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> overwriting any duplicate values.
-    </li>
-  </ol>
-
-  <div id="coerce" class="section">
-    <h4><span class="secno">6.3.1 </span>Coerce</h4>
-    <p>
-      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
-      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
-      <code>@coerce</code> mapping, overwriting any duplicate values in
-      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
-      The <code>@coerce</code> mapping has either a single 
-      <code>prefix:term</code> value, a single <a class="tref internalDFN" title="term" href="#dfn-term">term</a> value or an
-      <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of <code>prefix:term</code> or <a class="tref internalDFN" title="term" href="#dfn-term">term</a> values. 
-      When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-      map all <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> and <a class="tref internalDFN" title="term" href="#dfn-term">term</a> values to 
-      <a class="tref internalDFN" title="array" href="#dfn-array">array</a> form and replace with the union of the value from
-      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the 
-      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
-      with a single value, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
-    </p>
-  </div>
-
-  <div id="initial-context" class="section">
-    <h4><span class="secno">6.3.2 </span>Initial Context</h4>
-    <p>The <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> is initialized as follows:</p>
-    <ul>
-      <li>
-        <code>@base</code> is set using <cite><href="http: www.ietf.org="" rfc="" rfc2396.txt"="">section 5.1 Establishing a
-        Base URI</href="http:></cite> of [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>]. Processors <em class="rfc2119" title="may">may</em> provide a means
-        of setting the base IRI programatically.
-      </li>
-      <li><code>@coerce</code> is set with a single mapping from <code>@iri</code> to <code>@type</code>.</li>
-    </ul>
-    <pre class="example">
-{
-    "@base": <span class="diff">document-location</span>,
-    "@context": {
-      "@iri": "@type"
-    }
-}</pre>
-  </div>
-</div>
-
-<div id="iri-expansion" class="section">
-  <h3><span class="secno">6.4 </span>IRI Expansion</h3>
-  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
-    transforming a value representing an IRI into an actual IRI.</p>
-  <p>IRIs may be represented as an absolute IRI, a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, a <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>:<a class="tref internalDFN" title="term" href="#dfn-term">term</a> construct, or as a value relative to <code>@base</code>
-    or <code>@vocab</code>.</p>
-  <p>The algorithm for generating an IRI is:
-    </p><ol class="algorithm">
-      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
-      <li>If the prefix is a '_' (underscore), the IRI is unchanged.</li>
-      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
-        by prepending the mapped prefix to the (possibly empty) suffix using textual concatenation. Note that an empty
-        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
-      <li>If the IRI being processed is for a property (i.e., a key's value in a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>, or a
-        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
-        join the mapped value to the suffix using textual concatenation.</li>
-      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
-        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>].</li>
-      <li>Otherwise, use the value directly as an IRI.</li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="iri-compaction" class="section">
-  <h3><span class="secno">6.5 </span>IRI Compaction</h3>
-  <p>Some keys and values are expressed using IRIs. This section defines an
-    algorithm for transforming an IRI to a compact IRI using the
-    <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es specified in the
-    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</p>
-
-  <p>The algorithm for generating a compacted IRI is:
-    </p><ol class="algorithm">
-      <li>Search every key-value pair in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for
-        a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that is a complete match
-        against the IRI. If a complete match is found, the resulting compacted
-        IRI is the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> associated with the IRI in the
-        <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
-      <li>If a complete match is not found, search for a partial match from
-        the beginning of the IRI. For all matches that are found, the resulting
-        compacted IRI is the <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> associated with the partially
-        matched IRI in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> concatenated with a
-        colon (:) character and the unmatched part of the string. If there is
-        more than one compacted IRI produced, the final value is the
-        shortest and lexicographically least value of the entire set of compacted IRIs.</li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="value-expansion" class="section">
-  <h3><span class="secno">6.6 </span>Value Expansion</h3>
-  <p>Some values in JSON-LD can be expressed in a compact form. These values
-    are required to be expanded at times when processing JSON-LD documents.
-  </p>
-
-  <p>The algorithm for expanding a value is:
-    </p><ol class="algorithm">
-      <li>If the key that is associated with the value has an associated
-        coercion entry in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, the resulting
-        expansion is an object populated according to the following steps:
-        <ol class="algorithm">
-          <li>If the coercion target is <code>@iri</code>, expand the value
-            by adding a new key-value pair where the key is <code>@iri</code>
-            and the value is the expanded IRI according to the
-            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-          <li>If the coercion target is a typed literal, expand the value
-            by adding two new key-value pairs. The first key-value pair
-            will be <code>@literal</code> and the unexpanded value. The second
-            key-value pair will be <code>@datatype</code> and the associated
-            coercion datatype expanded according to the
-            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-        </ol>
-      </li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="value-compaction" class="section">
-  <h3><span class="secno">6.7 </span>Value Compaction</h3>
-  <p>Some values, such as IRIs and typed literals, may be expressed in an
-    expanded form in JSON-LD. These values are required to be compacted at
-    times when processing JSON-LD documents.
-  </p>
-
-  <p>The algorithm for compacting a value is:
-    </p><ol class="algorithm">
-      <li>If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> contains a coercion target for the
-        key that is associated with the value, compact the value using the
-        following steps:
-        <ol class="algorithm">
-          <li>If the coercion target is an <code>@iri</code>, the compacted
-            value is the value associated with the <code>@iri</code> key,
-            processed according to the
-            <a href="#iri-compaction">IRI Compaction</a> steps.</li>
-          <li>If the coercion target is a typed literal, the compacted
-            value is the value associated with the <code>@literal</code> key.
-          </li>
-          <li>Otherwise, the value is not modified.</li>
-        </ol>
-      </li>
-    </ol>
-  <p></p>
-</div>
-
-<div id="expansion-1" class="section">
-<h3><span class="secno">6.8 </span>Expansion</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>As stated previously, expansion is the process of taking a JSON-LD
-input and expanding all IRIs and typed literals to their fully-expanded form.
-The output will not contain a single context declaration and will have all IRIs
-and typed literals fully expanded.
-</p>
-
-<div id="expansion-algorithm" class="section">
-<h4><span class="secno">6.8.1 </span>Expansion Algorithm</h4>
-
-<ol class="algorithm">
-  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
-  process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> recursively using this algorithm.</li>
-  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an object,
-  update the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> according to the steps outlined in
-  the <a href="#context">context</a> section. Process each key, expanding
-  the key according to the <a href="#iri-expansion">IRI Expansion</a> rules.</li>
-  <ol class="algorithm">
-    <li>Process each value associated with each key:
-      <ol class="algorithm">
-        <li>If the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
-        recursively using this algorithm.</li>
-        <li>If the value is an object, process the object recursively
-        using this algorithm.</li>
-        <li>Otherwise, check to see the associated key has an associated
-        coercion rule. If the value should be coerced, expand the value
-        according to the <a href="#value-expansion">Value Expansion</a> rules.
-        If the value does not need to be coerced, leave the value as-is.
-        </li>
-      </ol>
-    </li><li>Remove the context from the object.</li>
-  </ol>
-</ol>
-</div>
-
-</div>
-
-<div id="compaction-1" class="section">
-<h3><span class="secno">6.9 </span>Compaction</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>As stated previously, compaction is the process of taking a JSON-LD
-input and compacting all IRIs using a given context. The output
-will contain a single top-level context declaration and will only use
-<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es and will ensure that all
-typed literals are fully compacted.
-</p>
-
-<div id="compaction-algorithm" class="section">
-<h4><span class="secno">6.9.1 </span>Compaction Algorithm</h4>
-
-<ol class="algorithm">
-  <li>Perform the <a href="#expansion-algorithm">Expansion Algorithm</a> on
-  the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>. This removes any existing context to allow the given context to be cleanly applied.</li>
-  <li>Set the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to the given context.
-  </li><li>If the top-level item is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
-    recursively, starting at this step.
-  </li><li>If the top-level item is an object, compress each key using the steps
-    defined in <a href="#iri-compaction">IRI Compaction</a> and compress each
-    value using the steps defined in
-    <a href="#value-compaction">Value Compaction</a>.</li>
-  
-</ol>
-</div>
-
-</div>
-
-
-<div id="framing-1" class="section">
-<h3><span class="secno">6.10 </span>Framing</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>A JSON-LD document is a representation of a directed graph. A single
-directed graph can have many different serializations, each expressing
-exactly the same information. Developers typically don't work directly with
-graphs, but rather, prefer trees when dealing with JSON. While mapping a graph
-to a tree can be done, the layout of the end result must be specified in
-advance. This section defines an algorithm for mapping a graph to
-a tree given a <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>.
-</p>
-
-<div id="framing-algorithm-terms" class="section">
-<h4><span class="secno">6.10.1 </span>Framing Algorithm Terms</h4>
- <dl>
-   <dt><dfn title="input_frame" id="dfn-input_frame">input frame</dfn></dt>
-   <dd>
-     the initial <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> provided to the framing algorithm.
-   </dd>
-   <dt><dfn title="framing_context" id="dfn-framing_context">framing context</dfn></dt>
-   <dd>
-     a context containing the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, the
-     <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> and the
-     <a class="tref" title="omit_default_flag">omit default flag</a>.
-   </dd>
-   <dt><dfn title="object_embed_flag" id="dfn-object_embed_flag">object embed flag</dfn></dt>
-   <dd>
-     a flag specifying that objects should be directly embedded in the output,
-     instead of being referred to by their IRI.
-   </dd>
-   <dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">explicit inclusion flag</dfn></dt>
-   <dd>
-     a flag specifying that for properties to be included in the output, they
-     must be explicitly declared in the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a>.
-   </dd>
-   <dt><dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">omit missing properties flag</dfn></dt>
-   <dd>
-     a flag specifying that properties that are missing from the
-     <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> should be omitted from the output.
-   </dd>
-   <dt><dfn title="match_limit" id="dfn-match_limit">match limit</dfn></dt>
-   <dd>
-     A value specifying the maximum number of matches to accept when building
-     arrays of values during the framing algorithm. A value of -1 specifies
-     that there is no match limit.
-   </dd>
-   <dt><dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">map of embedded subjects</dfn></dt>
-   <dd>
-     A map that tracks if a subject has been embedded in the output of the
-     <a href="#framing-algorithm">Framing Algorithm</a>.
-   </dd>
- </dl>
-</div>
-
-<div id="framing-algorithm" class="section">
-<h4><span class="secno">6.10.2 </span>Framing Algorithm</h4>
-
-<p>The framing algorithm takes <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> that has been
-normalized according to the
-<a href="#normalization-algorithm">Normalization Algorithm</a>
-(<strong>normalized input</strong>), an
-<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a> that has been expanded according to the
-<a href="#expansion-algorithm">Expansion Algorithm</a>
-(<strong>expanded frame</strong>), and a number of options and produces
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The following series of steps is the recursive
-portion of the framing algorithm:
-</p>
-
-<ol class="algorithm">
-  <li>Initialize the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> by setting the
-   <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, clearing the
-   <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a>, and clearing the
-   <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>. Override these values
-   based on input options provided to the algorithm by the application.
-  </li>
-  <li>Generate a <dfn title="list_of_frames" id="dfn-list_of_frames">list of frames</dfn> by processing the
-    <strong>expanded frame</strong>:
-    <ol class="algorithm">
-      <li>If the <strong>expanded frame</strong> is not an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, set
-        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to 1, place the
-        <strong>expanded frame</strong> into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
-        and set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to <code>null</code>.</li>
-      <li>If the <strong>expanded frame</strong> is an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, place an
-        empty object into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
-        set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and set
-        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
-      <li>If the <strong>expanded frame</strong> is a non-empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, add
-        each item in the <strong>expanded frame</strong> into the
-        <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>, set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an
-        <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and set <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
-    </ol></li>
-  <li>Create a <dfn title="match_array" id="dfn-match_array">match array</dfn> for each <strong>expanded frame</strong>
-    in the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> halting when either the
-    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> is zero or the end of the
-    <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> is reached. If an
-    <strong>expanded frame</strong> is
-    not an object, the processor <em class="rfc2119" title="must">must</em> throw a <code>Invalid Frame Format</code>
-    exception. Add each matching item from the <strong>normalized input</strong>
-    to the <a class="tref" title="matches_array">matches array</a> and decrement the
-    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> by 1 if:
-    <ol class="algorithm">
-       <li>The <strong>expanded frame</strong> has an <code>rdf:type</code>
-         that exists in the item's list of <code>rdf:type</code>s. Note:
-         the <code>rdf:type</code> can be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, but only one value needs
-         to be in common between the item and the
-         <strong>expanded frame</strong> for a match.</li>
-       <li>The <strong>expanded frame</strong> does not have an
-         <code>rdf:type</code> property, but every property in the
-         <strong>expanded frame</strong> exists in the item.</li>
-    </ol></li>
-  <li>Process each item in the <a class="tref internalDFN" title="match_array" href="#dfn-match_array">match array</a> with its associated
-    <dfn title="match_frame" id="dfn-match_frame">match frame</dfn>:
-    <ol class="algorithm">
-      <li>If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@embed</code>
-        keyword, set the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> to its value.
-        If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@explicit</code>
-        keyword, set the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> to its value.
-        Note: if the keyword exists, but the value is neither
-        <code>true</code> or <code>false</code>, set the associated flag to
-        <code>true</code>.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is cleared and the item has
-        the <code>@subject</code> property, replace the item with the value
-        of the <code>@subject</code> property.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
-        the <code>@subject</code> property, and its IRI is in the
-        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>, throw a
-        <code>Duplicate Embed</code> exception.</li>
-      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
-        the <code>@subject</code> property and its IRI is not in the
-        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>:
-        <ol class="algorithm">
-          <li>If the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> is set,
-            then delete any key from the item that does not exist in the
-            <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except <code>@subject</code>.</li>
-          <li>For each key in the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except for
-            keywords and <code>rdf:type</code>:
-          <ol class="algorithm">
-            <li>If the key is in the item, then build a new
-              <dfn title="recursion_input_list" id="dfn-recursion_input_list">recursion input list</dfn> using the object or objects
-              associated with the key. If any object contains an
-              <code>@iri</code> value that exists in the
-              <a class="tref" title="normalized_input">normalized input</a>, replace the object in the
-              <a class="tref" title="recusion_input_list">recusion input list</a> with a new object containing
-              the <code>@subject</code> key where the value is the value of
-              the <code>@iri</code>, and all of the other key-value pairs for
-              that subject. Set the <dfn title="recursion_match_frame" id="dfn-recursion_match_frame">recursion match frame</dfn> to the
-              value associated with the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>'s key. Replace
-              the value associated with the key by recursively calling this
-              algorithm using <a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">recursion input list</a>,
-              <a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">recursion match frame</a> as input.</li>
-            <li>If the key is not in the item, add the key to the item and
-              set the associated value to an empty array if the
-              <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> key's value is an array
-              or <code>null</code> otherwise.</li>
-            <li>If value associated with the item's key is <code>null</code>,
-              process the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>:
-              <ol class="algorithm">
-                <li>If the value associated with the key in the
-                  <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> is an array, use the first frame
-                  from the array as the <dfn title="property_frame" id="dfn-property_frame">property frame</dfn>, otherwise
-                  set the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> to an empty object.</li>
-                <li>If the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> contains an
-                <code>@omitDefault</code> keyword, set the
-                <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> to its value.
-                Note: if the keyword exists, but the value is neither
-                <code>true</code> or <code>false</code>, set the associated
-                flag to <code>true</code>.</li>
-                <li>If the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> is set,
-                  delete the key in the item. Otherwise, if the
-                  <code>@default</code> keyword is set in the
-                  <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> set the item's value to the value
-                  of <code>@default</code>.</li>
-              </ol></li>
-          </ol></li>
-        </ol>
-      </li><li>If the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> is <code>null</code> set it to
-        the item, otherwise, append the item to the
-        <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.
-    </li></ol>
-  </li><li>Return the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.</li>
-</ol>
-
-The final, non-recursive step of the framing algorithm requires the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to be compacted according to the
-<a href="#compaction-algorithm">Compaction Algorithm</a> by using the
-context provided in the <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a>. The resulting value is the
-final output of the compaction algorithm and is what should be returned to the
-application.
-
-</div>
-
-</div>
-
-<div id="normalization-1" class="section">
-<h3><span class="secno">6.11 </span>Normalization</h3>
-
-<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-
-<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and
-performing a deterministic transformation on that input that results in all
-aspects of the graph being fully expanded and named in the
-<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The normalized output is generated in such a way
-that any conforming JSON-LD processor will generate identical output
-given the same input. The problem is a fairly difficult technical
-problem to solve because it requires a directed graph to be ordered into a
-set of nodes and edges in a deterministic way. This is easy to do when all of
-the nodes have unique names, but very difficult to do when some of the nodes
-are not labeled.
-</p>
-
-<p>In time, there may be more than one normalization algorithm that will need
-to be identified. For identification purposes, this algorithm is named
-<abbr title="Universal Graph Normalization Algorithm 2011">UGNA2011</abbr>.
-</p>
-
-<div id="normalization-algorithm-terms" class="section">
-<h4><span class="secno">6.11.1 </span>Normalization Algorithm Terms</h4>
- <dl>
-   <dt><dfn title="label" id="dfn-label">label</dfn></dt>
-   <dd>
-     The subject IRI associated with a graph node. The subject IRI is expressed
-     using a key-value pair in a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> where the key is
-     <code>@subject</code> and the value is a string that is an IRI or
-     a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> containing the key <code>@iri</code> and
-     a value that is a string that is an IRI.
-   </dd>
-   <dt><dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">list of expanded nodes</dfn></dt>
-   <dd>
-     A list of all nodes in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> graph containing no
-     embedded objects and having all keys and values expanded according to the
-     steps in the <a href="#expansion-algorithm">Expansion Algorithm</a>.
-   </dd>
-   <dt><dfn title="alpha" id="dfn-alpha">alpha</dfn> and <dfn title="beta" id="dfn-beta">beta</dfn> values</dt>
-   <dd>
-     The words <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> refer to the first and
-     second nodes or values being examined in an algorithm. The names are
-     merely used to refer to each input value to a comparison algorithm.
-   </dd>
-   <dt><dfn title="renaming_counter" id="dfn-renaming_counter">renaming counter</dfn></dt>
-   <dd>
-     A counter that is used during the
-     <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. The
-     counter typically starts at one (1) and counts up for every node that is
-     relabeled. There will be two such renaming counters in an implementation
-     of the normalization algorithm. The first is the
-     <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> and the second is the
-     <a class="tref" title="deterministic_labeling_counter">deterministic labeling counter</a>.
-   </dd>
-   <dt><dfn title="serialization_label" id="dfn-serialization_label">serialization label</dfn></dt>
-   <dd>
-     An identifier that is created to aid in the normalization process in the
-     <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a>. The
-     value typically takes the form of <code>s<NUMBER></code> or
-     <code>c<NUMBER></code>.
-   </dd>
-</dl>
-</div>
-
-<div id="normalization-state" class="section">
-<h4><span class="secno">6.11.2 </span>Normalization State</h4>
-
-<p>When performing the steps required by the normalization algorithm,
-it is helpful to track the many pieces of information in a
-data structure called the <dfn title="normalization_state" id="dfn-normalization_state">normalization state</dfn>. Many of these
-pieces simply provide indexes into the graph. The information
-contained in the <a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a> is described below.</p>
-
-<dl>
-   <dt><dfn title="node_state" id="dfn-node_state">node state</dfn></dt>
-   <dd>
-     Each node in the graph will be assigned a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>. This
-     state contains the information necessary to deterministically
-     <a class="tref internalDFN" title="label" href="#dfn-label">label</a> all nodes in the graph. A <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>
-     includes:
-     <dl>
-        <dt><dfn title="node_reference" id="dfn-node_reference">node reference</dfn></dt>
-        <dd>
-          A <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> is a reference to a node in the graph.
-          For a given <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>
-          refers to the node that the state is for. When a
-          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> is created, its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>
-          should be to the node it is created for.
-        </dd>
-        <dt><dfn title="outgoing_list" id="dfn-outgoing_list">outgoing list</dfn></dt>
-        <dd>
-          Lists the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s for all nodes that are properties of
-          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>. This list should be initialized
-          by iterating over every object associated with a property in the
-          <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> adding its label if it is another node.
-        </dd>
-        <dt><dfn title="incoming_list" id="dfn-incoming_list">incoming list</dfn></dt>
-        <dd>
-          Lists the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s for all nodes in the graph for which
-          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> is a property. This list is
-          initialized to an empty list.
-        </dd>
-        <dt><dfn title="outgoing_serialization_map" id="dfn-outgoing_serialization_map">outgoing serialization map</dfn></dt>
-        <dd>
-          Maps node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s to <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s.
-          This map is initialized to an empty map. When this map is populated,
-          it will be filled with keys that are the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of every node in the
-          graph with a label that begins with <code>_:</code> and that has a
-          path, via properties, that starts with the
-          <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
-        </dd>
-        <dt><dfn title="outgoing_serialization" id="dfn-outgoing_serialization">outgoing serialization</dfn></dt>
-        <dd>
-          A string that can be lexicographically compared to the
-          <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a>s of other
-          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>s. It is a representation of the
-          <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> and other related
-          information. This string is initialized to an empty string.
-        </dd>
-        <dt><dfn title="incoming_serialization_map" id="dfn-incoming_serialization_map">incoming serialization map</dfn></dt>
-        <dd>
-          Maps node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s to <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s.
-          This map is initialized to an empty map. When this map is populated,
-          it will be filled with keys that are the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of every
-          node in the graph with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that begins with
-          <code>_:</code> and that has a path, via properties, that ends with
-          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
-        </dd>
-        <dt><dfn title="incoming_serialization" id="dfn-incoming_serialization">incoming serialization</dfn></dt>
-        <dd>
-          A string that can be lexicographically compared to the
-          <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a>s of other
-          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>s. It is a representation of the
-          <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> and other related
-          information. This string is initialized to an empty string.
-        </dd>
-     </dl>
-   </dd>
-   <dt><dfn title="node_state_map" id="dfn-node_state_map">node state map</dfn></dt>
-   <dd>
-     A mapping from a node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>.
-     It is initialized to an empty map.
-   </dd>
-   <dt><dfn title="labeling_prefix" id="dfn-labeling_prefix">labeling prefix</dfn></dt>
-   <dd>
-     The labeling prefix is a string that is used as the beginning of a node
-     <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. It should be initialized to a random base string that
-     starts with the characters <code>_:</code>, is not used by any other
-     node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>, and does not
-     start with the characters <code>_:c14n</code>. The prefix has two uses.
-     First it is used to temporarily name nodes during the normalization
-     algorithm in a way that doesn't collide with the names that already
-     exist as well as the names that will be generated by the normalization
-     algorithm. Second, it will eventually be set to <code>_:c14n</code> to
-     generate the final, deterministic labels for nodes in the graph. This
-     prefix will be concatenated with the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> to
-     produce a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. For example, <code>_:j8r3k</code> is
-     a proper initial value for the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a>.
-   </dd>
-   <dt><dfn title="labeling_counter" id="dfn-labeling_counter">labeling counter</dfn></dt>
-   <dd>
-     A counter that is used to label nodes. It is appended to the
-     <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> to create a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. It is
-     initialized to <code>1</code>.
-   </dd>
-   <dt><dfn title="map_of_flattened_nodes" id="dfn-map_of_flattened_nodes">map of flattened nodes</dfn></dt>
-   <dd>
-     A map containing a representation of all nodes in the graph where the
-     key is a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a> and the value is a single
-     <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that has no nested sub-objects
-     and has had all properties for the same node merged into a single
-     <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
-   </dd>
-</dl>
-
-</div>
-
-<div id="normalization-algorithm" class="section">
-<h4><span class="secno">6.11.3 </span>Normalization Algorithm</h4>
-
-<p>The normalization algorithm expands the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>,
-flattens the data structure, and creates an initial set of names for all
-nodes in the graph. The flattened data structure is then processed by a
-node labeling algorithm in order to get a fully expanded and named list of
-nodes which is then sorted. The result is a deterministically named and
-ordered list of graph nodes.
-</p>
-
-<ol class="algorithm">
-<li>Expand the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> according to the steps in
-the <a href="#expansion-algorithm">Expansion Algorithm</a> and store the
-result as the <strong>expanded input</strong>.</li>
-<li>Create a <a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a>.</li>
-<li>Initialize the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> by recursively
-processing every <dfn title="expanded_node" id="dfn-expanded_node">expanded node</dfn> in the
-<strong>expanded input</strong> in depth-first order:
-  <ol class="algorithm">
-    <li>If the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> is an unlabeled node, add a
-      new key-value pair to the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>
-      where the key is <code>@subject</code> and the value is the
-      concatenation of the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a>
-      and the string value of the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.
-      Increment the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.</li>
-    <li>Add the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> to the
-      <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>:
-      <ol class="algorithm">
-        <li>If the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is already
-          in the
-          <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> merge all properties from the
-          entry in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> into the
-          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>.</li>
-        <li>Go through every property associated with an array in the
-          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> and remove any duplicate IRI entries from
-          the array. If the resulting array only has one IRI entry, change it
-          from an array to an object.</li>
-        <li>Set the entry for the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
-          in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> to the
-          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>.
-        </li></ol></li>
-    <li>After exiting the recursive step, replace the reference to the
-      <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> with an object containing a single
-       key-value pair where the key is <code>@iri</code> and the value is
-       the value of the <code>@subject</code> key in the node.</li>
-  </ol></li>
-<li>For every entry in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>, insert a
-  key-value pair into the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> where the key is the
-  key from the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> and the value is a
-  <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> where its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> refers to
-  the value from the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>.
-</li><li>Populate the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> for each <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>
-  by iterating over every node in the graph and adding its <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
-  to the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> associated with each node found in its
-  properties.</li>
-<li>For every entry in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> that has a
-<a class="tref internalDFN" title="label" href="#dfn-label">label</a> that begins with <code>_:c14n</code>, relabel the node
-using the <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>.
-</li><li>Label all of the nodes that contain a <code>@subject</code> key associated
-with a value starting with <code>_:</code> according to the steps in the
-<a href="#deterministic-labeling-algorithm">Deterministic Labeling Algorithm</a>.
-</li>
-</ol>
-</div>
-
-<div id="node-relabeling-algorithm" class="section">
-<h4><span class="secno">6.11.4 </span>Node Relabeling Algorithm</h4>
-
-<p>This algorithm renames a node by generating a unique
-<dfn title="new_label" id="dfn-new_label">new label</dfn> and updating all references to that <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
-in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>. The <dfn title="old_label" id="dfn-old_label">old label</dfn> and the
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a> must be given as an input to the
-algorithm. The <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> is the current <a class="tref internalDFN" title="label" href="#dfn-label">label</a> of
-the node that is to be relabeled.
-
-</p><p>The node relabeling algorithm is as follows:</p>
-
-<ol class="algorithm">
-  <li>If the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> is <code>_:c14n</code> and the
-    <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> begins with <code>_:c14n</code> then return as
-    the node has already been renamed.
-  </li>
-  <li>Generate the <dfn title="new_label" id="dfn-new_label-1">new label</dfn> by concatenating the
-    <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> with the string value of the
-    <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>. Increment the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.
-  </li>
-  <li>For the <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> associated with the
-  <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a>, update every node in the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>
-  by changing all the properties that reference the <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> to
-  the <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a>.
-  </li>
-  <li>Change the <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> key in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>
-    to the <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a> and set the associated
-    <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the
-    <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a>.
-  </li>
-</ol>
-</div>
-
-<div id="deterministic-labeling-algorithm" class="section">
-<h4><span class="secno">6.11.5 </span>Deterministic Labeling Algorithm</h4>
-
-<p>The deterministic labeling algorithm takes the
-<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a>
-and produces a <dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes">list of finished nodes</dfn> that is sorted and
-contains deterministically named and expanded nodes from the graph.
-
-</p><ol class="algorithm">
-  <li>Set the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> to <code>_:c14n</code>, the
-    <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> to <code>1</code>,
-    the <dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes-1">list of finished nodes</dfn> to an empty array, and create
-    an empty array, the <dfn title="list_of_unfinished_nodes" id="dfn-list_of_unfinished_nodes">list of unfinished nodes</dfn>.</li>
-  <li>For each <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>:
-    <ol class="algorithm">
-      <li>If the node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> does not start with <code>_:</code>
-        then put the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the
-        <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a>.
-      </li>
-      <li>If the node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> does start with <code>_:</code>
-        then put the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the
-        <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a>.
-      </li>
-    </ol>
-  </li>
-  <li>Append to the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a> by processing
-    the remainder of the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> until it is
-    empty:
-    <ol class="algorithm">
-      <li>Sort the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> in descending order
-        according to the
-        <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
-        determine the sort order.</li>
-      <li>Create a <dfn title="list_of_labels" id="dfn-list_of_labels">list of labels</dfn> and initialize it to an
-        empty array.</li>
-      <li>For the first node from the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a>:
-        <ol class="algorithm">
-          <li>Add its <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the <a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">list of labels</a>.
-          </li>
-          <li>For each key-value pair from its associated
-            <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, add the key to a list and
-            then sort the list according to the lexicographical order of the
-            keys' associated values. Append the list to the
-            <a class="tref" title="list_of_nodes_to_label">list of nodes to label</a>.
-          </li>
-          <li>For each key-value pair from its associated
-            <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a>, add the key to a list and
-            then sort the list according to the lexicographical order of the
-            keys' associated values. Append the list to the
-            <a class="tref" title="list_of_nodes_to_label">list of nodes to label</a>.
-          </li></ol></li>
-      <li>For each <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the <a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">list of labels</a>,
-        relabel the associated node according to the
-        <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. If
-        any <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> contains a key that
-        matches the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, clear the map and set the associated
-        <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> to an empty string. If any
-        <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> contains a key that
-        matches the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, clear the map and set the associated
-        <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> to an empty string.
-      </li>
-      <li>
-        Remove each node with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that starts with
-        <code>_:c14n</code> from the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> and
-        add it to the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a>.
-      </li>
-    </ol>
-  </li>
-  <li>Sort the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a> in descending order
-    according to the
-    <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
-    determine the sort order.</li>
-</ol>
-</div>
-
-<div id="shallow-comparison-algorithm" class="section">
-<h4><span class="secno">6.11.6 </span>Shallow Comparison Algorithm</h4>
-
-<p>
-The shallow comparison algorithm takes two unlabeled nodes,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, as input and
-determines which one should come first in a sorted list. The following
-algorithm determines the steps that are executed in order to determine the
-node that should come first in a list:
-</p>
-
-<ol class="algorithm">
-  <li>Compare the total number of node properties. The node with fewer
-    properties is first.</li>
-  <li>Lexicographically sort the property IRIs for each node and compare
-    the sorted lists. If an IRI is found to be lexicographically smaller, the
-    node containing that IRI is first.</li>
-  <li>Compare the values of each property against one another:
-    <ol class="algorithm">
-      <li>The node associated with fewer property values is first.
-      </li>
-      <li>Create an <dfn title="alpha_list" id="dfn-alpha_list">alpha list</dfn> by adding all values associated
-        with the <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> property that are not unlabeled nodes.
-      </li>
-      <li>Create a <dfn title="beta_list" id="dfn-beta_list">beta list</dfn> by adding all values associated
-        with the <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> property that is not an unlabeled node.
-      </li>
-      <li>Compare the length of <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and
-        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a>. The node associated with the list containing
-        the fewer number of items is first.</li>
-      <li>Sort <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> according to
-        the
-        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
-        For each offset into the <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a>, compare the item
-        at the offset against the item at the same offset in the
-        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> according to the
-        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
-        The node associated with the lesser item is first.
-    </li></ol></li>
-  <li>Process the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s associated with each node to
-    determine order:
-    <ol class="algorithm">
-      <li>The node with the shortest <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> is first.</li>
-      <li>Sort the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s according to incoming property
-         and then incoming <a class="tref internalDFN" title="label" href="#dfn-label">label</a>.
-      </li><li>The node associated with the fewest number of incoming nodes is
-        first.</li>
-      <li>For each offset into the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s,
-        compare the associated properties and <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s:
-        <ol class="algorithm">
-          <li>The node associated with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that does not begin with
-            <code>_:</code> is first.
-          </li>
-          <li>If the nodes' <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s do not begin with
-            <code>_:</code>, then the node associated with the
-            lexicographically lesser <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is first.</li>
-          
-          <li>The node associated with the lexicographically lesser associated
-            property is first.
-          </li>
-          <li>The node with the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that does not begin with
-            <code>_:c14n</code> is first.
-          </li>
-          <li>The node with the lexicographically lesser <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
-            is first.
-          </li>
-        </ol>
-    </li></ol></li>
-  <li>Otherwise, the nodes are equivalent.</li>
-</ol></div>
-
-<div id="object-comparison-algorithm" class="section">
-<h4><span class="secno">6.11.7 </span>Object Comparison Algorithm</h4>
-
-<p>
-The object comparison algorithm is designed to compare two graph node
-property values, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, against the other.
-The algorithm is useful when sorting two lists of graph node properties.
-</p>
-
-<ol class="algorithm">
-  <li>If one of the values is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> and the other is not, the value that is
-    a string is first.
-  </li>
-  <li>If both values are <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s, the lexicographically lesser string is
-    first.
-  </li>
-  <li>If one of the values is a literal and the other is not, the value that is
-    a literal is first.
-  </li>
-  <li>If both values are literals:
-    <ol class="algorithm">
-      <li>The lexicographically lesser string associated with
-        <code>@literal</code> is first.
-      </li>
-      <li>The lexicographically lesser string associated with
-        <code>@datatype</code> is first.
-      </li>
-      <li>The lexicographically lesser string associated with
-        <code>@language</code> is first.
-      </li>
-    </ol>
-  </li>
-  <li>If both values are expanded IRIs, the
-    lexicographically lesser string associated with <code>@iri</code>
-    is first.</li>
-  <li>Otherwise, the two values are equivalent.</li>
-</ol>
-
-</div>
-
-<div id="deep-comparison-algorithm" class="section">
-<h4><span class="secno">6.11.8 </span>Deep Comparison Algorithm</h4>
-
-<p>
-The deep comparison algorithm is used to compare the difference between two
-nodes, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>.
-A deep comparison takes the incoming and outgoing node edges in
-a graph into account if the number of properties and value of those properties
-are identical. The algorithm is helpful when sorting a list of nodes and will
-return whichever node should be placed first in a list if the two nodes are
-not truly equivalent.
-</p>
-
-<p>When performing the steps required by the deep comparison algorithm, it
-is helpful to track state information about mappings. The information
-contained in a <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> is described below.</p>
-
-<dl class="algorithm">
-   <dt><dfn title="mapping_state" id="dfn-mapping_state">mapping state</dfn></dt>
-   <dd>
-     <dl>
-        <dt><dfn title="mapping_counter" id="dfn-mapping_counter">mapping counter</dfn></dt>
-        <dd>
-          Keeps track of the number of nodes that have been mapped to
-          <a class="tref" title="serialization_labels">serialization labels</a>. It is initialized to
-          <code>1</code>.
-        </dd>
-        <dt><dfn title="processed_labels_map" id="dfn-processed_labels_map">processed labels map</dfn></dt>
-        <dd>
-          Keeps track of the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of nodes that have already
-          been assigned <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s. It is initialized
-          to an empty map.
-        </dd>
-        <dt><dfn title="serialized_labels_map" id="dfn-serialized_labels_map">serialized labels map</dfn></dt>
-        <dd>
-          Maps a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to its associated
-          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>. It is initialized to an empty map.
-        </dd>
-        <dt><dfn title="adjacent_info_map" id="dfn-adjacent_info_map">adjacent info map</dfn></dt>
-        <dd>
-          Maps a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> to the node
-          <a class="tref internalDFN" title="label" href="#dfn-label">label</a> associated with it, the list of sorted
-          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s for adjacent nodes, and the map of
-          adjacent node <a class="tref" title="serialiation_label">serialiation label</a>s to their associated
-          node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s. It is initialized to an empty map.
-        </dd>
-        <dt><dfn title="key_stack" id="dfn-key_stack">key stack</dfn></dt>
-        <dd>
-          A stack where each element contains an array of adjacent
-          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s and an index into that array. It
-          is initialized to a stack containing a single element where its
-          array contains a single string element <code>s1</code> and its
-          index is set to <code>0</code>.
-        </dd>
-        <dt><dfn title="serialized_keys" id="dfn-serialized_keys">serialized keys</dfn></dt>
-        <dd>
-          Keeps track of which <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s have already
-          been written at least once to the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
-          It is initialized to an empty map.
-        </dd>
-        <dt><dfn title="serialization_string" id="dfn-serialization_string">serialization string</dfn></dt>
-        <dd>
-          A string that is incrementally updated as a serialization is built.
-          It is initialized to an empty string.
-        </dd>
-     </dl>
-   </dd>
-</dl>
-
-<p>The deep comparison algorithm is as follows:</p>
-
-<ol class="algorithm">
-  <li>Perform a comparison between <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-    according to the
-    <a href="#shallow-comparison-algorithm">Shallow Comparison Algorithm</a>.
-    If the result does not show that the two nodes are equivalent, return
-    the result.
-    </li>
-  <li>Compare incoming and outgoing edges for each node, updating their
-    associated <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> as each node is processed:
-    <ol class="algorithm">
-      <li>If the <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
-        is empty, generate the serialization according to the
-        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-        Provide <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
-        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>,
-        <code>outgoing direction</code> to the algorithm as inputs.
-      </li><li>If the <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        is empty, generate the serialization according to the
-        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-        Provide <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
-        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, and
-        <code>outgoing direction</code> to the algorithm as inputs.
-      </li><li>If <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> is
-        lexicographically less than <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s, then
-        <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> is first. If it is greater, then <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        is first.</li>
-      <li>If the <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
-        is empty, generate the serialization according to the
-        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-        Provide <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
-        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> with its <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>
-        set to a copy of <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s
-        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, and
-        <code>incoming direction</code> to the algorithm as inputs.
-      </li><li>If the <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        is empty, generate the serialization according to the
-        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-        Provide <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
-        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> with its <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>
-        set to a copy of <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s
-        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, and
-        <code>incoming direction</code> to the algorithm as inputs.
-      </li><li>If <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> is
-        lexicographically less than <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s, then
-        <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> is first. If it is greater, then <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
-        is first.</li>
-    </ol></li>
-</ol>
-</div>
-
-<div id="node-serialization-algorithm" class="section">
-<h4><span class="secno">6.11.9 </span>Node Serialization Algorithm</h4>
-
-<p>
-The node serialization algorithm takes a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, and a <dfn title="direction" id="dfn-direction">direction</dfn> (either
-<code>outgoing direction</code> or <code>incoming direction</code>) as
-inputs and generates a deterministic serialization for the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
-</p>
-
-<ol class="algorithm">
-<li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> exists in the
-  <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, terminate the algorithm as the
-  <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> has already been created.
-</li>
-<li>Set the value associated with the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the
-  <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a> to <code>true</code>.
-</li>
-<li>Generate the next <dfn title="serialization_label" id="dfn-serialization_label-1">serialization label</dfn> for the
-  <a class="tref internalDFN" title="label" href="#dfn-label">label</a> according to the
-  <a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>.
-</li>
-<li>Create an empty map called the <dfn title="adjacent_serialized_labels_map" id="dfn-adjacent_serialized_labels_map">adjacent serialized labels map</dfn>
-that will store mappings from <a class="tref" title="serialized_label">serialized label</a>s to adjacent
-node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s.</li>
-<li>Create an empty array called the
-<dfn title="adjacent_unserialized_labels_list" id="dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</dfn> that will store
-<a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of adjacent nodes that haven't been assigned
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s yet.
-</li>
-<li>For every <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in a list, where the list the <a class="tref internalDFN" title="outgoing_list" href="#dfn-outgoing_list">outgoing list</a> if
-the <a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a> is <code>outgoing direction</code> and the
-<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> otherwise, if the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> starts with
-<code>_:</code>, it is the <dfn title="target_node_label" id="dfn-target_node_label">target node label</dfn>:
-  <ol class="algorithm">
-    <li>Look up the <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a> in the
-      <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a> and if a mapping exists,
-      update the <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a> where the key is
-      the value in the <a class="tref" title="serialization_map">serialization map</a> and the value is the
-      <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a>.</li>
-    <li>Otherwise, add the <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a> to the
-      <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a>.
-  </li></ol>
-</li>
-<li>Set the <dfn title="maximum_serialization_combinations" id="dfn-maximum_serialization_combinations">maximum serialization combinations</dfn> to
-  <code>1</code> or the length of the
-  <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a>, whichever is greater.</li>
-<li>While the <a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">maximum serialization combinations</a> is greater than
-  <code>0</code>, perform the
-  <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
-  passing the <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, the <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> for the
-  first iteration and a copy of it for each subsequent iteration, the
-  generated <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, the <a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a>,
-  the <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a>, and the
-  <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a>.
-  Decrement the <a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">maximum serialization combinations</a> by
-  <code>1</code> for each iteration.
-</li></ol>
-
-</div>
-
-<div id="serialization-label-generation-algorithm" class="section">
-<h4><span class="secno">6.11.10 </span>Serialization Label Generation Algorithm</h4>
-
-<p>
-The algorithm generates a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> given a
-<a class="tref internalDFN" title="label" href="#dfn-label">label</a> and a <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> and returns the
-<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>.
-</p>
-
- <ol class="algorithm">
-   <li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is already in the
-     <a class="tref" title="serialization_labels_map">serialization labels map</a>, return its associated value.
-   </li>
-   <li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> starts with the string <code>_:c14n</code>,
-     the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> is the letter <code>c</code>
-     followed by the number that follows <code>_:c14n</code> in the
-     <a class="tref internalDFN" title="label" href="#dfn-label">label</a>.
-   </li>
-   <li>Otherwise, the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> is the
-     letter <code>s</code> followed by the string value of
-     <a class="tref" title="mapping_count">mapping count</a>. Increment the <a class="tref" title="mapping_count">mapping count</a> by
-     <code>1</code>.
-   </li>
-   <li>Create a new key-value pair in the <a class="tref" title="serialization_labels_map">serialization labels map</a>
-     where the key is the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> and the value is the
-     generated <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>.
-   </li>
- </ol>
-</div>
-
-<div id="combinatorial-serialization-algorithm" class="section">
-<h4><span class="secno">6.11.11 </span>Combinatorial Serialization Algorithm</h4>
-
-<p>
-The combinatorial serialization algorithm takes a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a
-<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, a
-<a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a>, a <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a>,
-and a <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> as inputs and generates
-the lexicographically least serialization of nodes relating to the
-<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
-</p>
-
-<ol class="algorithm">
-  <li>If the <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> is not empty:
-    <ol class="algorithm">
-      <li>Copy the <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a> to the
-        <dfn title="adjacent_serialized_labels_map_copy" id="dfn-adjacent_serialized_labels_map_copy">adjacent serialized labels map copy</dfn>.</li>
-      <li>Remove the first <a class="tref" title="unserialized_label">unserialized label</a> from the
-        <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> and create a new
-        <dfn title="new_serialization_label" id="dfn-new_serialization_label">new serialization label</dfn> according to the
-        <a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>.
-      </li><li>Create a new key-value mapping in the
-        <a class="tref internalDFN" title="adjacent_serialized_labels_map_copy" href="#dfn-adjacent_serialized_labels_map_copy">adjacent serialized labels map copy</a>
-        where the key is the <a class="tref internalDFN" title="new_serialization_label" href="#dfn-new_serialization_label">new serialization label</a> and the value
-        is the <a class="tref" title="unserialized_label">unserialized label</a>.
-      </li><li>Set the <dfn title="maximum_serialization_rotations" id="dfn-maximum_serialization_rotations">maximum serialization rotations</dfn> to
-        <code>1</code> or the length of the
-        <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a>, whichever is greater.
-      </li>
-      <li>While the <a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">maximum serialization rotations</a> is greater than
-        <code>0</code>:
-        <ol class="algorithm">
-          <li>Recursively perform the
-            <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
-            passing the <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> for the first iteration of the
-            loop, and a copy of it for each subsequent iteration.
-          </li>
-          <li>Rotate the elements in the
-            <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> by shifting each of
-            them once to the right, moving the element at the end of the list
-            to the beginning of the list.
-          </li>
-          <li>Decrement the <a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">maximum serialization rotations</a> by
-            <code>1</code> for each iteration.
-          </li>
-        </ol>
-      </li>
-    </ol>
-  </li>
-  <li>If the <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> is empty:
-    <ol class="algorithm">
-      <li>Create a <dfn title="list_of_keys" id="dfn-list_of_keys">list of keys</dfn> from the keys in the
-        <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a> and sort it
-        lexicographically.
-      </li>
-      <li>Add a key-value pair to the <a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">adjacent info map</a> where
-        the key is the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> and the value is
-        an object containing the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>'s label, the
-        <a class="tref internalDFN" title="list_of_keys" href="#dfn-list_of_keys">list of keys</a> and the
-        <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a>.
-      </li>
-      <li>Update the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> according to the
-        <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>.
-      </li>
-      <li>If the <a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a> is <code>outgoing direction</code>
-        then <dfn title="directed_serialization" id="dfn-directed_serialization">directed serialization</dfn> refers to the
-        <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> and the
-        <dfn title="directed_serialization_map" id="dfn-directed_serialization_map">directed serialization map</dfn> refers to the
-        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, otherwise it refers to the
-        <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> and the
-        <a class="tref internalDFN" title="directed_serialization_map" href="#dfn-directed_serialization_map">directed serialization map</a> refers to the
-        <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a>. Compare the
-        <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> to the
-        <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a> according to the
-        <a href="#mapping-serialization-algorithm">Serialization Comparison Algorithm</a>.
-        If the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> is less than or equal to
-        the <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a>:
-        <ol class="algorithm">
-          <li>For each value in the <a class="tref internalDFN" title="list_of_keys" href="#dfn-list_of_keys">list of keys</a>, run the
-            <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
-          </li>
-	       <li>Update the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> according to the
-	         <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>.
-	       </li>
-	       <li>Compare the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> to the
-	         <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a> again and if it is less than
-	         or equal and the length of the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> is
-	         greater than or equal to the length of the
-	         <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a>, then set the
-	         <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a> to the
-	         <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> and set the
-	         <a class="tref internalDFN" title="directed_serialization_map" href="#dfn-directed_serialization_map">directed serialization map</a> to the
-	         <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>.
-	       </li>
-        </ol>
-      </li>
-    </ol>
-  </li>
-</ol>
-
-</div>
-
-<div id="serialization-comparison-algorithm" class="section">
-<h4><span class="secno">6.11.12 </span>Serialization Comparison Algorithm</h4>
-
-<p>
-The serialization comparison algorithm takes two serializations,
-<a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> and returns either which of the two
-is less than the other or that they are equal.
-</p>
-
-<ol class="algorithm">
-  <li>Whichever serialization is an empty string is greater. If they are
-    both empty strings, they are equal.</li>
-  <li>Return the result of a lexicographical comparison of <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
-    and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> up to the number of characters in the shortest of
-    the two serializations.
-  </li>
-</ol>
-</div>
-
-<div id="mapping-serialization-algorithm" class="section">
-<h4><span class="secno">6.11.13 </span>Mapping Serialization Algorithm</h4>
-
-<p>
-The mapping serialization algorithm incrementally updates the
-<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> in a <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>.
-</p>
-
-<ol class="algorithm">
-  <li>If the <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a> is not empty:
-    <ol class="algorithm">
-      <li>Pop the <dfn title="serialization_key_info" id="dfn-serialization_key_info">serialization key info</dfn> off of the
-        <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a>.
-      </li>
-      <li>For each <dfn title="serialization_key" id="dfn-serialization_key">serialization key</dfn> in the
-        <a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">serialization key info</a> array, starting at
-        the <dfn title="serialization_key_index" id="dfn-serialization_key_index">serialization key index</dfn> from the
-        <a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">serialization key info</a>:
-        <ol class="algorithm">
-          <li>If the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> is not in the
-            <a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">adjacent info map</a>, push the
-            <a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">serialization key info</a> onto the
-            <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a> and exit from this loop.
-          </li>
-          <li>If the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> is a key in
-            <a class="tref internalDFN" title="serialized_keys" href="#dfn-serialized_keys">serialized keys</a>, a cycle has been detected. Append
-            the concatenation of the <code>_</code> character and the
-            <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> to the
-            <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
-          </li><li>Otherwise, serialize all outgoing and incoming edges in the
-            related node by performing the following steps:
-            <ol class="algorithm">
-              <li>Mark the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> as having
-                been processed by adding a new key-value pair to
-                <a class="tref internalDFN" title="serialized_keys" href="#dfn-serialized_keys">serialized keys</a> where the key
-                is the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> and the value is
-                <code>true</code>.
-              </li>
-              <li>Set the <dfn title="serialization_fragment" id="dfn-serialization_fragment">serialization fragment</dfn> to the value of
-                the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a>.</li>
-              <li>Set the <a class="tref" title="adjacent_info">adjacent info</a> to the value of the
-                <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> in the
-                <a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">adjacent info map</a>.
-              </li>
-              <li>Set the <a class="tref" title="adjacent_node_label">adjacent node label</a> to the node
-                <a class="tref internalDFN" title="label" href="#dfn-label">label</a> from the <a class="tref" title="adjacent_info">adjacent info</a>.
-              </li>
-              <li>If a mapping for the <a class="tref" title="adjacent_node_label">adjacent node label</a>
-                exists in the <a class="tref" title="map_of_all_labels">map of all labels</a>:
-                <ol class="algorithm">
-                  <li>Append the result of the
-                    <a href="">Label Serialization Algorithm</a> to the
-                    <a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment">serialization fragment</a>.
-                  </li>
-                </ol>
-              </li>
-              <li>Append all of the keys in the <a class="tref" title="adjacent_info">adjacent info</a>
-                to the <a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment">serialization fragment</a>.
-              </li>
-              <li>Append the <a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment">serialization fragment</a> to the
-                <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
-              </li>
-              <li>Push a new key info object containing the keys from the
-                <a class="tref" title="adjacent_info">adjacent info</a> and an index of <code>0</code>
-                onto the <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a>.
-              </li>
-              <li>Recursively update the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>
-                according to the
-                <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>.
-              </li>
-            </ol>
-          </li>
-        </ol>
-      </li>
-    </ol>
-  </li>
-</ol>
-
-</div>
-
-<div id="label-serialization-algorithm" class="section">
-<h4><span class="secno">6.11.14 </span>Label Serialization Algorithm</h4>
-
-<p>
-The label serialization algorithm serializes information about a node that
-has been assigned a particular <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>.
-</p>
-
-<ol class="algorithm">
-  <li>Initialize the <a class="tref" title="label_serialization">label serialization</a> to an empty string.</li>
-  <li>Append the <code>[</code> character to the
-    <a class="tref" title="label_serialization">label serialization</a>.</li>
-  <li>Append all properties to the <a class="tref" title="label_serialization">label serialization</a> by
-    processing each key-value pair in the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>,
-    excluding the
-    <code>@subject</code> property. The keys should be processed in
-    lexicographical order and their associated values should be processed
-    in the order produced by the
-    <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>:
-    <ol class="algorithm">
-      <li>Build a string using the pattern <code><</code><strong>KEY</strong><code>></code>
-        where <strong>KEY</strong> is the current key. Append string to the
-        <a class="tref" title="label_serialization">label serialization</a>.</li>
-      <li>The value may be a single object or an array of objects.
-        Process all of the objects that are associated with the key, building
-        an <dfn title="object_string" id="dfn-object_string">object string</dfn> for each item:
-        <ol class="algorithm">
-          <li>If the object contains an <code>@iri</code> key with a
-            value that starts
-            with <code>_:</code>, set the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> to
-            the value <code>_:</code>. If the value does not
-            start with <code>_:</code>, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a>
-            using the pattern
-            <code><</code><strong>IRI</strong><code>></code>
-            where <strong>IRI</strong> is the value associated with the
-            <code>@iri</code> key.</li>
-          <li>If the object contains a <code>@literal</code> key and a
-            <code>@datatype</code> key, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a>
-            using the pattern
-            <code>"</code><strong>LITERAL</strong><code>"^^<</code><strong>DATATYPE</strong><code>></code>
-            where <strong>LITERAL</strong> is the value associated with the
-            <code>@literal</code> key and <strong>DATATYPE</strong> is the
-            value associated with the <code>@datatype</code> key.</li>
-          <li>If the object contains a <code>@literal</code> key and a
-            <code>@language</code> key, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a>
-            using the pattern
-            <code>"</code><strong>LITERAL</strong><code>"@</code><strong>LANGUAGE</strong>
-            where <strong>LITERAL</strong> is the value associated with the
-            <code>@literal</code> key and <strong>LANGUAGE</strong> is the
-            value associated with the <code>@language</code> key.</li>
-          <li>Otherwise, the value is a string. Build the
-            <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> using the pattern
-            <code>"</code><strong>LITERAL</strong><code>"</code>
-            where <strong>LITERAL</strong> is the value associated with the
-            current key.</li>
-          <li>If this is the second iteration of the loop,
-            append a <code>|</code> separator character to the
-            <a class="tref" title="label_serialization">label serialization</a>.</li>
-          <li>Append the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> to the
-            <a class="tref" title="label_serialization">label serialization</a>.</li>
-        </ol>
-    </li></ol>
-  </li>
-  <li>Append the <code>]</code> character to the
-    <a class="tref" title="label_serialization">label serialization</a>.</li>
-  <li>Append the <code>[</code> character to the
-    <a class="tref" title="label_serialization">label serialization</a>.</li>
-  <li>Append all incoming references for the current
-    <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the <a class="tref" title="label_serialization">label serialization</a> by
-    processing all of the items associated with the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>:
-    <ol class="algorithm">
-      <li>Build a <dfn title="reference_string" id="dfn-reference_string">reference string</dfn>
-        using the pattern <code><</code><strong>PROPERTY</strong><code>></code><code><</code><strong>REFERER</strong><code>></code>
-        where <strong>PROPERTY</strong> is the property associated with the
-        incoming reference and <strong>REFERER</strong> is either the subject of
-        the node referring to the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the incoming reference
-        or <code>_:</code> if <strong>REFERER</strong> begins with
-        <code>_:</code>.
-      </li><li>If this is the second iteration of the loop,
-        append a <code>|</code> separator character to the
-        <a class="tref" title="label_serialization">label serialization</a>.</li>
-      <li>Append the <a class="tref internalDFN" title="reference_string" href="#dfn-reference_string">reference string</a> to the
-        <a class="tref" title="label_serialization">label serialization</a>.</li>
-    </ol>
-  </li><li>Append the <code>]</code> character to the
-    <a class="tref" title="label_serialization">label serialization</a>.</li>
-  <li>Append all <a class="tref" title="adjacent_node_labels">adjacent node labels</a> to the
-    <a class="tref" title="label_serialization">label serialization</a> by concatenating the string value
-    for all of them, one after the other, to the
-    <a class="tref" title="label_serialization">label serialization</a>.</li>
-  <li>Push the <a class="tref" title="adjacent_node_labels">adjacent node labels</a> onto the
-    <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a> and append the result of the
-    <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>
-    to the <a class="tref" title="label_serialization">label serialization</a>.
-</li></ol>
-
-</div>
-
-</div>
-
-<div id="data-round-tripping" class="section">
-
-<h3><span class="secno">6.12 </span>Data Round Tripping</h3>
-
-<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
-ensure that the normalized value is a string. In order to generate the
-string from a <strong>double</strong> value, output equivalent to the
-<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
-<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
-is the value to be converted.</p>
-
-<p>To convert the a double value in JavaScript, implementers can use the
-following snippet of code:</p>
-
-<pre class="example">
-// the variable 'value' below is the JavaScript native double value that is to be converted
-(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
-
-<p class="note">When data needs to be normalized, JSON-LD authors should
-not use values that are going to undergo automatic conversion. This is due
-to the lossy nature of <strong>xsd:double</strong> values.</p>
-
-<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> in some
-versions of PHP. This is problematic when generating a byte
-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 <em class="rfc2119" title="must not">must not</em> backslash-escape 
-forward slashes.</p>
-
-<p class="issue">Round-tripping data can be problematic if we mix and
-match @coerce rules with JSON-native datatypes, like integers. Consider the
-following code example:</p>
-
-<pre class="example">
-var myObj = { "@context" : {
-                "number" : "http://example.com/vocab#number",
-                "@coerce": {
-                   "xsd:nonNegativeInteger": "number"
-                }
-              },
-              "number" : 42 };
-
-// Map the language-native object to JSON-LD
-var jsonldText = jsonld.normalize(myObj);
-
-// Convert the normalized object back to a JavaScript object
-var myObj2 = jsonld.parse(jsonldText);</pre>
-
-<p class="issue">At this point, myObj2 and myObj will have different
-values for the "number" value. myObj will be the number 42, while
-myObj2 will be the string "42". This type of data round-tripping
-error can bite developers. We are currently wondering if having a
-"coerce validation" phase in the parsing/normalization phases would be a
-good idea. It would prevent data round-tripping issues like the
-one mentioned above.</p>
-
-</div>
-
-<div id="rdf-conversion" class="section">
-<h3><span class="secno">6.13 </span>RDF Conversion</h3>
-
-<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted to any other RDF-compatible document
-format using the algorithm specified in this section.</p>
-
-<p>
-  The JSON-LD Processing Model describes processing rules for extracting RDF
-  from a JSON-LD document. Note that many uses of JSON-LD may not require
-  generation of RDF.
-</p>
-
-<p>
-The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD to RDF processor.
-Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to
-implement the algorithm exactly as described.
-</p>
-
-<p class="issue">The RDF Conversion Algorithm is a work in progress.</p>
-
-<div class="informative section" id="overview">
-  <h4><span class="secno">6.13.1 </span>Overview</h4><p><em>This section is non-normative.</em></p>
-  <p>
-    JSON-LD is intended to have an easy to parse grammar that closely models existing
-    practice in using JSON for describing object representations. This allows the use
-    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
-    for stream-based parsing similar to SAX.
-  </p>
-  <p>
-    As with other grammars used for describing <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
-    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
-    externally named entities, <em>BNodes</em>, resources for which an external name does not
-    exist, or is not known, and Literals, which describe terminal entities such as strings,
-    dates and other representations having a lexical representation possibly including
-    an explicit language or datatype.
-  </p>
-  <p>
-    Data described with JSON-LD may be considered to be the representation of a graph made
-    up of <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> resources related via a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> resource.
-    However, specific implementations may choose to operate on the document as a normal
-    JSON description of objects having attributes.
-  </p>
-</div>
-
-<div id="rdf-conversion-algorithm-terms" class="section">
-  <h4><span class="secno">6.13.2 </span>RDF Conversion Algorithm Terms</h4>
-  <dl>
-    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
-    <dd>
-      the destination graph for all triples generated by JSON-LD markup.
-    </dd>
-  </dl>
-</div>
-
-<div id="rdf-conversion-algorithm" class="section">
-  <h4><span class="secno">6.13.3 </span>RDF Conversion Algorithm</h4>
-  <p>
-    The algorithm below is designed for in-memory implementations with random access to <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> elements.
-  </p>
-  <p>
-    A conforming JSON-LD processor implementing RDF conversion <em class="rfc2119" title="must">must</em> implement a
-    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
-    algorithm generates:
-  </p>
-
-  <ol class="algorithm">
-    <li id="processing-step-default-context">
-      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
-      <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      initialized to NULL.
-    </li>
-
-    <li id="processing-step-associative">
-      If a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> is detected, perform the following steps:
-      <ol class="algorithm">
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@context</code> key, process the local context as
-          described in <a href="#context">Context</a>.
-        </li>
-        <li>
-          Create a new <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> by mapping the keys from the current <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> using the
-          <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to new keys using the associated value from the current <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
-          Repeat the mapping until no entry is found within the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for the key. Use the new
-          <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> in subsequent steps.
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
-          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. Generate a
-          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-          <p class="issue"><code>@iri</code> really just behaves the same as <code>@subject</code>, consider consolidating them.</p>
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
-          to a literal value as follows:
-          <ol class="algorithm">
-            <li>
-              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> contains a <code>@datatype</code> key
-              after performing <a href="#iri-expansion">IRI Expansion</a> on the specified<code>@datatype</code>.
-            </li>
-            <li>
-              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> contains
-              a <code>@language</code> key, use it's value to set the language of the plain literal.
-            </li>
-            <li>
-              Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-            </li>
-          </ol>
-        </li>
-        <li id="processing-step-subject">If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@subject</code> key:
-          <ol class="algorithm">
-            <li>
-              If the value is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
-              <a href="#iri-expansion">IRI Expansion</a>. Generate a
-              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
-            </li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
-              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> does not have a <code>@subject</code> key, set the <a class="tref" title="active__object">active
-          object</a> to newly generated <dfn title="blank_node_identifier" id="dfn-blank_node_identifier">blank node identifier</dfn>. Generate a triple
-          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
-          object</a>.
-        </li>
-        <li>
-          For each key in the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that has not already been processed, perform
-          the following steps:
-          <ol class="algorithm">
-            <li>
-              If the key is <code>@type</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-              to <code>rdf:type</code>.
-            </li>
-            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
-            <a href="#iri-expansion">IRI Expansion</a> on the key.</li>
-            <li>
-              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
-              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-            </li>
-          </ol>
-        </li>
-        <li>
-          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
-        </li>
-      </ol>
-    </li>
-
-    <li>
-      If a regular <a class="tref internalDFN" title="array" href="#dfn-array">array</a> is detected, process each value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> by doing the following
-      returning the result of processing the last value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>:
-
-      <ol class="algorithm">
-        <li>
-          Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref" title="active__context">active
-          context</a>, <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
-          starting at <a href="#processing-step-associative">Step 2</a> then proceed using the previous
-          <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
-        </li>
-      </ol>
-    </li>
-
-    <li>
-      If a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> is detected:
-      <ol class="algorithm">
-        <li>
-          If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@iri</code> coercion,
-          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
-          performing <a href="#iri-expansion">IRI Expansion</a> on the string.
-        </li>
-        <li>
-          Otherwise, if the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of coercion,
-          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by creating a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using
-          the string and the coercion key as the datatype IRI.
-        </li>
-        <li>
-          Otherwise, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from
-          the string.
-        </li>
-      </ol>
-      Generate a
-      triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
-      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
-    </li>
-
-    <li>
-      If a <a class="tref internalDFN" title="number" href="#dfn-number">number</a> is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
-      the value with datatype set to either <code>xsd:integer</code> or
-      <code>xsd:double</code>, depending on if the value contains a
-      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
-      subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the generated typed literal.
-    </li>
-
-    <li>
-      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
-      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
-      value with datatype set to <code>xsd:boolean</code>.
-    </li>
-  </ol>
-</div>
-
-
-<!--  THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT
-
-<section>
-<h1>Best Practices</h1>
-
-<p>The nature of Web programming allows one to use basic technologies, such as
-JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be
-integrated in order to help alleviate certain development headaches.
-</p>
-
-<section>
-<h2>JavaScript</h2>
-
-<p class="issue">It is expected that JSON-LD will be used quite a bit in
-JavaScript environments, however, features like the expanded form for
-object values mean that using JSON-LD directly in JavaScript may be
-annoying without a middleware layer such as a simple library that
-converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
-is a good fit for the RDF API, which enables a variety of RDF-based
-Web Applications, but some don't want to require that level of functionality
-just to use JSON-LD. The group is still discussing the best way to proceed,
-so input on how JSON-LD could more easily be utilized in JavaScript
-environments would be very much appreciated.
-</p>
-</section>
-
-<section>
-<h2>Schema-less Databases</h2>
-
-<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
-schema-less data stores. RDF is a type of schema-less data model and thus
-lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from
-CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
-environments.</p>
-
-<p class="issue">MongoDB does not allow the '.' character to be used in
-key names. This prevents developers from storing IRIs as keys, which also
-prevents storage of the data in normalized form. While this issue can
-be avoided by using <tref>prefix</tref>es for key values, it is not known if this
-mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
-is useful to developers.
-</p>
-
- -->
-
-</div>
-
-</div>
-
-<div class="appendix section" id="experimental-concepts">
-
-<!-- OddPage -->
-<h2><span class="secno">A. </span>Experimental Concepts</h2>
-
-<p class="issue">There are a few advanced concepts where it is not clear
-whether or not the JSON-LD specification is going to support the complexity
-necessary to support each concept. The entire section on Advanced Concepts
-should be considered as discussion points; it is merely a list of
-possibilities where all of the benefits and drawbacks have not been explored.
-</p>
-
-<div id="disjoint-graphs" class="section">
-<h3><span class="secno">A.1 </span>Disjoint Graphs</h3>
-
-<p>When serializing an RDF graph that contains two or more sections of the
-graph which are entirely disjoint, one must use an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> to express the graph
-as two graphs. This may not be acceptable to some authors, who would rather
-express the information as one graph. Since, by definition, disjoint graphs
-require there to be two top-level objects, JSON-LD utilizes a mechanism that
-allows disjoint graphs to be expressed using a single graph.</p>
-
-<p>Assume the following RDF graph:</p>
-
-<pre class="example">
-&lt;http://example.org/people#john&gt;
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
-&lt;http://example.org/people#jane&gt;
-   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
-      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
-
-<p>Since the two subjects are entirely disjoint with one another, it is
-impossible to express the RDF graph above using a single <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.</p>
-
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a
-single graph:</p>
-
-<pre class="example">
-{
-  "@context": {
-    "Person": "http://xmlns.com/foaf/0.1/Person"
-  },
-  "@subject":
-  [
-    {
-      "@subject": "http://example.org/people#john",
-      "@type": "Person"
-    },
-    {
-      "@subject": "http://example.org/people#jane",
-      "@type": "Person"
-    }
-  ]
-}</pre>
-
-<p>A disjoint graph could also be expressed like so:</p>
-
-<pre class="example">
-[
-  {
-    "@subject": "http://example.org/people#john",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  },
-  {
-    "@subject": "http://example.org/people#jane",
-    "@type": "http://xmlns.com/foaf/0.1/Person"
-  }
-]</pre>
-
-<p class="note">Warning: Using this serialisation format it is impossible to include <code>@context</code>
-  given that the document's data structure is an array and not an object.</p>
-
-</div>
-
-<div id="lists" class="section">
-  <h3><span class="secno">A.2 </span>Lists</h3>
-  <p>
-    Because graphs do not describe ordering for links between nodes,  in contrast to plain JSON, multi-valued properties
-    in JSON-LD do not provide an ordering of the listed objects. For example, consider the following
-    simple document:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-  <p>
-    This results in three triples being generated, each relating the subject to an individual
-    object, with no inherent order.</p>
-  <p>To preserve the order of the objects, RDF-based languages, such as [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>]
-    use the concept of an <code>rdf:List</code> (as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">RDF-SCHEMA</a></cite>]). This uses a sequence
-    of unlabeled nodes with properties describing a value, a null-terminated next property. Without
-    specific syntactical support, this could be represented in JSON-LD as follows:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "nick": <span class="diff">{</span>,
-    <span class="diff">"@first": "joe"</span>,
-    <span class="diff">"@rest": {</span>
-      <span class="diff">"@first": "bob"</span>,
-      <span class="diff">"@rest": {</span>
-        <span class="diff">"@first": "jaybee"</span>,
-        <span class="diff">"@rest": "@nil"</span>
-        <span class="diff">}</span>
-      <span class="diff">}</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-}</pre>
-  <p>
-    As this notation is rather unwieldy and the notion of ordered collections is rather important
-    in data modeling, it is useful to have specific language support. In JSON-LD, a list may
-    be represented using the <code>@list</code> keyword as follows:
-  </p>
-  <pre class="example">
-{
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
-...
-}</pre>
-  <p>
-    This describes the use of this <a class="tref internalDFN" title="array" href="#dfn-array">array</a> as being ordered, and order is maintained through
-    normalization and RDF conversion. If every use of a given multi-valued property is a
-    list, this may be abbreviated by adding an <code>@coerce</code> term:
-  </p>
-  <pre class="example">
-{
-  <span class="diff">"@context": {</span>
-    ...
-    <span class="diff">"@coerce": {</span>
-      <span class="diff">"@list": ["foaf:nick"]</span>
-    <span class="diff">}</span>
-  <span class="diff">}</span>,
-...
-  "@subject": "http://example.org/people#joebob",
-  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
-...
-}</pre>
-  <p class="issue">There is an ongoing discussion about this issue. One of the <a href="https://github.com/json-ld/json-ld.org/issues/12">proposed solutions</a> is allowing to change the default behaviour so that arrays are considered as ordered lists by default.</p>
-  <div id="expansion-2" class="section"><h4 id="list-expansion"><span class="secno">A.2.1 </span>Expansion</h4>
-    <p class="issue">TBD.</p>
-  </div>
-  <div id="normalization-2" class="section"><h4 id="list-normalization"><span class="secno">A.2.2 </span>Normalization</h4>
-    <p class="issue">TBD.</p>
-  </div>
-  <div id="rdf-conversion-1" class="section"><h4 id="list-rdf"><span class="secno">A.2.3 </span>RDF Conversion</h4>
-    <p>
-      To support RDF Conversion of lists, <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>
-      is updated as follows:
-    </p>
-    <ol class="algorithm update">
-      <li>
-        <span class="list-number">2.4a.</span>
-        If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@list</code> key and the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
-        process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
-      </li>
-      <li>
-        <span class="list-number">2.7.3.</span>
-        Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
-        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
-        <ol class="algorithm">
-          <li>
-            If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@list</code> coercion,
-            and the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
-            process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
-          </li>
-          <li>
-            Otherwise, process the value starting at
-            <a href="#processing-step-associative">Step 2</a>.
-          </li>
-          <li>Proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
-        </ol>
-      </li>
-      <li id="processing-step-list">
-        <span class="list-number">3a.</span>
-        Generate an RDF List by linking
-        each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
-        using the following sequence:
-        <ol class="algorithm">
-          <li>
-            If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-            and <code>rdf:nil</code>.
-          </li>
-          <li>
-            Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
-            and a newly generated BNode identified as <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">blank node identifier</dfn></em>.
-          </li>
-          <li>
-            For each element other than the last element in the list:
-            <ol class="algorithm">
-              <li>Create a processor state using the active context, <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">blank node identifier</dfn></em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
-              <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">blank node identifier</dfn></em>, otherwise use <code>rdf:nil</code>.</li>
-              <li>Generate a new triple using <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">blank node identifier</dfn></em>, <code>rdf:rest</code> and <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">blank node identifier</dfn></em>.</li>
-              <li>Set <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">blank node identifier</dfn></em> to <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">blank node identifier</dfn></em>.</li>
-            </ol>
-          </li>
-        </ol>
-      </li>
-    </ol>
-  </div>
-</div>
-
-</div>
-
-<div class="appendix section" id="markup-examples">
-
-<!-- OddPage -->
-<h2><span class="secno">B. </span>Markup Examples</h2>
-
-<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
-express semantic data marked up in other languages such as RDFa, Microformats,
-and Microdata. These sections are merely provided as proof that JSON-LD is
-very flexible in what it can express across different Linked Data approaches.
-</p>
-
-<div id="rdfa" class="section">
-<h3><span class="secno">B.1 </span>RDFa</h3>
-
-<p>The following example describes three people with their respective names and
-homepages.</p>
-
-<pre class="example">
-&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
-   &lt;ul&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
-      &lt;/li&gt;
-      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
-        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
-      &lt;/li&gt;
-   &lt;/ul&gt;
-&lt;/div&gt;</pre>
-
-<p>An example JSON-LD implementation is described below, however, there are
-other ways to mark-up this information such that the context is not
-repeated.</p>
-
-<pre class="example">
-{
-  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
-  "@subject": [
-   {
-     "@subject": "_:bnode1",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/bob/",
-     "foaf:name": "Bob"
-   },
-   {
-     "@subject": "_:bnode2",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/eve/",
-     "foaf:name": "Eve"
-   },
-   {
-     "@subject": "_:bnode3",
-     "@type": "foaf:Person",
-     "foaf:homepage": "http://example.com/manu/",
-     "foaf:name": "Manu"
-   }
-  ]
-}</pre>
-
-</div>
-
-<div id="microformats" class="section">
-<h3><span class="secno">B.2 </span>Microformats</h3>
-
-<p>The following example uses a simple Microformats hCard example to express
-how the Microformat is represented in JSON-LD.</p>
-
-<pre class="example">
-&lt;div class="vcard"&gt;
- &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
-&lt;/div&gt;</pre>
-
-<p>The representation of the hCard expresses the Microformat terms in the
-context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has
-generated the proper URL type for <code>http://tantek.com</code>.</p>
-
-<pre class="example">
-{
-  "@context":
-  {
-    "vcard": "http://microformats.org/profile/hcard#vcard",
-    "url": "http://microformats.org/profile/hcard#url",
-    "fn": "http://microformats.org/profile/hcard#fn",
-    "@coerce": { "@iri": "url" }
-  },
-  "@subject": "_:bnode1",
-  "@type": "vcard",
-  "url": "http://tantek.com/",
-  "fn": "Tantek Çelik"
-}</pre>
-
-</div>
-
-<div id="microdata" class="section">
-<h3><span class="secno">B.3 </span>Microdata</h3>
-
-<p>The Microdata example below expresses book information as a Microdata Work
-item.
-</p>
-
-<pre class="example">
-&lt;dl itemscope
-    itemtype="http://purl.org/vocab/frbr/core#Work"
-    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
- &lt;dt&gt;Title&lt;/dt&gt;
- &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
- &lt;dt&gt;By&lt;/dt&gt;
- &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
- &lt;dt&gt;Format&lt;/dt&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
-  Print
- &lt;/dd&gt;
- &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
-     itemscope
-     itemtype="http://purl.org/vocab/frbr/core#Expression"
-     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
-  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
-  Ebook
- &lt;/dd&gt;
-&lt;/dl&gt;</pre>
-
-<p>Note that the JSON-LD representation of the Microdata information stays
-true to the desires of the Microdata community to avoid contexts and
-instead refer to items by their full IRI.</p>
-
-<pre class="example">
-[
-  {
-    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
-    "@type": "http://purl.org/vocab/frbr/core#Work",
-    "http://purl.org/dc/terms/title": "Just a Geek",
-    "http://purl.org/dc/terms/creator": "Whil Wheaton",
-    "http://purl.org/vocab/frbr/core#realization":
-      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
-  },
-  {
-    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
-    "@type": "http://purl.org/vocab/frbr/core#Expression",
-    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
-  }
-]</pre>
-</div>
-</div>
-
-<div class="appendix section" id="mashing-up-vocabularies">
-
-<!-- OddPage -->
-<h2><span class="secno">C. </span>Mashing Up Vocabularies</h2>
-
-<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200
-<a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a> Documents that are available for use on the Web 
-today. Some of these vocabularies are:
-</p>
-
-<ul>
-   <li>RDF - for describing information about objects and concepts on the Web.</li>
-   <li>RDFS - for expressing things like labels and comments.</li>
-   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
-   <li>Dublin Core - for describing creative works.</li>
-   <li>FOAF - for describing social networks.</li>
-   <li>Calendar - for specifying events.</li>
-   <li>SIOC - for describing discussions on blogs and websites.</li>
-   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
-   <li>GEO - for describing geographic location.</li>
-   <li>VCard - for describing organizations and people.</li>
-   <li>DOAP - for describing projects.</li>
-</ul>
-
-<p>You can use these vocabularies in combination, like so:</p>
-
-<pre class="example">
-{
-  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
-  "<span class="diff">foaf:name</span>": "Manu Sporny",
-  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
-  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
-}</pre>
-
-<p>Developers can also specify their own Vocabulary documents by modifying the
-<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword,
-like so:</p>
-
-<pre class="example">
-{
-  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
-  "@type": "foaf:Person",
-  "foaf:name": "Manu Sporny",
-  "foaf:homepage": "http://manu.sporny.org/",
-  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
-  "myvocab:personality": "friendly"</span>
-}</pre>
-
-<p>The <code>@context</code> keyword is used to change how the JSON-LD
-processor evaluates key-value pairs. In this case, it was used to
-map one string ('myvocab') to another string, which is interpreted as
-a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced
-with "<code>http://example.org/myvocab#</code>" when it
-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 <a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a> <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>, 
-and provides developers an unambiguous way to map any JSON value to RDF.</p><p>
-
-</p></div>
-
-<div class="appendix section" id="iana-considerations">
-
-<!-- OddPage -->
-<h2><span class="secno">D. </span>IANA Considerations</h2>
-
-<p>This section is included merely for standards community review and will be
-submitted to the Internet Engineering Steering Group if this specification
-becomes a W3C Recommendation.</p>
-
-<dl>
-  <dt>Type name:</dt>
-  <dd>application</dd>
-  <dt>Subtype name:</dt>
-  <dd>ld+json</dd>
-  <dt>Required parameters:</dt>
-  <dd>None</dd>
-  <dt>Optional parameters:</dt>
-  <dd>
-    <dl>
-      <dt><code>form</code></dt>
-      <dd>Determines the serialization form for the JSON-LD document. Valid
-        values include; <code>compacted</code>, <code>expanded</code>,
-        <code>framed</code>, and <code>normalized</code>. Other values are
-        allowed, but must be pre-pended with a <code>x-</code> string until
-        they are clearly defined by a stable specification. If no form
-        is specified in an HTTP request header to a responding application,
-        such as a Web server, the application <em class="rfc2119" title="may">may</em> choose any form. If no
-        form is specified for a receiving application, the form <em class="rfc2119" title="must not">must not</em>
-        be assumed to take any particular form.</dd>
-      <div class="issue">It is currently <a href="https://github.com/json-ld/json-ld.org/issues/14"> being discussed to remove form=framed</a> from this specification as there are several issues with it.</div>
-    </dl>
-  </dd>
-  <dt>Encoding considerations:</dt>
-  <dd>The same as the <code>application/json</code> MIME media type.</dd>
-  <dt>Security considerations:</dt>
-  <dd>Since JSON-LD is intended to be a pure data exchange format for
-    directed graphs, the serialization <em class="rfc2119" title="should not">should not</em> be passed through a
-    code execution mechanism such as JavaScript's <code>eval()</code>
-    function. It is <em class="rfc2119" title="recommended">recommended</em> that a conforming parser does not attempt to
-    directly evaluate the JSON-LD serialization and instead purely parse the
-    input into a language-native data structure. </dd>
-  <dt>Interoperability considerations:</dt>
-  <dd>Not Applicable</dd>
-  <dt>Published specification:</dt>
-  <dd>The <a href="http://json-ld/spec/latest/">JSON-LD</a> specification.</dd>
-  <dt>Applications that use this media type:</dt>
-  <dd>Any programming environment that requires the exchange of
-    directed graphs. Implementations of JSON-LD have been created for
-    JavaScript, Python, Ruby, PHP and C++.
-  </dd>
-  <dt>Additional information:</dt>
-  <dd>
-    <dl>
-      <dt>Magic number(s):</dt>
-      <dd>Not Applicable</dd>
-      <dt>File extension(s):</dt>
-      <dd>.jsonld</dd>
-      <dt>Macintosh file type code(s):</dt>
-      <dd>TEXT</dd>
-    </dl>
-  </dd>
-  <dt>Person & email address to contact for further information:</dt>
-  <dd>Manu Sporny <msporny@digitalbazaar.com></dd>
-  <dt>Intended usage:</dt>
-  <dd>Common</dd>
-  <dt>Restrictions on usage:</dt>
-  <dd>None</dd>
-  <dt>Author(s):</dt>
-  <dd>Manu Sporny, Gregg Kellogg, Dave Longley</dd>
-  <dt>Change controller:</dt>
-  <dd>W3C</dd>
-</dl>
-
-</div>
-
-<div class="appendix section" id="acknowledgements">
-
-<!-- OddPage -->
-<h2><span class="secno">E. </span>Acknowledgements</h2>
-
-<p>The editors would like to thank Mark Birbeck, who provided a great deal of
-the initial push behind the JSON-LD work via his work on RDFj,
-Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and
-performed several implementations of the specification, and Ian Davis, who
-created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
-Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
-Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard
-Cyganiak for their input on the specification. Another huge thank you goes out
-to Dave Longley who designed many of the algorithms used in this specification,
-including the normalization algorithm which was a monumentally difficult
-design challenge.
-</p>
-</div>
-
-
-
-<div id="references" class="appendix section">
-<!-- OddPage -->
-<h2><span class="secno">F. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">F.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
-</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
-</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd>T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 
-</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
-</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
-</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a> 
-</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">F.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification, Third Edition.</cite></a> December 1999. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 
-</dd><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
-</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
-</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd>Dan Brickley; Ramanathan V. Guha. <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite>RDF Vocabulary Description Language 1.0: RDF Schema.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">http://www.w3.org/TR/2004/REC-rdf-schema-20040210</a> 
-</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
-</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd>David Beckett, Tim Berners-Lee. <a href="http://www.w3.org/TeamSubmission/turtle/"><cite>Turtle: Terse RDF Triple Language.</cite></a> January 2008. W3C Team Submission. URL: <a href="http://www.w3.org/TeamSubmission/turtle/">http://www.w3.org/TeamSubmission/turtle/</a> 
-</dd></dl></div></div></body></html>
--- a/spec/ED/20110911/spec.css	Sun Oct 16 01:08:39 2011 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-ol.algorithm { counter-reset:numsection; list-style-type: none; }
-ol.algorithm li { margin: 0.5em 0; }
-ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20100529/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,532 @@
+<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
+<html lang="en" dir="ltr">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<!-- 
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+  -->
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<link href="http://dev.w3.org/2009/dap/ReSpec.js/css/respec.css" rel="stylesheet" type="text/css" charset="utf-8"><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8"></head><body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-30-may-2010">Unofficial Draft 30 May 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd><dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd></dl><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+Developers that embed structured data in their Web pages can choose among
+a number of languages such as RDFa [<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a>], Microformats [<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a>] 
+and Microdata [<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a>]. Each of these structured data languages, while
+incompatible at the syntax level, can be easily mapped to RDF. JSON has 
+proven to be a highly useful object serialization and messaging replacement 
+for SOAP. In an attempt to harmonize the representation of Link Data in JSON, 
+this specification outlines a common JSON representation format for 
+Linked Data that can be used to represent objects specified via RDFa, 
+Microformats and Microdata.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p></div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1. </span>How to Read this Document</a></li><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">2. </span>Introduction</a></li><li class="tocline"><a href="#design-goals" class="tocxref"><span class="secno">3. </span>Design Goals</a></li><li class="tocline"><a href="#design-rationale" class="tocxref"><span class="secno">4. </span>Design Rationale</a><ul class="toc"><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">4.1 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">4.2 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">4.3 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">4.4 </span>An Example of a Default Context</a></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">4.5 </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">4.5.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">4.5.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">4.5.3 </span>Microdata</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">5.10 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">5.11 </span>Automatic Typing</a></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+
+<div id="how-to-read-this-document" class="section">
+<!--OddPage--><h2><span class="secno">1. </span>How to Read this Document</h2>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Developers that want to encode Microformats, RDFa, or Microdata in a
+  way that is cross-language compatible via JSON.</li>
+  <li>Developers that want to understand the encoding possibilities.</li>
+</ul>
+
+<p>
+To understand this specification you must first be familiar with JSON, 
+which is detailed in [<a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a>].</p>
+
+</div>
+
+<div id="sotd" class="section">
+<p>This document is an experimental work in progress.</p>
+<!-- <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p> -->
+</div>
+
+<div id="introduction" class="section">
+<!--OddPage--><h2><span class="secno">2. </span>Introduction</h2>
+
+<p class="issue">Need to write introduction...</p>
+
+</div>
+
+<div id="design-goals" class="section">
+<!--OddPage--><h2><span class="secno">3. </span>Design Goals</h2>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers don't need to know RDF in order to use the basic functionality
+ provided by JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
+ <dt>Expressiveness</dt>
+ <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable.</dd>
+</dl>
+</div>
+
+<div id="design-rationale" class="section">
+<!--OddPage--><h2><span class="secno">4. </span>Design Rationale</h2>
+
+<p>The following section outlines the rationale behind the JSON-LD markup
+language.
+</p>
+
+<div id="map-terms-to-iris" class="section">
+<h3><span class="secno">4.1 </span>Map Terms to IRIs</h3>
+
+<p>Establishing a mechanism to map JSON values to IRIs will
+help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
+be restrictive in declaring a set of terms, rather, experimentation and 
+innovation should be supported as part of the core design of JSON-LD. There are, 
+however, a number of very small design criterial that can ensure that developers 
+will generate good RDF data that will create value for the greater 
+semantic web community and JSON/REST-based Web Services community.
+</p>
+
+<p>We will be using the following JSON object as the example for this section:
+</p>
+
+<pre class="example">{"a" : "Person",
+ "name" : "Manu Sporny",
+ "homepage" : "http://manu.sporny.org/"}</pre>
+</div><div id="the-default-context" class="section">
+<h3><span class="secno">4.2 </span>The Default Context</h3>
+
+<p>A default context is used in RDFa to allow developers to use keywords
+as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
+above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
+The semantic web, just like the document-based web, uses IRIs for
+unambiguous identification. The idea is that these terms mean something, 
+which you will eventually want to query. The semantic web specifies this via 
+<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
+a Vocabulary Document, and <strong>name</strong> is a term in that 
+vocabulary. Paste the two items together and you have an unambiguous identifier
+for a term.
+</p>
+
+<p>Developers, and machines, would be able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much
+like we can use WordNet today to see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Machines need the same sort of 
+dictionary of terms, and URIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>Non-prefixed terms should have term mappings declared in the default
+context so that they may be expanded later.</p>
+            
+<p>If a set of terms, like <strong>Person</strong>, 
+<strong>name</strong>, and <strong>homepage</strong>,
+are pre-defined in the default context, and that context is used to resolve the
+names in JSON objects, machines could automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">{"<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>" : "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+ "<span class="diff">http://xmlns.com/foaf/0.1/name</span>" : "Manu Sporny",
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>" : "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"}</pre>
+
+<p class="note">In order to differentiate between plain text and IRIs, the
+<strong>&lt;</strong> and <strong>&gt;</strong> are used around IRIs.</p>
+
+<p>Doing this would mean that JSON would start to become unambiguously
+machine-readable, play well with the semantic web, and basic markup wouldn't 
+be that much more complex than basic JSON markup. A win, all around.</p>
+</div>
+
+<div id="mashing-up-vocabularies" class="section">
+<h3><span class="secno">4.3 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
+default context beside the <em>terms</em> that are already defined. Using
+this feature, developers could also do markup like this:</p>
+
+<pre class="example">{"<span class="diff">rdf:type</span>" : "<span class="diff">foaf:Person</span>",
+ "<span class="diff">foaf:name</span>" : "Manu Sporny",
+ "<span class="diff">foaf:homepage</span>" : "http://manu.sporny.org/"<span class="diff">,
+ "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>}</pre>
+
+<p>Developers could also be allowed to specify their own Vocabulary documents 
+by modifying the default context, like so:</p>
+
+<pre class="example">[<span class="diff">{"a" : "Context",
+   "myvocab" : "http://example.org/myvocab#"}
+ },</span>
+ {"a" : "foaf:Person",
+ "foaf:name" : "Manu Sporny",
+ "foaf:homepage" : "&lt;http://manu.sporny.org/&gt;",
+ "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+ "myvocab:credits" : 500</span>}
+]</pre>
+
+<p>This mechanism is a short-hand for RDF, and if defined, will give
+developers an unambiguous way to map any JSON value to RDF. </p><p>
+</p></div>
+
+<div id="an-example-of-a-default-context" class="section">
+<h3><span class="secno">4.4 </span>An Example of a Default Context</h3>
+
+<p>To be clear, the JSON-LD aware Web Service could define a default
+context like the following:</p>
+
+<pre class="example">{"a" : "Context",
+ "__vocab__" : "http://example.org/default-vocab#",
+ "xsd" : "http://www.w3.org/2001/XMLSchema#",
+ "dc" : "http://purl.org/dc/terms/",
+ "foaf" : "http://xmlns.com/foaf/0.1/",
+ "sioc" : "http://rdfs.org/sioc/ns#",
+ "cc" : "http://creativecommons.org/ns#",
+ "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
+ "vcard" : "http://www.w3.org/2006/vcard/ns#",
+ "cal" : "http://www.w3.org/2002/12/cal/ical#",
+ "doap" : "http://usefulinc.com/ns/doap#",
+ "Person" : "http://xmlns.com/foaf/0.1/Person",
+ "name" : "http://xmlns.com/foaf/0.1/name",
+ "homepage" : "http://xmlns.com/foaf/0.1/homepage"
+}</pre>
+
+<p>The <strong>__vocab__</strong> prefix is a special prefix that states 
+that any term that doesn't resolve to a term or a prefix should be 
+appended to the <strong>__vocab__</strong> IRI. This is done to ensure that 
+terms can be transformed to an IRI at all times.
+</p>
+</div>
+
+<div id="markup-examples" class="section">
+<h3><span class="secno">4.5 </span>Markup Examples</h3>
+
+<p class="issue">Write some introductory stuff about the Markup Examples.</p>
+
+<div id="rdfa" class="section">
+<h4><span class="secno">4.5.1 </span>RDFa</h4>
+
+<pre class="example">&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>Representation:</p>
+
+<pre class="example">{{ 
+   "a" : "Context",
+   "foaf" : "http://xmlns.com/foaf/0.1/"
+ },
+ {
+    "@" : "_:bnode1",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/bob/&gt;",
+    "foaf:name" : "Bob"
+ },
+ {
+    "@" : "_:bnode2",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/eve/&gt;",
+    "foaf:name" : "Eve"
+ },
+ {
+    "@" : "_:bnode2",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/manu/&gt;",
+    "foaf:name" : "Manu"
+ }
+}</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h4><span class="secno">4.5.2 </span>Microformats</h4>
+
+<pre class="example">&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>Representation:</p>
+
+<pre class="example">{{ 
+   "a" : "Context",
+   "vcard" : "http://microformats.org/profile/hcard#vcard"
+   "url" : "http://microformats.org/profile/hcard#url"
+   "fn" : "http://microformats.org/profile/hcard#fn"
+ },
+ {
+    "@" : "_:bnode1",
+    "a" : "vcard",
+    "url" : "&lt;http://tantek.com/&gt;",
+    "fn" : "Tantek Çelik"
+ }
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h4><span class="secno">4.5.3 </span>Microdata</h4>
+
+<pre class="example">&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Representation:</p>
+
+<pre class="example">{{ 
+   "a" : "Context",
+   "__vocab__" : "http://www.w3.org/1999/xhtml/microdata#",
+   "frbr" : "http://purl.org/vocab/frbr/core#",
+   "dc" : "http://purl.org/dc/terms/"
+ },
+ {
+    "a" : "frbr:Work",
+    "@" : "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "dc:title" : "Just a Geek",
+    "dc:creator" : "Whil Wheaton",
+    "frbr:realization" : ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+ },
+ {
+    "a" : "frbr:Expression",
+    "@" : "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "dc:type" : "http://purl.oreilly.com/product-types/BOOK"
+ },
+ {
+    "a" : "frbr:Expression",
+    "@" : "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "dc:type" : "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+ }
+}</pre>
+
+</div>
+
+</div>
+
+</div>
+
+
+
+
+<div id="markup-of-rdf-concepts" class="section">
+<!--OddPage--><h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
+
+<p class="issue">Need to write introduction to RDF Concepts section</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">5.1 </span>IRIs</h3>
+
+<pre class="example">{
+...
+ "foaf:homepage" : "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}</pre>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
+
+<pre class="example">{
+...
+ "<span class="diff">@</span>" : "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}</pre>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">5.3 </span>Specifying the Type</h3>
+
+<pre class="example">{
+...
+ "<span class="diff">a</span>" : "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}</pre>
+
+</div>
+
+<div id="plain-literals" class="section">
+<h3><span class="secno">5.4 </span>Plain Literals</h3>
+
+<pre class="example">{
+...
+ "foaf:name" : "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="language-specification-in-plain-literals" class="section">
+<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
+
+<pre class="example">{
+...
+ "foaf:name" : "<span class="diff">花澄@ja</span>",
+...
+}</pre>
+
+</div>
+
+<div id="typed-literals" class="section">
+<h3><span class="secno">5.6 </span>Typed Literals</h3>
+
+<pre class="example">{
+...
+ "dc:modified" : "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}</pre>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
+
+<pre class="example">{
+...
+ "foaf:nick" : <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<pre class="example">{
+...
+ "dc:modified" : <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}</pre>
+
+</div>
+
+<div id="blank-nodes" class="section">
+<h3><span class="secno">5.9 </span>Blank Nodes</h3>
+
+<pre class="example">{
+...
+ "@" : "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+</div>
+
+<div id="escape-character" class="section">
+<h3><span class="secno">5.10 </span>Escape Character</h3>
+
+<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
+interpreted as IRIs, language tags, or TypedLiterals.</p>
+
+<p>The special characters in JSON-LD are: <code>&lt;</code>, <code>&gt;</code>,
+<code>@</code> and <code>^</code>.</p>
+
+<pre class="example">{
+...
+ "example:code" : <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}</pre>
+
+</div>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">5.11 </span>Automatic Typing</h3>
+
+<pre class="example">{
+...
+ // This value is automatically converted to having a type of xsd:decimal
+ "measure:cups" : <span class="diff">5.3</span>,
+ // This value is automatically converted to having a type of xsd:integer
+ "chem:protons" : <span class="diff">12</span>,
+ // This value is automatically converted to having a type of xsd:boolean
+ "sensor:active" : <span class="diff">true</span>,
+...
+}</pre>
+
+</div>
+
+
+</div>
+
+<div class="appendix section" id="acknowledgements">
+<!--OddPage--><h2><span class="secno">A. </span>Acknowledgements</h2>
+
+<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
+rationale and reasoning behind the JSON-LD work via his work on RDFj, and
+Ian Davis, who created RDF/JSON.</p>
+</div>
+
+
+
+
+<div id="references" class="appendix section"><!--OddPage--><h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100422"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>22 April 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100422">http://www.w3.org/TR/2010/WD-rdfa-core-20100422</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20100823/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,1042 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-23-september-2010">Unofficial Draft 23 September 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+</dl><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+Developers that embed structured data in their Web pages can choose among
+a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
+and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
+incompatible at the syntax level, can be easily mapped to RDF. JSON has 
+proven to be a highly useful object serialization and messaging replacement 
+for SOAP. In an attempt to harmonize the representation of Linked Data in JSON, 
+this specification outlines a common JSON representation format for 
+Linked Data that can be used to represent objects specified via RDFa, 
+Microformats and Microdata.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1. </span>How to Read this Document</a></li><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">2. </span>Introduction</a></li><li class="tocline"><a href="#design-goals" class="tocxref"><span class="secno">3. </span>Design Goals</a></li><li class="tocline"><a href="#design-rationale" class="tocxref"><span class="secno">4. </span>Design Rationale</a><ul class="toc"><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">4.1 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">4.2 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">4.3 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">4.4 </span>An Example of a Default Context</a></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">4.5 </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">4.5.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">4.5.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">4.5.3 </span>Microdata</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">5.10 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">5.11 </span>Automatic Typing</a></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+
+<div id="how-to-read-this-document" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>How to Read this Document</h2>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Developers that want to encode Microformats, RDFa, or Microdata in a
+  way that is cross-language compatible via JSON.</li>
+  <li>Developers that want to understand the encoding possibilities.</li>
+</ul>
+
+<p>
+To understand this specification you must first be familiar with JSON, 
+which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>].</p>
+
+</div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Introduction</h2>
+
+<p class="issue">Need to write introduction...</p>
+
+</div>
+
+<div id="design-goals" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Design Goals</h2>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers don't need to know RDF in order to use the basic functionality
+ provided by JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
+ <dt>Expressiveness</dt>
+ <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable.</dd>
+</dl>
+</div>
+
+<div id="design-rationale" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Design Rationale</h2>
+
+<p>The following section outlines the rationale behind the JSON-LD markup
+language.
+</p>
+
+<div id="map-terms-to-iris" class="section">
+<h3><span class="secno">4.1 </span>Map Terms to IRIs</h3>
+
+<p>Establishing a mechanism to map JSON values to IRIs will
+help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
+be restrictive in declaring a set of terms, rather, experimentation and 
+innovation should be supported as part of the core design of JSON-LD. There are, 
+however, a number of very small design criterial that can ensure that developers 
+will generate good RDF data that will create value for the greater 
+semantic web community and JSON/REST-based Web Services community.
+</p>
+
+<p>We will be using the following JSON object as the example for this section:
+</p>
+
+<pre class="example">
+{"a" : "Person",
+ "name" : "Manu Sporny",
+ "homepage" : "http://manu.sporny.org/"}</pre>
+</div><div id="the-default-context" class="section">
+<h3><span class="secno">4.2 </span>The Default Context</h3>
+
+<p>A default context is used in RDFa to allow developers to use keywords
+as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
+above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
+The semantic web, just like the document-based web, uses IRIs for
+unambiguous identification. The idea is that these terms mean something, 
+which you will eventually want to query. The semantic web specifies this via 
+<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
+a Vocabulary Document, and <strong>name</strong> is a term in that 
+vocabulary. Paste the two items together and you have an unambiguous identifier
+for a term.
+</p>
+
+<p>Developers, and machines, would be able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much
+like we can use WordNet today to see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Machines need the same sort of 
+dictionary of terms, and URIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>Non-prefixed terms should have term mappings declared in the default
+context so that they may be expanded later.</p>
+            
+<p>If a set of terms, like <strong>Person</strong>, 
+<strong>name</strong>, and <strong>homepage</strong>,
+are pre-defined in the default context, and that context is used to resolve the
+names in JSON objects, machines could automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{"<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>" : "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+ "<span class="diff">http://xmlns.com/foaf/0.1/name</span>" : "Manu Sporny",
+ "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>" : "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"}</pre>
+
+<p class="note">In order to differentiate between plain text and IRIs, the
+<strong><</strong> and <strong>></strong> are used around IRIs.</p>
+
+<p>Doing this would mean that JSON would start to become unambiguously
+machine-readable, play well with the semantic web, and basic markup wouldn't 
+be that much more complex than basic JSON markup. A win, all around.</p>
+</div>
+
+<div id="mashing-up-vocabularies" class="section">
+<h3><span class="secno">4.3 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
+default context beside the <em>terms</em> that are already defined. Using
+this feature, developers could also do markup like this:</p>
+
+<pre class="example">
+{"<span class="diff">rdf:type</span>" : "<span class="diff">foaf:Person</span>",
+ "<span class="diff">foaf:name</span>" : "Manu Sporny",
+ "<span class="diff">foaf:homepage</span>" : "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+ "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>}</pre>
+
+<p>Developers could also be allowed to specify their own Vocabulary documents 
+by modifying the default context, like so:</p>
+
+<pre class="example">
+[<span class="diff">{"a" : "Context",
+   "myvocab" : "http://example.org/myvocab#"}
+ },</span>
+ {"a" : "foaf:Person",
+ "foaf:name" : "Manu Sporny",
+ "foaf:homepage" : "&lt;http://manu.sporny.org/&gt;",
+ "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+ "myvocab:credits" : 500</span>}
+]</pre>
+
+<p>This mechanism is a short-hand for RDF, and if defined, will give
+developers an unambiguous way to map any JSON value to RDF. </p><p>
+</p></div>
+
+<div id="an-example-of-a-default-context" class="section">
+<h3><span class="secno">4.4 </span>An Example of a Default Context</h3>
+
+<p>To be clear, the JSON-LD aware Web Service could define a default
+context like the following:</p>
+
+<pre class="example">
+{"a" : "Context",
+ "__vocab__" : "http://example.org/default-vocab#",
+ "xsd" : "http://www.w3.org/2001/XMLSchema#",
+ "dc" : "http://purl.org/dc/terms/",
+ "foaf" : "http://xmlns.com/foaf/0.1/",
+ "sioc" : "http://rdfs.org/sioc/ns#",
+ "cc" : "http://creativecommons.org/ns#",
+ "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
+ "vcard" : "http://www.w3.org/2006/vcard/ns#",
+ "cal" : "http://www.w3.org/2002/12/cal/ical#",
+ "doap" : "http://usefulinc.com/ns/doap#",
+ "Person" : "http://xmlns.com/foaf/0.1/Person",
+ "name" : "http://xmlns.com/foaf/0.1/name",
+ "homepage" : "http://xmlns.com/foaf/0.1/homepage"
+}</pre>
+
+<p>The <strong>__vocab__</strong> prefix is a special prefix that states 
+that any term that doesn't resolve to a term or a prefix should be 
+appended to the <strong>__vocab__</strong> IRI. This is done to ensure that 
+terms can be transformed to an IRI at all times.
+</p>
+</div>
+
+<div id="markup-examples" class="section">
+<h3><span class="secno">4.5 </span>Markup Examples</h3>
+
+<p class="issue">Write some introductory stuff about the Markup Examples.</p>
+
+<div id="rdfa" class="section">
+<h4><span class="secno">4.5.1 </span>RDFa</h4>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>Representation:</p>
+
+<pre class="example">
+[{ 
+   "a" : "Context",
+   "foaf" : "http://xmlns.com/foaf/0.1/"
+ },
+ {
+    "@" : "_:bnode1",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/bob/&gt;",
+    "foaf:name" : "Bob"
+ },
+ {
+    "@" : "_:bnode2",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/eve/&gt;",
+    "foaf:name" : "Eve"
+ },
+ {
+    "@" : "_:bnode2",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/manu/&gt;",
+    "foaf:name" : "Manu"
+ }
+]</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h4><span class="secno">4.5.2 </span>Microformats</h4>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>Representation:</p>
+
+<pre class="example">
+[{ 
+   "a" : "Context",
+   "vcard" : "http://microformats.org/profile/hcard#vcard"
+   "url" : "http://microformats.org/profile/hcard#url"
+   "fn" : "http://microformats.org/profile/hcard#fn"
+ },
+ {
+    "@" : "_:bnode1",
+    "a" : "vcard",
+    "url" : "&lt;http://tantek.com/&gt;",
+    "fn" : "Tantek Çelik"
+ }
+]</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h4><span class="secno">4.5.3 </span>Microdata</h4>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Representation:</p>
+
+<pre class="example">
+[{ 
+   "a" : "Context",
+   "__vocab__" : "http://www.w3.org/1999/xhtml/microdata#",
+   "frbr" : "http://purl.org/vocab/frbr/core#",
+   "dc" : "http://purl.org/dc/terms/"
+ },
+ {
+    "a" : "frbr:Work",
+    "@" : "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "dc:title" : "Just a Geek",
+    "dc:creator" : "Whil Wheaton",
+    "frbr:realization" : ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+ },
+ {
+    "a" : "frbr:Expression",
+    "@" : "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "dc:type" : "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+ },
+ {
+    "a" : "frbr:Expression",
+    "@" : "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "dc:type" : "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+ }
+]</pre>
+
+</div>
+
+</div>
+
+</div>
+
+
+
+
+<div id="markup-of-rdf-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
+
+<p class="issue">Need to write introduction to RDF Concepts section</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">5.1 </span>IRIs</h3>
+
+<pre class="example">
+{
+...
+ "foaf:homepage" : "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}</pre>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
+
+<pre class="example">
+{
+...
+ "<span class="diff">@</span>" : "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}</pre>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">5.3 </span>Specifying the Type</h3>
+
+<pre class="example">
+{
+...
+ "<span class="diff">a</span>" : "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}</pre>
+
+</div>
+
+<div id="plain-literals" class="section">
+<h3><span class="secno">5.4 </span>Plain Literals</h3>
+
+<pre class="example">
+{
+...
+ "foaf:name" : "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="language-specification-in-plain-literals" class="section">
+<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
+
+<pre class="example">
+{
+...
+ "foaf:name" : "<span class="diff">花澄@ja</span>",
+...
+}</pre>
+
+</div>
+
+<div id="typed-literals" class="section">
+<h3><span class="secno">5.6 </span>Typed Literals</h3>
+
+<pre class="example">
+{
+...
+ "dc:modified" : "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}</pre>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
+
+<pre class="example">
+{
+...
+ "foaf:nick" : <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<pre class="example">
+{
+...
+ "dc:modified" : <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}</pre>
+
+</div>
+
+<div id="blank-nodes" class="section">
+<h3><span class="secno">5.9 </span>Blank Nodes</h3>
+
+<pre class="example">
+{
+...
+ "@" : "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+</div>
+
+<div id="escape-character" class="section">
+<h3><span class="secno">5.10 </span>Escape Character</h3>
+
+<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
+interpreted as IRIs, language tags, or TypedLiterals.</p>
+
+<p>The special characters in JSON-LD are: <code><</code>, <code>></code>,
+<code>@</code> and <code>^</code>.</p>
+
+<pre class="example">
+{
+...
+ "example:code" : <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}</pre>
+
+</div>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">5.11 </span>Automatic Typing</h3>
+
+<pre class="example">
+{
+...
+ // This value is automatically converted to having a type of xsd:decimal
+ "measure:cups" : <span class="diff">5.3</span>,
+ // This value is automatically converted to having a type of xsd:integer
+ "chem:protons" : <span class="diff">12</span>,
+ // This value is automatically converted to having a type of xsd:boolean
+ "sensor:active" : <span class="diff">true</span>,
+...
+}</pre>
+
+</div>
+
+
+</div>
+
+<div class="appendix section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Acknowledgements</h2>
+
+<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
+rationale and reasoning behind the JSON-LD work via his work on RDFj, and
+Ian Davis, who created RDF/JSON.</p>
+</div>
+
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>3 August 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">http://www.w3.org/TR/2010/WD-rdfa-core-20100803</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101014/diff-20100823.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,5650 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+-
+Linked
+Data
+Expression
+in
+JSON
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+Linked
+Data
+</h2>
+<h2 id="unofficial-draft-14-october-2010">
+Unofficial
+Draft
+<del class="diff-old">23
+September
+</del>
+<ins class="diff-chg">14
+October
+</ins>
+2010
+</h2>
+<dl>
+<dt>
+Editor:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+</dl>
+<p>
+<ins class="diff-new">This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+</ins><a href="diff-20100823.html"><ins class="diff-new">
+diff
+to
+previous
+version
+</ins></a>.</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+Developers
+that
+embed
+structured
+data
+in
+their
+Web
+pages
+can
+choose
+among
+a
+number
+of
+languages
+such
+as
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+],
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+Each
+of
+these
+structured
+data
+languages,
+while
+incompatible
+at
+the
+syntax
+level,
+can
+be
+easily
+mapped
+to
+RDF.
+JSON
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+replacement
+for
+SOAP.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+Linked
+Data
+that
+can
+be
+used
+to
+represent
+objects
+specified
+via
+RDFa,
+Microformats
+and
+Microdata.
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+2.
+</span>
+Introduction
+</a>
+</li>
+<li class="tocline">
+<a href="#design-goals" class="tocxref">
+<span class="secno">
+3.
+</span>
+Design
+Goals
+</a>
+</li>
+<li class="tocline">
+<a href="#design-rationale" class="tocxref">
+<span class="secno">
+4.
+</span>
+Design
+Rationale
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#map-terms-to-iris" class="tocxref">
+<span class="secno">
+4.1
+</span>
+Map
+Terms
+to
+IRIs
+</a>
+</li>
+<del class="diff-old">4.2
+The
+Default
+Context
+</del>
+</ul>
+</li>
+<li class="tocline">
+<a href="#mashing-up-vocabularies" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#an-example-of-a-default-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+An
+Example
+of
+a
+Default
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-processing-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-new">7.
+</ins></span><ins class="diff-new">
+The
+JSON-LD
+Processing
+Algorithm
+</ins></a></li><li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">8.
+</ins>
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5.1
+</del>
+<ins class="diff-chg">8.1
+</ins>
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5.2
+</del>
+<ins class="diff-chg">8.2
+</ins>
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5.3
+</del>
+<ins class="diff-chg">8.3
+</ins>
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-of-rdf-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">9.
+</ins>
+</span>
+Markup
+of
+RDF
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">9.1
+</ins>
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">9.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.3
+</del>
+<ins class="diff-chg">9.3
+</ins>
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#plain-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.4
+</del>
+<ins class="diff-chg">9.4
+</ins>
+</span>
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#language-specification-in-plain-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.5
+</del>
+<ins class="diff-chg">9.5
+</ins>
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#typed-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.6
+</del>
+<ins class="diff-chg">9.6
+</ins>
+</span>
+Typed
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.7
+</del>
+<ins class="diff-chg">9.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.8
+</del>
+<ins class="diff-chg">9.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#blank-nodes" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.9
+</del>
+<ins class="diff-chg">9.9
+</ins>
+</span>
+Blank
+Nodes
+</a>
+</li>
+<li class="tocline">
+<a href="#escape-character" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.10
+</del>
+<ins class="diff-chg">9.10
+</ins>
+</span>
+Escape
+Character
+</a>
+</li>
+<li class="tocline">
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11
+</del>
+<ins class="diff-chg">9.11
+</ins>
+</span>
+Automatic
+Typing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+<ins class="diff-new">10.
+</ins></span><ins class="diff-new">
+Advanced
+Concepts
+</ins></a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno"><ins class="diff-new">
+10.1
+</ins></span><ins class="diff-new">
+Disjoint
+Graphs
+</ins></a></li><li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.
+</del>
+<ins class="diff-chg">10.2
+</ins>
+</span>
+Acknowledgements
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">A.
+</ins>
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1
+</del>
+<ins class="diff-chg">A.1
+</ins>
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.2
+</del>
+<ins class="diff-chg">A.2
+</ins>
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="how-to-read-this-document" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+How
+to
+Read
+this
+Document
+</h2>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Developers
+that
+want
+to
+understand
+the
+encoding
+possibilities.
+</li>
+</ul>
+<p>
+To
+understand
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+].
+</p>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Introduction
+</h2>
+<p class="issue">
+<del class="diff-old">Need
+</del>
+<ins class="diff-chg">Write
+the
+introduction
+once
+all
+of
+the
+technical
+details
+are
+hammered
+out.
+Explain
+why
+JSON-LD
+is
+designed
+as
+a
+light-weight
+mechanism
+</ins>
+to
+<del class="diff-old">write
+introduction...
+</del>
+<ins class="diff-chg">express
+RDFa,
+Microformats
+and
+Microdata.
+It
+is
+primarily
+intended
+as
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+environments
+as
+well
+as
+a
+way
+to
+pass
+Linked
+Data
+to
+and
+from
+Web
+services.
+It
+is
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+(and
+understanding)
+that
+is
+out
+there
+already.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+Microformats
+data,
+and
+Microdata
+(that
+is,
+every
+data
+model
+currently
+in
+use)
+using
+one
+unified
+format.
+It
+does
+not
+require
+anyone
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+out-of-band
+-
+it
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+tiny
+memory
+footprint
+in
+order
+to
+operate.
+</ins>
+</p>
+</div>
+<div id="design-goals" class="section">
+<h2>
+<span class="secno">
+3.
+</span>
+Design
+Goals
+</h2>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+don't
+need
+to
+know
+RDF
+in
+order
+to
+use
+the
+basic
+functionality
+provided
+by
+JSON-LD.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+should
+be
+100%
+compatible
+with
+JSON.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+All
+major
+RDF
+concepts
+must
+be
+expressible
+via
+the
+JSON-LD
+syntax.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable.
+</dd>
+<dt>
+<ins class="diff-new">Zero
+Edits
+</ins></dt><dd><ins class="diff-new">
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+</ins></dd><dt><ins class="diff-new">
+Streaming
+</ins></dt><dd><ins class="diff-new">
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</ins></dd>
+</dl>
+</div>
+<div id="design-rationale" class="section">
+<h2>
+<span class="secno">
+4.
+</span>
+Design
+Rationale
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="map-terms-to-iris" class="section">
+<h3>
+<span class="secno">
+4.1
+</span>
+Map
+Terms
+to
+IRIs
+</h3>
+<p>
+Establishing
+a
+mechanism
+to
+map
+JSON
+values
+to
+IRIs
+will
+help
+in
+the
+mapping
+of
+JSON
+objects
+to
+RDF.
+This
+does
+not
+mean
+that
+JSON-LD
+must
+be
+restrictive
+in
+declaring
+a
+set
+of
+terms,
+rather,
+experimentation
+and
+innovation
+should
+be
+supported
+as
+part
+of
+the
+core
+design
+of
+JSON-LD.
+There
+are,
+however,
+a
+number
+of
+very
+small
+design
+criterial
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+RDF
+data
+that
+will
+create
+value
+for
+the
+greater
+semantic
+web
+community
+and
+JSON/REST-based
+Web
+Services
+community.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+object
+as
+the
+example
+for
+this
+section:
+</p>
+<pre class="example">
+<del class="diff-old">{"a" : "Person",
+ "name" : "Manu Sporny",
+"homepage"
+:
+"http://manu.sporny.org/"}
+</del>
+<ins class="diff-chg">{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+}
+</ins>
+</pre>
+</div>
+<del class="diff-old">4.2
+</del>
+<h3 id="the-default-context">
+The
+Default
+Context
+</h3>
+<p>
+A
+default
+context
+is
+used
+in
+RDFa
+to
+allow
+developers
+to
+use
+keywords
+as
+aliases
+for
+IRIs.
+So,
+for
+instance,
+the
+keyword
+<strong>
+name
+</strong>
+above
+could
+refer
+to
+the
+IRI
+<em>
+http://xmlns.com/foaf/0.1/name
+</em>.
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+terms
+mean
+something,
+which
+you
+will
+eventually
+want
+to
+query.
+The
+semantic
+web
+specifies
+this
+via
+<em>
+Vocabulary
+Documents
+</em>.
+The
+IRI
+<em>
+http://xmlns.com/foaf/0.1/
+</em>
+specifies
+a
+Vocabulary
+Document,
+and
+<strong>
+name
+</strong>
+is
+a
+term
+in
+that
+vocabulary.
+Paste
+the
+two
+items
+together
+and
+you
+have
+an
+unambiguous
+identifier
+for
+a
+term.
+</p>
+<p>
+Developers,
+and
+machines,
+would
+be
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+Machines
+need
+the
+same
+sort
+of
+dictionary
+of
+terms,
+and
+URIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+Non-prefixed
+terms
+should
+have
+term
+mappings
+declared
+in
+the
+default
+context
+so
+that
+they
+may
+be
+expanded
+later.
+</p>
+<p>
+If
+a
+set
+of
+terms,
+like
+<strong>
+Person
+</strong>,
+<strong>
+name
+</strong>,
+and
+<strong>
+homepage
+</strong>,
+are
+pre-defined
+in
+the
+default
+context,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+JSON
+objects,
+machines
+could
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<pre class="example">
+<del class="diff-old">{"",
+ "" : "Manu Sporny",
+"
+http://xmlns.com/foaf/0.1/homepage
+"
+:
+"
+&lt;
+http://manu.sporny.org
+&gt;
+"}
+</del>
+<ins class="diff-chg">{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
+}
+</ins>
+</pre>
+<p class="note">
+In
+order
+to
+differentiate
+between
+plain
+text
+and
+IRIs,
+the
+<strong>
+<
+</strong> and <strong>
+>
+</strong>
+are
+used
+around
+IRIs.
+</p>
+<p>
+Doing
+this
+would
+mean
+that
+JSON
+would
+start
+to
+become
+unambiguously
+machine-readable,
+play
+well
+with
+the
+semantic
+web,
+and
+basic
+markup
+wouldn't
+be
+that
+much
+more
+complex
+than
+basic
+JSON
+markup.
+A
+win,
+all
+around.
+</p>
+</div>
+<div id="mashing-up-vocabularies" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+Mashing
+Up
+Vocabularies
+</h2>
+<p>
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</p>
+<ul>
+<li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+A
+JSON-LD
+Web
+Service
+could
+define
+these
+as
+<em>
+prefix
+</em>
+es
+in
+their
+default
+context
+beside
+the
+<em>
+terms
+</em>
+that
+are
+already
+defined.
+Using
+this
+feature,
+developers
+could
+also
+<del class="diff-old">do
+</del>
+<ins class="diff-chg">express
+</ins>
+markup
+like
+this:
+</p>
+<pre class="example">
+<del class="diff-old">{"",
+ "" : "Manu Sporny",
+ ",
+"sioc:avatar"
+:
+"&lt;http://twitter.com/account/profile_image/manusporny&gt;"
+</del>
+<ins class="diff-chg">{
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
+</ins>
+}
+</pre>
+<p>
+Developers
+<del class="diff-old">could
+</del>
+<ins class="diff-chg">can
+</ins>
+also
+<del class="diff-old">be
+allowed
+to
+</del>
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+default
+<del class="diff-old">context,
+</del>
+<ins class="diff-chg">context
+in-line
+using
+the
+</ins><code><ins class="diff-chg">
+#
+</ins></code><ins class="diff-chg">
+character,
+</ins>
+like
+so:
+</p>
+<pre class="example">
+<del class="diff-old">[{"a" : "Context",
+   "myvocab" : "http://example.org/myvocab#"}
+ },
+ {"a" : "foaf:Person",
+ "foaf:name" : "Manu Sporny",
+ "foaf:homepage" : "&lt;http://manu.sporny.org/&gt;",
+ "sioc:avatar" : "&lt;http://twitter.com/account/profile_image/manusporny&gt;",
+ "myvocab:credits" : 500}
+]
+</del>
+<ins class="diff-chg">{
+</ins>  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,<ins class="diff-chg">
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+  "myvocab:credits": 500</span>
+}
+</ins>
+</pre>
+<p>
+<ins class="diff-new">Think
+of
+the
+</ins><code><ins class="diff-new">
+#
+</ins></code><ins class="diff-new">
+character
+as
+a
+"hashtable",
+which
+maps
+one
+string
+to
+another
+string.
+In
+the
+example
+above,
+the
+</ins><code><ins class="diff-new">
+myvocab
+</ins></code><ins class="diff-new">
+string
+is
+replaced
+with
+"
+</ins><code><ins class="diff-new">
+http://example.org/myvocab#
+</ins></code><ins class="diff-new">
+"
+when
+it
+is
+detected
+above.
+In
+the
+example
+above,
+"
+</ins><code><ins class="diff-new">
+myvocab:credits
+</ins></code><ins class="diff-new">
+"
+would
+expand
+to
+"
+</ins><code><ins class="diff-new">
+http://example.org/myvocab#credits
+</ins></code><ins class="diff-new">
+".
+</ins></p><p>
+This
+mechanism
+is
+a
+short-hand
+for
+RDF,
+and
+if
+defined,
+will
+give
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</p>
+<p>
+</p>
+</div>
+<div id="an-example-of-a-default-context" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+An
+Example
+of
+a
+Default
+Context
+</h2>
+<p>
+<del class="diff-old">To
+be
+clear,
+</del>
+<ins class="diff-chg">JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+</ins>
+the
+<ins class="diff-new">JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+A
+</ins>
+JSON-LD
+aware
+Web
+Service
+<del class="diff-old">could
+</del>
+<em class="rfc2119" title="may">
+<ins class="diff-chg">may
+</ins></em>
+define
+a
+default
+<del class="diff-old">context
+like
+</del>
+<ins class="diff-chg">context.
+For
+example,
+</ins>
+the
+<del class="diff-old">following:
+</del>
+<ins class="diff-chg">following
+default
+context
+could
+apply
+to
+all
+incoming
+Web
+Service
+calls
+previously
+accepting
+only
+JSON
+data:
+</ins>
+</p>
+<pre class="example">
+<del class="diff-old">{"a" : "Context",
+ "__vocab__" : "http://example.org/default-vocab#",
+ "xsd" : "http://www.w3.org/2001/XMLSchema#",
+ "dc" : "http://purl.org/dc/terms/",
+ "foaf" : "http://xmlns.com/foaf/0.1/",
+ "sioc" : "http://rdfs.org/sioc/ns#",
+ "cc" : "http://creativecommons.org/ns#",
+ "geo" : "http://www.w3.org/2003/01/geo/wgs84_pos#",
+ "vcard" : "http://www.w3.org/2006/vcard/ns#",
+ "cal" : "http://www.w3.org/2002/12/cal/ical#",
+ "doap" : "http://usefulinc.com/ns/doap#",
+ "Person" : "http://xmlns.com/foaf/0.1/Person",
+ "name" : "http://xmlns.com/foaf/0.1/name",
+ "homepage" : "http://xmlns.com/foaf/0.1/homepage"
+</del>
+<ins class="diff-chg">{
+  "#": 
+  {
+    "__vocab__": "http://example.org/default-vocab#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+  }
+</ins>
+}
+</pre>
+<p>
+The
+<code>
+__vocab__
+</code>
+prefix
+is
+a
+special
+prefix
+that
+states
+that
+any
+term
+that
+doesn't
+resolve
+to
+a
+term
+or
+a
+prefix
+should
+be
+appended
+to
+the
+<code>
+__vocab__
+</code>
+IRI.
+This
+is
+done
+to
+ensure
+that
+terms
+can
+be
+transformed
+to
+an
+IRI
+at
+all
+times.
+</p>
+</div>
+<div id="the-json-ld-processing-algorithm" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">7.
+</ins>
+</span>
+<del class="diff-old">Markup
+Examples
+</del>
+<ins class="diff-chg">The
+JSON-LD
+Processing
+Algorithm
+</ins></h2><p><ins class="diff-chg">
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</ins></p>
+<p class="issue">
+<del class="diff-old">Write
+</del>
+<ins class="diff-chg">The
+Processing
+Algorithm
+is
+a
+work
+in
+progress,
+there
+are
+still
+major
+bugs
+in
+the
+algorithm
+and
+it's
+difficult
+to
+follow.
+It's
+provided
+only
+to
+very
+early
+implementers
+to
+give
+them
+an
+idea
+of
+how
+to
+implement
+a
+processor.
+</ins></p><h4 id="processing-algorithm-terms"><ins class="diff-chg">
+Processing
+Algorithm
+Terms
+</ins></h4><ul><li><dfn title="default_context" id="dfn-default_context"><ins class="diff-chg">
+default
+context
+</ins></dfn><ins class="diff-chg">
+-
+a
+context
+that
+is
+specified
+to
+the
+JSON-LD
+processing
+algorithm
+before
+processing
+begins.
+</ins></li><li><dfn title="default_graph" id="dfn-default_graph"><ins class="diff-chg">
+default
+graph
+</ins></dfn><ins class="diff-chg">
+-
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</ins></li><li><dfn title="active_subject" id="dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></dfn><ins class="diff-chg">
+-
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</ins></li><li><dfn title="inherited_subject" id="dfn-inherited_subject"><ins class="diff-chg">
+inherited
+subject
+</ins></dfn><ins class="diff-chg">
+-
+a
+subject
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+</ins><a class="tref" title="current_subject"><ins class="diff-chg">
+current
+subject
+</ins></a><ins class="diff-chg">
+is
+discovered
+or
+generated.
+</ins></li><li><dfn title="active_property" id="dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></dfn><ins class="diff-chg">
+-
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</ins></li><li><dfn title="inherited_property" id="dfn-inherited_property"><ins class="diff-chg">
+inherited
+property
+</ins></dfn><ins class="diff-chg">
+-
+a
+property
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+</ins><a class="tref" title="current_subject"><ins class="diff-chg">
+current
+subject
+</ins></a><ins class="diff-chg">
+is
+discovered
+or
+generated.
+</ins></li><li><dfn title="active_object" id="dfn-active_object"><ins class="diff-chg">
+active
+object
+</ins></dfn><ins class="diff-chg">
+-
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</ins></li><li><dfn title="active_context" id="dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></dfn><ins class="diff-chg">
+-
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+is
+the
+top-most
+item
+on
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+stack.
+</ins></li><li><dfn title="local_context" id="dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></dfn><ins class="diff-chg">
+-
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+</ins><code><ins class="diff-chg">
+#
+</ins></code><ins class="diff-chg">
+key.
+</ins></li><li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples"><ins class="diff-chg">
+list
+of
+incomplete
+triples
+</ins></dfn><ins class="diff-chg">
+-
+A
+list
+of
+triples
+that
+have
+yet
+to
+have
+their
+subject
+set.
+</ins></li><li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items"><ins class="diff-chg">
+list
+of
+unprocessed
+items
+</ins></dfn><ins class="diff-chg">
+-
+A
+list
+of
+objects
+that
+cannot
+be
+processed
+until
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+is
+detected
+or
+the
+end
+of
+the
+current
+associative-array
+is
+detected.
+</ins></li><li><dfn title="processor_state" id="dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></dfn><ins class="diff-chg">
+-
+the
+processor
+state,
+which
+includes
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+stack,
+</ins><a class="tref" title="current_subject"><ins class="diff-chg">
+current
+subject
+</ins></a>,<a class="tref" title="current_property"><ins class="diff-chg">
+current
+property
+</ins></a>,<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples"><ins class="diff-chg">
+list
+of
+incomplete
+triples
+</ins></a>,<ins class="diff-chg">
+and
+the
+</ins><a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items"><ins class="diff-chg">
+list
+of
+unprocessed
+items
+</ins></a>.</li></ul><p><ins class="diff-chg">
+The
+algorithm
+below
+is
+designed
+for
+streaming
+(SAX-based)
+implementations.
+Implementers
+will
+find
+that
+non-streaming
+(document-based)
+implementations
+will
+be
+much
+easier
+to
+implement
+as
+full
+access
+to
+the
+JSON
+object
+model
+eliminates
+</ins>
+some
+<del class="diff-old">introductory
+stuff
+about
+</del>
+<ins class="diff-chg">of
+the
+steps
+that
+are
+necessary
+for
+streaming
+implementations.
+A
+conforming
+JSON-LD
+processor
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-chg">
+default
+graph
+</ins></a><ins class="diff-chg">
+that
+the
+following
+algorithm
+generates:
+</ins></p><ol class="algorithm"><li id="processing-step-default-context"><ins class="diff-chg">
+If
+a
+</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context"><ins class="diff-chg">
+default
+context
+</ins></a><ins class="diff-chg">
+is
+supplied
+to
+the
+processing
+algorithm,
+push
+it
+onto
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+stack.
+</ins></li><li id="processing-step-associative"><ins class="diff-chg">
+If
+an
+associative
+array
+is
+detected,
+create
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a>.<ins class="diff-chg">
+Copy
+the
+</ins><a class="tref" title="current_context"><ins class="diff-chg">
+current
+context
+</ins></a><ins class="diff-chg">
+stack
+to
+the
+newly
+created
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a>.<ins class="diff-chg">
+Push
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+onto
+the
+newly
+created
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+'s
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+stack.
+For
+each
+key-value
+pair
+in
+</ins>
+the
+<ins class="diff-new">associative
+array,
+using
+the
+newly
+created
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a><ins class="diff-new">
+do
+the
+following:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+a
+</ins><code><ins class="diff-new">
+#
+</ins></code><ins class="diff-new">
+key
+is
+found,
+the
+processor
+merges
+each
+key-value
+pair
+in
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a><ins class="diff-new">
+into
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>,<ins class="diff-new">
+overwriting
+any
+duplicate
+values
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>.<ins class="diff-new">
+Process
+each
+object
+in
+the
+</ins><a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items"><ins class="diff-new">
+list
+of
+unprocessed
+items
+</ins></a>,<ins class="diff-new">
+starting
+at
+</ins><a href="#processing-subject"><ins class="diff-new">
+Step
+2.2
+</ins></a>.</li><li id="processing-associative"><ins class="diff-new">
+If
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a><ins class="diff-new">
+has
+not
+been
+detected,
+the
+current
+key-value
+pair
+is
+placed
+into
+the
+</ins><a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items"><ins class="diff-new">
+list
+of
+unprocessed
+items
+</ins></a><ins class="diff-new">
+and
+processing
+proceeds
+to
+the
+next
+key-value
+pair.
+Otherwise,
+if
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a><ins class="diff-new">
+is
+known
+perform
+the
+following
+steps:
+</ins></li><ol class="algorithm"><li id="processing-subject"><ins class="diff-new">
+If
+a
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+key
+is
+found,
+the
+processor
+sets
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+to
+the
+value
+after
+</ins><a href="#markup-of-rdf-concepts"><ins class="diff-new">
+Object
+Processing
+</ins></a><ins class="diff-new">
+has
+been
+performed.
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+</ins><a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject"><ins class="diff-new">
+inherited
+subject
+</ins></a><ins class="diff-new">
+and
+</ins><a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property"><ins class="diff-new">
+inherited
+property
+</ins></a><ins class="diff-new">
+values
+are
+specified,
+generate
+a
+triple
+using
+the
+</ins><a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject"><ins class="diff-new">
+inherited
+subject
+</ins></a><ins class="diff-new">
+for
+the
+subject,
+the
+</ins><a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property"><ins class="diff-new">
+inherited
+property
+</ins></a><ins class="diff-new">
+for
+the
+property,
+and
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+for
+the
+object.
+</ins></li><li><ins class="diff-new">
+If
+there
+are
+any
+triples
+in
+the
+</ins><a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples"><ins class="diff-new">
+list
+of
+incomplete
+triples
+</ins></a>,<ins class="diff-new">
+complete
+each
+triple
+using
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+as
+the
+subject
+for
+each
+triple.
+</ins></li></ol></li><li><ins class="diff-new">
+If
+an
+</ins><code><ins class="diff-new">
+a
+</ins></code><ins class="diff-new">
+key
+is
+found,
+set
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+to
+</ins><code><ins class="diff-new">
+http://www.w3.org/1999/02/22-rdf-syntax-ns#type
+</ins></code>.</li><li><ins class="diff-new">
+If
+a
+key
+that
+is
+not
+</ins><code><ins class="diff-new">
+#
+</ins></code>,<code><ins class="diff-new">
+@
+</ins></code>,<ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
+a
+</ins></code><ins class="diff-new">
+is
+found,
+set
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+by
+performing
+</ins><a href="#markup-of-rdf-concepts"><ins class="diff-new">
+Property
+Processing
+</ins></a><ins class="diff-new">
+on
+the
+key.
+</ins></li><li><ins class="diff-new">
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+by
+performing
+</ins><a href="#markup-of-rdf-concepts"><ins class="diff-new">
+Object
+Processing
+</ins></a><ins class="diff-new">
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<ins class="diff-new">
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+value
+is
+an
+associative
+array,
+then
+process
+the
+value
+starting
+at
+</ins><a href="#processing-step-associative"><ins class="diff-new">
+Step
+2
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+value
+is
+a
+regular
+array,
+then
+process
+the
+value
+starting
+at
+</ins><a href="#processing-step-array"><ins class="diff-new">
+Step
+3
+</ins></a><ins class="diff-new">
+ensuring
+that
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+are
+copied
+to
+a
+newly
+created
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+was
+not
+discovered,
+then:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+Generate
+a
+</ins><a class="tref" title="blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifier
+</ins></a><ins class="diff-new">
+and
+set
+it
+as
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>.</li><li><ins class="diff-new">
+Complete
+any
+previously
+incomplete
+triples
+by
+running
+all
+substeps
+of
+</ins><a href="#processing-subject"><ins class="diff-new">
+Step
+2.2.1
+</ins></a>.</li></ol></li><li><ins class="diff-new">
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a><ins class="diff-new">
+was
+not
+discovered,
+then
+assume
+that
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+is
+unmodified
+and
+run
+all
+substeps
+of
+</ins><a href="#processing-associative"><ins class="diff-new">
+Step
+2.2
+</ins></a><ins class="diff-new">
+on
+the
+</ins><a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items"><ins class="diff-new">
+list
+of
+unprocessed
+items
+</ins></a>.</li></ol></ol></li><li id="processing-step-array"><ins class="diff-new">
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+value
+is
+an
+associative
+array,
+processes
+per
+</ins><a href="#processing-step-associative"><ins class="diff-new">
+Step
+2
+</ins></a>,<ins class="diff-new">
+ensuring
+to
+set
+the
+</ins><a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject"><ins class="diff-new">
+inherited
+subject
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property"><ins class="diff-new">
+inherited
+property
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+in
+the
+newly
+created
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+by
+performing
+</ins><a href="#markup-of-rdf-concepts"><ins class="diff-new">
+Object
+Processing
+</ins></a><ins class="diff-new">
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<ins class="diff-new">
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+and
+place
+it
+into
+the
+</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-new">
+default
+graph
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+Processing?
+</ins><div class="issue"><ins class="diff-new">
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+generation
+of
+triples?
+For
+example,
+would
+implementing
+this
+be
+worth
+the
+more
+complex
+processing
+rules:
+"ex:orderedItems"
+:
+[["one",
+"two",
+"three"]]
+</ins></div></li></ol></li></ol></div><div id="markup-examples" class="section"><h2><span class="secno"><ins class="diff-new">
+8.
+</ins></span>
+Markup
+<del class="diff-old">Examples.
+</del>
+<ins class="diff-chg">Examples
+</ins></h2><p><ins class="diff-chg">
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</ins>
+</p>
+<div id="rdfa" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.5.1
+</del>
+<ins class="diff-chg">8.1
+</ins>
+</span>
+RDFa
+</h3>
+<p>
+<ins class="diff-chg">The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</ins></p>
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</pre>
+<p>
+<del class="diff-old">Representation:
+</del>
+<ins class="diff-chg">An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</ins>
+</p>
+<pre class="example">
+<del class="diff-old">[{ 
+   "a" : "Context",
+   "foaf" : "http://xmlns.com/foaf/0.1/"
+ },
+</del>
+<ins class="diff-chg">[
+</ins>
+ {
+<del class="diff-old">    "@" : "_:bnode1",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/bob/&gt;",
+    "foaf:name" : "Bob"
+</del>
+<ins class="diff-chg">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+</ins>
+ },
+ {
+<del class="diff-old">    "@" : "_:bnode2",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/eve/&gt;",
+    "foaf:name" : "Eve"
+</del>
+<ins class="diff-chg">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+</ins>
+ },
+ {
+<del class="diff-old">    "@" : "_:bnode2",
+    "a" : "foaf:Person",
+    "foaf:homepage" : "&lt;http://example.com/manu/&gt;",
+    "foaf:name" : "Manu"
+</del>
+<ins class="diff-chg">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+</ins>
+ }
+]
+</pre>
+</div>
+<div id="microformats" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.5.2
+</del>
+<ins class="diff-chg">8.2
+</ins>
+</span>
+Microformats
+</h3>
+<p>
+<ins class="diff-chg">The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</ins></p>
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+</pre>
+<p>
+<del class="diff-old">Representation:
+</del>
+<ins class="diff-chg">The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+</ins><code><ins class="diff-chg">
+url
+</ins></code><ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+fn
+</ins></code><ins class="diff-chg">
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+</ins><code><ins class="diff-chg">
+http://tantek.com
+</ins></code>.
+</p>
+<pre class="example">
+<del class="diff-old">[{ 
+   "a" : "Context",
+   "vcard" : "http://microformats.org/profile/hcard#vcard"
+   "url" : "http://microformats.org/profile/hcard#url"
+   "fn" : "http://microformats.org/profile/hcard#fn"
+ },
+ {
+    "@" : "_:bnode1",
+    "a" : "vcard",
+    "url" : "&lt;http://tantek.com/&gt;",
+    "fn" : "Tantek Çelik"
+ }
+]
+</del>
+<ins class="diff-chg">{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+}
+</ins>
+</pre>
+</div>
+<div id="microdata" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.5.3
+</del>
+<ins class="diff-chg">8.3
+</ins>
+</span>
+Microdata
+</h3>
+<p>
+<ins class="diff-chg">The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</ins></p>
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</pre>
+<p>
+<del class="diff-old">Representation:
+</del>
+<ins class="diff-chg">Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</ins>
+</p>
+<pre class="example">
+<del class="diff-old">[{ 
+   "a" : "Context",
+   "__vocab__" : "http://www.w3.org/1999/xhtml/microdata#",
+   "frbr" : "http://purl.org/vocab/frbr/core#",
+   "dc" : "http://purl.org/dc/terms/"
+ },
+ {
+    "a" : "frbr:Work",
+    "@" : "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "dc:title" : "Just a Geek",
+    "dc:creator" : "Whil Wheaton",
+    "frbr:realization" : ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+ },
+ {
+    "a" : "frbr:Expression",
+    "@" : "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "dc:type" : "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+ },
+ {
+    "a" : "frbr:Expression",
+    "@" : "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "dc:type" : "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+ }
+</del>
+<ins class="diff-chg">[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+</ins>
+]
+</pre>
+</div>
+</div>
+<div id="markup-of-rdf-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">9.
+</ins>
+</span>
+Markup
+of
+RDF
+Concepts
+</h2>
+<del class="diff-old">Need
+</del>
+<p>
+<ins class="diff-chg">JSON-LD
+is
+designed
+</ins>
+to
+<del class="diff-old">write
+introduction
+</del>
+<ins class="diff-chg">ensure
+that
+most
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+</ins>
+to
+<ins class="diff-new">understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+Javascript
+objects
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+Since
+</ins>
+RDF
+<del class="diff-old">Concepts
+</del>
+<ins class="diff-chg">is
+also
+an
+important
+sub-community
+of
+the
+Linked
+Data
+movement,
+it
+is
+important
+that
+all
+RDF
+concepts
+are
+well-represented
+in
+this
+specification.
+This
+</ins>
+section
+<ins class="diff-new">details
+how
+each
+RDF
+concept
+can
+be
+expressed
+in
+JSON-LD.
+</ins>
+</p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">9.1
+</ins>
+</span>
+IRIs
+</h3>
+<p>
+<ins class="diff-new">Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+subjects
+and
+many
+objects
+are
+identified.
+IRIs
+can
+be
+expressed
+by
+wrapping
+a
+text
+string
+with
+the
+</ins><code><</code> and <code><ins class="diff-new">
+>
+</ins></code><ins class="diff-new">
+characters.
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "foaf:homepage" : "",
+</del>
+<ins class="diff-chg">  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">The
+example
+above
+would
+set
+the
+object
+to
+an
+IRI
+with
+the
+value
+of
+</ins><code><ins class="diff-new">
+http://manu.sporny.org
+</ins></code>.</p><p><ins class="diff-new">
+Wrapping
+IRIs
+with
+the
+</ins><code><</code> and <code><ins class="diff-new">
+>
+</ins></code><ins class="diff-new">
+characters
+are
+only
+necessary
+when
+IRIs
+are
+specified
+as
+objects.
+At
+no
+other
+point
+do
+you
+need
+to
+wrap
+an
+IRI.
+You
+do
+not
+need
+to
+wrap
+IRIs
+when
+declaring
+a
+property,
+declaring
+a
+CURIE,
+or
+describing
+key-value
+pairs
+in
+a
+context.
+</ins></p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">9.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+<ins class="diff-new">A
+subject
+is
+declared
+using
+the
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+predicate,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "",
+</del>
+<ins class="diff-chg">  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">The
+example
+above
+would
+set
+the
+subject
+to
+</ins><code><http://example.org/people#joebob></code>.</p>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.3
+</del>
+<ins class="diff-chg">9.3
+</ins>
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+<ins class="diff-new">The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+</ins><code><ins class="diff-new">
+a
+</ins></code><ins class="diff-new">
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-url).
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "",
+</del>
+<ins class="diff-chg">  "@": "&lt;http://example.org/people#joebob&gt;",
+  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">The
+example
+above
+would
+generate
+the
+following
+triple
+(in
+N-Triples
+notation):
+</ins></p><pre class="example"><ins class="diff-new">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</ins></pre>
+</div>
+<div id="plain-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.4
+</del>
+<ins class="diff-chg">9.4
+</ins>
+</span>
+Plain
+Literals
+</h3>
+<p>
+<ins class="diff-new">Regular
+text
+strings
+are
+called
+"plain
+literals"
+in
+RDF
+and
+are
+easily
+expressed
+using
+regular
+JSON
+strings.
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "foaf:name" : "",
+</del>
+<ins class="diff-chg">  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+</ins>
+...
+}
+</pre>
+</div>
+<div id="language-specification-in-plain-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.5
+</del>
+<ins class="diff-chg">9.5
+</ins>
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</h3>
+<p>
+<ins class="diff-new">JSON-LD
+attempts
+to
+make
+sure
+that
+it
+is
+easy
+to
+express
+triples
+in
+other
+languages
+while
+simultaneously
+ensuring
+that
+hefty
+data
+structures
+aren't
+required
+to
+accomplish
+simple
+language
+markup.
+When
+the
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+symbol
+is
+used
+in
+a
+literal,
+the
+JSON-LD
+processor
+tags
+the
+literal
+text
+with
+the
+language
+tag
+that
+follows
+the
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+symbol.
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "foaf:name" : "",
+</del>
+<ins class="diff-chg">  "foaf:name": "<span class="diff">花澄@ja</span>",
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">The
+example
+above
+would
+generate
+a
+plain
+literal
+for
+</ins><em><ins class="diff-new">
+花澄
+</ins></em><ins class="diff-new">
+and
+associate
+the
+</ins><code><ins class="diff-new">
+ja
+</ins></code><ins class="diff-new">
+language
+tag
+with
+the
+triple
+that
+is
+generated.
+Languages
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+expressed
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-BCP47"><ins class="diff-new">
+BCP47
+</ins></a></cite><ins class="diff-new">
+]
+format.
+</ins></p>
+</div>
+<div id="typed-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.6
+</del>
+<ins class="diff-chg">9.6
+</ins>
+</span>
+Typed
+Literals
+</h3>
+<p>
+<ins class="diff-new">Literals
+may
+also
+be
+typed
+in
+JSON-LD
+by
+using
+the
+</ins><code><ins class="diff-new">
+^^
+</ins></code><ins class="diff-new">
+sequence
+at
+the
+end
+of
+the
+text
+string.
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "dc:modified" : "",
+</del>
+<ins class="diff-chg">  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">The
+example
+above
+would
+generate
+an
+object
+with
+the
+value
+of
+</ins><code><ins class="diff-new">
+2010-05-29T14:17:39+02:00
+</ins></code><ins class="diff-new">
+and
+the
+datatype
+of
+</ins><code><ins class="diff-new">
+http://www.w3.org/2001/XMLSchema#dateTime
+</ins></code>.</p>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.7
+</del>
+<ins class="diff-chg">9.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+<ins class="diff-new">A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+arrays.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+express
+each
+property
+as
+an
+array.
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "foaf:nick" : ,
+</del>
+<ins class="diff-chg">  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</ins></p><pre class="example"><ins class="diff-new">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/&gt;
+      "stu" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/&gt;
+      "groknar" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/&gt;
+"radface"
+.
+</ins></pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.8
+</del>
+<ins class="diff-chg">9.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+<ins class="diff-new">Multiple
+typed
+literals
+are
+expressed
+very
+much
+in
+the
+same
+way
+as
+multiple
+properties:
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "dc:modified" : ],
+</del>
+<ins class="diff-chg">  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</ins></p><pre class="example"><ins class="diff-new">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</ins></pre>
+</div>
+<div id="blank-nodes" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.9
+</del>
+<ins class="diff-chg">9.9
+</ins>
+</span>
+Blank
+Nodes
+</h3>
+<p>
+<ins class="diff-new">At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+is
+where
+blank
+nodes
+come
+into
+play.
+In
+JSON-LD,
+blank
+node
+identifiers
+are
+automatically
+created
+if
+a
+subject
+is
+not
+specified
+using
+the
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+key.
+However,
+authors
+may
+name
+blank
+nodes
+by
+using
+the
+special
+</ins><code><ins class="diff-new">
+_
+</ins></code><ins class="diff-new">
+CURIE
+prefix.
+</ins></p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "@" : "",
+</del>
+<ins class="diff-chg">  "@": "<span class="diff">_:foo</span>",
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">The
+example
+above
+would
+set
+the
+subject
+to
+</ins><code><ins class="diff-new">
+_:foo
+</ins></code>,<ins class="diff-new">
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+named
+blank
+node.
+</ins></p>
+</div>
+<div id="escape-character" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.10
+</del>
+<ins class="diff-chg">9.10
+</ins>
+</span>
+Escape
+Character
+</h3>
+<p>
+Special
+characters
+in
+property
+values
+<em class="rfc2119" title="must">
+must
+</em>
+be
+escaped
+in
+order
+to
+not
+be
+interpreted
+as
+<ins class="diff-new">CURIEs,
+</ins>
+IRIs,
+language
+tags,
+or
+TypedLiterals.
+</p>
+<p>
+The
+special
+characters
+in
+JSON-LD
+are:
+<code>
+<
+</code>, <code>
+>
+</code>,
+<code>
+@
+</code>,
+<code>
+<ins class="diff-new">#
+</ins></code>,<code>:
+</code>
+and
+<code>
+^
+</code>.
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old"> "example:code" : ,
+</del>
+<ins class="diff-chg">  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+</ins>
+...
+}
+</pre>
+</div>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.11
+</del>
+<ins class="diff-chg">9.11
+</ins>
+</span>
+Automatic
+Typing
+</h3>
+<p>
+<ins class="diff-new">Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+decimals,
+integers
+and
+boolean
+values,
+JSON-LD
+utilizes
+that
+information
+to
+create
+</ins><a href="#typed-literals"><ins class="diff-new">
+Typed
+Literals
+</ins></a>.</p>
+<pre class="example">
+{
+...
+<del class="diff-old"> // This value is automatically converted to having a type of xsd:decimal
+ "measure:cups" : ,
+ // This value is automatically converted to having a type of xsd:integer
+ "chem:protons" : ,
+ // This value is automatically converted to having a type of xsd:boolean
+ "sensor:active" : ,
+</del>
+<ins class="diff-chg">  // This value is automatically converted to having a type of xsd:decimal
+  "measure:cups": <span class="diff">5.3</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+</ins>
+...
+}
+</pre>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">A.
+</del>
+<ins class="diff-chg">10.
+</ins>
+</span>
+<del class="diff-old">Acknowledgements
+</del>
+<ins class="diff-chg">Advanced
+Concepts
+</ins>
+</h2>
+<p class="issue">
+<ins class="diff-new">There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+taken
+with
+a
+grain
+of
+salt;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</ins></p><div id="disjoint-graphs" class="section"><h3><span class="secno"><ins class="diff-new">
+10.1
+</ins></span><ins class="diff-new">
+Disjoint
+Graphs
+</ins></h3><p><ins class="diff-new">
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+array
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</ins></p><p><ins class="diff-new">
+Assume
+the
+following
+RDF
+graph:
+</ins></p><pre class="example"><ins class="diff-new">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;/section&gt;
+</ins></pre><p><ins class="diff-new">
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+JSON-LD
+associative
+array.
+</ins></p><p><ins class="diff-new">
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</ins></p><pre class="example"><ins class="diff-new">
+{
+  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+  "@": 
+  [
+    {
+      "@": "&lt;http://example.org/people#john&gt;",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "&lt;http://example.org/people#jane&gt;",
+      "a": "foaf:Person"
+    }
+  ]
+}
+</ins></pre></div><div class="appendix section" id="acknowledgements"><h3><span class="secno"><ins class="diff-new">
+10.2
+</ins></span><ins class="diff-new">
+Acknowledgements
+</ins></h3>
+<p>
+The
+editor
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+rationale
+and
+reasoning
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+<ins class="diff-new">Dave
+Longley
+who
+reviewed
+and
+provided
+feedback
+on
+the
+overall
+specification
+and
+contexts,
+</ins>
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+</p>
+</div>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">A.
+</ins>
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">B.1
+</del>
+<ins class="diff-chg">A.1
+</ins>
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+<ins class="diff-new">[BCP47]
+</ins></dt><dd><ins class="diff-new">
+A.
+Phillips,
+M.
+Davis.
+</ins><a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite><ins class="diff-new">
+Tags
+for
+Identifying
+Languages
+</ins></cite></a><ins class="diff-new">
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+</ins><a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><ins class="diff-new">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</ins></a></dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">B.2
+</del>
+<ins class="diff-chg">A.2
+</ins>
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+3
+August
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">
+http://www.w3.org/TR/2010/WD-rdfa-core-20100803
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101014/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,1459 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head><body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-14-october-2010">Unofficial Draft 14 October 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20100823.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+Developers that embed structured data in their Web pages can choose among
+a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
+and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
+incompatible at the syntax level, can be easily mapped to RDF. JSON has 
+proven to be a highly useful object serialization and messaging replacement 
+for SOAP. In an attempt to harmonize the representation of Linked Data in JSON, 
+this specification outlines a common JSON representation format for 
+Linked Data that can be used to represent objects specified via RDFa, 
+Microformats and Microdata.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1. </span>How to Read this Document</a></li><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">2. </span>Introduction</a></li><li class="tocline"><a href="#design-goals" class="tocxref"><span class="secno">3. </span>Design Goals</a></li><li class="tocline"><a href="#design-rationale" class="tocxref"><span class="secno">4. </span>Design Rationale</a><ul class="toc"><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">4.1 </span>Map Terms to IRIs</a></li></ul></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">5. </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">6. </span>An Example of a Default Context</a></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">7. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">8. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">8.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">8.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">8.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">9. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">9.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">9.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">9.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">9.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">9.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">9.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">9.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">9.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">9.9 </span>Blank Nodes</a></li><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">9.10 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">9.11 </span>Automatic Typing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">10. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">10.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">10.2 </span>Acknowledgements</a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">A.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.2 </span>Informative references</a></li></ul></li></ul></div>
+
+<div id="how-to-read-this-document" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>How to Read this Document</h2>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Developers that want to encode Microformats, RDFa, or Microdata in a
+  way that is cross-language compatible via JSON.</li>
+  <li>Developers that want to understand the encoding possibilities.</li>
+</ul>
+
+<p>
+To understand this specification you must first be familiar with JSON, 
+which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>].</p>
+
+</div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Introduction</h2>
+
+<p class="issue">Write the introduction once all of the technical details
+are hammered out. Explain why JSON-LD is designed as a light-weight mechanism
+to express RDFa, Microformats and Microdata. It is primarily intended as
+a way to express Linked Data in Javascript environments as well as a way to pass
+Linked Data to and from Web services. It is designed to be as simple as 
+possible, utilizing the large number of JSON parsers (and understanding) that
+is out there already. It is designed to be able to express key-value pairs,
+RDF data, Microformats data, and Microdata (that is, every data model
+currently in use) using one unified format. It does not require anyone to change
+their JSON, but easily add meaning by adding context in a way that is 
+out-of-band - it is designed to not disturb already deployed systems running
+on JSON, but provide a smooth migration path from JSON to JSON with added
+semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a tiny memory footprint in order to operate.
+</p>
+</div>
+
+<div id="design-goals" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Design Goals</h2>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers don't need to know RDF in order to use the basic functionality
+ provided by JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
+ <dt>Expressiveness</dt>
+ <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable.</dd>
+ <dt>Zero Edits</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers.</dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="design-rationale" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Design Rationale</h2>
+
+<p>The following section outlines the rationale behind the JSON-LD markup
+language.
+</p>
+
+<div id="map-terms-to-iris" class="section">
+<h3><span class="secno">4.1 </span>Map Terms to IRIs</h3>
+
+<p>Establishing a mechanism to map JSON values to IRIs will
+help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
+be restrictive in declaring a set of terms, rather, experimentation and 
+innovation should be supported as part of the core design of JSON-LD. There are, 
+however, a number of very small design criterial that can ensure that developers 
+will generate good RDF data that will create value for the greater 
+semantic web community and JSON/REST-based Web Services community.
+</p>
+
+<p>We will be using the following JSON object as the example for this section:
+</p>
+
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+}</pre>
+</div>
+<h3 id="the-default-context">The Default Context</h3>
+
+<p>A default context is used in RDFa to allow developers to use keywords
+as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
+above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
+The semantic web, just like the document-based web, uses IRIs for
+unambiguous identification. The idea is that these terms mean something, 
+which you will eventually want to query. The semantic web specifies this via 
+<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
+a Vocabulary Document, and <strong>name</strong> is a term in that 
+vocabulary. Paste the two items together and you have an unambiguous identifier
+for a term.
+</p>
+
+<p>Developers, and machines, would be able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much
+like we can use WordNet today to see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Machines need the same sort of 
+dictionary of terms, and URIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>Non-prefixed terms should have term mappings declared in the default
+context so that they may be expanded later.</p>
+            
+<p>If a set of terms, like <strong>Person</strong>, 
+<strong>name</strong>, and <strong>homepage</strong>,
+are pre-defined in the default context, and that context is used to resolve the
+names in JSON objects, machines could automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
+}</pre>
+
+<p class="note">In order to differentiate between plain text and IRIs, the
+<strong><</strong> and <strong>></strong> are used around IRIs.</p>
+
+<p>Doing this would mean that JSON would start to become unambiguously
+machine-readable, play well with the semantic web, and basic markup wouldn't 
+be that much more complex than basic JSON markup. A win, all around.</p>
+</div>
+
+<div id="mashing-up-vocabularies" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Mashing Up Vocabularies</h2>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
+default context beside the <em>terms</em> that are already defined. Using
+this feature, developers could also express markup like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+default context in-line using the <code>#</code> character, like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+  "myvocab:credits": 500</span>
+}</pre>
+
+<p>Think of the <code>#</code> character as a "hashtable", which maps one
+string to another string. In the example above, the <code>myvocab</code>
+string is replaced with "<code>http://example.org/myvocab#</code>" when it
+is detected above. In the example above, "<code>myvocab:credits</code>" would
+expand to "<code>http://example.org/myvocab#credits</code>".</p>
+
+<p>This mechanism is a short-hand for RDF, and if defined, will give
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div id="an-example-of-a-default-context" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>An Example of a Default Context</h2>
+
+<p>JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> define a default context. For example, the
+following default context could apply to all incoming Web Service calls
+previously accepting only JSON data:</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+    "__vocab__": "http://example.org/default-vocab#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+  }
+}</pre>
+
+<p>The <code>__vocab__</code> prefix is a special prefix that states 
+that any term that doesn't resolve to a term or a prefix should be 
+appended to the <code>__vocab__</code> IRI. This is done to ensure that 
+terms can be transformed to an IRI at all times.
+</p>
+</div>
+
+<div id="the-json-ld-processing-algorithm" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">7. </span>The JSON-LD Processing Algorithm</h2>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The Processing Algorithm is a work in progress, there are
+still major bugs in the algorithm and it's difficult to follow. It's provided
+only to very early implementers to give them an idea of how to implement a
+processor.</p>
+
+<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
+<ul>
+<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
+JSON-LD processing algorithm before processing begins.</li>
+<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
+generated by JSON-LD markup.</li>
+<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
+processor should use when generating triples.</li>
+<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
+CURIEs while the processing algorithm is running. The 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
+associative-array level, specified via the <code>#</code> key.</li>
+<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
+yet to have their subject set.</li>
+<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
+processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
+current associative-array is detected.</li>
+<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
+the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
+<a class="tref" title="current_property">current property</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+</li></ul>
+
+<p>The algorithm below is designed for streaming (SAX-based) implementations.
+Implementers will find that non-streaming (document-based) implementations will
+be much easier to implement as full access to the JSON object model eliminates 
+some of the steps that are necessary for streaming implementations. A conforming
+JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
+same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
+
+<ol class="algorithm">
+<li id="processing-step-default-context">If a <a class="tref internalDFN" title="default_context" href="#dfn-default_context">default context</a> is 
+supplied to the
+processing algorithm, push it onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+
+<li id="processing-step-associative">If an associative array is 
+detected, create a new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
+the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
+key-value pair in the associative array, using the newly created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
+
+  <ol class="algorithm">
+
+    <li>If a <code>#</code> key is found, the processor
+    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
+    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
+    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. 
+    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
+    starting at <a href="#processing-subject">Step 2.2</a>.</li>
+
+    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not been detected, the current
+    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
+    and processing proceeds to the next key-value pair. Otherwise, if the
+    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
+
+    <ol class="algorithm">
+
+      <li id="processing-subject">If a <code>@</code> key is found, the 
+      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> has been performed.
+
+      <ol class="algorithm">
+        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
+        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
+        </li>
+ 
+        <li>If there are any triples in the 
+        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
+        </li>
+      </ol>
+
+      </li>
+
+      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
+      </li>
+
+      <li>If a key that is not <code>#</code>, 
+      <code>@</code>, or <code>a</code> is found, set the 
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
+      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
+      </li>
+
+      <li>If the value is not an array, set the 
+      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
+      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
+
+      <li>If the value is an associative array, then
+      process the value starting at 
+      <a href="#processing-step-associative">Step 2</a>.</li>
+
+      <li>If the value is a regular array, then process the value 
+      starting at 
+      <a href="#processing-step-array">Step 3</a> ensuring that
+      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
+      
+      <ol class="algorithm">
+        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
+
+        <li>Complete any previously incomplete triples by running all substeps 
+        of <a href="#processing-subject">Step 2.2.1</a>.
+        </li>
+      </ol>
+
+      </li><li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
+      <a href="#processing-associative">Step 2.2</a>
+      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+     </li></ol>
+    </ol>
+  </li>
+
+  <li id="processing-step-array">If a regular array is detected, 
+  process each value in the array by doing the following:
+
+    <ol class="algorithm">
+      <li>If the value is an associative array, processes per 
+      <a href="#processing-step-associative">Step 2</a>, ensuring to set
+      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
+      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
+      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
+      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
+      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
+      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
+
+      <li>If the value is a regular array, should we support RDF 
+      List/Sequence Processing? 
+      <div class="issue">If the value is a regular array, should we support 
+      RDF List/Sequence generation of triples? For example, would implementing
+      this be worth the more complex processing rules: "ex:orderedItems" : 
+      [["one", "two", "three"]]</div></li>
+    </ol>
+  </li>
+</ol>
+
+</div>
+
+<div id="markup-examples" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">8. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">8.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+[
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+ }
+]</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">8.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">8.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+]</pre>
+
+</div>
+
+</div>
+
+
+
+
+
+
+<div id="markup-of-rdf-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">9. </span>Markup of RDF Concepts</h2>
+
+<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked up
+in a way that is simple to understand and author by Web developers. In many
+cases, Javascript objects can become Linked Data with the simple addition
+of a context. Since RDF is also an important sub-community of the Linked
+Data movement, it is important that all RDF concepts are well-represented
+in this specification. This section details how each RDF concept can be
+expressed in JSON-LD.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">9.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
+and many objects are identified. IRIs can be expressed by wrapping a
+text string with the <code><</code> and <code>></code> characters.
+</p>
+
+<pre class="example">
+{
+...
+  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}</pre>
+
+<p>The example above would set the object to an IRI with the value of
+<code>http://manu.sporny.org</code>.
+</p>
+
+<p>Wrapping IRIs with the  <code><</code> and <code>></code> 
+characters are only necessary when IRIs are specified as objects. At no other
+point do you need to wrap an IRI. You do not need to wrap IRIs when declaring 
+a property, declaring a CURIE, or describing key-value pairs in a context.</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">9.2 </span>Identifying the Subject</h3>
+
+<p>A subject is declared using the <code>@</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, predicate, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to 
+<code><http://example.org/people#joebob></code>.
+</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">9.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the <code>a</code>
+key. Specifying the type in this way will generate a triple of the form 
+(subject, type, type-url).</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple 
+(in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+</div>
+
+<div id="plain-literals" class="section">
+<h3><span class="secno">9.4 </span>Plain Literals</h3>
+
+<p>Regular text strings are called "plain literals" in RDF and are easily
+expressed using regular JSON strings.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="language-specification-in-plain-literals" class="section">
+<h3><span class="secno">9.5 </span>Language Specification in Plain Literals</h3>
+
+<p>JSON-LD attempts to make sure that it is easy to express triples in other
+languages while simultaneously ensuring that hefty data structures 
+aren't required to accomplish simple language markup. When the 
+<code>@</code> symbol is used in a literal, the JSON-LD processor tags
+the literal text with the language tag that follows the <code>@</code>
+symbol.
+</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">花澄@ja</span>",
+...
+}</pre>
+
+<p>The example above would generate a plain literal for <em>花澄</em> and
+associate the <code>ja</code> language tag with the triple that is
+generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="typed-literals" class="section">
+<h3><span class="secno">9.6 </span>Typed Literals</h3>
+
+<p>Literals may also be typed in JSON-LD by using the <code>^^</code>
+sequence at the end of the text string.</p>
+
+<pre class="example">
+{
+...
+  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}</pre>
+
+<p>The example above would generate an object with the value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">9.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+arrays. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an array.</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/&gt;
+      "stu" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/&gt;
+      "groknar" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/&gt;
+      "radface" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">9.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple typed literals are expressed very much in the same way as 
+multiple properties:</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="blank-nodes" class="section">
+<h3><span class="secno">9.9 </span>Blank Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this is where blank nodes come
+into play. In JSON-LD, blank node identifiers are automatically created if a 
+subject is not specified using the <code>@</code> key. However, authors may
+name blank nodes by using the special <code>_</code> CURIE prefix.</p>
+
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+named blank node.
+</p>
+
+</div>
+
+<div id="escape-character" class="section">
+<h3><span class="secno">9.10 </span>Escape Character</h3>
+
+<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
+interpreted as CURIEs, IRIs, language tags, or TypedLiterals.</p>
+
+<p>The special characters in JSON-LD are: <code><</code>, <code>></code>,
+<code>@</code>, <code>#</code>, <code>:</code> and <code>^</code>.</p>
+
+<pre class="example">
+{
+...
+  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}</pre>
+
+</div>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">9.11 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as decimals, 
+integers and boolean values, JSON-LD utilizes that information to create 
+<a href="#typed-literals">Typed Literals</a>.</p>
+
+<pre class="example">
+{
+...
+  // This value is automatically converted to having a type of xsd:decimal
+  "measure:cups": <span class="diff">5.3</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">10. </span>Advanced Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear whether
+or not the JSON-LD specification is going to support the complexity necessary
+to support each concept. The entire section on Advanced Concepts should be
+taken with a grain of salt; it is merely a list of possibilities where all
+of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">10.1 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an array to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;/section&gt;</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single JSON-LD associative
+array.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+  "@": 
+  [
+    {
+      "@": "&lt;http://example.org/people#john&gt;",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "&lt;http://example.org/people#jane&gt;",
+      "a": "foaf:Person"
+    }
+  ]
+}</pre>
+
+</div>
+
+<div class="appendix section" id="acknowledgements">
+<h3><span class="secno">10.2 </span>Acknowledgements</h3>
+
+<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
+rationale and reasoning behind the JSON-LD work via his work on RDFj, 
+Dave Longley who reviewed and provided feedback on the overall 
+specification and contexts, and Ian Davis, who created RDF/JSON.</p>
+</div>
+
+
+
+
+</div><div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">A. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">A.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">A.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>3 August 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">http://www.w3.org/TR/2010/WD-rdfa-core-20100803</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101014/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101024/diff-20101014.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,6923 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+-
+Linked
+Data
+Expression
+in
+JSON
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+Linked
+Data
+</h2>
+<h2 id="unofficial-draft-24-october-2010">
+Unofficial
+Draft
+<del class="diff-old">14
+</del>
+<ins class="diff-chg">24
+</ins>
+October
+2010
+</h2>
+<dl>
+<dt>
+Editor:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20101014.html">
+diff
+to
+previous
+version
+</a>.
+</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+Developers
+that
+embed
+structured
+data
+in
+their
+Web
+pages
+can
+choose
+among
+a
+number
+of
+languages
+such
+as
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+],
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+Each
+of
+these
+structured
+data
+languages,
+while
+incompatible
+at
+the
+syntax
+level,
+can
+be
+easily
+mapped
+to
+RDF.
+JSON
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+<del class="diff-old">replacement
+for
+SOAP.
+</del>
+<ins class="diff-chg">format.
+</ins>
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+Linked
+Data
+that
+can
+be
+used
+to
+represent
+objects
+specified
+via
+RDFa,
+Microformats
+and
+Microdata.
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+<ins class="diff-new">Introduction
+</ins></a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno"><ins class="diff-new">
+1.1
+</ins></span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+<del class="diff-old">2.
+</del>
+<ins class="diff-chg">1.2
+</ins>
+</span>
+<del class="diff-old">Introduction
+</del>
+<ins class="diff-chg">Contributing
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design-goals-and-rationale" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.
+</del>
+<ins class="diff-chg">2.
+</ins>
+</span>
+Design
+Goals
+<ins class="diff-new">and
+Rationale
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">2.1
+</ins>
+</span>
+<del class="diff-old">Design
+Rationale
+</del>
+<ins class="diff-chg">Goals
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#map-terms-to-iris" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">2.2
+</ins>
+</span>
+Map
+Terms
+to
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-default-context" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">2.3
+</ins></span><ins class="diff-chg">
+The
+Default
+Context
+</ins></a>
+</li>
+<li class="tocline">
+<a href="#mashing-up-vocabularies" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">2.4
+</ins>
+</span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#an-example-of-a-default-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">2.5
+</ins>
+</span>
+An
+Example
+of
+a
+Default
+Context
+</a>
+</li>
+<del class="diff-old">7.
+The
+JSON-LD
+Processing
+Algorithm
+</del>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.
+</del>
+<ins class="diff-chg">3.
+</ins>
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.1
+</del>
+<ins class="diff-chg">3.1
+</ins>
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.2
+</del>
+<ins class="diff-chg">3.2
+</ins>
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.3
+</del>
+<ins class="diff-chg">3.3
+</ins>
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-processing-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-new">4.
+</ins></span><ins class="diff-new">
+The
+JSON-LD
+Processing
+Algorithm
+</ins></a></li><li class="tocline">
+<a href="#markup-of-rdf-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+Markup
+of
+RDF
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#plain-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.4
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#language-specification-in-plain-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.5
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#typed-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.6
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+Typed
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.7
+</del>
+<ins class="diff-chg">5.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.8
+</del>
+<ins class="diff-chg">5.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#blank-nodes" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.9
+</del>
+<ins class="diff-chg">5.9
+</ins>
+</span>
+Blank
+Nodes
+</a>
+</li>
+<li class="tocline">
+<a href="#escape-character" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.10
+</del>
+<ins class="diff-chg">5.10
+</ins>
+</span>
+Escape
+Character
+</a>
+</li>
+<li class="tocline">
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.11
+</del>
+<ins class="diff-chg">5.11
+</ins>
+</span>
+Automatic
+Typing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#best-practices" class="tocxref">
+<span class="secno">
+<ins class="diff-new">6.
+</ins></span><ins class="diff-new">
+Best
+Practices
+</ins></a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno"><ins class="diff-new">
+6.1
+</ins></span><ins class="diff-new">
+JavaScript
+</ins></a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno"><ins class="diff-new">
+6.2
+</ins></span><ins class="diff-new">
+Schema-less
+Databases
+</ins></a></li></ul></li><li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">10.
+</del>
+<ins class="diff-chg">7.
+</ins>
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+<ins class="diff-new">7.1
+</ins></span><ins class="diff-new">
+Type
+Coercion
+</ins></a></li><li class="tocline"><a href="#json-ld-profiles" class="tocxref"><span class="secno"><ins class="diff-new">
+7.2
+</ins></span><ins class="diff-new">
+JSON-LD
+Profiles
+</ins></a></li><li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+<del class="diff-old">10.1
+</del>
+<ins class="diff-chg">7.3
+</ins>
+</span>
+Disjoint
+Graphs
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+<del class="diff-old">10.2
+</del>
+<ins class="diff-chg">A.
+</ins>
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<del class="diff-old">1.
+How
+to
+Read
+this
+Document
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+Developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+Developers
+that
+want
+to
+understand
+the
+encoding
+possibilities.
+To
+understand
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+RFC4627
+].
+</del>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">2.
+</del>
+<ins class="diff-chg">1.
+</ins>
+</span>
+Introduction
+</h2>
+<p class="issue">
+Write
+the
+introduction
+once
+all
+of
+the
+technical
+details
+are
+hammered
+out.
+Explain
+why
+JSON-LD
+is
+designed
+as
+a
+light-weight
+mechanism
+to
+express
+RDFa,
+Microformats
+and
+Microdata.
+It
+is
+primarily
+intended
+as
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+environments
+as
+well
+as
+a
+way
+to
+pass
+Linked
+Data
+to
+and
+from
+Web
+services.
+It
+is
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+(and
+understanding)
+that
+is
+out
+there
+already.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+Microformats
+data,
+and
+Microdata
+(that
+is,
+every
+data
+model
+currently
+in
+use)
+using
+one
+unified
+format.
+It
+does
+not
+require
+anyone
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+out-of-band
+-
+it
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+tiny
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">1.1
+</ins></span><ins class="diff-new">
+How
+to
+Read
+this
+Document
+</ins></h3><p><ins class="diff-new">
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</ins></p><ul><li><ins class="diff-new">
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</ins></li><li><ins class="diff-new">
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</ins></li><li><ins class="diff-new">
+Software
+developers
+that
+want
+to
+write
+processors
+for
+JSON-LD.
+</ins></li></ul><p><ins class="diff-new">
+To
+understand
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
+RFC4627
+</ins></a></cite><ins class="diff-new">
+]
+and
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS"><ins class="diff-new">
+RDF-CONCEPTS
+</ins></a></cite><ins class="diff-new">
+].
+</ins></p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-chg">1.2
+</ins></span><ins class="diff-chg">
+Contributing
+</ins></h3><p><ins class="diff-chg">
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</ins></p><ul><li><ins class="diff-chg">
+All
+comments
+and
+discussion
+takes
+place
+on
+the
+public
+mailing
+list:
+</ins><a href="http://groups.google.com/group/json-ld"><ins class="diff-chg">
+json-ld@googlegroups.com
+</ins></a></li><li><ins class="diff-chg">
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+</ins><a href="http://github.com/digitalbazaar/json-ld/issues"><ins class="diff-chg">
+issue
+tracker
+</ins></a>.</li><li><a href="http://github.com/digitalbazaar/json-ld"><ins class="diff-chg">
+Source
+code
+</ins></a><ins class="diff-chg">
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</ins></li><li><ins class="diff-chg">
+The
+</ins><a href="http://webchat.freenode.net/?channels=#json-ld"><ins class="diff-chg">
+#json-ld
+</ins></a><ins class="diff-chg">
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</ins></li></ul></div></div><div id="design-goals-and-rationale" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">3.
+</del>
+<ins class="diff-chg">2.
+</ins>
+</span>
+Design
+Goals
+<ins class="diff-new">and
+Rationale
+</ins>
+</h2>
+<p>
+<ins class="diff-new">The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</ins></p><div id="goals" class="section"><h3><span class="secno"><ins class="diff-new">
+2.1
+</ins></span><ins class="diff-new">
+Goals
+</ins></h3><p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+don't
+need
+to
+know
+RDF
+in
+order
+to
+use
+the
+basic
+functionality
+provided
+by
+JSON-LD.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+should
+be
+100%
+compatible
+with
+JSON.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+All
+major
+RDF
+concepts
+must
+be
+expressible
+via
+the
+JSON-LD
+syntax.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable.
+</dd>
+<dt>
+Zero
+Edits
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<del class="diff-old">4.
+Design
+Rationale
+The
+following
+section
+outlines
+the
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</del>
+<div id="map-terms-to-iris" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">2.2
+</ins>
+</span>
+Map
+Terms
+to
+IRIs
+</h3>
+<p>
+Establishing
+a
+mechanism
+to
+map
+JSON
+values
+to
+IRIs
+will
+help
+in
+the
+mapping
+of
+JSON
+objects
+to
+RDF.
+This
+does
+not
+mean
+that
+JSON-LD
+must
+be
+restrictive
+in
+declaring
+a
+set
+of
+terms,
+rather,
+experimentation
+and
+innovation
+should
+be
+supported
+as
+part
+of
+the
+core
+design
+of
+JSON-LD.
+There
+are,
+however,
+a
+number
+of
+very
+small
+design
+criterial
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+RDF
+data
+that
+will
+create
+value
+for
+the
+greater
+semantic
+web
+community
+and
+JSON/REST-based
+Web
+Services
+community.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+object
+as
+the
+example
+for
+this
+section:
+</p>
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+}
+</pre>
+</div>
+<div id="the-default-context" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-chg">2.3
+</ins></span>
+The
+Default
+Context
+</h3>
+<p>
+A
+default
+context
+is
+used
+in
+RDFa
+to
+allow
+developers
+to
+use
+keywords
+as
+aliases
+for
+IRIs.
+So,
+for
+instance,
+the
+keyword
+<strong>
+name
+</strong>
+above
+could
+refer
+to
+the
+IRI
+<em>
+http://xmlns.com/foaf/0.1/name
+</em>.
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+terms
+mean
+something,
+which
+you
+will
+eventually
+want
+to
+query.
+The
+semantic
+web
+specifies
+this
+via
+<em>
+Vocabulary
+Documents
+</em>.
+The
+IRI
+<em>
+http://xmlns.com/foaf/0.1/
+</em>
+specifies
+a
+Vocabulary
+Document,
+and
+<strong>
+name
+</strong>
+is
+a
+term
+in
+that
+vocabulary.
+Paste
+the
+two
+items
+together
+and
+you
+have
+an
+unambiguous
+identifier
+for
+a
+term.
+</p>
+<p>
+Developers,
+and
+machines,
+would
+be
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+Machines
+need
+the
+same
+sort
+of
+dictionary
+of
+terms,
+and
+URIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+Non-prefixed
+terms
+should
+have
+term
+mappings
+declared
+in
+the
+default
+context
+so
+that
+they
+may
+be
+expanded
+later.
+</p>
+<p>
+If
+a
+set
+of
+terms,
+like
+<strong>
+Person
+</strong>,
+<strong>
+name
+</strong>,
+and
+<strong>
+homepage
+</strong>,
+are
+pre-defined
+in
+the
+default
+context,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+JSON
+objects,
+machines
+could
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
+}
+</pre>
+<p class="note">
+In
+order
+to
+differentiate
+between
+plain
+text
+and
+IRIs,
+the
+<strong>
+<
+</strong> and <strong>
+>
+</strong>
+are
+used
+around
+IRIs.
+</p>
+<p>
+Doing
+this
+would
+mean
+that
+JSON
+would
+start
+to
+become
+unambiguously
+machine-readable,
+play
+well
+with
+the
+semantic
+web,
+and
+basic
+markup
+wouldn't
+be
+that
+much
+more
+complex
+than
+basic
+JSON
+markup.
+A
+win,
+all
+around.
+</p>
+</div>
+<div id="mashing-up-vocabularies" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">2.4
+</ins>
+</span>
+Mashing
+Up
+Vocabularies
+</h3>
+<p>
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</p>
+<ul>
+<li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+A
+JSON-LD
+Web
+Service
+could
+define
+these
+as
+<em>
+prefix
+</em>
+es
+in
+their
+default
+context
+beside
+the
+<em>
+terms
+</em>
+that
+are
+already
+defined.
+Using
+this
+feature,
+developers
+could
+also
+express
+markup
+like
+this:
+</p>
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
+}
+</pre>
+<p>
+Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+default
+context
+in-line
+using
+the
+<code>
+#
+</code>
+character,
+like
+so:
+</p>
+<pre class="example">
+{
+  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+  "myvocab:credits": 500</span>
+}
+</pre>
+<p>
+Think
+of
+the
+<code>
+#
+</code>
+character
+as
+a
+"hashtable",
+which
+maps
+one
+string
+to
+another
+string.
+In
+the
+example
+above,
+the
+<code>
+myvocab
+</code>
+string
+is
+replaced
+with
+"
+<code>
+http://example.org/myvocab#
+</code>
+"
+when
+it
+is
+detected
+above.
+In
+the
+example
+above,
+"
+<code>
+myvocab:credits
+</code>
+"
+would
+expand
+to
+"
+<code>
+http://example.org/myvocab#credits
+</code>
+".
+</p>
+<p>
+This
+mechanism
+is
+a
+short-hand
+for
+RDF,
+and
+if
+defined,
+will
+give
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</p>
+<p>
+</p>
+</div>
+<div id="an-example-of-a-default-context" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">2.5
+</ins>
+</span>
+An
+Example
+of
+a
+Default
+Context
+</h3>
+<p>
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+A
+JSON-LD
+aware
+Web
+Service
+<em class="rfc2119" title="may">
+may
+</em>
+define
+a
+default
+context.
+For
+example,
+the
+following
+default
+context
+could
+apply
+to
+all
+incoming
+Web
+Service
+calls
+previously
+accepting
+only
+JSON
+data:
+</p>
+<pre class="example">
+{
+  "#": 
+  {
+<del class="diff-old">    "__vocab__": "http://example.org/default-vocab#",
+</del>
+<ins class="diff-chg">    "#vocab": "http://example.org/default-vocab#",
+    "#base": "http://example.org/baseurl/",
+</ins>
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+  }
+}
+</pre>
+<p>
+The
+<code>
+<del class="diff-old">__vocab__
+</del>
+<ins class="diff-chg">#vocab
+</ins>
+</code>
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">string
+</ins>
+is
+a
+special
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">keyword
+</ins>
+that
+states
+that
+any
+term
+that
+doesn't
+resolve
+to
+a
+term
+or
+a
+prefix
+should
+be
+appended
+to
+the
+<code>
+<del class="diff-old">__vocab__
+</del>
+<ins class="diff-chg">#vocab
+</ins>
+</code>
+IRI.
+This
+is
+done
+to
+ensure
+that
+terms
+can
+be
+transformed
+to
+an
+IRI
+at
+all
+times.
+</p>
+<p>
+<ins class="diff-new">The
+</ins><code><ins class="diff-new">
+#base
+</ins></code><ins class="diff-new">
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+relative
+IRI
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+appended
+to
+the
+string
+specified
+by
+</ins><code><ins class="diff-new">
+#base
+</ins></code>.</p></div></div><div id="markup-examples" class="section"><h2><span class="secno"><ins class="diff-new">
+3.
+</ins></span><ins class="diff-new">
+Markup
+Examples
+</ins></h2><p><ins class="diff-new">
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</ins></p><div id="rdfa" class="section"><h3><span class="secno"><ins class="diff-new">
+3.1
+</ins></span><ins class="diff-new">
+RDFa
+</ins></h3><p><ins class="diff-new">
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</ins></p><pre class="example"><ins class="diff-new">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</ins></pre><p><ins class="diff-new">
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</ins></p><pre class="example"><ins class="diff-new">
+[
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+ }
+]
+</ins></pre></div><div id="microformats" class="section"><h3><span class="secno"><ins class="diff-new">
+3.2
+</ins></span><ins class="diff-new">
+Microformats
+</ins></h3><p><ins class="diff-new">
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</ins></p><pre class="example"><ins class="diff-new">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+</ins></pre><p><ins class="diff-new">
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+</ins><code><ins class="diff-new">
+url
+</ins></code><ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+fn
+</ins></code><ins class="diff-new">
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+</ins><code><ins class="diff-new">
+http://tantek.com
+</ins></code>.</p><pre class="example"><ins class="diff-new">
+{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+}
+</ins></pre></div><div id="microdata" class="section"><h3><span class="secno"><ins class="diff-new">
+3.3
+</ins></span><ins class="diff-new">
+Microdata
+</ins></h3><p><ins class="diff-new">
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</ins></p><pre class="example"><ins class="diff-new">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</ins></pre><p><ins class="diff-new">
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</ins></p><pre class="example"><ins class="diff-new">
+[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+]
+</ins></pre></div>
+</div>
+<div id="the-json-ld-processing-algorithm" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+The
+JSON-LD
+Processing
+Algorithm
+</h2>
+<p>
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<p class="issue">
+The
+Processing
+Algorithm
+is
+a
+work
+in
+progress,
+there
+are
+still
+major
+bugs
+in
+the
+algorithm
+and
+it's
+difficult
+to
+follow.
+It's
+provided
+only
+to
+very
+early
+implementers
+to
+give
+them
+an
+idea
+of
+how
+to
+implement
+a
+processor.
+</p>
+<h4 id="processing-algorithm-terms">
+Processing
+Algorithm
+Terms
+</h4>
+<ul>
+<li>
+<dfn title="default_context" id="dfn-default_context">
+default
+context
+</dfn>
+-
+a
+context
+that
+is
+specified
+to
+the
+JSON-LD
+processing
+algorithm
+before
+processing
+begins.
+</li>
+<li>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+-
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</li>
+<li>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+-
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="inherited_subject" id="dfn-inherited_subject">
+inherited
+subject
+</dfn>
+-
+a
+subject
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+<a class="tref" title="current_subject">
+current
+subject
+</a>
+is
+discovered
+or
+generated.
+</li>
+<li>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+-
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="inherited_property" id="dfn-inherited_property">
+inherited
+property
+</dfn>
+-
+a
+property
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+<a class="tref" title="current_subject">
+current
+subject
+</a>
+is
+discovered
+or
+generated.
+</li>
+<li>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+-
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+-
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+top-most
+item
+on
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+</li>
+<li>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+-
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+<code>
+#
+</code>
+key.
+</li>
+<li>
+<dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</dfn>
+-
+A
+list
+of
+triples
+that
+have
+yet
+to
+have
+their
+subject
+set.
+</li>
+<li>
+<dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</dfn>
+-
+A
+list
+of
+objects
+that
+cannot
+be
+processed
+until
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+detected
+or
+the
+end
+of
+the
+current
+associative-array
+is
+detected.
+</li>
+<li>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+-
+the
+processor
+state,
+which
+includes
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack,
+<a class="tref" title="current_subject">
+current
+subject
+</a>,
+<a class="tref" title="current_property">
+current
+property
+</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</a>,
+and
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>.
+</li>
+</ul>
+<h4 id="processing-tokens-and-keywords">
+<ins class="diff-new">Processing
+Tokens
+and
+Keywords
+</ins></h4><ul><li><code><ins class="diff-new">
+#
+</ins></code><ins class="diff-new">
+-
+Used
+to
+set
+the
+active
+context.
+</ins></li><li><code><ins class="diff-new">
+#base
+</ins></code><ins class="diff-new">
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+active
+context.
+</ins></li><li><code><ins class="diff-new">
+#vocab
+</ins></code><ins class="diff-new">
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+active
+context.
+</ins></li><li><code><ins class="diff-new">
+#types
+</ins></code><ins class="diff-new">
+-
+Used
+to
+specify
+type
+coercion.
+</ins><div class="issue"><ins class="diff-new">
+The
+#types
+keyword
+assumes
+</ins><a href="#type-coercion"><ins class="diff-new">
+Type
+Coercion
+</ins></a>,<ins class="diff-new">
+which
+is
+an
+experimental
+feature.
+</ins></div></li><li><code><</code> and <code><ins class="diff-new">
+>
+</ins></code><ins class="diff-new">
+-
+Used
+to
+express
+IRIs
+in
+JSON
+values.
+</ins></li><li><code>:</code><ins class="diff-new">
+-
+The
+separator
+for
+CURIEs
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+</ins></li><li><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+-
+Sets
+the
+active
+subjects.
+</ins></li><li><code><ins class="diff-new">
+a
+</ins></code><ins class="diff-new">
+-
+Used
+to
+set
+the
+rdf:type
+of
+the
+active
+subjects.
+</ins></li><li><code><ins class="diff-new">
+\
+</ins></code><ins class="diff-new">
+-
+Used
+as
+an
+escape
+character
+to
+escape
+all
+the
+special
+tokens
+and
+keywords.
+</ins></li><li><code><ins class="diff-new">
+^^
+</ins></code><ins class="diff-new">
+-
+Used
+to
+express
+the
+data
+type
+for
+Typed
+Literals.
+</ins></li></ul>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+streaming
+(SAX-based)
+implementations.
+Implementers
+will
+find
+that
+non-streaming
+(document-based)
+implementations
+will
+be
+much
+easier
+to
+implement
+as
+full
+access
+to
+the
+JSON
+object
+model
+eliminates
+some
+of
+the
+steps
+that
+are
+necessary
+for
+streaming
+implementations.
+A
+conforming
+JSON-LD
+processor
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<ol class="algorithm">
+<li id="processing-step-default-context">
+If
+a
+<a class="tref internalDFN" title="default_context" href="#dfn-default_context">
+default
+context
+</a>
+is
+supplied
+to
+the
+processing
+algorithm,
+push
+it
+onto
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+</li>
+<li id="processing-step-associative">
+If
+an
+associative
+array
+is
+detected,
+create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+Copy
+the
+<a class="tref" title="current_context">
+current
+context
+</a>
+stack
+to
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+Push
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+onto
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+'s
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+For
+each
+key-value
+pair
+in
+the
+associative
+array,
+using
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+do
+the
+following:
+<ol class="algorithm">
+<li>
+If
+a
+<code>
+#
+</code>
+key
+is
+found,
+the
+processor
+merges
+each
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+overwriting
+any
+duplicate
+values
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+Process
+each
+object
+in
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>,
+starting
+at
+<a href="#processing-subject">
+Step
+2.2
+</a>.
+</li>
+<li id="processing-associative">
+If
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+has
+not
+been
+detected,
+the
+current
+key-value
+pair
+is
+placed
+into
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>
+and
+processing
+proceeds
+to
+the
+next
+key-value
+pair.
+Otherwise,
+if
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+known
+perform
+the
+following
+steps:
+</li>
+<ol class="algorithm">
+<li id="processing-subject">
+If
+a
+<code>
+@
+</code>
+key
+is
+found,
+the
+processor
+sets
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+value
+after
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+has
+been
+performed.
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+and
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+values
+are
+specified,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+for
+the
+subject,
+the
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+for
+the
+property,
+and
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+for
+the
+object.
+</li>
+<li>
+If
+there
+are
+any
+triples
+in
+the
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</a>,
+complete
+each
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+as
+the
+subject
+for
+each
+triple.
+</li>
+</ol>
+</li>
+<li>
+If
+an
+<code>
+a
+</code>
+key
+is
+found,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+http://www.w3.org/1999/02/22-rdf-syntax-ns#type
+</code>.
+</li>
+<li>
+If
+a
+key
+that
+is
+not
+<code>
+#
+</code>,
+<code>
+@
+</code>,
+or
+<code>
+a
+</code>
+is
+found,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Property
+Processing
+</a>
+on
+the
+key.
+</li>
+<li>
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+an
+associative
+array,
+then
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+then
+process
+the
+value
+starting
+at
+<a href="#processing-step-array">
+Step
+3
+</a>
+ensuring
+that
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+are
+copied
+to
+a
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+<li>
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+was
+not
+discovered,
+then:
+<ol class="algorithm">
+<li>
+Generate
+a
+<a class="tref" title="blank_node_identifier">
+blank
+node
+identifier
+</a>
+and
+set
+it
+as
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>.
+</li>
+<li>
+Complete
+any
+previously
+incomplete
+triples
+by
+running
+all
+substeps
+of
+<a href="#processing-subject">
+Step
+2.2.1
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+was
+not
+discovered,
+then
+assume
+that
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+unmodified
+and
+run
+all
+substeps
+of
+<a href="#processing-associative">
+Step
+2.2
+</a>
+on
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>.
+</li>
+</ol>
+</ol>
+</li>
+<li id="processing-step-array">
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+an
+associative
+array,
+processes
+per
+<a href="#processing-step-associative">
+Step
+2
+</a>,
+ensuring
+to
+set
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+to
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+the
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+to
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+in
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+place
+it
+into
+the
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+Processing?
+<div class="issue">
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+generation
+of
+triples?
+For
+example,
+would
+implementing
+this
+be
+worth
+the
+more
+complex
+processing
+rules:
+"ex:orderedItems"
+:
+[["one",
+"two",
+"three"]]
+</div>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<del class="diff-old">8.
+Markup
+Examples
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+8.1
+RDFa
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+&lt;div &gt;
+   &lt;ul&gt;
+      &lt;li &gt;
+        &lt;a &gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li &gt;
+        &lt;a &gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li &gt;
+        &lt;a &gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+[
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+ }
+]
+8.2
+Microformats
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+url
+and
+fn
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+http://tantek.com
+.
+{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+}
+8.3
+Microdata
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+]
+</del>
+<div id="markup-of-rdf-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">9.
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+Markup
+of
+RDF
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+most
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+Javascript
+objects
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+Since
+RDF
+is
+also
+an
+important
+sub-community
+of
+the
+Linked
+Data
+movement,
+it
+is
+important
+that
+all
+RDF
+concepts
+are
+well-represented
+in
+this
+specification.
+This
+section
+details
+how
+each
+RDF
+concept
+can
+be
+expressed
+in
+JSON-LD.
+</p>
+<p class="issue">
+<ins class="diff-new">The
+current
+specification
+relies
+on
+microsyntaxes
+to
+express
+things
+like
+IRIs,
+typed
+literals
+and
+CURIEs.
+There
+is
+a
+small
+amount
+of
+debate
+on
+whether
+or
+not
+to
+use
+full-blown
+JSON
+objects
+containing
+things
+like
+"value"
+and
+"datatype".
+The
+original
+authors
+of
+the
+JSON-LD
+specification
+feel
+that
+microsyntaxes
+allow
+a
+much
+simpler,
+less
+error-prone
+structure
+in
+the
+JSON-LD
+objects.
+Proponents
+of
+the
+verbose
+mechanism
+assert
+that
+there
+would
+be
+less
+chance
+of
+data
+markup
+issues
+concerning
+proper
+escaping
+and
+that
+the
+objects,
+while
+more
+verbose,
+would
+be
+easier
+to
+work
+with
+within
+JavaScript
+environments.
+Feedback
+on
+this
+issue
+would
+be
+appreciated.
+</ins></p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+subjects
+and
+many
+objects
+are
+identified.
+IRIs
+can
+be
+expressed
+by
+wrapping
+a
+text
+string
+with
+the
+<code>
+<
+</code> and <code>
+>
+</code>
+characters.
+</p>
+<pre class="example">
+{
+...
+  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+object
+to
+an
+IRI
+with
+the
+value
+of
+<code>
+http://manu.sporny.org
+</code>.
+</p>
+<p>
+Wrapping
+IRIs
+with
+the
+<code>
+<
+</code> and <code>
+>
+</code>
+characters
+are
+only
+necessary
+when
+IRIs
+are
+specified
+as
+objects.
+At
+no
+other
+point
+do
+you
+need
+to
+wrap
+an
+IRI.
+You
+do
+not
+need
+to
+wrap
+IRIs
+when
+declaring
+a
+property,
+declaring
+a
+CURIE,
+or
+describing
+key-value
+pairs
+in
+a
+context.
+</p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+A
+subject
+is
+declared
+using
+the
+<code>
+@
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+predicate,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+<http://example.org/people#joebob>
+</code>.
+</p>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.3
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+a
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-url).
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+(in
+N-Triples
+notation):
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+</div>
+<div id="plain-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.4
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+Plain
+Literals
+</h3>
+<p>
+Regular
+text
+strings
+are
+called
+"plain
+literals"
+in
+RDF
+and
+are
+easily
+expressed
+using
+regular
+JSON
+strings.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}
+</pre>
+</div>
+<div id="language-specification-in-plain-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.5
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</h3>
+<p>
+JSON-LD
+attempts
+to
+make
+sure
+that
+it
+is
+easy
+to
+express
+triples
+in
+other
+languages
+while
+simultaneously
+ensuring
+that
+hefty
+data
+structures
+aren't
+required
+to
+accomplish
+simple
+language
+markup.
+When
+the
+<code>
+@
+</code>
+symbol
+is
+used
+in
+a
+literal,
+the
+JSON-LD
+processor
+tags
+the
+literal
+text
+with
+the
+language
+tag
+that
+follows
+the
+<code>
+@
+</code>
+symbol.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">花澄@ja</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+plain
+literal
+for
+<em>
+花澄
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+tag
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="typed-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.6
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+Typed
+Literals
+</h3>
+<p>
+Literals
+may
+also
+be
+typed
+in
+JSON-LD
+by
+using
+the
+<code>
+^^
+</code>
+sequence
+at
+the
+end
+of
+the
+text
+string.
+</p>
+<pre class="example">
+{
+...
+  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+an
+object
+with
+the
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.7
+</del>
+<ins class="diff-chg">5.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+arrays.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+array.
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+<del class="diff-old">   &lt;http://xmlns.com/foaf/0.1/&gt;
+</del>
+<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+</ins>
+      "stu" .
+&lt;http://example.org/people#joebob&gt; 
+<del class="diff-old">   &lt;http://xmlns.com/foaf/0.1/&gt;
+</del>
+<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+</ins>
+      "groknar" .
+&lt;http://example.org/people#joebob&gt; 
+<del class="diff-old">   &lt;http://xmlns.com/foaf/0.1/&gt;
+</del>
+<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+</ins>
+"radface"
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.8
+</del>
+<ins class="diff-chg">5.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+typed
+literals
+are
+expressed
+very
+much
+in
+the
+same
+way
+as
+multiple
+properties:
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="blank-nodes" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.9
+</del>
+<ins class="diff-chg">5.9
+</ins>
+</span>
+Blank
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+is
+where
+blank
+nodes
+come
+into
+play.
+In
+JSON-LD,
+blank
+node
+identifiers
+are
+automatically
+created
+if
+a
+subject
+is
+not
+specified
+using
+the
+<code>
+@
+</code>
+key.
+However,
+authors
+may
+name
+blank
+nodes
+by
+using
+the
+special
+<code>
+_
+</code>
+CURIE
+prefix.
+</p>
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+named
+blank
+node.
+</p>
+</div>
+<div id="escape-character" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.10
+</del>
+<ins class="diff-chg">5.10
+</ins>
+</span>
+Escape
+Character
+</h3>
+<p>
+Special
+characters
+in
+property
+values
+<em class="rfc2119" title="must">
+must
+</em>
+be
+escaped
+in
+order
+to
+not
+be
+interpreted
+as
+CURIEs,
+IRIs,
+language
+tags,
+or
+TypedLiterals.
+</p>
+<p>
+The
+special
+characters
+in
+JSON-LD
+are:
+<code>
+<
+</code>, <code>
+>
+</code>,
+<code>
+@
+</code>,
+<code>
+#
+</code>,
+<code>:
+</code>
+and
+<code>
+^
+</code>.
+</p>
+<pre class="example">
+{
+...
+  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}
+</pre>
+</div>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.11
+</del>
+<ins class="diff-chg">5.11
+</ins>
+</span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+decimals,
+integers
+and
+boolean
+values,
+JSON-LD
+utilizes
+that
+information
+to
+create
+<a href="#typed-literals">
+Typed
+Literals
+</a>.
+</p>
+<pre class="example">
+{
+...
+  // This value is automatically converted to having a type of xsd:decimal
+  "measure:cups": <span class="diff">5.3</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}
+</pre>
+</div>
+</div>
+<div id="best-practices" class="section">
+<h2>
+<span class="secno">
+<ins class="diff-new">6.
+</ins></span><ins class="diff-new">
+Best
+Practices
+</ins></h2><p><ins class="diff-new">
+The
+nature
+of
+Web
+programming
+allows
+one
+to
+use
+basic
+technologies,
+such
+as
+JSON-LD,
+across
+a
+variety
+of
+systems
+and
+environments.
+This
+section
+attempts
+to
+describe
+some
+of
+those
+environments
+and
+the
+way
+in
+which
+JSON-LD
+can
+be
+integrated
+in
+order
+to
+help
+alleviate
+certain
+development
+headaches.
+</ins></p><div id="javascript" class="section"><h3><span class="secno"><ins class="diff-new">
+6.1
+</ins></span><ins class="diff-new">
+JavaScript
+</ins></h3><p class="issue"><ins class="diff-new">
+It
+is
+expected
+that
+JSON-LD
+will
+be
+used
+quite
+a
+bit
+in
+JavaScript
+environments,
+however,
+features
+like
+IRIs
+requiring
+angled
+brackets
+in
+JSON-LD
+means
+that
+using
+JSON-LD
+directly
+in
+JavaScript
+is
+going
+to
+be
+annoying
+without
+a
+middleware
+layer
+such
+as
+a
+simple
+library
+that
+strips
+JSON-LD
+markup
+before
+JavaScript
+uses
+it.
+One
+could
+say
+that
+JSON-LD
+is
+a
+good
+fit
+for
+the
+RDFa
+API,
+which
+would
+enable
+a
+triple-store
+in
+the
+browser,
+but
+some
+don't
+want
+to
+require
+that
+level
+of
+functionality
+just
+to
+use
+JSON-LD.
+The
+group
+is
+still
+discussing
+the
+best
+way
+to
+proceed,
+so
+input
+on
+how
+JSON-LD
+could
+more
+easily
+be
+utilized
+in
+JavaScript
+environments
+would
+be
+very
+much
+appreciated.
+</ins></p></div><div id="schema-less-databases" class="section"><h3><span class="secno"><ins class="diff-new">
+6.2
+</ins></span><ins class="diff-new">
+Schema-less
+Databases
+</ins></h3><p class="issue"><ins class="diff-new">
+Databases
+such
+as
+CouchDB
+and
+MongoDB
+allow
+the
+creation
+of
+schema-less
+data
+stores.
+RDF
+is
+a
+type
+of
+schema-less
+data
+model
+and
+thus
+lends
+itself
+to
+databases
+such
+as
+CouchDB
+and
+MongoDB.
+Both
+of
+these
+databases
+can
+use
+JSON-LD
+as
+their
+storage
+format.
+The
+group
+needs
+feedback
+from
+CouchDB
+and
+MongoDB
+experts
+regarding
+the
+usefulness
+of
+JSON-LD
+in
+those
+environments.
+</ins></p></div></div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">10.
+</del>
+<ins class="diff-chg">7.
+</ins>
+</span>
+Advanced
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+taken
+with
+a
+grain
+of
+salt;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">7.1
+</ins></span><ins class="diff-new">
+Type
+Coercion
+</ins></h3><p><ins class="diff-new">
+JSON-LD
+supports
+the
+coercion
+of
+types
+to
+ensure
+that
+the
+zero-edit
+goal
+of
+JSON-LD
+can
+be
+accomplished.
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+and
+incoming
+or
+outgoing
+types
+to
+the
+proper
+RDF
+type
+based
+on
+a
+mapping
+of
+type
+IRIs
+to
+RDF
+types.
+Using
+type
+conversion,
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</ins></p><p><ins class="diff-new">
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+plain
+literals,
+typed
+literals
+and
+IRIs.
+</ins></p><pre class="example"><ins class="diff-new">
+{
+  "#": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+</ins><span class="diff">     "#types":<ins class="diff-new">
+     {
+        "name": "rdf:PlainLiteral",
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }</span>
+  },
+  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}
+</ins></pre><p><ins class="diff-new">
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</ins></p><pre class="example"><ins class="diff-new">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "&lt;John Smith&gt;" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</ins></pre></div><div id="json-ld-profiles" class="section"><h3><span class="secno"><ins class="diff-new">
+7.2
+</ins></span><ins class="diff-new">
+JSON-LD
+Profiles
+</ins></h3><p><ins class="diff-new">
+One
+of
+the
+more
+powerful
+features
+of
+RDFa
+1.1
+Core
+is
+the
+ability
+to
+specify
+a
+collection
+of
+prefixes
+and
+terms
+that
+can
+be
+re-used
+by
+a
+processor
+to
+simplfy
+markup.
+JSON-LD
+provides
+a
+similar
+mechanism
+called
+JSON-LD
+Profiles,
+which
+is
+the
+inclusion
+of
+a
+context
+external
+to
+the
+JSON-LD
+document.
+</ins></p><p><ins class="diff-new">
+The
+example
+below
+demonstrates
+how
+one
+may
+specify
+an
+external
+JSON-LD
+Profile.
+Assume
+the
+following
+profile
+exists
+at
+this
+imaginary
+URL:
+</ins><code><ins class="diff-new">
+http://example.org/profiles/contacts
+</ins></code>.</p><pre class="example"><ins class="diff-new">
+{
+  "#": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}
+</ins></pre><p><ins class="diff-new">
+The
+profile
+listed
+above
+can
+be
+used
+in
+the
+following
+way:
+</ins></p><pre class="example"><ins class="diff-new">
+{
+  "#": { "#profile": "http://example.org/profiles/contacts" },
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}
+</ins></pre><p><ins class="diff-new">
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</ins></p><pre class="example"><ins class="diff-new">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</ins></pre></div>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">10.1
+</del>
+<ins class="diff-chg">7.3
+</ins>
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+array
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+<del class="diff-old">      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;/section&gt;
+</del>
+<ins class="diff-chg">&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</ins>
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+JSON-LD
+associative
+array.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<pre class="example">
+{
+  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+  "@": 
+  [
+    {
+      "@": "&lt;http://example.org/people#john&gt;",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "&lt;http://example.org/people#jane&gt;",
+      "a": "foaf:Person"
+    }
+  ]
+}
+</pre>
+</div>
+</div>
+<div class="appendix section" id="acknowledgements">
+<h2>
+<span class="secno">
+<del class="diff-old">10.2
+</del>
+<ins class="diff-chg">A.
+</ins>
+</span>
+Acknowledgements
+</h2>
+<p>
+The
+editor
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+rationale
+and
+reasoning
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+Longley
+who
+reviewed
+and
+provided
+feedback
+on
+the
+overall
+specification
+and
+contexts,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+<ins class="diff-new">Thanks
+also
+to
+Bradley
+P.
+Allen
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</ins>
+</p>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+<del class="diff-old">A.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">A.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+<ins class="diff-new">[RDF-CONCEPTS]
+</ins></dt><dd><ins class="diff-new">
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+</ins><a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite><ins class="diff-new">
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</ins></cite></a><ins class="diff-new">
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+</ins><a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><ins class="diff-new">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</ins></a></dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">A.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+3
+August
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">
+http://www.w3.org/TR/2010/WD-rdfa-core-20100803
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101024/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,1656 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head><body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-24-october-2010">Unofficial Draft 24 October 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20101014.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+Developers that embed structured data in their Web pages can choose among
+a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
+and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
+incompatible at the syntax level, can be easily mapped to RDF. JSON has 
+proven to be a highly useful object serialization and messaging format. 
+In an attempt to harmonize the representation of Linked Data in JSON, 
+this specification outlines a common JSON representation format for 
+Linked Data that can be used to represent objects specified via RDFa, 
+Microformats and Microdata.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">2.3 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">2.5 </span>An Example of a Default Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">4. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">5.10 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">5.11 </span>Automatic Typing</a></li></ul></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">6. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">6.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">6.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">7. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">7.1 </span>Type Coercion</a></li><li class="tocline"><a href="#json-ld-profiles" class="tocxref"><span class="secno">7.2 </span>JSON-LD Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">7.3 </span>Disjoint Graphs</a></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p class="issue">Write the introduction once all of the technical details
+are hammered out. Explain why JSON-LD is designed as a light-weight mechanism
+to express RDFa, Microformats and Microdata. It is primarily intended as
+a way to express Linked Data in Javascript environments as well as a way to pass
+Linked Data to and from Web services. It is designed to be as simple as 
+possible, utilizing the large number of JSON parsers (and understanding) that
+is out there already. It is designed to be able to express key-value pairs,
+RDF data, Microformats data, and Microdata (that is, every data model
+currently in use) using one unified format. It does not require anyone to change
+their JSON, but easily add meaning by adding context in a way that is 
+out-of-band - it is designed to not disturb already deployed systems running
+on JSON, but provide a smooth migration path from JSON to JSON with added
+semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a tiny memory footprint in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and 
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to write processors for JSON-LD.</li>
+</ul>
+
+<p>
+To understand this specification you must first be familiar with JSON, 
+which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>All comments and discussion takes place on the public mailing list:
+<a href="http://groups.google.com/group/json-ld">json-ld@googlegroups.com
+</a></li>
+
+<li>Specification bugs and issues should be reported in the 
+<a href="http://github.com/digitalbazaar/json-ld/issues">issue tracker</a>.</li>
+
+<li><a href="http://github.com/digitalbazaar/json-ld">Source code</a> for the 
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design-goals-and-rationale" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
+
+<p>The following section outlines the design goals and rationale behind the 
+JSON-LD markup language.
+</p>
+
+<div id="goals" class="section">
+<h3><span class="secno">2.1 </span>Goals</h3>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers don't need to know RDF in order to use the basic functionality
+ provided by JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
+ <dt>Expressiveness</dt>
+ <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable.</dd>
+ <dt>Zero Edits</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers.</dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="map-terms-to-iris" class="section">
+<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
+
+<p>Establishing a mechanism to map JSON values to IRIs will
+help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
+be restrictive in declaring a set of terms, rather, experimentation and 
+innovation should be supported as part of the core design of JSON-LD. There are, 
+however, a number of very small design criterial that can ensure that developers 
+will generate good RDF data that will create value for the greater 
+semantic web community and JSON/REST-based Web Services community.
+</p>
+
+<p>We will be using the following JSON object as the example for this section:
+</p>
+
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+}</pre>
+</div>
+
+<div id="the-default-context" class="section">
+<h3><span class="secno">2.3 </span>The Default Context</h3>
+
+<p>A default context is used in RDFa to allow developers to use keywords
+as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
+above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
+The semantic web, just like the document-based web, uses IRIs for
+unambiguous identification. The idea is that these terms mean something, 
+which you will eventually want to query. The semantic web specifies this via 
+<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
+a Vocabulary Document, and <strong>name</strong> is a term in that 
+vocabulary. Paste the two items together and you have an unambiguous identifier
+for a term.
+</p>
+
+<p>Developers, and machines, would be able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much
+like we can use WordNet today to see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Machines need the same sort of 
+dictionary of terms, and URIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>Non-prefixed terms should have term mappings declared in the default
+context so that they may be expanded later.</p>
+            
+<p>If a set of terms, like <strong>Person</strong>, 
+<strong>name</strong>, and <strong>homepage</strong>,
+are pre-defined in the default context, and that context is used to resolve the
+names in JSON objects, machines could automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
+}</pre>
+
+<p class="note">In order to differentiate between plain text and IRIs, the
+<strong><</strong> and <strong>></strong> are used around IRIs.</p>
+
+<p>Doing this would mean that JSON would start to become unambiguously
+machine-readable, play well with the semantic web, and basic markup wouldn't 
+be that much more complex than basic JSON markup. A win, all around.</p>
+</div>
+
+<div id="mashing-up-vocabularies" class="section">
+<h3><span class="secno">2.4 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
+default context beside the <em>terms</em> that are already defined. Using
+this feature, developers could also express markup like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+default context in-line using the <code>#</code> character, like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+  "myvocab:credits": 500</span>
+}</pre>
+
+<p>Think of the <code>#</code> character as a "hashtable", which maps one
+string to another string. In the example above, the <code>myvocab</code>
+string is replaced with "<code>http://example.org/myvocab#</code>" when it
+is detected above. In the example above, "<code>myvocab:credits</code>" would
+expand to "<code>http://example.org/myvocab#credits</code>".</p>
+
+<p>This mechanism is a short-hand for RDF, and if defined, will give
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div id="an-example-of-a-default-context" class="section">
+<h3><span class="secno">2.5 </span>An Example of a Default Context</h3>
+
+<p>JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> define a default context. For example, the
+following default context could apply to all incoming Web Service calls
+previously accepting only JSON data:</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+    "#vocab": "http://example.org/default-vocab#",
+    "#base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+  }
+}</pre>
+
+<p>The <code>#vocab</code> string is a special keyword that states 
+that any term that doesn't resolve to a term or a prefix should be 
+appended to the <code>#vocab</code> IRI. This is done to ensure that 
+terms can be transformed to an IRI at all times.
+</p>
+
+<p>The <code>#base</code> string is a special keyword that states 
+that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
+<code>#base</code>.
+</p>
+</div>
+</div>
+
+<div id="markup-examples" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">3.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+[
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+ }
+]</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">3.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">3.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+]</pre>
+</div>
+</div>
+
+<div id="the-json-ld-processing-algorithm" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>The JSON-LD Processing Algorithm</h2>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The Processing Algorithm is a work in progress, there are
+still major bugs in the algorithm and it's difficult to follow. It's provided
+only to very early implementers to give them an idea of how to implement a
+processor.</p>
+
+<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
+<ul>
+<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
+JSON-LD processing algorithm before processing begins.</li>
+<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
+generated by JSON-LD markup.</li>
+<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
+processor should use when generating triples.</li>
+<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
+CURIEs while the processing algorithm is running. The 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
+associative-array level, specified via the <code>#</code> key.</li>
+<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
+yet to have their subject set.</li>
+<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
+processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
+current associative-array is detected.</li>
+<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
+the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
+<a class="tref" title="current_property">current property</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+</li></ul>
+
+<h4 id="processing-tokens-and-keywords">Processing Tokens and Keywords</h4>
+<ul>
+<li><code>#</code> - Used to set the active context.</li>
+<li><code>#base</code> - Used to set the base IRI for all object IRIs affected 
+by the active context.</li>
+<li><code>#vocab</code> - Used to set the base IRI for all property IRIs
+affected by the active context.</li>
+<li><code>#types</code> - Used to specify type coercion.
+<div class="issue">The #types keyword assumes 
+<a href="#type-coercion">Type Coercion</a>, which is an 
+experimental feature.</div></li>
+<li><code><</code> and <code>></code> - Used to express IRIs in
+JSON values.</li>
+<li><code>:</code> - The separator for CURIEs when used in JSON keys or
+JSON values.</li>
+<li><code>@</code> - Sets the active subjects.</li>
+<li><code>a</code> - Used to set the rdf:type of the active subjects.</li>
+<li><code>\</code> - Used as an escape character to escape all the special
+tokens and keywords.</li>
+<li><code>^^</code> - Used to express the data type for Typed Literals.</li>
+</ul>
+
+<p>The algorithm below is designed for streaming (SAX-based) implementations.
+Implementers will find that non-streaming (document-based) implementations will
+be much easier to implement as full access to the JSON object model eliminates 
+some of the steps that are necessary for streaming implementations. A conforming
+JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
+same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
+
+<ol class="algorithm">
+<li id="processing-step-default-context">If a <a class="tref internalDFN" title="default_context" href="#dfn-default_context">default context</a> is 
+supplied to the
+processing algorithm, push it onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+
+<li id="processing-step-associative">If an associative array is 
+detected, create a new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
+the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
+key-value pair in the associative array, using the newly created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
+
+  <ol class="algorithm">
+
+    <li>If a <code>#</code> key is found, the processor
+    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
+    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
+    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. 
+    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
+    starting at <a href="#processing-subject">Step 2.2</a>.</li>
+
+    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not been detected, the current
+    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
+    and processing proceeds to the next key-value pair. Otherwise, if the
+    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
+
+    <ol class="algorithm">
+
+      <li id="processing-subject">If a <code>@</code> key is found, the 
+      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> has been performed.
+
+      <ol class="algorithm">
+        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
+        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
+        </li>
+ 
+        <li>If there are any triples in the 
+        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
+        </li>
+      </ol>
+
+      </li>
+
+      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
+      </li>
+
+      <li>If a key that is not <code>#</code>, 
+      <code>@</code>, or <code>a</code> is found, set the 
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
+      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
+      </li>
+
+      <li>If the value is not an array, set the 
+      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
+      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
+
+      <li>If the value is an associative array, then
+      process the value starting at 
+      <a href="#processing-step-associative">Step 2</a>.</li>
+
+      <li>If the value is a regular array, then process the value 
+      starting at 
+      <a href="#processing-step-array">Step 3</a> ensuring that
+      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
+      
+      <ol class="algorithm">
+        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
+
+        <li>Complete any previously incomplete triples by running all substeps 
+        of <a href="#processing-subject">Step 2.2.1</a>.
+        </li>
+      </ol>
+
+      </li><li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
+      <a href="#processing-associative">Step 2.2</a>
+      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+     </li></ol>
+    </ol>
+  </li>
+
+  <li id="processing-step-array">If a regular array is detected, 
+  process each value in the array by doing the following:
+
+    <ol class="algorithm">
+      <li>If the value is an associative array, processes per 
+      <a href="#processing-step-associative">Step 2</a>, ensuring to set
+      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
+      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
+      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
+      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
+      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
+      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
+
+      <li>If the value is a regular array, should we support RDF 
+      List/Sequence Processing? 
+      <div class="issue">If the value is a regular array, should we support 
+      RDF List/Sequence generation of triples? For example, would implementing
+      this be worth the more complex processing rules: "ex:orderedItems" : 
+      [["one", "two", "three"]]</div></li>
+    </ol>
+  </li>
+</ol>
+
+</div>
+
+<div id="markup-of-rdf-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
+
+<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked up
+in a way that is simple to understand and author by Web developers. In many
+cases, Javascript objects can become Linked Data with the simple addition
+of a context. Since RDF is also an important sub-community of the Linked
+Data movement, it is important that all RDF concepts are well-represented
+in this specification. This section details how each RDF concept can be
+expressed in JSON-LD.</p>
+
+<p class="issue">The current specification relies on microsyntaxes to 
+express things like IRIs, typed literals and CURIEs. There is a small amount
+of debate on whether or not to use full-blown JSON objects containing things
+like "value" and "datatype". The original authors of the JSON-LD specification
+feel that microsyntaxes allow a much simpler, less error-prone structure in 
+the JSON-LD objects. Proponents of the verbose mechanism assert that there
+would be less chance of data markup issues concerning proper escaping and 
+that the objects, while more verbose, would be easier to work with within
+JavaScript environments. Feedback on this issue would be appreciated.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">5.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
+and many objects are identified. IRIs can be expressed by wrapping a
+text string with the <code><</code> and <code>></code> characters.
+</p>
+
+<pre class="example">
+{
+...
+  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}</pre>
+
+<p>The example above would set the object to an IRI with the value of
+<code>http://manu.sporny.org</code>.
+</p>
+
+<p>Wrapping IRIs with the  <code><</code> and <code>></code> 
+characters are only necessary when IRIs are specified as objects. At no other
+point do you need to wrap an IRI. You do not need to wrap IRIs when declaring 
+a property, declaring a CURIE, or describing key-value pairs in a context.</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
+
+<p>A subject is declared using the <code>@</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, predicate, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to 
+<code><http://example.org/people#joebob></code>.
+</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">5.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the <code>a</code>
+key. Specifying the type in this way will generate a triple of the form 
+(subject, type, type-url).</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple 
+(in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+</div>
+
+<div id="plain-literals" class="section">
+<h3><span class="secno">5.4 </span>Plain Literals</h3>
+
+<p>Regular text strings are called "plain literals" in RDF and are easily
+expressed using regular JSON strings.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="language-specification-in-plain-literals" class="section">
+<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
+
+<p>JSON-LD attempts to make sure that it is easy to express triples in other
+languages while simultaneously ensuring that hefty data structures 
+aren't required to accomplish simple language markup. When the 
+<code>@</code> symbol is used in a literal, the JSON-LD processor tags
+the literal text with the language tag that follows the <code>@</code>
+symbol.
+</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">花澄@ja</span>",
+...
+}</pre>
+
+<p>The example above would generate a plain literal for <em>花澄</em> and
+associate the <code>ja</code> language tag with the triple that is
+generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="typed-literals" class="section">
+<h3><span class="secno">5.6 </span>Typed Literals</h3>
+
+<p>Literals may also be typed in JSON-LD by using the <code>^^</code>
+sequence at the end of the text string.</p>
+
+<pre class="example">
+{
+...
+  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}</pre>
+
+<p>The example above would generate an object with the value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+arrays. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an array.</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "stu" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "groknar" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "radface" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple typed literals are expressed very much in the same way as 
+multiple properties:</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="blank-nodes" class="section">
+<h3><span class="secno">5.9 </span>Blank Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this is where blank nodes come
+into play. In JSON-LD, blank node identifiers are automatically created if a 
+subject is not specified using the <code>@</code> key. However, authors may
+name blank nodes by using the special <code>_</code> CURIE prefix.</p>
+
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+named blank node.
+</p>
+
+</div>
+
+<div id="escape-character" class="section">
+<h3><span class="secno">5.10 </span>Escape Character</h3>
+
+<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
+interpreted as CURIEs, IRIs, language tags, or TypedLiterals.</p>
+
+<p>The special characters in JSON-LD are: <code><</code>, <code>></code>,
+<code>@</code>, <code>#</code>, <code>:</code> and <code>^</code>.</p>
+
+<pre class="example">
+{
+...
+  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}</pre>
+
+</div>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">5.11 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as decimals, 
+integers and boolean values, JSON-LD utilizes that information to create 
+<a href="#typed-literals">Typed Literals</a>.</p>
+
+<pre class="example">
+{
+...
+  // This value is automatically converted to having a type of xsd:decimal
+  "measure:cups": <span class="diff">5.3</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+</div>
+
+</div>
+
+<div id="best-practices" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>Best Practices</h2>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be 
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<div id="javascript" class="section">
+<h3><span class="secno">6.1 </span>JavaScript</h3>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in 
+JavaScript environments, however, features like IRIs requiring angled
+brackets in JSON-LD means that using JSON-LD directly in JavaScript is going
+to be annoying without a middleware layer such as a simple library that 
+strips JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDFa API, which would enable a triple-store in the 
+browser, but some don't want to require that level of functionality just to use 
+JSON-LD. The group is still discussing the best way to proceed, so input
+on how JSON-LD could more easily be utilized in JavaScript environments
+would be very much appreciated.
+</p>
+</div>
+
+<div id="schema-less-databases" class="section">
+<h3><span class="secno">6.2 </span>Schema-less Databases</h3>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from 
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">7. </span>Advanced Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear whether
+or not the JSON-LD specification is going to support the complexity necessary
+to support each concept. The entire section on Advanced Concepts should be
+taken with a grain of salt; it is merely a list of possibilities where all
+of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">7.1 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
+JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
+coerce and incoming or outgoing types to the proper RDF type based on a
+mapping of type IRIs to RDF types. Using type conversion, one may convert
+simple JSON data to properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to 
+plain literals, typed literals and IRIs.</p>
+
+<pre class="example">
+{
+  "#": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "#types":
+     {
+        "name": "rdf:PlainLiteral",
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }</span>
+  },
+  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "&lt;John Smith&gt;" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="json-ld-profiles" class="section">
+<h3><span class="secno">7.2 </span>JSON-LD Profiles</h3>
+
+<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
+a collection of prefixes and terms that can be re-used by a processor to simplfy
+markup. JSON-LD provides a similar mechanism called JSON-LD Profiles, which is 
+the inclusion of a context external to the JSON-LD document.</p>
+
+<p>The example below demonstrates how one may specify an external JSON-LD
+Profile. Assume the following profile exists at this imaginary URL:
+<code>http://example.org/profiles/contacts</code>.</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}</pre>
+
+<p>The profile listed above can be used in the following way:</p>
+
+<pre class="example">
+{
+  "#": { "#profile": "http://example.org/profiles/contacts" },
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">7.3 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an array to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single JSON-LD associative
+array.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+  "@": 
+  [
+    {
+      "@": "&lt;http://example.org/people#john&gt;",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "&lt;http://example.org/people#jane&gt;",
+      "a": "foaf:Person"
+    }
+  ]
+}</pre>
+
+</div>
+</div>
+
+<div class="appendix section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Acknowledgements</h2>
+
+<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
+rationale and reasoning behind the JSON-LD work via his work on RDFj, 
+Dave Longley who reviewed and provided feedback on the overall 
+specification and contexts, and Ian Davis, who created RDF/JSON. Thanks also
+to Bradley P. Allen and Richard Cyganiak for their input on the 
+specification.</p>
+</div>
+
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>3 August 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20100803">http://www.w3.org/TR/2010/WD-rdfa-core-20100803</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101024/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101128/diff-20101024.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,7859 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+-
+Linked
+Data
+Expression
+in
+JSON
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+Linked
+Data
+</h2>
+<h2 id="unofficial-draft-28-november-2010">
+Unofficial
+Draft
+<del class="diff-old">24
+October
+</del>
+<ins class="diff-chg">28
+November
+</ins>
+2010
+</h2>
+<dl>
+<dt>
+Editor:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20101024.html">
+diff
+to
+previous
+version
+</a>.
+</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+Developers
+that
+embed
+structured
+data
+in
+their
+Web
+pages
+can
+choose
+among
+a
+number
+of
+languages
+such
+as
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+],
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+Each
+of
+these
+structured
+data
+languages,
+while
+incompatible
+at
+the
+syntax
+level,
+can
+be
+easily
+mapped
+to
+RDF.
+JSON
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+Linked
+Data
+that
+can
+be
+used
+to
+represent
+objects
+specified
+via
+RDFa,
+Microformats
+and
+Microdata.
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design-goals-and-rationale" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Goals
+</a>
+</li>
+<li class="tocline">
+<a href="#map-terms-to-iris" class="tocxref">
+<span class="secno">
+2.2
+</span>
+Map
+Terms
+to
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-default-context" class="tocxref">
+<span class="secno">
+2.3
+</span>
+The
+Default
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#mashing-up-vocabularies" class="tocxref">
+<span class="secno">
+2.4
+</span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#an-example-of-a-default-context" class="tocxref">
+<span class="secno">
+2.5
+</span>
+An
+Example
+of
+a
+Default
+Context
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+3.
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+3.1
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+3.2
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+3.3
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-processing-algorithm" class="tocxref">
+<span class="secno">
+4.
+</span>
+The
+JSON-LD
+Processing
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#markup-of-rdf-concepts" class="tocxref">
+<span class="secno">
+5.
+</span>
+Markup
+of
+RDF
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+5.1
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+5.2
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+5.3
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#plain-literals" class="tocxref">
+<span class="secno">
+5.4
+</span>
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#language-specification-in-plain-literals" class="tocxref">
+<span class="secno">
+5.5
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#typed-literals" class="tocxref">
+<span class="secno">
+5.6
+</span>
+Typed
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+5.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+5.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#blank-nodes" class="tocxref">
+<span class="secno">
+5.9
+</span>
+Blank
+Nodes
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-features" class="tocxref">
+<span class="secno">
+<ins class="diff-new">6.
+</ins></span><ins class="diff-new">
+Advanced
+Features
+</ins></a><ul class="toc">
+<li class="tocline">
+<a href="#escape-character" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.10
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Escape
+Character
+</a>
+</li>
+<li class="tocline">
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+Automatic
+Typing
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+<ins class="diff-new">6.3
+</ins></span><ins class="diff-new">
+Type
+Coercion
+</ins></a></li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#best-practices" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">7.
+</ins>
+</span>
+Best
+Practices
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#javascript" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">7.1
+</ins>
+</span>
+JavaScript
+</a>
+</li>
+<li class="tocline">
+<a href="#schema-less-databases" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">7.2
+</ins>
+</span>
+Schema-less
+Databases
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">8.
+</ins>
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#vocabulary-profiles" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.1
+</del>
+<ins class="diff-chg">8.1
+</ins>
+</span>
+<del class="diff-old">Type
+Coercion
+</del>
+<ins class="diff-chg">Vocabulary
+Profiles
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.2
+</del>
+<ins class="diff-chg">8.2
+</ins>
+</span>
+<ins class="diff-new">Disjoint
+Graphs
+</ins></a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno"><ins class="diff-new">
+8.3
+</ins></span><ins class="diff-new">
+The
+</ins>
+JSON-LD
+<del class="diff-old">Profiles
+</del>
+<ins class="diff-chg">API
+</ins></a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno"><ins class="diff-chg">
+8.3.1
+</ins></span><ins class="diff-chg">
+Methods
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.3
+</del>
+<ins class="diff-chg">8.3.2
+</ins>
+</span>
+<del class="diff-old">Disjoint
+Graphs
+</del>
+<ins class="diff-chg">Methods
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-2" class="tocxref">
+<span class="secno">
+<ins class="diff-new">8.3.3
+</ins></span><ins class="diff-new">
+Methods
+</ins></a></li></ul></li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+A.
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+B.
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p class="issue">
+Write
+the
+introduction
+once
+all
+of
+the
+technical
+details
+are
+hammered
+out.
+Explain
+why
+JSON-LD
+is
+designed
+as
+a
+light-weight
+mechanism
+to
+express
+RDFa,
+Microformats
+and
+Microdata.
+It
+is
+primarily
+intended
+as
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+environments
+as
+well
+as
+a
+way
+to
+pass
+Linked
+Data
+to
+and
+from
+Web
+services.
+It
+is
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+(and
+understanding)
+that
+is
+out
+there
+already.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+Microformats
+data,
+and
+Microdata
+(that
+is,
+every
+data
+model
+currently
+in
+use)
+using
+one
+unified
+format.
+It
+does
+not
+require
+anyone
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+out-of-band
+-
+it
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+tiny
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+write
+processors
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+and
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+All
+comments
+and
+discussion
+takes
+place
+on
+the
+public
+mailing
+list:
+<a href="http://groups.google.com/group/json-ld">
+json-ld@googlegroups.com
+</a>
+</li>
+<li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="http://github.com/digitalbazaar/json-ld/issues">
+issue
+tracker
+</a>.
+</li>
+<li>
+<a href="http://github.com/digitalbazaar/json-ld">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=#json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+</div>
+</div>
+<div id="design-goals-and-rationale" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="goals" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+Goals
+</h3>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+don't
+need
+to
+know
+RDF
+in
+order
+to
+use
+the
+basic
+functionality
+provided
+by
+JSON-LD.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+should
+be
+100%
+compatible
+with
+JSON.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+All
+major
+RDF
+concepts
+must
+be
+expressible
+via
+the
+JSON-LD
+syntax.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable.
+</dd>
+<dt>
+Zero
+Edits
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<div id="map-terms-to-iris" class="section">
+<h3>
+<span class="secno">
+2.2
+</span>
+Map
+Terms
+to
+IRIs
+</h3>
+<p>
+Establishing
+a
+mechanism
+to
+map
+JSON
+values
+to
+IRIs
+will
+help
+in
+the
+mapping
+of
+JSON
+objects
+to
+RDF.
+This
+does
+not
+mean
+that
+JSON-LD
+must
+be
+restrictive
+in
+declaring
+a
+set
+of
+terms,
+rather,
+experimentation
+and
+innovation
+should
+be
+supported
+as
+part
+of
+the
+core
+design
+of
+JSON-LD.
+There
+are,
+however,
+a
+number
+of
+very
+small
+design
+criterial
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+RDF
+data
+that
+will
+create
+value
+for
+the
+greater
+semantic
+web
+community
+and
+JSON/REST-based
+Web
+Services
+community.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+object
+as
+the
+example
+for
+this
+section:
+</p>
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+}
+</pre>
+</div>
+<div id="the-default-context" class="section">
+<h3>
+<span class="secno">
+2.3
+</span>
+The
+Default
+Context
+</h3>
+<p>
+A
+default
+context
+is
+used
+in
+RDFa
+to
+allow
+developers
+to
+use
+keywords
+as
+aliases
+for
+IRIs.
+So,
+for
+instance,
+the
+keyword
+<strong>
+name
+</strong>
+above
+could
+refer
+to
+the
+IRI
+<em>
+http://xmlns.com/foaf/0.1/name
+</em>.
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+terms
+mean
+something,
+which
+you
+will
+eventually
+want
+to
+query.
+The
+semantic
+web
+specifies
+this
+via
+<em>
+Vocabulary
+Documents
+</em>.
+The
+IRI
+<em>
+http://xmlns.com/foaf/0.1/
+</em>
+specifies
+a
+Vocabulary
+Document,
+and
+<strong>
+name
+</strong>
+is
+a
+term
+in
+that
+vocabulary.
+Paste
+the
+two
+items
+together
+and
+you
+have
+an
+unambiguous
+identifier
+for
+a
+term.
+</p>
+<p>
+Developers,
+and
+machines,
+would
+be
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+Machines
+need
+the
+same
+sort
+of
+dictionary
+of
+terms,
+and
+URIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+Non-prefixed
+terms
+should
+have
+term
+mappings
+declared
+in
+the
+default
+context
+so
+that
+they
+may
+be
+expanded
+later.
+</p>
+<p>
+If
+a
+set
+of
+terms,
+like
+<strong>
+Person
+</strong>,
+<strong>
+name
+</strong>,
+and
+<strong>
+homepage
+</strong>,
+are
+pre-defined
+in
+the
+default
+context,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+JSON
+objects,
+machines
+could
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "",
+</del>
+<ins class="diff-chg">  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+</ins>
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
+}
+</pre>
+<p class="note">
+In
+order
+to
+differentiate
+between
+plain
+text
+and
+IRIs,
+the
+<strong>
+<
+</strong> and <strong>
+>
+</strong>
+are
+used
+around
+IRIs.
+</p>
+<p>
+Doing
+this
+would
+mean
+that
+JSON
+would
+start
+to
+become
+unambiguously
+machine-readable,
+play
+well
+with
+the
+semantic
+web,
+and
+basic
+markup
+wouldn't
+be
+that
+much
+more
+complex
+than
+basic
+JSON
+markup.
+A
+win,
+all
+around.
+</p>
+</div>
+<div id="mashing-up-vocabularies" class="section">
+<h3>
+<span class="secno">
+2.4
+</span>
+Mashing
+Up
+Vocabularies
+</h3>
+<p>
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</p>
+<ul>
+<li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+A
+JSON-LD
+Web
+Service
+could
+define
+these
+as
+<em>
+prefix
+</em>
+es
+in
+their
+default
+context
+beside
+the
+<em>
+terms
+</em>
+that
+are
+already
+defined.
+Using
+this
+feature,
+developers
+could
+also
+express
+markup
+like
+this:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "",
+</del>
+<ins class="diff-chg">  "<span class="diff">rdf:type</span>": "<span class="diff">&lt;foaf:Person&gt;</span>",
+</ins>
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
+}
+</pre>
+<p>
+Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+default
+context
+in-line
+using
+the
+<code>
+#
+</code>
+character,
+like
+so:
+</p>
+<pre class="example">
+{
+  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
+<del class="diff-old">  "a": "foaf:Person",
+</del>
+<ins class="diff-chg">  "a": "&lt;foaf:Person&gt;",
+</ins>
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+  "myvocab:credits": 500</span>
+}
+</pre>
+<p>
+Think
+of
+the
+<code>
+#
+</code>
+character
+as
+a
+<del class="diff-old">"hashtable",
+</del>
+<ins class="diff-chg">"
+</ins><strong><ins class="diff-chg">
+hash
+</ins></strong><ins class="diff-chg">
+table",
+</ins>
+which
+maps
+one
+string
+to
+another
+string.
+In
+the
+example
+above,
+the
+<code>
+myvocab
+</code>
+string
+is
+replaced
+with
+"
+<code>
+http://example.org/myvocab#
+</code>
+"
+when
+it
+is
+detected
+above.
+In
+the
+example
+above,
+"
+<code>
+myvocab:credits
+</code>
+"
+would
+expand
+to
+"
+<code>
+http://example.org/myvocab#credits
+</code>
+".
+</p>
+<p>
+This
+mechanism
+is
+a
+short-hand
+for
+RDF,
+and
+if
+defined,
+will
+give
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</p>
+<p>
+</p>
+</div>
+<div id="an-example-of-a-default-context" class="section">
+<h3>
+<span class="secno">
+2.5
+</span>
+An
+Example
+of
+a
+Default
+Context
+</h3>
+<p>
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+A
+JSON-LD
+aware
+Web
+Service
+<em class="rfc2119" title="may">
+may
+</em>
+define
+a
+default
+context.
+For
+example,
+the
+following
+default
+context
+could
+apply
+to
+all
+incoming
+Web
+Service
+calls
+previously
+accepting
+only
+JSON
+data:
+</p>
+<pre class="example">
+{
+  "#": 
+  {
+    "#vocab": "http://example.org/default-vocab#",
+    "#base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+  }
+}
+</pre>
+<p>
+The
+<code>
+#vocab
+</code>
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+term
+that
+doesn't
+resolve
+to
+a
+term
+or
+a
+prefix
+should
+be
+appended
+to
+the
+<code>
+#vocab
+</code>
+IRI.
+This
+is
+done
+to
+ensure
+that
+terms
+can
+be
+transformed
+to
+an
+IRI
+at
+all
+times.
+</p>
+<p>
+The
+<code>
+#base
+</code>
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+relative
+IRI
+<em class="rfc2119" title="must">
+must
+</em>
+be
+appended
+to
+the
+string
+specified
+by
+<code>
+#base
+</code>.
+</p>
+</div>
+</div>
+<div id="markup-examples" class="section">
+<h2>
+<span class="secno">
+3.
+</span>
+Markup
+Examples
+</h2>
+<p>
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</p>
+<div id="rdfa" class="section">
+<h3>
+<span class="secno">
+3.1
+</span>
+RDFa
+</h3>
+<p>
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</p>
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</pre>
+<p>
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</p>
+<pre class="example">
+[
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+ }
+]
+</pre>
+</div>
+<div id="microformats" class="section">
+<h3>
+<span class="secno">
+3.2
+</span>
+Microformats
+</h3>
+<p>
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</p>
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+</pre>
+<p>
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+<code>
+url
+</code>
+and
+<code>
+fn
+</code>
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+<code>
+http://tantek.com
+</code>.
+</p>
+<pre class="example">
+{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+}
+</pre>
+</div>
+<div id="microdata" class="section">
+<h3>
+<span class="secno">
+3.3
+</span>
+Microdata
+</h3>
+<p>
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</p>
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</pre>
+<p>
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</p>
+<pre class="example">
+[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+]
+</pre>
+</div>
+</div>
+<div id="the-json-ld-processing-algorithm" class="section">
+<h2>
+<span class="secno">
+4.
+</span>
+The
+JSON-LD
+Processing
+Algorithm
+</h2>
+<p>
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<p class="issue">
+The
+Processing
+Algorithm
+is
+a
+work
+in
+progress,
+there
+are
+still
+major
+bugs
+in
+the
+algorithm
+and
+it's
+difficult
+to
+follow.
+It's
+provided
+only
+to
+very
+early
+implementers
+to
+give
+them
+an
+idea
+of
+how
+to
+implement
+a
+processor.
+</p>
+<h4 id="processing-algorithm-terms">
+Processing
+Algorithm
+Terms
+</h4>
+<ul>
+<li>
+<dfn title="default_context" id="dfn-default_context">
+default
+context
+</dfn>
+-
+a
+context
+that
+is
+specified
+to
+the
+JSON-LD
+processing
+algorithm
+before
+processing
+begins.
+</li>
+<li>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+-
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</li>
+<li>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+-
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="inherited_subject" id="dfn-inherited_subject">
+inherited
+subject
+</dfn>
+-
+a
+subject
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+<a class="tref" title="current_subject">
+current
+subject
+</a>
+is
+discovered
+or
+generated.
+</li>
+<li>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+-
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="inherited_property" id="dfn-inherited_property">
+inherited
+property
+</dfn>
+-
+a
+property
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+<a class="tref" title="current_subject">
+current
+subject
+</a>
+is
+discovered
+or
+generated.
+</li>
+<li>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+-
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+-
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+top-most
+item
+on
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+</li>
+<li>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+-
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+<code>
+#
+</code>
+key.
+</li>
+<li>
+<dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</dfn>
+-
+A
+list
+of
+triples
+that
+have
+yet
+to
+have
+their
+subject
+set.
+</li>
+<li>
+<dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</dfn>
+-
+A
+list
+of
+objects
+that
+cannot
+be
+processed
+until
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+detected
+or
+the
+end
+of
+the
+current
+associative-array
+is
+detected.
+</li>
+<li>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+-
+the
+processor
+state,
+which
+includes
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack,
+<a class="tref" title="current_subject">
+current
+subject
+</a>,
+<a class="tref" title="current_property">
+current
+property
+</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</a>,
+and
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>.
+</li>
+</ul>
+<h4 id="processing-tokens-and-keywords">
+Processing
+Tokens
+and
+Keywords
+</h4>
+<ul>
+<li>
+<code>
+#
+</code>
+-
+Used
+to
+set
+the
+active
+context.
+</li>
+<li>
+<code>
+#base
+</code>
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+active
+context.
+</li>
+<li>
+<code>
+#vocab
+</code>
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+active
+context.
+</li>
+<li>
+<code>
+#types
+</code>
+-
+Used
+to
+specify
+type
+coercion.
+<del class="diff-old">The
+#types
+keyword
+assumes
+Type
+Coercion
+,
+which
+is
+an
+experimental
+feature.
+</del>
+</li>
+<li>
+<code>
+<
+</code> and <code>
+>
+</code>
+-
+Used
+to
+express
+IRIs
+in
+JSON
+values.
+</li>
+<li>
+<code>:
+</code>
+-
+The
+separator
+for
+CURIEs
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+</li>
+<li>
+<code>
+@
+</code>
+-
+Sets
+the
+active
+subjects.
+</li>
+<li>
+<code>
+a
+</code>
+-
+Used
+to
+set
+the
+rdf:type
+of
+the
+active
+subjects.
+</li>
+<li>
+<code>
+\
+</code>
+-
+Used
+as
+an
+escape
+character
+to
+escape
+all
+the
+special
+tokens
+and
+keywords.
+</li>
+<li>
+<code>
+^^
+</code>
+-
+Used
+to
+express
+the
+data
+type
+for
+Typed
+Literals.
+</li>
+</ul>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+streaming
+(SAX-based)
+implementations.
+Implementers
+will
+find
+that
+non-streaming
+(document-based)
+implementations
+will
+be
+much
+easier
+to
+implement
+as
+full
+access
+to
+the
+JSON
+object
+model
+eliminates
+some
+of
+the
+steps
+that
+are
+necessary
+for
+streaming
+implementations.
+A
+conforming
+JSON-LD
+processor
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<ol class="algorithm">
+<li id="processing-step-default-context">
+If
+a
+<a class="tref internalDFN" title="default_context" href="#dfn-default_context">
+default
+context
+</a>
+is
+supplied
+to
+the
+processing
+algorithm,
+push
+it
+onto
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+</li>
+<li id="processing-step-associative">
+If
+an
+associative
+array
+is
+detected,
+create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+Copy
+the
+<a class="tref" title="current_context">
+current
+context
+</a>
+stack
+to
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+Push
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+onto
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+'s
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+For
+each
+key-value
+pair
+in
+the
+associative
+array,
+using
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+do
+the
+following:
+<ol class="algorithm">
+<li>
+If
+a
+<code>
+#
+</code>
+key
+is
+found,
+the
+processor
+merges
+each
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+overwriting
+any
+duplicate
+values
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+Process
+each
+object
+in
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>,
+starting
+at
+<a href="#processing-subject">
+Step
+2.2
+</a>.
+</li>
+<li id="processing-associative">
+If
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+has
+not
+been
+detected,
+the
+current
+key-value
+pair
+is
+placed
+into
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>
+and
+processing
+proceeds
+to
+the
+next
+key-value
+pair.
+Otherwise,
+if
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+known
+perform
+the
+following
+steps:
+</li>
+<ol class="algorithm">
+<li id="processing-subject">
+If
+a
+<code>
+@
+</code>
+key
+is
+found,
+the
+processor
+sets
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+value
+after
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+has
+been
+performed.
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+and
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+values
+are
+specified,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+for
+the
+subject,
+the
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+for
+the
+property,
+and
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+for
+the
+object.
+</li>
+<li>
+If
+there
+are
+any
+triples
+in
+the
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</a>,
+complete
+each
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+as
+the
+subject
+for
+each
+triple.
+</li>
+</ol>
+</li>
+<li>
+If
+an
+<code>
+a
+</code>
+key
+is
+found,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+http://www.w3.org/1999/02/22-rdf-syntax-ns#type
+</code>.
+</li>
+<li>
+If
+a
+key
+that
+is
+not
+<code>
+#
+</code>,
+<code>
+@
+</code>,
+or
+<code>
+a
+</code>
+is
+found,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Property
+Processing
+</a>
+on
+the
+key.
+</li>
+<li>
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+an
+associative
+array,
+then
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+then
+process
+the
+value
+starting
+at
+<a href="#processing-step-array">
+Step
+3
+</a>
+ensuring
+that
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+are
+copied
+to
+a
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+<li>
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+was
+not
+discovered,
+then:
+<ol class="algorithm">
+<li>
+Generate
+a
+<a class="tref" title="blank_node_identifier">
+blank
+node
+identifier
+</a>
+and
+set
+it
+as
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>.
+</li>
+<li>
+Complete
+any
+previously
+incomplete
+triples
+by
+running
+all
+substeps
+of
+<a href="#processing-subject">
+Step
+2.2.1
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+was
+not
+discovered,
+then
+assume
+that
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+unmodified
+and
+run
+all
+substeps
+of
+<a href="#processing-associative">
+Step
+2.2
+</a>
+on
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>.
+</li>
+</ol>
+</ol>
+</li>
+<li id="processing-step-array">
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+an
+associative
+array,
+processes
+per
+<a href="#processing-step-associative">
+Step
+2
+</a>,
+ensuring
+to
+set
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+to
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+the
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+to
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+in
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+place
+it
+into
+the
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+Processing?
+<div class="issue">
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+generation
+of
+triples?
+For
+example,
+would
+implementing
+this
+be
+worth
+the
+more
+complex
+processing
+rules:
+"ex:orderedItems"
+:
+[["one",
+"two",
+"three"]]
+</div>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="markup-of-rdf-concepts" class="section">
+<h2>
+<span class="secno">
+5.
+</span>
+Markup
+of
+RDF
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+most
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+Javascript
+objects
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+Since
+RDF
+is
+also
+an
+important
+sub-community
+of
+the
+Linked
+Data
+movement,
+it
+is
+important
+that
+all
+RDF
+concepts
+are
+well-represented
+in
+this
+specification.
+This
+section
+details
+how
+each
+RDF
+concept
+can
+be
+expressed
+in
+JSON-LD.
+</p>
+<p class="issue">
+The
+current
+specification
+relies
+on
+microsyntaxes
+to
+express
+things
+like
+IRIs,
+typed
+literals
+and
+CURIEs.
+There
+is
+a
+small
+amount
+of
+debate
+on
+whether
+or
+not
+to
+use
+full-blown
+JSON
+objects
+containing
+things
+like
+"value"
+and
+"datatype".
+The
+original
+authors
+of
+the
+JSON-LD
+specification
+feel
+that
+microsyntaxes
+allow
+a
+much
+simpler,
+less
+error-prone
+structure
+in
+the
+JSON-LD
+objects.
+Proponents
+of
+the
+verbose
+mechanism
+assert
+that
+there
+would
+be
+less
+chance
+of
+data
+markup
+issues
+concerning
+proper
+escaping
+and
+that
+the
+objects,
+while
+more
+verbose,
+would
+be
+easier
+to
+work
+with
+within
+JavaScript
+environments.
+Feedback
+on
+this
+issue
+would
+be
+appreciated.
+</p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+5.1
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+subjects
+and
+many
+objects
+are
+identified.
+IRIs
+can
+be
+expressed
+by
+wrapping
+a
+text
+string
+with
+the
+<code>
+<
+</code> and <code>
+>
+</code>
+characters.
+</p>
+<pre class="example">
+{
+...
+  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+object
+to
+an
+IRI
+with
+the
+value
+of
+<code>
+http://manu.sporny.org
+</code>.
+</p>
+<p>
+<ins class="diff-new">As
+a
+general
+rule,
+all
+CURIEs
+and
+IRIs
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+be
+wrapped
+in
+</ins><code><</code> and <code><ins class="diff-new">
+>
+</ins></code><ins class="diff-new">
+characters.
+This
+is
+to
+ensure
+that
+there
+is
+a
+simple,
+consistent
+rule
+that
+can
+be
+followed
+when
+authoring
+JSON-LD
+data.
+There
+are,
+however,
+several
+instances
+where
+angle
+brackets
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+be
+omitted,
+without
+introducing
+ambiguity,
+to
+ease
+authoring
+burden.
+These
+instances
+are:
+</ins></p><ul><li><ins class="diff-new">
+When
+specifying
+the
+subject
+IRI
+using
+</ins><code><ins class="diff-new">
+@
+</ins></code>.</li><li><ins class="diff-new">
+When
+specifying
+the
+RDF
+type
+IRI
+using
+</ins><code><ins class="diff-new">
+a
+</ins></code>.</li><li><ins class="diff-new">
+Any
+CURIE
+in
+the
+key
+portion
+of
+a
+JSON
+associative
+array.
+</ins></li></ul>
+Wrapping
+IRIs
+with
+the
+<code>
+<
+</code> and <code>
+>
+</code>
+characters
+are
+only
+<del class="diff-old">necessary
+</del>
+<ins class="diff-chg">mandatory
+</ins>
+when
+IRIs
+are
+specified
+as
+<del class="diff-old">objects.
+</del>
+<ins class="diff-chg">values
+in
+the
+JSON
+key-value
+pairs.
+</ins><p></p><p><ins class="diff-chg">
+To
+further
+illustrate,
+the
+following
+example
+omissions
+of
+the
+</ins><code><</code> and <code><ins class="diff-chg">
+>
+</ins></code><ins class="diff-chg">
+characters
+are
+allowed:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+...
+  "@": "<span class="diff">&lt;</span>http://manu.sporny.org/about#manu<span class="diff">&gt;</span>",
+  // CURIE/IRI when specifying the subject can be minimized.
+  "@": "http://manu.sporny.org/about#manu",
+...
+  "a": "<span class="diff">&lt;</span>foaf:Person<span class="diff">&gt;</span>",
+  // CURIE/IRI when specifying the type of an object can be minimized.
+  "a": "foaf:Person",
+...
+  "<span class="diff">&lt;</span>foaf:homepage<span class="diff">&gt;</span>": "&lt;http://manu.sporny.org&gt;",
+  // CURIE/IRI when specifying a property can be minimized.
+  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
+...
+}
+</ins></pre><p>
+At
+<del class="diff-old">no
+</del>
+<ins class="diff-chg">all
+</ins>
+other
+<del class="diff-old">point
+do
+you
+need
+to
+wrap
+an
+IRI.
+You
+do
+not
+need
+to
+wrap
+</del>
+<ins class="diff-chg">times,
+CURIEs
+and
+</ins>
+IRIs
+<del class="diff-old">when
+declaring
+a
+property,
+declaring
+a
+CURIE,
+or
+describing
+key-value
+pairs
+in
+a
+context.
+</del>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em><ins class="diff-chg">
+be
+wrapped
+with
+the
+</ins><code><</code> and <code><ins class="diff-chg">
+>
+</ins></code><ins class="diff-chg">
+characters.
+</ins>
+</p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+5.2
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+A
+subject
+is
+declared
+using
+the
+<code>
+@
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+predicate,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<ins class="diff-new">the
+IRI
+</ins>
+<code>
+<ins class="diff-chg">http://example.org/people#joebob
+</ins>
+</code>.
+</p>
+<p>
+<ins class="diff-new">Note
+that
+subject
+do
+not
+need
+to
+be
+wrapped
+in
+angle
+brackets.
+The
+following
+example
+is
+valid
+JSON-LD
+markup:
+</ins></p><pre class="example"><ins class="diff-new">
+{
+...
+  "@": "http://example.org/people#joebob",
+...
+}
+</ins></pre>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+5.3
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+a
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-url).
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+(in
+N-Triples
+notation):
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+<ins class="diff-new">Note
+that
+the
+type
+IRI
+does
+not
+need
+to
+be
+wrapped
+in
+angle
+brackets.
+The
+following
+example
+is
+valid
+JSON-LD
+markup:
+</ins></p><pre class="example"><ins class="diff-new">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "a": "http://xmlns.com/foaf/0.1/Person",
+...
+}
+</ins></pre>
+</div>
+<div id="plain-literals" class="section">
+<h3>
+<span class="secno">
+5.4
+</span>
+Plain
+Literals
+</h3>
+<p>
+Regular
+text
+strings
+are
+called
+"plain
+literals"
+in
+RDF
+and
+are
+easily
+expressed
+using
+regular
+JSON
+strings.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}
+</pre>
+</div>
+<div id="language-specification-in-plain-literals" class="section">
+<h3>
+<span class="secno">
+5.5
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</h3>
+<p>
+JSON-LD
+attempts
+to
+make
+sure
+that
+it
+is
+easy
+to
+express
+triples
+in
+other
+languages
+while
+simultaneously
+ensuring
+that
+hefty
+data
+structures
+aren't
+required
+to
+accomplish
+simple
+language
+markup.
+When
+the
+<code>
+@
+</code>
+symbol
+is
+used
+in
+a
+literal,
+the
+JSON-LD
+processor
+tags
+the
+literal
+text
+with
+the
+language
+tag
+that
+follows
+the
+<code>
+@
+</code>
+symbol.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">花澄@ja</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+plain
+literal
+for
+<em>
+花澄
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+tag
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="typed-literals" class="section">
+<h3>
+<span class="secno">
+5.6
+</span>
+Typed
+Literals
+</h3>
+<p>
+Literals
+may
+also
+be
+typed
+in
+JSON-LD
+by
+using
+the
+<code>
+^^
+</code>
+sequence
+at
+the
+end
+of
+the
+text
+string.
+</p>
+<pre class="example">
+{
+...
+  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+an
+object
+with
+the
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+5.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+arrays.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+array.
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "stu" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "groknar" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+"radface"
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+5.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+typed
+literals
+are
+expressed
+very
+much
+in
+the
+same
+way
+as
+multiple
+properties:
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="blank-nodes" class="section">
+<h3>
+<span class="secno">
+5.9
+</span>
+Blank
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+is
+where
+blank
+nodes
+come
+into
+play.
+In
+JSON-LD,
+blank
+node
+identifiers
+are
+automatically
+created
+if
+a
+subject
+is
+not
+specified
+using
+the
+<code>
+@
+</code>
+key.
+However,
+authors
+may
+name
+blank
+nodes
+by
+using
+the
+special
+<code>
+_
+</code>
+CURIE
+prefix.
+</p>
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+named
+blank
+node.
+</p>
+</div>
+</div>
+<div id="advanced-features" class="section">
+<h2>
+<span class="secno">
+<ins class="diff-new">6.
+</ins></span><ins class="diff-new">
+Advanced
+Features
+</ins></h2><p><ins class="diff-new">
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+provided
+by
+RDF.
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</ins></p>
+<div id="escape-character" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.10
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Escape
+Character
+</h3>
+<p>
+Special
+characters
+in
+property
+values
+<em class="rfc2119" title="must">
+must
+</em>
+be
+escaped
+in
+order
+to
+not
+be
+interpreted
+as
+CURIEs,
+IRIs,
+language
+tags,
+or
+TypedLiterals.
+</p>
+<p>
+The
+special
+characters
+<ins class="diff-new">that
+need
+to
+be
+escaped
+</ins>
+in
+<del class="diff-old">JSON-LD
+</del>
+<ins class="diff-chg">property
+values
+</ins>
+are:
+<code>
+<
+</code> (at the beginning of a string), <code>
+>
+<del class="diff-old">,
+</del>
+</code>
+<ins class="diff-chg">(at
+the
+end
+of
+a
+string),
+</ins>
+<code>
+@
+</code>,
+<del class="diff-old">#
+,
+:
+</del>
+and
+<code>
+^
+</code>.
+</p>
+<pre class="example">
+{
+...
+  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}
+</pre>
+</div>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.11
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+decimals,
+integers
+and
+boolean
+values,
+JSON-LD
+utilizes
+that
+information
+to
+create
+<a href="#typed-literals">
+Typed
+Literals
+</a>.
+</p>
+<pre class="example">
+{
+...
+  // This value is automatically converted to having a type of xsd:decimal
+  "measure:cups": <span class="diff">5.3</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}
+</pre>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">6.3
+</ins></span><ins class="diff-new">
+Type
+Coercion
+</ins></h3><p><ins class="diff-new">
+JSON-LD
+supports
+the
+coercion
+of
+types
+to
+ensure
+that
+the
+zero-edit
+goal
+of
+JSON-LD
+can
+be
+accomplished.
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+and
+incoming
+or
+outgoing
+types
+to
+the
+proper
+RDF
+type
+based
+on
+a
+mapping
+of
+type
+IRIs
+to
+RDF
+types.
+Using
+type
+conversion,
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</ins></p><p><ins class="diff-new">
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+plain
+literals,
+typed
+literals
+and
+IRIs.
+</ins></p><pre class="example"><ins class="diff-new">
+{
+  "#": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+</ins><span class="diff">     "#types":<ins class="diff-new">
+     {
+        "name": "rdf:PlainLiteral",
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }</span>
+  },
+  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}
+</ins></pre><p><ins class="diff-new">
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</ins></p><pre class="example"><ins class="diff-new">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "&lt;John Smith&gt;" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</ins></pre></div>
+</div>
+<div id="best-practices" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">7.
+</ins>
+</span>
+Best
+Practices
+</h2>
+<p>
+The
+nature
+of
+Web
+programming
+allows
+one
+to
+use
+basic
+technologies,
+such
+as
+JSON-LD,
+across
+a
+variety
+of
+systems
+and
+environments.
+This
+section
+attempts
+to
+describe
+some
+of
+those
+environments
+and
+the
+way
+in
+which
+JSON-LD
+can
+be
+integrated
+in
+order
+to
+help
+alleviate
+certain
+development
+headaches.
+</p>
+<div id="javascript" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">7.1
+</ins>
+</span>
+JavaScript
+</h3>
+<p class="issue">
+It
+is
+expected
+that
+JSON-LD
+will
+be
+used
+quite
+a
+bit
+in
+JavaScript
+environments,
+however,
+features
+like
+IRIs
+requiring
+angled
+brackets
+in
+JSON-LD
+means
+that
+using
+JSON-LD
+directly
+in
+JavaScript
+is
+going
+to
+be
+annoying
+without
+a
+middleware
+layer
+such
+as
+a
+simple
+library
+that
+strips
+JSON-LD
+markup
+before
+JavaScript
+uses
+it.
+One
+could
+say
+that
+JSON-LD
+is
+a
+good
+fit
+for
+the
+RDFa
+API,
+which
+would
+enable
+a
+triple-store
+in
+the
+browser,
+but
+some
+don't
+want
+to
+require
+that
+level
+of
+functionality
+just
+to
+use
+JSON-LD.
+The
+group
+is
+still
+discussing
+the
+best
+way
+to
+proceed,
+so
+input
+on
+how
+JSON-LD
+could
+more
+easily
+be
+utilized
+in
+JavaScript
+environments
+would
+be
+very
+much
+appreciated.
+</p>
+</div>
+<div id="schema-less-databases" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">7.2
+</ins>
+</span>
+Schema-less
+Databases
+</h3>
+<p class="issue">
+Databases
+such
+as
+CouchDB
+and
+MongoDB
+allow
+the
+creation
+of
+schema-less
+data
+stores.
+RDF
+is
+a
+type
+of
+schema-less
+data
+model
+and
+thus
+lends
+itself
+to
+databases
+such
+as
+CouchDB
+and
+MongoDB.
+Both
+of
+these
+databases
+can
+use
+JSON-LD
+as
+their
+storage
+format.
+The
+group
+needs
+feedback
+from
+CouchDB
+and
+MongoDB
+experts
+regarding
+the
+usefulness
+of
+JSON-LD
+in
+those
+environments.
+</p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">8.
+</ins>
+</span>
+Advanced
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+taken
+with
+a
+grain
+of
+salt;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<del class="diff-old">7.1
+Type
+Coercion
+JSON-LD
+supports
+the
+coercion
+of
+types
+to
+ensure
+that
+the
+zero-edit
+goal
+of
+JSON-LD
+can
+be
+accomplished.
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+and
+incoming
+or
+outgoing
+types
+to
+the
+proper
+RDF
+type
+based
+on
+a
+mapping
+of
+type
+IRIs
+to
+RDF
+types.
+Using
+type
+conversion,
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+plain
+literals,
+typed
+literals
+and
+IRIs.
+{
+  "#": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "name": "rdf:PlainLiteral",
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  },
+  "name": ,
+  "age": ,
+  "homepage": 
+}
+The
+example
+above
+would
+generate
+the
+following
+triples:
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "&lt;John Smith&gt;" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</del>
+<div id="vocabulary-profiles" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">7.2
+</del>
+<ins class="diff-chg">8.1
+</ins>
+</span>
+<del class="diff-old">JSON-LD
+</del>
+<ins class="diff-chg">Vocabulary
+</ins>
+Profiles
+</h3>
+<p>
+One
+of
+the
+more
+powerful
+features
+of
+RDFa
+1.1
+Core
+is
+the
+ability
+to
+specify
+a
+collection
+of
+prefixes
+and
+terms
+that
+can
+be
+re-used
+by
+a
+processor
+to
+simplfy
+markup.
+JSON-LD
+provides
+a
+similar
+mechanism
+called
+<del class="diff-old">JSON-LD
+</del>
+<ins class="diff-chg">Vocabulary
+</ins>
+Profiles,
+which
+is
+the
+inclusion
+of
+a
+context
+external
+to
+the
+JSON-LD
+document.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+one
+may
+specify
+an
+external
+<del class="diff-old">JSON-LD
+</del>
+<ins class="diff-chg">Vocabulary
+</ins>
+Profile.
+Assume
+the
+following
+profile
+exists
+at
+this
+imaginary
+URL:
+<code>
+http://example.org/profiles/contacts
+</code>.
+</p>
+<pre class="example">
+{
+  "#": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}
+</pre>
+<p>
+The
+profile
+listed
+above
+can
+be
+used
+in
+the
+following
+way:
+</p>
+<pre class="example">
+{
+  "#": { "#profile": "http://example.org/profiles/contacts" },
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">7.3
+</del>
+<ins class="diff-chg">8.2
+</ins>
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+array
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+JSON-LD
+associative
+array.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<pre class="example">
+{
+  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+  "@": 
+  [
+    {
+      "@": "&lt;http://example.org/people#john&gt;",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "&lt;http://example.org/people#jane&gt;",
+      "a": "foaf:Person"
+    }
+  ]
+}
+</pre>
+</div>
+<div id="the-json-ld-api" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">8.3
+</ins></span><ins class="diff-new">
+The
+JSON-LD
+API
+</ins></h3><p><ins class="diff-new">
+This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+format
+that
+is
+easier
+to
+work
+with
+in
+various
+programming
+languages.
+</ins></p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDParser">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-new">
+interface <span class="idlInterfaceID">JSONLDParser</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span>   <span class="idlMethName"><a href="#widl-JSONLDParser-toObject">toObject</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">map</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>RDFGraph</a></span> <span class="idlMethName"><a href="#widl-JSONLDParser-toRDFGraph">toRDFGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><ins class="diff-new">
+};</span>
+</ins></pre><div id="methods" class="section"><h4><span class="secno"><ins class="diff-new">
+8.3.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></h4><dl class="methods"><dt id="widl-JSONLDParser-toObject"><code><ins class="diff-new">
+toObject
+</ins></code></dt><dd><ins class="diff-new">
+Parses
+JSON-LD
+text
+into
+an
+object
+that
+allows
+at
+least
+attribute-based
+or
+key-based
+access
+to
+the
+data.
+If
+the
+contents
+are
+a
+disjoint
+graph,
+an
+array
+of
+objects
+are
+returned.
+If
+there
+are
+any
+errors,
+</ins><code><ins class="diff-new">
+null
+</ins></code><ins class="diff-new">
+is
+returned.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+jsonld
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+return
+object.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+map
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+map
+from
+IRIs
+to
+attribute
+names
+for
+the
+resulting
+object.
+Any
+term
+mapping
+that
+is
+not
+mentioned
+in
+the
+map
+will
+not
+be
+available
+in
+the
+resulting
+object.
+You
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+map
+</ins><code><ins class="diff-new">
+rdf:type
+</ins></code><ins class="diff-new">
+using
+the
+</ins><code><ins class="diff-new">
+a
+</ins></code><ins class="diff-new">
+key
+or
+the
+</ins><code><ins class="diff-new">
+rdf:type
+</ins></code><ins class="diff-new">
+IRI.
+You
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+map
+the
+subject
+by
+using
+the
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+key.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+options
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+An
+associative-array
+of
+processing
+options
+to
+enable
+or
+disable
+when
+processing
+the
+JSON-LD
+string.
+A
+conforming
+JSON-LD
+processor
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+support
+the
+following
+options:
+</ins><dl><dt><ins class="diff-new">
+indexBySubject
+</ins></dt><dd><ins class="diff-new">
+If
+set
+to
+true,
+the
+returned
+object
+will
+be
+indexed
+by
+subject.
+</ins></dd><dt><ins class="diff-new">
+preserveDatatypes
+</ins></dt><dd><ins class="diff-new">
+If
+set
+to
+true,
+preserves
+the
+datatype
+for
+object
+literals.
+</ins></dd><dt><ins class="diff-new">
+preserveLanguage
+</ins></dt><dd><ins class="diff-new">
+If
+set
+to
+true,
+preserves
+the
+languages
+for
+object
+literals.
+</ins></dd></dl></td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code><ins class="diff-new">
+JSONLDParserCallback
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</ins></td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+object
+</ins></a></code></div></dd><dt id="widl-JSONLDParser-toRDFGraph"><code><ins class="diff-new">
+toRDFGraph
+</ins></code></dt><dd><ins class="diff-new">
+Parses
+JSON-LD
+and
+transforms
+the
+data
+into
+an
+RDFGraph,
+which
+is
+compatible
+with
+the
+RDFa
+API
+specification.
+This
+method
+will
+return
+</ins><code><ins class="diff-new">
+null
+</ins></code><ins class="diff-new">
+if
+there
+are
+any
+errors,
+or
+if
+the
+RDFa
+API
+is
+not
+available
+for
+use.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+jsonld
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+RDFGraph.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code><ins class="diff-new">
+JSONLDParserCallback
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</ins></td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+RDFGraph
+</ins></a></code></div></dd></dl></div><p><ins class="diff-new">
+The
+JSONLDParserCallback
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+input
+data.
+</ins></p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDParserCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]<ins class="diff-new">
+interface <span class="idlInterfaceID">JSONLDParserCallback</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDParserCallback-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span><ins class="diff-new">
+};</span>
+</ins></pre><div id="methods-1" class="section"><h4><span class="secno"><ins class="diff-new">
+8.3.2
+</ins></span><ins class="diff-new">
+Methods
+</ins></h4><dl class="methods"><dt id="widl-JSONLDParserCallback-error"><code><ins class="diff-new">
+error
+</ins></code></dt><dd><ins class="diff-new">
+This
+callback
+is
+invoked
+whenever
+an
+error
+occurs
+during
+processing.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+error
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+descriptive
+error
+string
+returned
+by
+the
+processor.
+</ins></td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+void
+</ins></a></code></div></dd></dl></div><p><ins class="diff-new">
+The
+following
+example
+demonstrates
+how
+to
+convert
+JSON-LD
+to
+a
+JSON
+object
+that
+is
+directly
+usable
+in
+a
+programming
+environment:
+</ins></p><pre class="example"><ins class="diff-new">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
+              "http://xmlns.com/foaf/0.1/age" : "age",
+              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+// Map the JSON-LD to a language-native object
+var person = jsonld.toObject(jsonldString, myMap);
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+"Their
+homepage
+is:
+"
++
+person.homepage);
+</ins></pre><p><ins class="diff-new">
+A
+JSON-LD
+Serializer
+is
+also
+available
+to
+map
+a
+language-native
+object
+to
+JSON-LD.
+</ins></p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-new">
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span><ins class="diff-new">
+};</span>
+</ins></pre><div id="methods-2" class="section"><h4><span class="secno"><ins class="diff-new">
+8.3.3
+</ins></span><ins class="diff-new">
+Methods
+</ins></h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize"><code><ins class="diff-new">
+normalize
+</ins></code></dt><dd><ins class="diff-new">
+Serializes
+a
+language-native
+object
+into
+a
+normalized
+JSON-LD
+string.
+Normalization
+is
+important
+when
+performing
+things
+like
+equality
+comparison
+and
+digital
+signature
+creation
+and
+verification.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+obj
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+An
+associative
+array
+of
+key-value
+pairs
+that
+should
+be
+converted
+to
+a
+JSON-LD
+string.
+It
+is
+assumed
+that
+a
+map
+already
+exists
+for
+the
+data.
+</ins></td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></div></dd></dl></div><h3 id="the-normalization-algorithm"><ins class="diff-new">
+The
+Normalization
+Algorithm
+</ins></h3><p class="issue"><ins class="diff-new">
+This
+algorithm
+is
+very
+rough,
+untested,
+and
+probably
+contains
+many
+bugs.
+Use
+at
+your
+own
+risk.
+It
+will
+change
+in
+the
+coming
+months.
+</ins></p><p><ins class="diff-new">
+The
+JSON-LD
+normalization
+algorithm
+is
+as
+follows:
+</ins></p><ol class="algorithm"><li><ins class="diff-new">
+Remove
+the
+</ins><code><ins class="diff-new">
+#
+</ins></code><ins class="diff-new">
+key
+and
+preserve
+it
+as
+the
+</ins><dfn title="transformation_map" id="dfn-transformation_map"><ins class="diff-new">
+transformation
+map
+</ins></dfn><ins class="diff-new">
+while
+running
+this
+algorithm.
+</ins></li><li><ins class="diff-new">
+For
+each
+key
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+key
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+</ins><a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map"><ins class="diff-new">
+transformation
+map
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+transformed
+key
+is
+an
+IRI,
+ensure
+that
+it
+is
+surrounded
+by
+angle
+brackets.
+</ins></li></ol></li><li><ins class="diff-new">
+For
+each
+value
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+value
+should
+be
+type
+coerced
+per
+the
+</ins><a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map"><ins class="diff-new">
+transformation
+map
+</ins></a>,<ins class="diff-new">
+ensure
+that
+it
+is
+transformed
+to
+the
+new
+value.
+</ins></li><li><ins class="diff-new">
+If
+the
+value
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+</ins><a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map"><ins class="diff-new">
+transformation
+map
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+value
+is
+a
+Typed
+Literal
+and
+the
+type
+is
+a
+CURIE,
+expand
+it
+to
+an
+IRI
+using
+the
+</ins><a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map"><ins class="diff-new">
+transformation
+map
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+final
+value
+is
+an
+IRI,
+ensure
+that
+it
+is
+surrounded
+by
+angle
+brackets.
+</ins></li></ol></li><li><ins class="diff-new">
+Output
+each
+sorted
+key-value
+pair
+without
+any
+extraneous
+whitespace.
+If
+the
+value
+is
+an
+associative
+array,
+perform
+this
+algorithm,
+starting
+at
+step
+#1,
+recursively
+on
+the
+sub-tree.
+</ins></li></ol><p></p><pre class="example"><ins class="diff-new">
+var myObj = { "#" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "#types": {
+                   "age" : "xsd:nonNegativeInteger",
+                   "homepage" : "xsd:anyURI" 
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : 42,
+              "homepage" : "http://example.org/people/joe" };
+// Map the language-native object to JSON-LD
+var
+jsonldText
+=
+jsonld.normalize(myObj);
+</ins></pre><p><ins class="diff-new">
+After
+the
+code
+in
+the
+example
+above
+has
+executed,
+the
+</ins><strong><ins class="diff-new">
+jsonldText
+</ins></strong><ins class="diff-new">
+value
+will
+be
+(line-breaks
+added
+for
+readability):
+</ins></p><pre class="example"><ins class="diff-new">
+{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
+"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
+"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe
+Jackson"}
+</ins></pre></div>
+</div>
+<div class="appendix section" id="acknowledgements">
+<h2>
+<span class="secno">
+A.
+</span>
+Acknowledgements
+</h2>
+<p>
+The
+editor
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+rationale
+and
+reasoning
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+Longley
+who
+reviewed
+and
+provided
+feedback
+on
+the
+overall
+specification
+and
+contexts,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Bradley
+P.
+Allen
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</p>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+B.
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+<del class="diff-old">3
+August
+</del>
+<ins class="diff-chg">26
+October
+</ins>
+2010.
+W3C
+Working
+Draft.
+URL:
+<del class="diff-old">http://www.w3.org/TR/2010/WD-rdfa-core-20100803
+</del>
+<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">
+<ins class="diff-chg">http://www.w3.org/TR/2010/WD-rdfa-core-20101026
+</ins>
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101128/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,1890 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-28-november-2010">Unofficial Draft 28 November 2010</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20101024.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+Developers that embed structured data in their Web pages can choose among
+a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
+and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
+incompatible at the syntax level, can be easily mapped to RDF. JSON has 
+proven to be a highly useful object serialization and messaging format. 
+In an attempt to harmonize the representation of Linked Data in JSON, 
+this specification outlines a common JSON representation format for 
+Linked Data that can be used to represent objects specified via RDFa, 
+Microformats and Microdata.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">2.3 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">2.5 </span>An Example of a Default Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">4. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li></ul></li><li class="tocline"><a href="#advanced-features" class="tocxref"><span class="secno">6. </span>Advanced Features</a><ul class="toc"><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">6.1 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">6.2 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">6.3 </span>Type Coercion</a></li></ul></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">7. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">7.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">7.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">8. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-profiles" class="tocxref"><span class="secno">8.1 </span>Vocabulary Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">8.2 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">8.3 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">8.3.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">8.3.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">8.3.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p class="issue">Write the introduction once all of the technical details
+are hammered out. Explain why JSON-LD is designed as a light-weight mechanism
+to express RDFa, Microformats and Microdata. It is primarily intended as
+a way to express Linked Data in Javascript environments as well as a way to pass
+Linked Data to and from Web services. It is designed to be as simple as 
+possible, utilizing the large number of JSON parsers (and understanding) that
+is out there already. It is designed to be able to express key-value pairs,
+RDF data, Microformats data, and Microdata (that is, every data model
+currently in use) using one unified format. It does not require anyone to change
+their JSON, but easily add meaning by adding context in a way that is 
+out-of-band - it is designed to not disturb already deployed systems running
+on JSON, but provide a smooth migration path from JSON to JSON with added
+semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a tiny memory footprint in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and 
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to write processors for JSON-LD.</li>
+</ul>
+
+<p>
+To understand this specification you must first be familiar with JSON, 
+which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>All comments and discussion takes place on the public mailing list:
+<a href="http://groups.google.com/group/json-ld">json-ld@googlegroups.com
+</a></li>
+
+<li>Specification bugs and issues should be reported in the 
+<a href="http://github.com/digitalbazaar/json-ld/issues">issue tracker</a>.</li>
+
+<li><a href="http://github.com/digitalbazaar/json-ld">Source code</a> for the 
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design-goals-and-rationale" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
+
+<p>The following section outlines the design goals and rationale behind the 
+JSON-LD markup language.
+</p>
+
+<div id="goals" class="section">
+<h3><span class="secno">2.1 </span>Goals</h3>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers don't need to know RDF in order to use the basic functionality
+ provided by JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
+ <dt>Expressiveness</dt>
+ <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable.</dd>
+ <dt>Zero Edits</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers.</dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="map-terms-to-iris" class="section">
+<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
+
+<p>Establishing a mechanism to map JSON values to IRIs will
+help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
+be restrictive in declaring a set of terms, rather, experimentation and 
+innovation should be supported as part of the core design of JSON-LD. There are, 
+however, a number of very small design criterial that can ensure that developers 
+will generate good RDF data that will create value for the greater 
+semantic web community and JSON/REST-based Web Services community.
+</p>
+
+<p>We will be using the following JSON object as the example for this section:
+</p>
+
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+}</pre>
+</div>
+
+<div id="the-default-context" class="section">
+<h3><span class="secno">2.3 </span>The Default Context</h3>
+
+<p>A default context is used in RDFa to allow developers to use keywords
+as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
+above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
+The semantic web, just like the document-based web, uses IRIs for
+unambiguous identification. The idea is that these terms mean something, 
+which you will eventually want to query. The semantic web specifies this via 
+<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
+a Vocabulary Document, and <strong>name</strong> is a term in that 
+vocabulary. Paste the two items together and you have an unambiguous identifier
+for a term.
+</p>
+
+<p>Developers, and machines, would be able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much
+like we can use WordNet today to see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Machines need the same sort of 
+dictionary of terms, and URIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>Non-prefixed terms should have term mappings declared in the default
+context so that they may be expanded later.</p>
+            
+<p>If a set of terms, like <strong>Person</strong>, 
+<strong>name</strong>, and <strong>homepage</strong>,
+are pre-defined in the default context, and that context is used to resolve the
+names in JSON objects, machines could automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
+}</pre>
+
+<p class="note">In order to differentiate between plain text and IRIs, the
+<strong><</strong> and <strong>></strong> are used around IRIs.</p>
+
+<p>Doing this would mean that JSON would start to become unambiguously
+machine-readable, play well with the semantic web, and basic markup wouldn't 
+be that much more complex than basic JSON markup. A win, all around.</p>
+</div>
+
+<div id="mashing-up-vocabularies" class="section">
+<h3><span class="secno">2.4 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
+default context beside the <em>terms</em> that are already defined. Using
+this feature, developers could also express markup like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">&lt;foaf:Person&gt;</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+default context in-line using the <code>#</code> character, like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "&lt;foaf:Person&gt;",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+  "myvocab:credits": 500</span>
+}</pre>
+
+<p>Think of the <code>#</code> character as a "<strong>hash</strong>table", 
+which maps one
+string to another string. In the example above, the <code>myvocab</code>
+string is replaced with "<code>http://example.org/myvocab#</code>" when it
+is detected above. In the example above, "<code>myvocab:credits</code>" would
+expand to "<code>http://example.org/myvocab#credits</code>".</p>
+
+<p>This mechanism is a short-hand for RDF, and if defined, will give
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div id="an-example-of-a-default-context" class="section">
+<h3><span class="secno">2.5 </span>An Example of a Default Context</h3>
+
+<p>JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> define a default context. For example, the
+following default context could apply to all incoming Web Service calls
+previously accepting only JSON data:</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+    "#vocab": "http://example.org/default-vocab#",
+    "#base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+  }
+}</pre>
+
+<p>The <code>#vocab</code> string is a special keyword that states 
+that any term that doesn't resolve to a term or a prefix should be 
+appended to the <code>#vocab</code> IRI. This is done to ensure that 
+terms can be transformed to an IRI at all times.
+</p>
+
+<p>The <code>#base</code> string is a special keyword that states 
+that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
+<code>#base</code>.
+</p>
+</div>
+</div>
+
+<div id="markup-examples" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">3.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+[
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+ }
+]</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">3.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">3.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+]</pre>
+</div>
+</div>
+
+<div id="the-json-ld-processing-algorithm" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>The JSON-LD Processing Algorithm</h2>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The Processing Algorithm is a work in progress, there are
+still major bugs in the algorithm and it's difficult to follow. It's provided
+only to very early implementers to give them an idea of how to implement a
+processor.</p>
+
+<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
+<ul>
+<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
+JSON-LD processing algorithm before processing begins.</li>
+<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
+generated by JSON-LD markup.</li>
+<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
+processor should use when generating triples.</li>
+<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
+CURIEs while the processing algorithm is running. The 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
+associative-array level, specified via the <code>#</code> key.</li>
+<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
+yet to have their subject set.</li>
+<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
+processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
+current associative-array is detected.</li>
+<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
+the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
+<a class="tref" title="current_property">current property</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+</li></ul>
+
+<h4 id="processing-tokens-and-keywords">Processing Tokens and Keywords</h4>
+<ul>
+<li><code>#</code> - Used to set the active context.</li>
+<li><code>#base</code> - Used to set the base IRI for all object IRIs affected 
+by the active context.</li>
+<li><code>#vocab</code> - Used to set the base IRI for all property IRIs
+affected by the active context.</li>
+<li><code>#types</code> - Used to specify type coercion.</li>
+<li><code><</code> and <code>></code> - Used to express IRIs in
+JSON values.</li>
+<li><code>:</code> - The separator for CURIEs when used in JSON keys or
+JSON values.</li>
+<li><code>@</code> - Sets the active subjects.</li>
+<li><code>a</code> - Used to set the rdf:type of the active subjects.</li>
+<li><code>\</code> - Used as an escape character to escape all the special
+tokens and keywords.</li>
+<li><code>^^</code> - Used to express the data type for Typed Literals.</li>
+</ul>
+
+<p>The algorithm below is designed for streaming (SAX-based) implementations.
+Implementers will find that non-streaming (document-based) implementations will
+be much easier to implement as full access to the JSON object model eliminates 
+some of the steps that are necessary for streaming implementations. A conforming
+JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
+same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
+
+<ol class="algorithm">
+<li id="processing-step-default-context">If a <a class="tref internalDFN" title="default_context" href="#dfn-default_context">default context</a> is 
+supplied to the
+processing algorithm, push it onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+
+<li id="processing-step-associative">If an associative array is 
+detected, create a new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
+the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
+key-value pair in the associative array, using the newly created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
+
+  <ol class="algorithm">
+
+    <li>If a <code>#</code> key is found, the processor
+    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
+    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
+    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. 
+    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
+    starting at <a href="#processing-subject">Step 2.2</a>.</li>
+
+    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not been detected, the current
+    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
+    and processing proceeds to the next key-value pair. Otherwise, if the
+    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
+
+    <ol class="algorithm">
+
+      <li id="processing-subject">If a <code>@</code> key is found, the 
+      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> has been performed.
+
+      <ol class="algorithm">
+        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
+        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
+        </li>
+ 
+        <li>If there are any triples in the 
+        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
+        </li>
+      </ol>
+
+      </li>
+
+      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
+      </li>
+
+      <li>If a key that is not <code>#</code>, 
+      <code>@</code>, or <code>a</code> is found, set the 
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
+      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
+      </li>
+
+      <li>If the value is not an array, set the 
+      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
+      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
+
+      <li>If the value is an associative array, then
+      process the value starting at 
+      <a href="#processing-step-associative">Step 2</a>.</li>
+
+      <li>If the value is a regular array, then process the value 
+      starting at 
+      <a href="#processing-step-array">Step 3</a> ensuring that
+      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
+      
+      <ol class="algorithm">
+        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
+
+        <li>Complete any previously incomplete triples by running all substeps 
+        of <a href="#processing-subject">Step 2.2.1</a>.
+        </li>
+      </ol>
+
+      </li><li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
+      <a href="#processing-associative">Step 2.2</a>
+      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+     </li></ol>
+    </ol>
+  </li>
+
+  <li id="processing-step-array">If a regular array is detected, 
+  process each value in the array by doing the following:
+
+    <ol class="algorithm">
+      <li>If the value is an associative array, processes per 
+      <a href="#processing-step-associative">Step 2</a>, ensuring to set
+      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
+      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
+      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
+      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
+      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
+      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
+
+      <li>If the value is a regular array, should we support RDF 
+      List/Sequence Processing? 
+      <div class="issue">If the value is a regular array, should we support 
+      RDF List/Sequence generation of triples? For example, would implementing
+      this be worth the more complex processing rules: "ex:orderedItems" : 
+      [["one", "two", "three"]]</div></li>
+    </ol>
+  </li>
+</ol>
+
+</div>
+
+<div id="markup-of-rdf-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
+
+<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked up
+in a way that is simple to understand and author by Web developers. In many
+cases, Javascript objects can become Linked Data with the simple addition
+of a context. Since RDF is also an important sub-community of the Linked
+Data movement, it is important that all RDF concepts are well-represented
+in this specification. This section details how each RDF concept can be
+expressed in JSON-LD.</p>
+
+<p class="issue">The current specification relies on microsyntaxes to 
+express things like IRIs, typed literals and CURIEs. There is a small amount
+of debate on whether or not to use full-blown JSON objects containing things
+like "value" and "datatype". The original authors of the JSON-LD specification
+feel that microsyntaxes allow a much simpler, less error-prone structure in 
+the JSON-LD objects. Proponents of the verbose mechanism assert that there
+would be less chance of data markup issues concerning proper escaping and 
+that the objects, while more verbose, would be easier to work with within
+JavaScript environments. Feedback on this issue would be appreciated.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">5.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
+and many objects are identified. IRIs can be expressed by wrapping a
+text string with the <code><</code> and <code>></code> characters.
+</p>
+
+<pre class="example">
+{
+...
+  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}</pre>
+
+<p>The example above would set the object to an IRI with the value of
+<code>http://manu.sporny.org</code>.
+</p>
+
+<p>As a general rule, all CURIEs and IRIs <em class="rfc2119" title="may">may</em> be wrapped in <code><</code> 
+and <code>></code> characters. This is to ensure that there is a simple, 
+consistent rule that can be followed when authoring JSON-LD data. There 
+are, however, several instances where angle brackets <em class="rfc2119" title="may">may</em> be omitted, 
+without introducing ambiguity, to ease authoring burden. These instances 
+are:
+
+</p><ul>
+<li>When specifying the subject IRI using <code>@</code>.</li>
+<li>When specifying the RDF type IRI using <code>a</code>.</li>
+<li>Any CURIE in the key portion of a JSON associative array.</li>
+</ul>
+
+Wrapping IRIs with the <code><</code> and <code>></code> 
+characters are only mandatory when IRIs are specified as values in the
+JSON key-value pairs.<p></p>
+
+<p>To further illustrate, the following example omissions of the 
+<code><</code> and <code>></code> characters are allowed:
+</p>
+
+<pre class="example">
+{
+...
+  "@": "<span class="diff">&lt;</span>http://manu.sporny.org/about#manu<span class="diff">&gt;</span>",
+  // CURIE/IRI when specifying the subject can be minimized.
+  "@": "http://manu.sporny.org/about#manu",
+...
+  "a": "<span class="diff">&lt;</span>foaf:Person<span class="diff">&gt;</span>",
+  // CURIE/IRI when specifying the type of an object can be minimized.
+  "a": "foaf:Person",
+...
+  "<span class="diff">&lt;</span>foaf:homepage<span class="diff">&gt;</span>": "&lt;http://manu.sporny.org&gt;",
+  // CURIE/IRI when specifying a property can be minimized.
+  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
+...
+}</pre>
+
+<p>At all other times, CURIEs and IRIs <em class="rfc2119" title="must">must</em> be wrapped with the 
+<code><</code> and <code>></code> characters.</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
+
+<p>A subject is declared using the <code>@</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, predicate, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to the IRI 
+<code>http://example.org/people#joebob</code>.
+</p>
+
+<p>Note that subject do not need to be wrapped in angle brackets. The following
+example is valid JSON-LD markup:</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+...
+}</pre>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">5.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the <code>a</code>
+key. Specifying the type in this way will generate a triple of the form 
+(subject, type, type-url).</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple 
+(in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Note that the type IRI does not need to be wrapped in angle brackets. 
+The following example is valid JSON-LD markup:</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "a": "http://xmlns.com/foaf/0.1/Person",
+...
+}</pre>
+
+</div>
+
+<div id="plain-literals" class="section">
+<h3><span class="secno">5.4 </span>Plain Literals</h3>
+
+<p>Regular text strings are called "plain literals" in RDF and are easily
+expressed using regular JSON strings.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="language-specification-in-plain-literals" class="section">
+<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
+
+<p>JSON-LD attempts to make sure that it is easy to express triples in other
+languages while simultaneously ensuring that hefty data structures 
+aren't required to accomplish simple language markup. When the 
+<code>@</code> symbol is used in a literal, the JSON-LD processor tags
+the literal text with the language tag that follows the <code>@</code>
+symbol.
+</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">花澄@ja</span>",
+...
+}</pre>
+
+<p>The example above would generate a plain literal for <em>花澄</em> and
+associate the <code>ja</code> language tag with the triple that is
+generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="typed-literals" class="section">
+<h3><span class="secno">5.6 </span>Typed Literals</h3>
+
+<p>Literals may also be typed in JSON-LD by using the <code>^^</code>
+sequence at the end of the text string.</p>
+
+<pre class="example">
+{
+...
+  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}</pre>
+
+<p>The example above would generate an object with the value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+arrays. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an array.</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "stu" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "groknar" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "radface" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple typed literals are expressed very much in the same way as 
+multiple properties:</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="blank-nodes" class="section">
+<h3><span class="secno">5.9 </span>Blank Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this is where blank nodes come
+into play. In JSON-LD, blank node identifiers are automatically created if a 
+subject is not specified using the <code>@</code> key. However, authors may
+name blank nodes by using the special <code>_</code> CURIE prefix.</p>
+
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+named blank node.
+</p>
+
+</div>
+
+</div>
+
+<div id="advanced-features" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>Advanced Features</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality provided by RDF. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="escape-character" class="section">
+<h3><span class="secno">6.1 </span>Escape Character</h3>
+
+<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
+interpreted as CURIEs, IRIs, language tags, or TypedLiterals.</p>
+
+<p>The special characters that need to be escaped in property values are: 
+<code><</code> (at the beginning of a string), 
+<code>></code> (at the end of a string), <code>@</code>, 
+and <code>^</code>.</p>
+
+<pre class="example">
+{
+...
+  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}</pre>
+
+</div>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">6.2 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as decimals, 
+integers and boolean values, JSON-LD utilizes that information to create 
+<a href="#typed-literals">Typed Literals</a>.</p>
+
+<pre class="example">
+{
+...
+  // This value is automatically converted to having a type of xsd:decimal
+  "measure:cups": <span class="diff">5.3</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">6.3 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
+JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
+coerce and incoming or outgoing types to the proper RDF type based on a
+mapping of type IRIs to RDF types. Using type conversion, one may convert
+simple JSON data to properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to 
+plain literals, typed literals and IRIs.</p>
+
+<pre class="example">
+{
+  "#": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "#types":
+     {
+        "name": "rdf:PlainLiteral",
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }</span>
+  },
+  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "&lt;John Smith&gt;" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+</div>
+
+<div id="best-practices" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">7. </span>Best Practices</h2>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be 
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<div id="javascript" class="section">
+<h3><span class="secno">7.1 </span>JavaScript</h3>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in 
+JavaScript environments, however, features like IRIs requiring angled
+brackets in JSON-LD means that using JSON-LD directly in JavaScript is going
+to be annoying without a middleware layer such as a simple library that 
+strips JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDFa API, which would enable a triple-store in the 
+browser, but some don't want to require that level of functionality just to use 
+JSON-LD. The group is still discussing the best way to proceed, so input
+on how JSON-LD could more easily be utilized in JavaScript environments
+would be very much appreciated.
+</p>
+</div>
+
+<div id="schema-less-databases" class="section">
+<h3><span class="secno">7.2 </span>Schema-less Databases</h3>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from 
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">8. </span>Advanced Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear whether
+or not the JSON-LD specification is going to support the complexity necessary
+to support each concept. The entire section on Advanced Concepts should be
+taken with a grain of salt; it is merely a list of possibilities where all
+of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="vocabulary-profiles" class="section">
+<h3><span class="secno">8.1 </span>Vocabulary Profiles</h3>
+
+<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
+a collection of prefixes and terms that can be re-used by a processor to simplfy
+markup. JSON-LD provides a similar mechanism called Vocabulary Profiles, which is 
+the inclusion of a context external to the JSON-LD document.</p>
+
+<p>The example below demonstrates how one may specify an external Vocabulary
+Profile. Assume the following profile exists at this imaginary URL:
+<code>http://example.org/profiles/contacts</code>.</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}</pre>
+
+<p>The profile listed above can be used in the following way:</p>
+
+<pre class="example">
+{
+  "#": { "#profile": "http://example.org/profiles/contacts" },
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">8.2 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an array to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single JSON-LD associative
+array.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+  "@": 
+  [
+    {
+      "@": "&lt;http://example.org/people#john&gt;",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "&lt;http://example.org/people#jane&gt;",
+      "a": "foaf:Person"
+    }
+  ]
+}</pre>
+
+</div>
+
+<div id="the-json-ld-api" class="section">
+<h3><span class="secno">8.3 </span>The JSON-LD API</h3>
+
+<p>This API provides a clean mechanism that enables developers to convert 
+JSON-LD data into a format that is easier to work with in various programming
+languages.
+</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDParser">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDParser</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span>   <span class="idlMethName"><a href="#widl-JSONLDParser-toObject">toObject</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">map</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>RDFGraph</a></span> <span class="idlMethName"><a href="#widl-JSONLDParser-toRDFGraph">toRDFGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+};</span>
+</pre><div id="methods" class="section"><h4><span class="secno">8.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDParser-toObject"><code>toObject</code></dt><dd>Parses JSON-LD text into an object that allows at least attribute-based
+  or key-based access to the data. If the contents are a disjoint graph, an
+  array of objects are returned. If there are any errors, <code>null</code> 
+  is returned.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the return object.</td></tr><tr><td class="prmName">map</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The map from IRIs to attribute names for the resulting object. Any
+     term mapping that is not mentioned in the map will not be available in the 
+     resulting object. You <em class="rfc2119" title="may">may</em> map <code>rdf:type</code> using the 
+     <code>a</code> key or the <code>rdf:type</code> IRI. You <em class="rfc2119" title="may">may</em> map the 
+     subject by using the <code>@</code> key.
+     </td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">An associative-array of processing options to enable or disable when 
+     processing the JSON-LD string. A conforming JSON-LD processor <em class="rfc2119" title="must">must</em> support 
+     the following options:
+     <dl>
+       <dt>indexBySubject</dt>
+       <dd>If set to true, the returned object will be indexed by subject.</dd>
+       <dt>preserveDatatypes</dt>
+       <dd>If set to true, preserves the datatype for object literals.</dd>
+       <dt>preserveLanguage</dt>
+       <dd>If set to true, preserves the languages for object literals.</dd>
+     </dl>
+     </td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDParser-toRDFGraph"><code>toRDFGraph</code></dt><dd>Parses JSON-LD and transforms the data into an RDFGraph, which is 
+  compatible with the RDFa API specification. This method will return
+  <code>null</code> if there are any errors, or if the RDFa API is not
+  available for use.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>RDFGraph</a></code></div></dd></dl></div>
+
+<p>The JSONLDParserCallback is called whenever a processing error occurs on
+input data.</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDParserCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDParserCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDParserCallback-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre><div id="methods-1" class="section"><h4><span class="secno">8.3.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDParserCallback-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+
+<p>The following example demonstrates how to convert JSON-LD to a JSON object
+that is directly usable in a programming environment:
+</p>
+
+<pre class="example">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
+              "http://xmlns.com/foaf/0.1/age" : "age",
+              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+
+// Map the JSON-LD to a language-native object
+var person = jsonld.toObject(jsonldString, myMap);
+
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+      "Their homepage is: " + person.homepage);</pre>
+
+<p>A JSON-LD Serializer is also available to map a language-native object
+to JSON-LD.
+
+</p><pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
+};</span>
+</pre><div id="methods-2" class="section"><h4><span class="secno">8.3.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
+  Normalization is important when performing things like equality comparison
+  and digital signature creation and verification.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An associative array of key-value pairs that should be converted
+     to a JSON-LD string. It is assumed that a map already exists for the
+     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
+
+<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
+
+<p class="issue">This algorithm is very rough, untested, and probably contains
+many bugs. Use at your own risk. It will change in the coming months.</p>
+
+<p>The JSON-LD normalization algorithm is as follows:
+
+</p><ol class="algorithm">
+<li>Remove the <code>#</code> key and preserve it as the 
+<dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
+<li>For each key
+ <ol class="algorithm">
+  <li>If the key is a CURIE, expand the CURIE to an IRI using the
+      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+  <li>If the transformed key is an IRI, ensure that it is surrounded by 
+      angle brackets.</li>
+ </ol>
+</li>
+<li>For each value
+ <ol class="algorithm">
+  <li>If the value should be type coerced per the 
+      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
+      new value.</li>
+  <li>If the value is a CURIE, expand the CURIE to an IRI using the
+      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+  <li>If the value is a Typed Literal and the type is a CURIE,
+      expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+  <li>If the final value is an IRI, ensure that it is surrounded by angle 
+      brackets.</li>
+ </ol>
+</li><li>Output each sorted key-value pair without any extraneous whitespace. If 
+the value is an associative array, perform this algorithm, starting
+at step #1, recursively on the sub-tree.</li>
+
+</ol>
+
+<p></p>
+
+<pre class="example">
+var myObj = { "#" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "#types": {
+                   "age" : "xsd:nonNegativeInteger",
+                   "homepage" : "xsd:anyURI" 
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : 42,
+              "homepage" : "http://example.org/people/joe" };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);</pre>
+
+<p>After the code in the example above has executed, the 
+<strong>jsonldText</strong> value will be (line-breaks added for 
+readability):</p>
+
+<pre class="example">
+{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
+"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
+"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe Jackson"}</pre>
+
+</div>
+
+</div>
+
+
+
+<div class="appendix section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Acknowledgements</h2>
+
+<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
+rationale and reasoning behind the JSON-LD work via his work on RDFj, 
+Dave Longley who reviewed and provided feedback on the overall 
+specification and contexts, and Ian Davis, who created RDF/JSON. Thanks also
+to Bradley P. Allen and Richard Cyganiak for their input on the 
+specification.</p>
+</div>
+
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>26 October 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">http://www.w3.org/TR/2010/WD-rdfa-core-20101026</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20101128/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110201/diff-20101128.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,8226 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+-
+Linked
+Data
+Expression
+in
+JSON
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+Linked
+Data
+</h2>
+<h2 id="unofficial-draft-01-february-2011">
+Unofficial
+Draft
+<del class="diff-old">28
+November
+2010
+</del>
+<ins class="diff-chg">01
+February
+2011
+</ins>
+</h2>
+<dl>
+<dt>
+Editor:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+</dl>
+<del class="diff-old">This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+diff
+to
+previous
+version
+.
+</del>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+Developers
+that
+embed
+structured
+data
+in
+their
+Web
+pages
+can
+choose
+among
+a
+number
+of
+languages
+such
+as
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+],
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+Each
+of
+these
+structured
+data
+languages,
+while
+incompatible
+at
+the
+syntax
+level,
+can
+be
+easily
+mapped
+to
+RDF.
+JSON
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+Linked
+Data
+that
+can
+be
+used
+to
+represent
+objects
+specified
+via
+RDFa,
+Microformats
+and
+Microdata.
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design-goals-and-rationale" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Goals
+</a>
+</li>
+<li class="tocline">
+<a href="#map-terms-to-iris" class="tocxref">
+<span class="secno">
+2.2
+</span>
+Map
+Terms
+to
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-default-context" class="tocxref">
+<span class="secno">
+2.3
+</span>
+The
+Default
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#mashing-up-vocabularies" class="tocxref">
+<span class="secno">
+2.4
+</span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#an-example-of-a-default-context" class="tocxref">
+<span class="secno">
+2.5
+</span>
+An
+Example
+of
+a
+Default
+Context
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+3.
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+3.1
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+3.2
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+3.3
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-processing-algorithm" class="tocxref">
+<span class="secno">
+4.
+</span>
+The
+JSON-LD
+Processing
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#markup-of-rdf-concepts" class="tocxref">
+<span class="secno">
+5.
+</span>
+Markup
+of
+RDF
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+5.1
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+5.2
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+5.3
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#plain-literals" class="tocxref">
+<span class="secno">
+5.4
+</span>
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#language-specification-in-plain-literals" class="tocxref">
+<span class="secno">
+5.5
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#typed-literals" class="tocxref">
+<span class="secno">
+5.6
+</span>
+Typed
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+5.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+5.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#blank-nodes" class="tocxref">
+<span class="secno">
+5.9
+</span>
+Blank
+Nodes
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-features" class="tocxref">
+<span class="secno">
+6.
+</span>
+Advanced
+Features
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#escape-character" class="tocxref">
+<span class="secno">
+6.1
+</span>
+Escape
+Character
+</a>
+</li>
+<li class="tocline">
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+6.2
+</span>
+Automatic
+Typing
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+6.3
+</span>
+Type
+Coercion
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#best-practices" class="tocxref">
+<span class="secno">
+7.
+</span>
+Best
+Practices
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#javascript" class="tocxref">
+<span class="secno">
+7.1
+</span>
+JavaScript
+</a>
+</li>
+<li class="tocline">
+<a href="#schema-less-databases" class="tocxref">
+<span class="secno">
+7.2
+</span>
+Schema-less
+Databases
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+8.
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#vocabulary-profiles" class="tocxref">
+<span class="secno">
+8.1
+</span>
+Vocabulary
+Profiles
+</a>
+</li>
+<li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+8.2
+</span>
+Disjoint
+Graphs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-api" class="tocxref">
+<span class="secno">
+8.3
+</span>
+The
+JSON-LD
+API
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods" class="tocxref">
+<span class="secno">
+8.3.1
+</span>
+Methods
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-1" class="tocxref">
+<span class="secno">
+8.3.2
+</span>
+Methods
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-2" class="tocxref">
+<span class="secno">
+8.3.3
+</span>
+Methods
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+A.
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+B.
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p class="issue">
+Write
+the
+introduction
+once
+all
+of
+the
+technical
+details
+are
+hammered
+out.
+Explain
+why
+JSON-LD
+is
+designed
+as
+a
+light-weight
+mechanism
+to
+express
+RDFa,
+Microformats
+and
+Microdata.
+It
+is
+primarily
+intended
+as
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+environments
+as
+well
+as
+a
+way
+to
+pass
+Linked
+Data
+to
+and
+from
+Web
+services.
+It
+is
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+(and
+understanding)
+that
+is
+out
+there
+already.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+Microformats
+data,
+and
+Microdata
+(that
+is,
+every
+data
+model
+currently
+in
+use)
+using
+one
+unified
+format.
+It
+does
+not
+require
+anyone
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+out-of-band
+-
+it
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+tiny
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+write
+processors
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+and
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+All
+comments
+and
+discussion
+takes
+place
+on
+the
+public
+mailing
+list:
+<a href="http://groups.google.com/group/json-ld">
+json-ld@googlegroups.com
+</a>
+</li>
+<li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="http://github.com/digitalbazaar/json-ld/issues">
+issue
+tracker
+</a>.
+</li>
+<li>
+<a href="http://github.com/digitalbazaar/json-ld">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=#json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+</div>
+</div>
+<div id="design-goals-and-rationale" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="goals" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+Goals
+</h3>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+don't
+need
+to
+know
+RDF
+in
+order
+to
+use
+the
+basic
+functionality
+provided
+by
+JSON-LD.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+should
+be
+100%
+compatible
+with
+JSON.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+All
+major
+RDF
+concepts
+must
+be
+expressible
+via
+the
+JSON-LD
+syntax.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable.
+</dd>
+<dt>
+Zero
+Edits
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<div id="map-terms-to-iris" class="section">
+<h3>
+<span class="secno">
+2.2
+</span>
+Map
+Terms
+to
+IRIs
+</h3>
+<p>
+Establishing
+a
+mechanism
+to
+map
+JSON
+values
+to
+IRIs
+will
+help
+in
+the
+mapping
+of
+JSON
+objects
+to
+RDF.
+This
+does
+not
+mean
+that
+JSON-LD
+must
+be
+restrictive
+in
+declaring
+a
+set
+of
+terms,
+rather,
+experimentation
+and
+innovation
+should
+be
+supported
+as
+part
+of
+the
+core
+design
+of
+JSON-LD.
+There
+are,
+however,
+a
+number
+of
+very
+small
+design
+criterial
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+RDF
+data
+that
+will
+create
+value
+for
+the
+greater
+semantic
+web
+community
+and
+JSON/REST-based
+Web
+Services
+community.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+object
+as
+the
+example
+for
+this
+section:
+</p>
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+}
+</pre>
+</div>
+<div id="the-default-context" class="section">
+<h3>
+<span class="secno">
+2.3
+</span>
+The
+Default
+Context
+</h3>
+<p>
+A
+default
+context
+is
+used
+in
+RDFa
+to
+allow
+developers
+to
+use
+keywords
+as
+aliases
+for
+IRIs.
+So,
+for
+instance,
+the
+keyword
+<strong>
+name
+</strong>
+above
+could
+refer
+to
+the
+IRI
+<em>
+http://xmlns.com/foaf/0.1/name
+</em>.
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+terms
+mean
+something,
+which
+you
+will
+eventually
+want
+to
+query.
+The
+semantic
+web
+specifies
+this
+via
+<em>
+Vocabulary
+Documents
+</em>.
+The
+IRI
+<em>
+http://xmlns.com/foaf/0.1/
+</em>
+specifies
+a
+Vocabulary
+Document,
+and
+<strong>
+name
+</strong>
+is
+a
+term
+in
+that
+vocabulary.
+Paste
+the
+two
+items
+together
+and
+you
+have
+an
+unambiguous
+identifier
+for
+a
+term.
+</p>
+<p>
+Developers,
+and
+machines,
+would
+be
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+Machines
+need
+the
+same
+sort
+of
+dictionary
+of
+terms,
+and
+URIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+Non-prefixed
+terms
+should
+have
+term
+mappings
+declared
+in
+the
+default
+context
+so
+that
+they
+may
+be
+expanded
+later.
+</p>
+<p>
+If
+a
+set
+of
+terms,
+like
+<strong>
+Person
+</strong>,
+<strong>
+name
+</strong>,
+and
+<strong>
+homepage
+</strong>,
+are
+pre-defined
+in
+the
+default
+context,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+JSON
+objects,
+machines
+could
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
+}
+</pre>
+<p class="note">
+In
+order
+to
+differentiate
+between
+plain
+text
+and
+IRIs,
+the
+<strong>
+<
+</strong> and <strong>
+>
+</strong>
+are
+used
+around
+IRIs.
+</p>
+<p>
+Doing
+this
+would
+mean
+that
+JSON
+would
+start
+to
+become
+unambiguously
+machine-readable,
+play
+well
+with
+the
+semantic
+web,
+and
+basic
+markup
+wouldn't
+be
+that
+much
+more
+complex
+than
+basic
+JSON
+markup.
+A
+win,
+all
+around.
+</p>
+</div>
+<div id="mashing-up-vocabularies" class="section">
+<h3>
+<span class="secno">
+2.4
+</span>
+Mashing
+Up
+Vocabularies
+</h3>
+<p>
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</p>
+<ul>
+<li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+A
+JSON-LD
+Web
+Service
+could
+define
+these
+as
+<em>
+prefix
+</em>
+es
+in
+their
+default
+context
+beside
+the
+<em>
+terms
+</em>
+that
+are
+already
+defined.
+Using
+this
+feature,
+developers
+could
+also
+express
+markup
+like
+this:
+</p>
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">&lt;foaf:Person&gt;</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
+}
+</pre>
+<p>
+Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+default
+context
+in-line
+using
+the
+<code>
+#
+</code>
+character,
+like
+so:
+</p>
+<pre class="example">
+{
+  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "&lt;foaf:Person&gt;",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+  "myvocab:credits": 500</span>
+}
+</pre>
+<p>
+Think
+of
+the
+<code>
+#
+</code>
+character
+as
+a
+"
+<strong>
+hash
+</strong>
+table",
+which
+maps
+one
+string
+to
+another
+string.
+In
+the
+example
+above,
+the
+<code>
+myvocab
+</code>
+string
+is
+replaced
+with
+"
+<code>
+http://example.org/myvocab#
+</code>
+"
+when
+it
+is
+detected
+above.
+In
+the
+example
+above,
+"
+<code>
+myvocab:credits
+</code>
+"
+would
+expand
+to
+"
+<code>
+http://example.org/myvocab#credits
+</code>
+".
+</p>
+<p>
+This
+mechanism
+is
+a
+short-hand
+for
+RDF,
+and
+if
+defined,
+will
+give
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</p>
+<p>
+</p>
+</div>
+<div id="an-example-of-a-default-context" class="section">
+<h3>
+<span class="secno">
+2.5
+</span>
+An
+Example
+of
+a
+Default
+Context
+</h3>
+<p>
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+A
+JSON-LD
+aware
+Web
+Service
+<em class="rfc2119" title="may">
+may
+</em>
+define
+a
+default
+context.
+For
+example,
+the
+following
+default
+context
+could
+apply
+to
+all
+incoming
+Web
+Service
+calls
+previously
+accepting
+only
+JSON
+data:
+</p>
+<pre class="example">
+{
+  "#": 
+  {
+    "#vocab": "http://example.org/default-vocab#",
+    "#base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+  }
+}
+</pre>
+<p>
+The
+<code>
+#vocab
+</code>
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+term
+that
+doesn't
+resolve
+to
+a
+term
+or
+a
+prefix
+should
+be
+appended
+to
+the
+<code>
+#vocab
+</code>
+IRI.
+This
+is
+done
+to
+ensure
+that
+terms
+can
+be
+transformed
+to
+an
+IRI
+at
+all
+times.
+</p>
+<p>
+The
+<code>
+#base
+</code>
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+relative
+IRI
+<em class="rfc2119" title="must">
+must
+</em>
+be
+appended
+to
+the
+string
+specified
+by
+<code>
+#base
+</code>.
+</p>
+</div>
+</div>
+<div id="markup-examples" class="section">
+<h2>
+<span class="secno">
+3.
+</span>
+Markup
+Examples
+</h2>
+<p>
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</p>
+<div id="rdfa" class="section">
+<h3>
+<span class="secno">
+3.1
+</span>
+RDFa
+</h3>
+<p>
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</p>
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</pre>
+<p>
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</p>
+<pre class="example">
+[
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+ }
+]
+</pre>
+</div>
+<div id="microformats" class="section">
+<h3>
+<span class="secno">
+3.2
+</span>
+Microformats
+</h3>
+<p>
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</p>
+<pre class="example">
+&lt;div class="vcard"&gt;
+<del class="diff-old"> &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+</del>
+<ins class="diff-chg"> &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+</ins>
+&lt;/div&gt;
+</pre>
+<p>
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+<code>
+url
+</code>
+and
+<code>
+fn
+</code>
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+<code>
+http://tantek.com
+</code>.
+</p>
+<pre class="example">
+{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+<del class="diff-old">  "fn": "Tantek Çelik"
+</del>
+<ins class="diff-chg">  "fn": "Tantek Çelik"
+</ins>
+}
+</pre>
+</div>
+<div id="microdata" class="section">
+<h3>
+<span class="secno">
+3.3
+</span>
+Microdata
+</h3>
+<p>
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</p>
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</pre>
+<p>
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</p>
+<pre class="example">
+[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+]
+</pre>
+</div>
+</div>
+<div id="the-json-ld-processing-algorithm" class="section">
+<h2>
+<span class="secno">
+4.
+</span>
+The
+JSON-LD
+Processing
+Algorithm
+</h2>
+<p>
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<p class="issue">
+The
+Processing
+Algorithm
+is
+a
+work
+in
+progress,
+there
+are
+still
+major
+bugs
+in
+the
+algorithm
+and
+it's
+difficult
+to
+follow.
+It's
+provided
+only
+to
+very
+early
+implementers
+to
+give
+them
+an
+idea
+of
+how
+to
+implement
+a
+processor.
+</p>
+<h4 id="processing-algorithm-terms">
+Processing
+Algorithm
+Terms
+</h4>
+<ul>
+<li>
+<dfn title="default_context" id="dfn-default_context">
+default
+context
+</dfn>
+-
+a
+context
+that
+is
+specified
+to
+the
+JSON-LD
+processing
+algorithm
+before
+processing
+begins.
+</li>
+<li>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+-
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</li>
+<li>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+-
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="inherited_subject" id="dfn-inherited_subject">
+inherited
+subject
+</dfn>
+-
+a
+subject
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+<a class="tref" title="current_subject">
+current
+subject
+</a>
+is
+discovered
+or
+generated.
+</li>
+<li>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+-
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="inherited_property" id="dfn-inherited_property">
+inherited
+property
+</dfn>
+-
+a
+property
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+<a class="tref" title="current_subject">
+current
+subject
+</a>
+is
+discovered
+or
+generated.
+</li>
+<li>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+-
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+-
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+top-most
+item
+on
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+</li>
+<li>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+-
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+<code>
+#
+</code>
+key.
+</li>
+<li>
+<dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</dfn>
+-
+A
+list
+of
+triples
+that
+have
+yet
+to
+have
+their
+subject
+set.
+</li>
+<li>
+<dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</dfn>
+-
+A
+list
+of
+objects
+that
+cannot
+be
+processed
+until
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+detected
+or
+the
+end
+of
+the
+current
+associative-array
+is
+detected.
+</li>
+<li>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+-
+the
+processor
+state,
+which
+includes
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack,
+<a class="tref" title="current_subject">
+current
+subject
+</a>,
+<a class="tref" title="current_property">
+current
+property
+</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</a>,
+and
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>.
+</li>
+</ul>
+<h4 id="processing-tokens-and-keywords">
+Processing
+Tokens
+and
+Keywords
+</h4>
+<ul>
+<li>
+<code>
+#
+</code>
+-
+Used
+to
+set
+the
+active
+context.
+</li>
+<li>
+<code>
+#base
+</code>
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+active
+context.
+</li>
+<li>
+<code>
+#vocab
+</code>
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+active
+context.
+</li>
+<li>
+<code>
+#types
+</code>
+-
+Used
+to
+specify
+type
+coercion.
+</li>
+<li>
+<code>
+<
+</code> and <code>
+>
+</code>
+-
+Used
+to
+express
+IRIs
+in
+JSON
+values.
+</li>
+<li>
+<code>:
+</code>
+-
+The
+separator
+for
+CURIEs
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+</li>
+<li>
+<code>
+@
+</code>
+-
+Sets
+the
+active
+subjects.
+</li>
+<li>
+<code>
+a
+</code>
+-
+Used
+to
+set
+the
+rdf:type
+of
+the
+active
+subjects.
+</li>
+<li>
+<code>
+\
+</code>
+-
+Used
+as
+an
+escape
+character
+to
+escape
+all
+the
+special
+tokens
+and
+keywords.
+</li>
+<li>
+<code>
+^^
+</code>
+-
+Used
+to
+express
+the
+data
+type
+for
+Typed
+Literals.
+</li>
+</ul>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+streaming
+(SAX-based)
+implementations.
+Implementers
+will
+find
+that
+non-streaming
+(document-based)
+implementations
+will
+be
+much
+easier
+to
+implement
+as
+full
+access
+to
+the
+JSON
+object
+model
+eliminates
+some
+of
+the
+steps
+that
+are
+necessary
+for
+streaming
+implementations.
+A
+conforming
+JSON-LD
+processor
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<ol class="algorithm">
+<li id="processing-step-default-context">
+If
+a
+<a class="tref internalDFN" title="default_context" href="#dfn-default_context">
+default
+context
+</a>
+is
+supplied
+to
+the
+processing
+algorithm,
+push
+it
+onto
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+</li>
+<li id="processing-step-associative">
+If
+an
+associative
+array
+is
+detected,
+create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+Copy
+the
+<a class="tref" title="current_context">
+current
+context
+</a>
+stack
+to
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+Push
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+onto
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+'s
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+For
+each
+key-value
+pair
+in
+the
+associative
+array,
+using
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+do
+the
+following:
+<ol class="algorithm">
+<li>
+If
+a
+<code>
+#
+</code>
+key
+is
+found,
+the
+processor
+merges
+each
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+overwriting
+any
+duplicate
+values
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+Process
+each
+object
+in
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>,
+starting
+at
+<a href="#processing-subject">
+Step
+2.2
+</a>.
+</li>
+<li id="processing-associative">
+If
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+has
+not
+been
+detected,
+the
+current
+key-value
+pair
+is
+placed
+into
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>
+and
+processing
+proceeds
+to
+the
+next
+key-value
+pair.
+Otherwise,
+if
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+known
+perform
+the
+following
+steps:
+</li>
+<ol class="algorithm">
+<li id="processing-subject">
+If
+a
+<code>
+@
+</code>
+key
+is
+found,
+the
+processor
+sets
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+value
+after
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+has
+been
+performed.
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+and
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+values
+are
+specified,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+for
+the
+subject,
+the
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+for
+the
+property,
+and
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+for
+the
+object.
+</li>
+<li>
+If
+there
+are
+any
+triples
+in
+the
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</a>,
+complete
+each
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+as
+the
+subject
+for
+each
+triple.
+</li>
+</ol>
+</li>
+<li>
+If
+an
+<code>
+a
+</code>
+key
+is
+found,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+http://www.w3.org/1999/02/22-rdf-syntax-ns#type
+</code>.
+</li>
+<li>
+If
+a
+key
+that
+is
+not
+<code>
+#
+</code>,
+<code>
+@
+</code>,
+or
+<code>
+a
+</code>
+is
+found,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Property
+Processing
+</a>
+on
+the
+key.
+</li>
+<li>
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+an
+associative
+array,
+then
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+then
+process
+the
+value
+starting
+at
+<a href="#processing-step-array">
+Step
+3
+</a>
+ensuring
+that
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+are
+copied
+to
+a
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+<li>
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+was
+not
+discovered,
+then:
+<ol class="algorithm">
+<li>
+Generate
+a
+<a class="tref" title="blank_node_identifier">
+blank
+node
+identifier
+</a>
+and
+set
+it
+as
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>.
+</li>
+<li>
+Complete
+any
+previously
+incomplete
+triples
+by
+running
+all
+substeps
+of
+<a href="#processing-subject">
+Step
+2.2.1
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+was
+not
+discovered,
+then
+assume
+that
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+unmodified
+and
+run
+all
+substeps
+of
+<a href="#processing-associative">
+Step
+2.2
+</a>
+on
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>.
+</li>
+</ol>
+</ol>
+</li>
+<li id="processing-step-array">
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+an
+associative
+array,
+processes
+per
+<a href="#processing-step-associative">
+Step
+2
+</a>,
+ensuring
+to
+set
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+to
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+the
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+to
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+in
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+place
+it
+into
+the
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+Processing?
+<div class="issue">
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+generation
+of
+triples?
+For
+example,
+would
+implementing
+this
+be
+worth
+the
+more
+complex
+processing
+rules:
+"ex:orderedItems"
+:
+[["one",
+"two",
+"three"]]
+</div>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="markup-of-rdf-concepts" class="section">
+<h2>
+<span class="secno">
+5.
+</span>
+Markup
+of
+RDF
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+most
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+Javascript
+objects
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+Since
+RDF
+is
+also
+an
+important
+sub-community
+of
+the
+Linked
+Data
+movement,
+it
+is
+important
+that
+all
+RDF
+concepts
+are
+well-represented
+in
+this
+specification.
+This
+section
+details
+how
+each
+RDF
+concept
+can
+be
+expressed
+in
+JSON-LD.
+</p>
+<p class="issue">
+The
+current
+specification
+relies
+on
+microsyntaxes
+to
+express
+things
+like
+IRIs,
+typed
+literals
+and
+CURIEs.
+There
+is
+a
+small
+amount
+of
+debate
+on
+whether
+or
+not
+to
+use
+full-blown
+JSON
+objects
+containing
+things
+like
+"value"
+and
+"datatype".
+The
+original
+authors
+of
+the
+JSON-LD
+specification
+feel
+that
+microsyntaxes
+allow
+a
+much
+simpler,
+less
+error-prone
+structure
+in
+the
+JSON-LD
+objects.
+Proponents
+of
+the
+verbose
+mechanism
+assert
+that
+there
+would
+be
+less
+chance
+of
+data
+markup
+issues
+concerning
+proper
+escaping
+and
+that
+the
+objects,
+while
+more
+verbose,
+would
+be
+easier
+to
+work
+with
+within
+JavaScript
+environments.
+Feedback
+on
+this
+issue
+would
+be
+appreciated.
+</p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+5.1
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+subjects
+and
+many
+objects
+are
+identified.
+IRIs
+can
+be
+expressed
+by
+wrapping
+a
+text
+string
+with
+the
+<code>
+<
+</code> and <code>
+>
+</code>
+characters.
+</p>
+<pre class="example">
+{
+...
+  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+object
+to
+an
+IRI
+with
+the
+value
+of
+<code>
+http://manu.sporny.org
+</code>.
+</p>
+<p>
+As
+a
+general
+rule,
+all
+CURIEs
+and
+IRIs
+<em class="rfc2119" title="may">
+may
+</em>
+be
+wrapped
+in
+<code>
+<
+</code> and <code>
+>
+</code>
+characters.
+This
+is
+to
+ensure
+that
+there
+is
+a
+simple,
+consistent
+rule
+that
+can
+be
+followed
+when
+authoring
+JSON-LD
+data.
+There
+are,
+however,
+several
+instances
+where
+angle
+brackets
+<em class="rfc2119" title="may">
+may
+</em>
+be
+omitted,
+without
+introducing
+ambiguity,
+to
+ease
+authoring
+burden.
+These
+instances
+are:
+</p>
+<ul>
+<li>
+When
+specifying
+the
+subject
+IRI
+using
+<code>
+@
+</code>.
+</li>
+<li>
+When
+specifying
+the
+RDF
+type
+IRI
+using
+<code>
+a
+</code>.
+</li>
+<li>
+Any
+CURIE
+in
+the
+key
+portion
+of
+a
+JSON
+associative
+array.
+</li>
+</ul>
+Wrapping
+IRIs
+with
+the
+<code>
+<
+</code> and <code>
+>
+</code>
+characters
+are
+only
+mandatory
+when
+IRIs
+are
+specified
+as
+values
+in
+the
+JSON
+key-value
+pairs.
+<p>
+</p>
+<p>
+To
+further
+illustrate,
+the
+following
+example
+omissions
+of
+the
+<code>
+<
+</code> and <code>
+>
+</code>
+characters
+are
+allowed:
+</p>
+<pre class="example">
+{
+...
+  "@": "<span class="diff">&lt;</span>http://manu.sporny.org/about#manu<span class="diff">&gt;</span>",
+  // CURIE/IRI when specifying the subject can be minimized.
+  "@": "http://manu.sporny.org/about#manu",
+...
+  "a": "<span class="diff">&lt;</span>foaf:Person<span class="diff">&gt;</span>",
+  // CURIE/IRI when specifying the type of an object can be minimized.
+  "a": "foaf:Person",
+...
+  "<span class="diff">&lt;</span>foaf:homepage<span class="diff">&gt;</span>": "&lt;http://manu.sporny.org&gt;",
+  // CURIE/IRI when specifying a property can be minimized.
+  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
+...
+}
+</pre>
+<p>
+At
+all
+other
+times,
+CURIEs
+and
+IRIs
+<em class="rfc2119" title="must">
+must
+</em>
+be
+wrapped
+with
+the
+<code>
+<
+</code> and <code>
+>
+</code>
+characters.
+</p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+5.2
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+A
+subject
+is
+declared
+using
+the
+<code>
+@
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+predicate,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+the
+IRI
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+<p>
+Note
+that
+subject
+do
+not
+need
+to
+be
+wrapped
+in
+angle
+brackets.
+The
+following
+example
+is
+valid
+JSON-LD
+markup:
+</p>
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+...
+}
+</pre>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+5.3
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+a
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-url).
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+(in
+N-Triples
+notation):
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Note
+that
+the
+type
+IRI
+does
+not
+need
+to
+be
+wrapped
+in
+angle
+brackets.
+The
+following
+example
+is
+valid
+JSON-LD
+markup:
+</p>
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "a": "http://xmlns.com/foaf/0.1/Person",
+...
+}
+</pre>
+</div>
+<div id="plain-literals" class="section">
+<h3>
+<span class="secno">
+5.4
+</span>
+Plain
+Literals
+</h3>
+<p>
+Regular
+text
+strings
+are
+called
+"plain
+literals"
+in
+RDF
+and
+are
+easily
+expressed
+using
+regular
+JSON
+strings.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}
+</pre>
+</div>
+<div id="language-specification-in-plain-literals" class="section">
+<h3>
+<span class="secno">
+5.5
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</h3>
+<p>
+JSON-LD
+attempts
+to
+make
+sure
+that
+it
+is
+easy
+to
+express
+triples
+in
+other
+languages
+while
+simultaneously
+ensuring
+that
+hefty
+data
+structures
+aren't
+required
+to
+accomplish
+simple
+language
+markup.
+When
+the
+<code>
+@
+</code>
+symbol
+is
+used
+in
+a
+literal,
+the
+JSON-LD
+processor
+tags
+the
+literal
+text
+with
+the
+language
+tag
+that
+follows
+the
+<code>
+@
+</code>
+symbol.
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "foaf:name": "",
+</del>
+<ins class="diff-chg">  "foaf:name": "<span class="diff">??@ja</span>",
+</ins>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+plain
+literal
+for
+<em>
+<del class="diff-old">花澄
+</del>
+<ins class="diff-chg">??
+</ins>
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+tag
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="typed-literals" class="section">
+<h3>
+<span class="secno">
+5.6
+</span>
+Typed
+Literals
+</h3>
+<p>
+Literals
+may
+also
+be
+typed
+in
+JSON-LD
+by
+using
+the
+<code>
+^^
+</code>
+sequence
+at
+the
+end
+of
+the
+text
+string.
+</p>
+<pre class="example">
+{
+...
+  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+an
+object
+with
+the
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+5.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+arrays.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+array.
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "stu" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "groknar" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+"radface"
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+5.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+typed
+literals
+are
+expressed
+very
+much
+in
+the
+same
+way
+as
+multiple
+properties:
+</p>
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="blank-nodes" class="section">
+<h3>
+<span class="secno">
+5.9
+</span>
+Blank
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+is
+where
+blank
+nodes
+come
+into
+play.
+In
+JSON-LD,
+blank
+node
+identifiers
+are
+automatically
+created
+if
+a
+subject
+is
+not
+specified
+using
+the
+<code>
+@
+</code>
+key.
+However,
+authors
+may
+name
+blank
+nodes
+by
+using
+the
+special
+<code>
+_
+</code>
+CURIE
+prefix.
+</p>
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+named
+blank
+node.
+</p>
+</div>
+</div>
+<div id="advanced-features" class="section">
+<h2>
+<span class="secno">
+6.
+</span>
+Advanced
+Features
+</h2>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+provided
+by
+RDF.
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</p>
+<div id="escape-character" class="section">
+<h3>
+<span class="secno">
+6.1
+</span>
+Escape
+Character
+</h3>
+<p>
+Special
+characters
+in
+property
+values
+<em class="rfc2119" title="must">
+must
+</em>
+be
+escaped
+in
+order
+to
+not
+be
+interpreted
+as
+CURIEs,
+IRIs,
+language
+tags,
+or
+TypedLiterals.
+</p>
+<p>
+The
+special
+characters
+that
+need
+to
+be
+escaped
+in
+property
+values
+are:
+<code>
+<
+</code> (at the beginning of a string), <code>
+>
+</code>
+(at
+the
+end
+of
+a
+string),
+<code>
+@
+</code>,
+and
+<code>
+^
+</code>.
+</p>
+<pre class="example">
+{
+...
+  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}
+</pre>
+</div>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+6.2
+</span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+<del class="diff-old">decimals,
+integers
+</del>
+<ins class="diff-chg">doubles,
+integers,
+</ins>
+and
+boolean
+<del class="diff-old">values,
+</del>
+<ins class="diff-chg">values.
+As
+demonstrated
+below,
+</ins>
+JSON-LD
+utilizes
+that
+information
+to
+create
+<a href="#typed-literals">
+Typed
+Literals
+<del class="diff-old">.
+</del>
+</a>:
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  // This value is automatically converted to having a type of xsd:decimal
+</del>
+<ins class="diff-chg">  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+</ins>
+  "measure:cups": <span class="diff">5.3</span>,
+<ins class="diff-new">  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">"4.8^^&lt;xsd:decimal&gt;"</span>,
+</ins>
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}
+</pre>
+<p class="note">
+<ins class="diff-new">When
+dealing
+with
+a
+number
+of
+modern
+programming
+languages,
+including
+JavaScript
+ECMA-262,
+there
+is
+no
+distinction
+between
+</ins><strong><ins class="diff-new">
+xsd:decimal
+</ins></strong><ins class="diff-new">
+and
+</ins><strong><ins class="diff-new">
+xsd:double
+</ins></strong><ins class="diff-new">
+values.
+That
+is,
+the
+number
+</ins><code><ins class="diff-new">
+5.3
+</ins></code><ins class="diff-new">
+and
+the
+number
+</ins><code><ins class="diff-new">
+5.3e0
+</ins></code><ins class="diff-new">
+are
+treated
+as
+if
+they
+were
+the
+same.
+When
+converting
+from
+JSON-LD
+to
+a
+language-native
+format
+and
+back,
+datatype
+information
+is
+lost
+in
+a
+number
+of
+these
+languages.
+Thus,
+one
+could
+say
+that
+</ins><code><ins class="diff-new">
+5.3
+</ins></code><ins class="diff-new">
+is
+a
+</ins><strong><ins class="diff-new">
+xsd:decimal
+</ins></strong><ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+5.3e0
+</ins></code><ins class="diff-new">
+is
+an
+</ins><strong><ins class="diff-new">
+xsd:double
+</ins></strong><ins class="diff-new">
+in
+JSON-LD,
+but
+when
+both
+values
+are
+converted
+to
+a
+language-native
+format
+the
+datatype
+difference
+between
+the
+two
+is
+lost
+because
+the
+machine-level
+representation
+will
+almost
+always
+be
+a
+</ins><strong><ins class="diff-new">
+double
+</ins></strong>.<ins class="diff-new">
+Implementers
+should
+be
+aware
+of
+this
+potential
+round-tripping
+issue
+between
+</ins><strong><ins class="diff-new">
+xsd:decimal
+</ins></strong><ins class="diff-new">
+and
+</ins><strong><ins class="diff-new">
+xsd:double
+</ins></strong>.<ins class="diff-new">
+Specifically
+objects
+with
+a
+datatype
+of
+</ins><strong><ins class="diff-new">
+xsd:decimal
+</ins></strong><em class="rfc2119" title="must not"><ins class="diff-new">
+must
+not
+</ins></em><ins class="diff-new">
+be
+converted
+to
+a
+language
+native
+type.
+</ins></p>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+6.3
+</span>
+Type
+Coercion
+</h3>
+<p>
+JSON-LD
+supports
+the
+coercion
+of
+types
+to
+ensure
+that
+the
+zero-edit
+goal
+of
+JSON-LD
+can
+be
+accomplished.
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+and
+incoming
+or
+outgoing
+types
+to
+the
+proper
+RDF
+type
+based
+on
+a
+mapping
+of
+type
+IRIs
+to
+RDF
+types.
+Using
+type
+conversion,
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+plain
+literals,
+typed
+literals
+and
+IRIs.
+</p>
+<pre class="example">
+{
+  "#": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "#types":
+     {
+        "name": "rdf:PlainLiteral",
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }</span>
+  },
+  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "&lt;John Smith&gt;" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+</div>
+<div id="best-practices" class="section">
+<h2>
+<span class="secno">
+7.
+</span>
+Best
+Practices
+</h2>
+<p>
+The
+nature
+of
+Web
+programming
+allows
+one
+to
+use
+basic
+technologies,
+such
+as
+JSON-LD,
+across
+a
+variety
+of
+systems
+and
+environments.
+This
+section
+attempts
+to
+describe
+some
+of
+those
+environments
+and
+the
+way
+in
+which
+JSON-LD
+can
+be
+integrated
+in
+order
+to
+help
+alleviate
+certain
+development
+headaches.
+</p>
+<div id="javascript" class="section">
+<h3>
+<span class="secno">
+7.1
+</span>
+JavaScript
+</h3>
+<p class="issue">
+It
+is
+expected
+that
+JSON-LD
+will
+be
+used
+quite
+a
+bit
+in
+JavaScript
+environments,
+however,
+features
+like
+IRIs
+requiring
+angled
+brackets
+in
+JSON-LD
+means
+that
+using
+JSON-LD
+directly
+in
+JavaScript
+is
+going
+to
+be
+annoying
+without
+a
+middleware
+layer
+such
+as
+a
+simple
+library
+that
+strips
+JSON-LD
+markup
+before
+JavaScript
+uses
+it.
+One
+could
+say
+that
+JSON-LD
+is
+a
+good
+fit
+for
+the
+RDFa
+API,
+which
+would
+enable
+a
+triple-store
+in
+the
+browser,
+but
+some
+don't
+want
+to
+require
+that
+level
+of
+functionality
+just
+to
+use
+JSON-LD.
+The
+group
+is
+still
+discussing
+the
+best
+way
+to
+proceed,
+so
+input
+on
+how
+JSON-LD
+could
+more
+easily
+be
+utilized
+in
+JavaScript
+environments
+would
+be
+very
+much
+appreciated.
+</p>
+</div>
+<div id="schema-less-databases" class="section">
+<h3>
+<span class="secno">
+7.2
+</span>
+Schema-less
+Databases
+</h3>
+<p class="issue">
+Databases
+such
+as
+CouchDB
+and
+MongoDB
+allow
+the
+creation
+of
+schema-less
+data
+stores.
+RDF
+is
+a
+type
+of
+schema-less
+data
+model
+and
+thus
+lends
+itself
+to
+databases
+such
+as
+CouchDB
+and
+MongoDB.
+Both
+of
+these
+databases
+can
+use
+JSON-LD
+as
+their
+storage
+format.
+The
+group
+needs
+feedback
+from
+CouchDB
+and
+MongoDB
+experts
+regarding
+the
+usefulness
+of
+JSON-LD
+in
+those
+environments.
+</p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+8.
+</span>
+Advanced
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+taken
+with
+a
+grain
+of
+salt;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<div id="vocabulary-profiles" class="section">
+<h3>
+<span class="secno">
+8.1
+</span>
+Vocabulary
+Profiles
+</h3>
+<p>
+One
+of
+the
+more
+powerful
+features
+of
+RDFa
+1.1
+Core
+is
+the
+ability
+to
+specify
+a
+collection
+of
+prefixes
+and
+terms
+that
+can
+be
+re-used
+by
+a
+processor
+to
+simplfy
+markup.
+JSON-LD
+provides
+a
+similar
+mechanism
+called
+Vocabulary
+Profiles,
+which
+is
+the
+inclusion
+of
+a
+context
+external
+to
+the
+JSON-LD
+document.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+one
+may
+specify
+an
+external
+Vocabulary
+Profile.
+Assume
+the
+following
+profile
+exists
+at
+this
+imaginary
+URL:
+<code>
+http://example.org/profiles/contacts
+</code>.
+</p>
+<pre class="example">
+{
+  "#": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}
+</pre>
+<p>
+The
+profile
+listed
+above
+can
+be
+used
+in
+the
+following
+way:
+</p>
+<pre class="example">
+{
+  "#": { "#profile": "http://example.org/profiles/contacts" },
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+8.2
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+array
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+JSON-LD
+associative
+array.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<pre class="example">
+{
+  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+  "@": 
+  [
+    {
+      "@": "&lt;http://example.org/people#john&gt;",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "&lt;http://example.org/people#jane&gt;",
+      "a": "foaf:Person"
+    }
+  ]
+}
+</pre>
+</div>
+<div id="the-json-ld-api" class="section">
+<h3>
+<span class="secno">
+8.3
+</span>
+The
+JSON-LD
+API
+</h3>
+<p>
+This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+format
+that
+is
+easier
+to
+work
+with
+in
+various
+programming
+languages.
+</p>
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDParser">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDParser</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span>   <span class="idlMethName"><a href="#widl-JSONLDParser-toObject">toObject</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">map</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>RDFGraph</a></span> <span class="idlMethName"><a href="#widl-JSONLDParser-toRDFGraph">toRDFGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+};</span>
+</pre>
+<div id="methods" class="section">
+<h4>
+<span class="secno">
+8.3.1
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDParser-toObject">
+<code>
+toObject
+</code>
+</dt>
+<dd>
+Parses
+JSON-LD
+text
+into
+an
+object
+that
+allows
+at
+least
+attribute-based
+or
+key-based
+access
+to
+the
+data.
+If
+the
+contents
+are
+a
+disjoint
+graph,
+an
+array
+of
+objects
+are
+returned.
+If
+there
+are
+any
+errors,
+<code>
+null
+</code>
+is
+returned.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+jsonld
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+return
+object.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+map
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmDesc">
+The
+map
+from
+IRIs
+to
+attribute
+names
+for
+the
+resulting
+object.
+Any
+term
+mapping
+that
+is
+not
+mentioned
+in
+the
+map
+will
+not
+be
+available
+in
+the
+resulting
+object.
+You
+<em class="rfc2119" title="may">
+may
+</em>
+map
+<code>
+rdf:type
+</code>
+using
+the
+<code>
+a
+</code>
+key
+or
+the
+<code>
+rdf:type
+</code>
+IRI.
+You
+<em class="rfc2119" title="may">
+may
+</em>
+map
+the
+subject
+by
+using
+the
+<code>
+@
+</code>
+key.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+options
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmOptTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmDesc">
+An
+associative-array
+of
+processing
+options
+to
+enable
+or
+disable
+when
+processing
+the
+JSON-LD
+string.
+A
+conforming
+JSON-LD
+processor
+<em class="rfc2119" title="must">
+must
+</em>
+support
+the
+following
+options:
+<dl>
+<dt>
+indexBySubject
+</dt>
+<dd>
+If
+set
+to
+true,
+the
+returned
+object
+will
+be
+indexed
+by
+subject.
+</dd>
+<dt>
+preserveDatatypes
+</dt>
+<dd>
+If
+set
+to
+true,
+preserves
+the
+datatype
+for
+object
+literals.
+</dd>
+<dt>
+preserveLanguage
+</dt>
+<dd>
+If
+set
+to
+true,
+preserves
+the
+languages
+for
+object
+literals.
+</dd>
+</dl>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+callback
+</td>
+<td class="prmType">
+<code>
+<a href="#idl-def-JSONLDParserCallback" class="idlType">
+<code>
+JSONLDParserCallback
+</code>
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmOptTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+object
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JSONLDParser-toRDFGraph">
+<code>
+toRDFGraph
+</code>
+</dt>
+<dd>
+Parses
+JSON-LD
+and
+transforms
+the
+data
+into
+an
+RDFGraph,
+which
+is
+compatible
+with
+the
+RDFa
+API
+specification.
+This
+method
+will
+return
+<code>
+null
+</code>
+if
+there
+are
+any
+errors,
+or
+if
+the
+RDFa
+API
+is
+not
+available
+for
+use.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+jsonld
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+RDFGraph.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+callback
+</td>
+<td class="prmType">
+<code>
+<a href="#idl-def-JSONLDParserCallback" class="idlType">
+<code>
+JSONLDParserCallback
+</code>
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmOptTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+RDFGraph
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<p>
+The
+JSONLDParserCallback
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+input
+data.
+</p>
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDParserCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDParserCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDParserCallback-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre>
+<div id="methods-1" class="section">
+<h4>
+<span class="secno">
+8.3.2
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDParserCallback-error">
+<code>
+error
+</code>
+</dt>
+<dd>
+This
+callback
+is
+invoked
+whenever
+an
+error
+occurs
+during
+processing.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+error
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmDesc">
+A
+descriptive
+error
+string
+returned
+by
+the
+processor.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+void
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<p>
+The
+following
+example
+demonstrates
+how
+to
+convert
+JSON-LD
+to
+a
+JSON
+object
+that
+is
+directly
+usable
+in
+a
+programming
+environment:
+</p>
+<pre class="example">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
+              "http://xmlns.com/foaf/0.1/age" : "age",
+              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+// Map the JSON-LD to a language-native object
+var person = jsonld.toObject(jsonldString, myMap);
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+"Their
+homepage
+is:
+"
++
+person.homepage);
+</pre>
+<p>
+A
+JSON-LD
+Serializer
+is
+also
+available
+to
+map
+a
+language-native
+object
+to
+JSON-LD.
+</p><pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
+};</span>
+</pre>
+<div id="methods-2" class="section">
+<h4>
+<span class="secno">
+8.3.3
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDSerializer-normalize">
+<code>
+normalize
+</code>
+</dt>
+<dd>
+Serializes
+a
+language-native
+object
+into
+a
+normalized
+JSON-LD
+string.
+Normalization
+is
+important
+when
+performing
+things
+like
+equality
+comparison
+and
+digital
+signature
+creation
+and
+verification.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+obj
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">?
+</ins>
+</td>
+<td class="prmDesc">
+An
+associative
+array
+of
+key-value
+pairs
+that
+should
+be
+converted
+to
+a
+JSON-LD
+string.
+It
+is
+assumed
+that
+a
+map
+already
+exists
+for
+the
+data.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+DOMString
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<h3 id="the-normalization-algorithm">
+The
+Normalization
+Algorithm
+</h3>
+<p class="issue">
+This
+algorithm
+is
+very
+rough,
+untested,
+and
+probably
+contains
+many
+bugs.
+Use
+at
+your
+own
+risk.
+It
+will
+change
+in
+the
+coming
+months.
+</p>
+<p>
+The
+JSON-LD
+normalization
+algorithm
+is
+as
+follows:
+</p>
+<ol class="algorithm">
+<li>
+Remove
+the
+<code>
+#
+</code>
+key
+and
+preserve
+it
+as
+the
+<dfn title="transformation_map" id="dfn-transformation_map">
+transformation
+map
+</dfn>
+while
+running
+this
+algorithm.
+</li>
+<li>
+For
+each
+key
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+If
+the
+transformed
+key
+is
+an
+IRI,
+ensure
+that
+it
+is
+surrounded
+by
+angle
+brackets.
+</li>
+</ol>
+</li>
+<li>
+For
+each
+value
+<ol class="algorithm">
+<li>
+If
+the
+value
+should
+be
+type
+coerced
+per
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>,
+ensure
+that
+it
+is
+transformed
+to
+the
+new
+value.
+</li>
+<li>
+If
+the
+value
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+Typed
+Literal
+and
+the
+type
+is
+a
+CURIE,
+expand
+it
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+If
+the
+final
+value
+is
+an
+IRI,
+ensure
+that
+it
+is
+surrounded
+by
+angle
+brackets.
+</li>
+</ol>
+</li>
+<li>
+Output
+each
+sorted
+key-value
+pair
+without
+any
+extraneous
+whitespace.
+If
+the
+value
+is
+an
+associative
+array,
+perform
+this
+algorithm,
+starting
+at
+step
+#1,
+recursively
+on
+the
+sub-tree.
+</li>
+</ol>
+<p>
+</p>
+<pre class="example">
+var myObj = { "#" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "#types": {
+                   "age" : "xsd:nonNegativeInteger",
+                   "homepage" : "xsd:anyURI" 
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : 42,
+              "homepage" : "http://example.org/people/joe" };
+// Map the language-native object to JSON-LD
+var
+jsonldText
+=
+jsonld.normalize(myObj);
+</pre>
+<p>
+After
+the
+code
+in
+the
+example
+above
+has
+executed,
+the
+<strong>
+jsonldText
+</strong>
+value
+will
+be
+(line-breaks
+added
+for
+readability):
+</p>
+<pre class="example">
+{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
+"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
+"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe
+Jackson"}
+</pre>
+<p>
+<ins class="diff-new">When
+normalizing
+</ins><strong><ins class="diff-new">
+xsd:double
+</ins></strong><ins class="diff-new">
+values,
+implementers
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+ensure
+that
+the
+normalized
+value
+is
+a
+string.
+In
+order
+to
+generate
+the
+string
+from
+a
+</ins><strong><ins class="diff-new">
+double
+</ins></strong><ins class="diff-new">
+value,
+output
+equivalent
+to
+the
+</ins><code><ins class="diff-new">
+printf("%1.6e",
+value)
+</ins></code><ins class="diff-new">
+function
+in
+C
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+used
+where
+</ins><strong><ins class="diff-new">
+"%1.6e"
+</ins></strong><ins class="diff-new">
+is
+the
+string
+formatter
+and
+</ins><strong><ins class="diff-new">
+value
+</ins></strong><ins class="diff-new">
+is
+the
+value
+to
+be
+converted.
+</ins></p><p><ins class="diff-new">
+To
+convert
+the
+a
+double
+value
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</ins></p><pre class="example"><ins class="diff-new">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</ins></pre><p class="note"><ins class="diff-new">
+When
+data
+needs
+to
+be
+normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+that
+are
+going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+the
+lossy
+nature
+of
+</ins><strong><ins class="diff-new">
+xsd:double
+</ins></strong><ins class="diff-new">
+values.
+</ins></p>
+</div>
+</div>
+<div class="appendix section" id="acknowledgements">
+<h2>
+<span class="secno">
+A.
+</span>
+Acknowledgements
+</h2>
+<p>
+The
+editor
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+rationale
+and
+reasoning
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+Longley
+who
+reviewed
+and
+provided
+feedback
+on
+the
+overall
+specification
+and
+contexts,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Bradley
+P.
+Allen
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</p>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+B.
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+26
+October
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">
+http://www.w3.org/TR/2010/WD-rdfa-core-20101026
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110201/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,1933 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  medium solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-01-february-2011">Unofficial Draft 01 February 2011</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+</dl><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+Developers that embed structured data in their Web pages can choose among
+a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
+and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
+incompatible at the syntax level, can be easily mapped to RDF. JSON has 
+proven to be a highly useful object serialization and messaging format. 
+In an attempt to harmonize the representation of Linked Data in JSON, 
+this specification outlines a common JSON representation format for 
+Linked Data that can be used to represent objects specified via RDFa, 
+Microformats and Microdata.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">2.3 </span>The Default Context</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-default-context" class="tocxref"><span class="secno">2.5 </span>An Example of a Default Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">4. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li></ul></li><li class="tocline"><a href="#advanced-features" class="tocxref"><span class="secno">6. </span>Advanced Features</a><ul class="toc"><li class="tocline"><a href="#escape-character" class="tocxref"><span class="secno">6.1 </span>Escape Character</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">6.2 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">6.3 </span>Type Coercion</a></li></ul></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">7. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">7.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">7.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">8. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-profiles" class="tocxref"><span class="secno">8.1 </span>Vocabulary Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">8.2 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">8.3 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">8.3.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">8.3.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">8.3.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p class="issue">Write the introduction once all of the technical details
+are hammered out. Explain why JSON-LD is designed as a light-weight mechanism
+to express RDFa, Microformats and Microdata. It is primarily intended as
+a way to express Linked Data in Javascript environments as well as a way to pass
+Linked Data to and from Web services. It is designed to be as simple as 
+possible, utilizing the large number of JSON parsers (and understanding) that
+is out there already. It is designed to be able to express key-value pairs,
+RDF data, Microformats data, and Microdata (that is, every data model
+currently in use) using one unified format. It does not require anyone to change
+their JSON, but easily add meaning by adding context in a way that is 
+out-of-band - it is designed to not disturb already deployed systems running
+on JSON, but provide a smooth migration path from JSON to JSON with added
+semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a tiny memory footprint in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and 
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to write processors for JSON-LD.</li>
+</ul>
+
+<p>
+To understand this specification you must first be familiar with JSON, 
+which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>All comments and discussion takes place on the public mailing list:
+<a href="http://groups.google.com/group/json-ld">json-ld@googlegroups.com
+</a></li>
+
+<li>Specification bugs and issues should be reported in the 
+<a href="http://github.com/digitalbazaar/json-ld/issues">issue tracker</a>.</li>
+
+<li><a href="http://github.com/digitalbazaar/json-ld">Source code</a> for the 
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design-goals-and-rationale" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
+
+<p>The following section outlines the design goals and rationale behind the 
+JSON-LD markup language.
+</p>
+
+<div id="goals" class="section">
+<h3><span class="secno">2.1 </span>Goals</h3>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers don't need to know RDF in order to use the basic functionality
+ provided by JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
+ <dt>Expressiveness</dt>
+ <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable.</dd>
+ <dt>Zero Edits</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers.</dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="map-terms-to-iris" class="section">
+<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
+
+<p>Establishing a mechanism to map JSON values to IRIs will
+help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
+be restrictive in declaring a set of terms, rather, experimentation and 
+innovation should be supported as part of the core design of JSON-LD. There are, 
+however, a number of very small design criterial that can ensure that developers 
+will generate good RDF data that will create value for the greater 
+semantic web community and JSON/REST-based Web Services community.
+</p>
+
+<p>We will be using the following JSON object as the example for this section:
+</p>
+
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+}</pre>
+</div>
+
+<div id="the-default-context" class="section">
+<h3><span class="secno">2.3 </span>The Default Context</h3>
+
+<p>A default context is used in RDFa to allow developers to use keywords
+as aliases for IRIs. So, for instance, the keyword <strong>name</strong>
+above could refer to the IRI <em>http://xmlns.com/foaf/0.1/name</em>.
+The semantic web, just like the document-based web, uses IRIs for
+unambiguous identification. The idea is that these terms mean something, 
+which you will eventually want to query. The semantic web specifies this via 
+<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> specifies
+a Vocabulary Document, and <strong>name</strong> is a term in that 
+vocabulary. Paste the two items together and you have an unambiguous identifier
+for a term.
+</p>
+
+<p>Developers, and machines, would be able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much
+like we can use WordNet today to see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Machines need the same sort of 
+dictionary of terms, and URIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>Non-prefixed terms should have term mappings declared in the default
+context so that they may be expanded later.</p>
+            
+<p>If a set of terms, like <strong>Person</strong>, 
+<strong>name</strong>, and <strong>homepage</strong>,
+are pre-defined in the default context, and that context is used to resolve the
+names in JSON objects, machines could automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>"
+}</pre>
+
+<p class="note">In order to differentiate between plain text and IRIs, the
+<strong><</strong> and <strong>></strong> are used around IRIs.</p>
+
+<p>Doing this would mean that JSON would start to become unambiguously
+machine-readable, play well with the semantic web, and basic markup wouldn't 
+be that much more complex than basic JSON markup. A win, all around.</p>
+</div>
+
+<div id="mashing-up-vocabularies" class="section">
+<h3><span class="secno">2.4 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>A JSON-LD Web Service could define these as <em>prefix</em>es in their 
+default context beside the <em>terms</em> that are already defined. Using
+this feature, developers could also express markup like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">&lt;foaf:Person&gt;</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "&lt;http://manu.sporny.org/&gt;"<span class="diff">,
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"</span>
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+default context in-line using the <code>#</code> character, like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"#": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "&lt;foaf:Person&gt;",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"<span class="diff">,
+  "myvocab:credits": 500</span>
+}</pre>
+
+<p>Think of the <code>#</code> character as a "<strong>hash</strong>table", 
+which maps one
+string to another string. In the example above, the <code>myvocab</code>
+string is replaced with "<code>http://example.org/myvocab#</code>" when it
+is detected above. In the example above, "<code>myvocab:credits</code>" would
+expand to "<code>http://example.org/myvocab#credits</code>".</p>
+
+<p>This mechanism is a short-hand for RDF, and if defined, will give
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div id="an-example-of-a-default-context" class="section">
+<h3><span class="secno">2.5 </span>An Example of a Default Context</h3>
+
+<p>JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> define a default context. For example, the
+following default context could apply to all incoming Web Service calls
+previously accepting only JSON data:</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+    "#vocab": "http://example.org/default-vocab#",
+    "#base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+  }
+}</pre>
+
+<p>The <code>#vocab</code> string is a special keyword that states 
+that any term that doesn't resolve to a term or a prefix should be 
+appended to the <code>#vocab</code> IRI. This is done to ensure that 
+terms can be transformed to an IRI at all times.
+</p>
+
+<p>The <code>#base</code> string is a special keyword that states 
+that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
+<code>#base</code>.
+</p>
+</div>
+</div>
+
+<div id="markup-examples" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">3.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+[
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+   "foaf:name": "Bob"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+   "foaf:name": "Eve"
+ },
+ {
+   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+   "foaf:name": "Manu"
+ }
+]</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">3.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">3.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+  },
+  {
+    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+  }
+]</pre>
+</div>
+</div>
+
+<div id="the-json-ld-processing-algorithm" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>The JSON-LD Processing Algorithm</h2>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The Processing Algorithm is a work in progress, there are
+still major bugs in the algorithm and it's difficult to follow. It's provided
+only to very early implementers to give them an idea of how to implement a
+processor.</p>
+
+<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
+<ul>
+<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
+JSON-LD processing algorithm before processing begins.</li>
+<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
+generated by JSON-LD markup.</li>
+<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
+processor should use when generating triples.</li>
+<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
+CURIEs while the processing algorithm is running. The 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
+associative-array level, specified via the <code>#</code> key.</li>
+<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
+yet to have their subject set.</li>
+<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
+processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
+current associative-array is detected.</li>
+<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
+the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
+<a class="tref" title="current_property">current property</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+</li></ul>
+
+<h4 id="processing-tokens-and-keywords">Processing Tokens and Keywords</h4>
+<ul>
+<li><code>#</code> - Used to set the active context.</li>
+<li><code>#base</code> - Used to set the base IRI for all object IRIs affected 
+by the active context.</li>
+<li><code>#vocab</code> - Used to set the base IRI for all property IRIs
+affected by the active context.</li>
+<li><code>#types</code> - Used to specify type coercion.</li>
+<li><code><</code> and <code>></code> - Used to express IRIs in
+JSON values.</li>
+<li><code>:</code> - The separator for CURIEs when used in JSON keys or
+JSON values.</li>
+<li><code>@</code> - Sets the active subjects.</li>
+<li><code>a</code> - Used to set the rdf:type of the active subjects.</li>
+<li><code>\</code> - Used as an escape character to escape all the special
+tokens and keywords.</li>
+<li><code>^^</code> - Used to express the data type for Typed Literals.</li>
+</ul>
+
+<p>The algorithm below is designed for streaming (SAX-based) implementations.
+Implementers will find that non-streaming (document-based) implementations will
+be much easier to implement as full access to the JSON object model eliminates 
+some of the steps that are necessary for streaming implementations. A conforming
+JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
+same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
+
+<ol class="algorithm">
+<li id="processing-step-default-context">If a <a class="tref internalDFN" title="default_context" href="#dfn-default_context">default context</a> is 
+supplied to the
+processing algorithm, push it onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+
+<li id="processing-step-associative">If an associative array is 
+detected, create a new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
+the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
+key-value pair in the associative array, using the newly created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
+
+  <ol class="algorithm">
+
+    <li>If a <code>#</code> key is found, the processor
+    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
+    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
+    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. 
+    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
+    starting at <a href="#processing-subject">Step 2.2</a>.</li>
+
+    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not been detected, the current
+    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
+    and processing proceeds to the next key-value pair. Otherwise, if the
+    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
+
+    <ol class="algorithm">
+
+      <li id="processing-subject">If a <code>@</code> key is found, the 
+      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> has been performed.
+
+      <ol class="algorithm">
+        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
+        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
+        </li>
+ 
+        <li>If there are any triples in the 
+        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
+        </li>
+      </ol>
+
+      </li>
+
+      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
+      </li>
+
+      <li>If a key that is not <code>#</code>, 
+      <code>@</code>, or <code>a</code> is found, set the 
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
+      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
+      </li>
+
+      <li>If the value is not an array, set the 
+      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
+      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
+
+      <li>If the value is an associative array, then
+      process the value starting at 
+      <a href="#processing-step-associative">Step 2</a>.</li>
+
+      <li>If the value is a regular array, then process the value 
+      starting at 
+      <a href="#processing-step-array">Step 3</a> ensuring that
+      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
+      
+      <ol class="algorithm">
+        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
+
+        <li>Complete any previously incomplete triples by running all substeps 
+        of <a href="#processing-subject">Step 2.2.1</a>.
+        </li>
+      </ol>
+
+      </li><li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
+      <a href="#processing-associative">Step 2.2</a>
+      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+     </li></ol>
+    </ol>
+  </li>
+
+  <li id="processing-step-array">If a regular array is detected, 
+  process each value in the array by doing the following:
+
+    <ol class="algorithm">
+      <li>If the value is an associative array, processes per 
+      <a href="#processing-step-associative">Step 2</a>, ensuring to set
+      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
+      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
+      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
+      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
+      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
+      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
+
+      <li>If the value is a regular array, should we support RDF 
+      List/Sequence Processing? 
+      <div class="issue">If the value is a regular array, should we support 
+      RDF List/Sequence generation of triples? For example, would implementing
+      this be worth the more complex processing rules: "ex:orderedItems" : 
+      [["one", "two", "three"]]</div></li>
+    </ol>
+  </li>
+</ol>
+
+</div>
+
+<div id="markup-of-rdf-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
+
+<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked up
+in a way that is simple to understand and author by Web developers. In many
+cases, Javascript objects can become Linked Data with the simple addition
+of a context. Since RDF is also an important sub-community of the Linked
+Data movement, it is important that all RDF concepts are well-represented
+in this specification. This section details how each RDF concept can be
+expressed in JSON-LD.</p>
+
+<p class="issue">The current specification relies on microsyntaxes to 
+express things like IRIs, typed literals and CURIEs. There is a small amount
+of debate on whether or not to use full-blown JSON objects containing things
+like "value" and "datatype". The original authors of the JSON-LD specification
+feel that microsyntaxes allow a much simpler, less error-prone structure in 
+the JSON-LD objects. Proponents of the verbose mechanism assert that there
+would be less chance of data markup issues concerning proper escaping and 
+that the objects, while more verbose, would be easier to work with within
+JavaScript environments. Feedback on this issue would be appreciated.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">5.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
+and many objects are identified. IRIs can be expressed by wrapping a
+text string with the <code><</code> and <code>></code> characters.
+</p>
+
+<pre class="example">
+{
+...
+  "foaf:homepage": "<span class="diff">&lt;</span>http://manu.sporny.org<span class="diff">&gt;</span>",
+...
+}</pre>
+
+<p>The example above would set the object to an IRI with the value of
+<code>http://manu.sporny.org</code>.
+</p>
+
+<p>As a general rule, all CURIEs and IRIs <em class="rfc2119" title="may">may</em> be wrapped in <code><</code> 
+and <code>></code> characters. This is to ensure that there is a simple, 
+consistent rule that can be followed when authoring JSON-LD data. There 
+are, however, several instances where angle brackets <em class="rfc2119" title="may">may</em> be omitted, 
+without introducing ambiguity, to ease authoring burden. These instances 
+are:
+
+</p><ul>
+<li>When specifying the subject IRI using <code>@</code>.</li>
+<li>When specifying the RDF type IRI using <code>a</code>.</li>
+<li>Any CURIE in the key portion of a JSON associative array.</li>
+</ul>
+
+Wrapping IRIs with the <code><</code> and <code>></code> 
+characters are only mandatory when IRIs are specified as values in the
+JSON key-value pairs.<p></p>
+
+<p>To further illustrate, the following example omissions of the 
+<code><</code> and <code>></code> characters are allowed:
+</p>
+
+<pre class="example">
+{
+...
+  "@": "<span class="diff">&lt;</span>http://manu.sporny.org/about#manu<span class="diff">&gt;</span>",
+  // CURIE/IRI when specifying the subject can be minimized.
+  "@": "http://manu.sporny.org/about#manu",
+...
+  "a": "<span class="diff">&lt;</span>foaf:Person<span class="diff">&gt;</span>",
+  // CURIE/IRI when specifying the type of an object can be minimized.
+  "a": "foaf:Person",
+...
+  "<span class="diff">&lt;</span>foaf:homepage<span class="diff">&gt;</span>": "&lt;http://manu.sporny.org&gt;",
+  // CURIE/IRI when specifying a property can be minimized.
+  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
+...
+}</pre>
+
+<p>At all other times, CURIEs and IRIs <em class="rfc2119" title="must">must</em> be wrapped with the 
+<code><</code> and <code>></code> characters.</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
+
+<p>A subject is declared using the <code>@</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, predicate, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">&lt;http://example.org/people#joebob&gt;</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to the IRI 
+<code>http://example.org/people#joebob</code>.
+</p>
+
+<p>Note that subject do not need to be wrapped in angle brackets. The following
+example is valid JSON-LD markup:</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+...
+}</pre>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">5.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the <code>a</code>
+key. Specifying the type in this way will generate a triple of the form 
+(subject, type, type-url).</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "<span class="diff">a</span>": "<span class="diff">&lt;http://xmlns.com/foaf/0.1/Person&gt;</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple 
+(in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Note that the type IRI does not need to be wrapped in angle brackets. 
+The following example is valid JSON-LD markup:</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "a": "http://xmlns.com/foaf/0.1/Person",
+...
+}</pre>
+
+</div>
+
+<div id="plain-literals" class="section">
+<h3><span class="secno">5.4 </span>Plain Literals</h3>
+
+<p>Regular text strings are called "plain literals" in RDF and are easily
+expressed using regular JSON strings.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="language-specification-in-plain-literals" class="section">
+<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
+
+<p>JSON-LD attempts to make sure that it is easy to express triples in other
+languages while simultaneously ensuring that hefty data structures 
+aren't required to accomplish simple language markup. When the 
+<code>@</code> symbol is used in a literal, the JSON-LD processor tags
+the literal text with the language tag that follows the <code>@</code>
+symbol.
+</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">??@ja</span>",
+...
+}</pre>
+
+<p>The example above would generate a plain literal for <em>??</em> and
+associate the <code>ja</code> language tag with the triple that is
+generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="typed-literals" class="section">
+<h3><span class="secno">5.6 </span>Typed Literals</h3>
+
+<p>Literals may also be typed in JSON-LD by using the <code>^^</code>
+sequence at the end of the text string.</p>
+
+<pre class="example">
+{
+...
+  "dc:modified": "<span class="diff">2010-05-29T14:17:39+02:00^^xsd:dateTime</span>",
+...
+}</pre>
+
+<p>The example above would generate an object with the value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+arrays. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an array.</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": <span class="diff">["stu", "groknar", "radface"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "stu" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "groknar" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "radface" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple typed literals are expressed very much in the same way as 
+multiple properties:</p>
+
+<pre class="example">
+{
+...
+  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": <span class="diff">["2010-05-29T14:17:39+02:00^^xsd:dateTime", "2010-05-30T09:21:28-04:00^^xsd:dateTime"</span>],
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="blank-nodes" class="section">
+<h3><span class="secno">5.9 </span>Blank Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this is where blank nodes come
+into play. In JSON-LD, blank node identifiers are automatically created if a 
+subject is not specified using the <code>@</code> key. However, authors may
+name blank nodes by using the special <code>_</code> CURIE prefix.</p>
+
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+named blank node.
+</p>
+
+</div>
+
+</div>
+
+<div id="advanced-features" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>Advanced Features</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality provided by RDF. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="escape-character" class="section">
+<h3><span class="secno">6.1 </span>Escape Character</h3>
+
+<p>Special characters in property values <em class="rfc2119" title="must">must</em> be escaped in order to not be 
+interpreted as CURIEs, IRIs, language tags, or TypedLiterals.</p>
+
+<p>The special characters that need to be escaped in property values are: 
+<code><</code> (at the beginning of a string), 
+<code>></code> (at the end of a string), <code>@</code>, 
+and <code>^</code>.</p>
+
+<pre class="example">
+{
+...
+  "example:code": <span class="diff">"\\&lt;foobar\\^\\^2\\&gt;"</span>,
+...
+}</pre>
+
+</div>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">6.2 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as doubles, 
+integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
+information to create <a href="#typed-literals">Typed Literals</a>:</p>
+
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">"4.8^^&lt;xsd:decimal&gt;"</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+<p class="note">When dealing with a number of modern programming languages,
+including JavaScript ECMA-262, there is no distinction between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
+the number <code>5.3</code> and the number 
+<code>5.3e0</code> are treated as if they were the same. When converting from 
+JSON-LD to a language-native format and back, datatype information is lost in a 
+number of these languages. Thus, one could say that <code>5.3</code> is a 
+<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
+<strong>xsd:double</strong> in JSON-LD, but when both values are 
+converted to a language-native format the datatype difference between the two 
+is lost because the machine-level representation will almost always be a 
+<strong>double</strong>. 
+Implementers should be aware of this potential round-tripping issue between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
+objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
+to a language native type.
+</p>
+
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">6.3 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
+JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
+coerce and incoming or outgoing types to the proper RDF type based on a
+mapping of type IRIs to RDF types. Using type conversion, one may convert
+simple JSON data to properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to 
+plain literals, typed literals and IRIs.</p>
+
+<pre class="example">
+{
+  "#": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "#types":
+     {
+        "name": "rdf:PlainLiteral",
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }</span>
+  },
+  "name": <span class="diff">"&lt;John Smith&gt;"</span>,
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "&lt;John Smith&gt;" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+</div>
+
+<div id="best-practices" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">7. </span>Best Practices</h2>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be 
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<div id="javascript" class="section">
+<h3><span class="secno">7.1 </span>JavaScript</h3>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in 
+JavaScript environments, however, features like IRIs requiring angled
+brackets in JSON-LD means that using JSON-LD directly in JavaScript is going
+to be annoying without a middleware layer such as a simple library that 
+strips JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDFa API, which would enable a triple-store in the 
+browser, but some don't want to require that level of functionality just to use 
+JSON-LD. The group is still discussing the best way to proceed, so input
+on how JSON-LD could more easily be utilized in JavaScript environments
+would be very much appreciated.
+</p>
+</div>
+
+<div id="schema-less-databases" class="section">
+<h3><span class="secno">7.2 </span>Schema-less Databases</h3>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from 
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">8. </span>Advanced Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear whether
+or not the JSON-LD specification is going to support the complexity necessary
+to support each concept. The entire section on Advanced Concepts should be
+taken with a grain of salt; it is merely a list of possibilities where all
+of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="vocabulary-profiles" class="section">
+<h3><span class="secno">8.1 </span>Vocabulary Profiles</h3>
+
+<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
+a collection of prefixes and terms that can be re-used by a processor to simplfy
+markup. JSON-LD provides a similar mechanism called Vocabulary Profiles, which is 
+the inclusion of a context external to the JSON-LD document.</p>
+
+<p>The example below demonstrates how one may specify an external Vocabulary
+Profile. Assume the following profile exists at this imaginary URL:
+<code>http://example.org/profiles/contacts</code>.</p>
+
+<pre class="example">
+{
+  "#": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}</pre>
+
+<p>The profile listed above can be used in the following way:</p>
+
+<pre class="example">
+{
+  "#": { "#profile": "http://example.org/profiles/contacts" },
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">8.2 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an array to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single JSON-LD associative
+array.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+  "@": 
+  [
+    {
+      "@": "&lt;http://example.org/people#john&gt;",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "&lt;http://example.org/people#jane&gt;",
+      "a": "foaf:Person"
+    }
+  ]
+}</pre>
+
+</div>
+
+<div id="the-json-ld-api" class="section">
+<h3><span class="secno">8.3 </span>The JSON-LD API</h3>
+
+<p>This API provides a clean mechanism that enables developers to convert 
+JSON-LD data into a format that is easier to work with in various programming
+languages.
+</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDParser">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDParser</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span>   <span class="idlMethName"><a href="#widl-JSONLDParser-toObject">toObject</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">map</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>RDFGraph</a></span> <span class="idlMethName"><a href="#widl-JSONLDParser-toRDFGraph">toRDFGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+};</span>
+</pre><div id="methods" class="section"><h4><span class="secno">8.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDParser-toObject"><code>toObject</code></dt><dd>Parses JSON-LD text into an object that allows at least attribute-based
+  or key-based access to the data. If the contents are a disjoint graph, an
+  array of objects are returned. If there are any errors, <code>null</code> 
+  is returned.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">The JSON-LD string to parse into the return object.</td></tr><tr><td class="prmName">map</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">The map from IRIs to attribute names for the resulting object. Any
+     term mapping that is not mentioned in the map will not be available in the 
+     resulting object. You <em class="rfc2119" title="may">may</em> map <code>rdf:type</code> using the 
+     <code>a</code> key or the <code>rdf:type</code> IRI. You <em class="rfc2119" title="may">may</em> map the 
+     subject by using the <code>@</code> key.
+     </td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">?</td><td class="prmOptTrue">?</td><td class="prmDesc">An associative-array of processing options to enable or disable when 
+     processing the JSON-LD string. A conforming JSON-LD processor <em class="rfc2119" title="must">must</em> support 
+     the following options:
+     <dl>
+       <dt>indexBySubject</dt>
+       <dd>If set to true, the returned object will be indexed by subject.</dd>
+       <dt>preserveDatatypes</dt>
+       <dd>If set to true, preserves the datatype for object literals.</dd>
+       <dt>preserveLanguage</dt>
+       <dd>If set to true, preserves the languages for object literals.</dd>
+     </dl>
+     </td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a></code></td><td class="prmNullTrue">?</td><td class="prmOptTrue">?</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDParser-toRDFGraph"><code>toRDFGraph</code></dt><dd>Parses JSON-LD and transforms the data into an RDFGraph, which is 
+  compatible with the RDFa API specification. This method will return
+  <code>null</code> if there are any errors, or if the RDFa API is not
+  available for use.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDParserCallback" class="idlType"><code>JSONLDParserCallback</code></a></code></td><td class="prmNullTrue">?</td><td class="prmOptTrue">?</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>RDFGraph</a></code></div></dd></dl></div>
+
+<p>The JSONLDParserCallback is called whenever a processing error occurs on
+input data.</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDParserCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDParserCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDParserCallback-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre><div id="methods-1" class="section"><h4><span class="secno">8.3.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDParserCallback-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+
+<p>The following example demonstrates how to convert JSON-LD to a JSON object
+that is directly usable in a programming environment:
+</p>
+
+<pre class="example">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
+              "http://xmlns.com/foaf/0.1/age" : "age",
+              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+
+// Map the JSON-LD to a language-native object
+var person = jsonld.toObject(jsonldString, myMap);
+
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+      "Their homepage is: " + person.homepage);</pre>
+
+<p>A JSON-LD Serializer is also available to map a language-native object
+to JSON-LD.
+
+</p><pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
+};</span>
+</pre><div id="methods-2" class="section"><h4><span class="secno">8.3.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
+  Normalization is important when performing things like equality comparison
+  and digital signature creation and verification.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">?</td><td class="prmOptFalse">?</td><td class="prmDesc">An associative array of key-value pairs that should be converted
+     to a JSON-LD string. It is assumed that a map already exists for the
+     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
+
+<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
+
+<p class="issue">This algorithm is very rough, untested, and probably contains
+many bugs. Use at your own risk. It will change in the coming months.</p>
+
+<p>The JSON-LD normalization algorithm is as follows:
+
+</p><ol class="algorithm">
+<li>Remove the <code>#</code> key and preserve it as the 
+<dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
+<li>For each key
+ <ol class="algorithm">
+  <li>If the key is a CURIE, expand the CURIE to an IRI using the
+      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+  <li>If the transformed key is an IRI, ensure that it is surrounded by 
+      angle brackets.</li>
+ </ol>
+</li>
+<li>For each value
+ <ol class="algorithm">
+  <li>If the value should be type coerced per the 
+      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
+      new value.</li>
+  <li>If the value is a CURIE, expand the CURIE to an IRI using the
+      <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+  <li>If the value is a Typed Literal and the type is a CURIE,
+      expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+  <li>If the final value is an IRI, ensure that it is surrounded by angle 
+      brackets.</li>
+ </ol>
+</li><li>Output each sorted key-value pair without any extraneous whitespace. If 
+the value is an associative array, perform this algorithm, starting
+at step #1, recursively on the sub-tree.</li>
+
+</ol>
+
+<p></p>
+
+<pre class="example">
+var myObj = { "#" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "#types": {
+                   "age" : "xsd:nonNegativeInteger",
+                   "homepage" : "xsd:anyURI" 
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : 42,
+              "homepage" : "http://example.org/people/joe" };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);</pre>
+
+<p>After the code in the example above has executed, the 
+<strong>jsonldText</strong> value will be (line-breaks added for 
+readability):</p>
+
+<pre class="example">
+{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
+"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
+"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe Jackson"}</pre>
+
+<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
+ensure that the normalized value is a string. In order to generate the
+string from a <strong>double</strong> value, output equivalent to the
+<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
+<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
+is the value to be converted.</p>
+
+<p>To convert the a double value in JavaScript, implementers can use the 
+following snippet of code:</p>
+
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
+
+<p class="note">When data needs to be normalized, JSON-LD authors should
+not use values that are going to undergo automatic conversion. This is due
+to the lossy nature of <strong>xsd:double</strong> values.</p>
+
+</div>
+
+</div>
+
+
+
+<div class="appendix section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Acknowledgements</h2>
+
+<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
+rationale and reasoning behind the JSON-LD work via his work on RDFj, 
+Dave Longley who reviewed and provided feedback on the overall 
+specification and contexts, and Ian Davis, who created RDF/JSON. Thanks also
+to Bradley P. Allen and Richard Cyganiak for their input on the 
+specification.</p>
+</div>
+
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford <a href="http://www.ietf.org/rfc/rfc4627.txt">The application/json Media Type for JavaScript Object Notation (JSON)</a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a>26 October 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2010/WD-rdfa-core-20101026">http://www.w3.org/TR/2010/WD-rdfa-core-20101026</a> 
+</dd></dl></div></div></body></html>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110201/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110507/diff-20110201.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,9781 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+-
+Linked
+Data
+Expression
+in
+JSON
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+Linked
+Data
+</h2>
+<h2 id="unofficial-draft-07-may-2011">
+Unofficial
+Draft
+<del class="diff-old">01
+February
+</del>
+<ins class="diff-chg">07
+May
+</ins>
+2011
+</h2>
+<dl>
+<dt>
+Editor:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+</dl>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+Developers
+that
+embed
+structured
+data
+in
+their
+Web
+pages
+can
+choose
+among
+a
+number
+of
+languages
+such
+as
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+],
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+Each
+of
+these
+structured
+data
+languages,
+while
+incompatible
+at
+the
+syntax
+level,
+can
+be
+easily
+mapped
+to
+RDF.
+JSON
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+Linked
+Data
+that
+can
+be
+used
+to
+represent
+objects
+specified
+via
+RDFa,
+Microformats
+and
+Microdata.
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design-goals-and-rationale" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Goals
+</a>
+</li>
+<li class="tocline">
+<a href="#map-terms-to-iris" class="tocxref">
+<span class="secno">
+2.2
+</span>
+Map
+Terms
+to
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-context" class="tocxref">
+<span class="secno">
+2.3
+</span>
+The
+<del class="diff-old">Default
+</del>
+<ins class="diff-chg">JSON-LD
+</ins>
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#unambiguous-identifiers-for-json" class="tocxref">
+<span class="secno">
+2.4
+</span>
+<ins class="diff-new">Unambiguous
+Identifiers
+for
+JSON
+</ins></a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno"><ins class="diff-new">
+2.5
+</ins></span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#an-example-of-a-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">2.5
+</del>
+<ins class="diff-chg">2.6
+</ins>
+</span>
+An
+Example
+of
+a
+<del class="diff-old">Default
+</del>
+Context
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+3.
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+3.1
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+3.2
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+3.3
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-processing-algorithm" class="tocxref">
+<span class="secno">
+4.
+</span>
+The
+JSON-LD
+Processing
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#markup-of-rdf-concepts" class="tocxref">
+<span class="secno">
+5.
+</span>
+Markup
+of
+RDF
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+5.1
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+5.2
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+5.3
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#plain-literals" class="tocxref">
+<span class="secno">
+5.4
+</span>
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#language-specification-in-plain-literals" class="tocxref">
+<span class="secno">
+5.5
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#typed-literals" class="tocxref">
+<span class="secno">
+5.6
+</span>
+Typed
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+5.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+5.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#blank-nodes" class="tocxref">
+<span class="secno">
+5.9
+</span>
+Blank
+Nodes
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-features" class="tocxref">
+<span class="secno">
+6.
+</span>
+Advanced
+Features
+</a>
+<ul class="toc">
+<li class="tocline">
+<del class="diff-old">6.1
+Escape
+Character
+</del>
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Automatic
+Typing
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.3
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+Type
+Coercion
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#best-practices" class="tocxref">
+<span class="secno">
+7.
+</span>
+Best
+Practices
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#javascript" class="tocxref">
+<span class="secno">
+7.1
+</span>
+JavaScript
+</a>
+</li>
+<li class="tocline">
+<a href="#schema-less-databases" class="tocxref">
+<span class="secno">
+7.2
+</span>
+Schema-less
+Databases
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+8.
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#vocabulary-profiles" class="tocxref">
+<span class="secno">
+8.1
+</span>
+Vocabulary
+Profiles
+</a>
+</li>
+<li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+8.2
+</span>
+Disjoint
+Graphs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-api" class="tocxref">
+<span class="secno">
+8.3
+</span>
+The
+JSON-LD
+API
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods" class="tocxref">
+<span class="secno">
+8.3.1
+</span>
+Methods
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-1" class="tocxref">
+<span class="secno">
+8.3.2
+</span>
+Methods
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-2" class="tocxref">
+<span class="secno">
+8.3.3
+</span>
+Methods
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-default-context" class="tocxref">
+<span class="secno">
+A.
+</span>
+<ins class="diff-new">The
+Default
+Context
+</ins></a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno"><ins class="diff-new">
+B.
+</ins></span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">C.
+</ins>
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1
+</del>
+<ins class="diff-chg">C.1
+</ins>
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.2
+</del>
+<ins class="diff-chg">C.2
+</ins>
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<del class="diff-old">Write
+the
+introduction
+once
+all
+of
+the
+technical
+details
+are
+hammered
+out.
+Explain
+why
+</del>
+JSON-LD
+is
+designed
+as
+a
+light-weight
+<del class="diff-old">mechanism
+</del>
+<ins class="diff-chg">syntax
+that
+can
+be
+used
+</ins>
+to
+express
+<del class="diff-old">RDFa,
+Microformats
+and
+Microdata.
+</del>
+<ins class="diff-chg">Linked
+Data.
+</ins>
+It
+is
+primarily
+intended
+<del class="diff-old">as
+</del>
+<ins class="diff-chg">to
+be
+</ins>
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+<del class="diff-old">environments
+as
+well
+as
+a
+way
+to
+pass
+Linked
+Data
+to
+</del>
+and
+<del class="diff-old">from
+</del>
+<ins class="diff-chg">other
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+interoperable
+</ins>
+Web
+<del class="diff-old">services.
+</del>
+<ins class="diff-chg">Services
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+document
+storage
+engines.
+</ins>
+It
+is
+<ins class="diff-new">practical
+and
+</ins>
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+<del class="diff-old">(and
+understanding)
+</del>
+<ins class="diff-chg">and
+existing
+code
+</ins>
+that
+is
+<del class="diff-old">out
+there
+already.
+</del>
+<ins class="diff-chg">in
+use
+today.
+</ins>
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+Microformats
+data,
+and
+<del class="diff-old">Microdata
+(that
+</del>
+<ins class="diff-chg">Microdata.
+That
+</ins>
+is,
+<ins class="diff-new">it
+supports
+</ins>
+every
+<ins class="diff-new">major
+Web-based
+structured
+</ins>
+data
+model
+<del class="diff-old">currently
+</del>
+in
+<del class="diff-old">use)
+using
+one
+unified
+format.
+</del>
+<ins class="diff-chg">use
+today.
+</ins>
+It
+does
+not
+require
+anyone
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+<del class="diff-old">out-of-band
+-
+it
+</del>
+<ins class="diff-chg">out-of-band.
+The
+syntax
+</ins>
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+<del class="diff-old">tiny
+</del>
+<ins class="diff-chg">very
+small
+</ins>
+memory
+footprint
+in
+order
+to
+operate.
+<p>
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+write
+processors
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+and
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+All
+comments
+and
+discussion
+takes
+place
+on
+the
+public
+mailing
+list:
+<del class="diff-old">json-ld@googlegroups.com
+</del>
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
+<ins class="diff-chg">public-linked-json@w3.org
+</ins>
+</a>
+</li>
+<li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="http://github.com/digitalbazaar/json-ld/issues">
+issue
+tracker
+</a>.
+</li>
+<li>
+<a href="http://github.com/digitalbazaar/json-ld">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=#json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+</div>
+</div>
+<div id="design-goals-and-rationale" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="goals" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+Goals
+</h3>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+don't
+need
+to
+know
+RDF
+in
+order
+to
+use
+the
+basic
+functionality
+provided
+by
+JSON-LD.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+should
+be
+100%
+compatible
+with
+JSON.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+All
+major
+RDF
+concepts
+must
+be
+expressible
+via
+the
+JSON-LD
+syntax.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable.
+</dd>
+<dt>
+Zero
+<del class="diff-old">Edits
+</del>
+<ins class="diff-chg">Edits,
+most
+of
+the
+time
+</ins>
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+<ins class="diff-new">At
+times,
+mapping
+JSON
+to
+RDF
+can
+become
+difficult
+-
+in
+these
+instances,
+rather
+than
+having
+JSON-LD
+support
+esoteric
+markup,
+we
+chose
+not
+to
+support
+the
+use
+case
+and
+support
+a
+simplified
+syntax
+instead.
+So,
+while
+we
+strive
+for
+Zero
+Edits,
+it
+was
+not
+always
+possible
+without
+adding
+great
+complexity
+to
+the
+language.
+</ins>
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<div id="map-terms-to-iris" class="section">
+<h3>
+<span class="secno">
+2.2
+</span>
+Map
+Terms
+to
+IRIs
+</h3>
+<p>
+Establishing
+a
+mechanism
+to
+map
+JSON
+values
+to
+IRIs
+will
+help
+in
+the
+mapping
+of
+JSON
+objects
+to
+RDF.
+This
+does
+not
+mean
+that
+JSON-LD
+must
+be
+restrictive
+in
+declaring
+a
+set
+of
+terms,
+rather,
+experimentation
+and
+innovation
+should
+be
+supported
+as
+part
+of
+the
+core
+design
+of
+JSON-LD.
+There
+are,
+however,
+a
+number
+of
+very
+small
+design
+<del class="diff-old">criterial
+</del>
+<ins class="diff-chg">criteria
+</ins>
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+RDF
+data
+that
+will
+create
+value
+for
+the
+greater
+semantic
+web
+community
+and
+JSON/REST-based
+Web
+Services
+community.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+object
+as
+the
+example
+for
+this
+section:
+</p>
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+<ins class="diff-new">  "avatar": "http://twitter.com/account/profile_image/manusporny"
+</ins>
+}
+</pre>
+</div>
+<div id="the-json-ld-context" class="section">
+<h3>
+<span class="secno">
+2.3
+</span>
+The
+<del class="diff-old">Default
+</del>
+<ins class="diff-chg">JSON-LD
+</ins>
+Context
+</h3>
+<p>
+A
+<del class="diff-old">default
+</del>
+context
+is
+used
+in
+RDFa
+to
+allow
+developers
+to
+use
+<del class="diff-old">keywords
+as
+</del>
+aliases
+for
+IRIs.
+<del class="diff-old">So,
+for
+instance,
+the
+keyword
+name
+above
+could
+refer
+to
+the
+IRI
+http://xmlns.com/foaf/0.1/name
+.
+</del>
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+terms
+mean
+something,
+which
+you
+will
+eventually
+want
+to
+query.
+The
+semantic
+web
+specifies
+this
+via
+<em>
+Vocabulary
+Documents
+</em>.
+The
+IRI
+<em>
+http://xmlns.com/foaf/0.1/
+</em>
+specifies
+a
+Vocabulary
+Document,
+and
+<strong>
+name
+</strong>
+is
+a
+term
+in
+that
+vocabulary.
+<del class="diff-old">Paste
+</del>
+<ins class="diff-chg">Join
+</ins>
+the
+two
+items
+together
+and
+you
+have
+an
+unambiguous
+identifier
+for
+a
+<ins class="diff-new">vocabulary
+</ins>
+term.
+<ins class="diff-new">The
+Compact
+URI
+Expression,
+or
+short-form,
+is
+</ins><code><ins class="diff-new">
+foaf:name
+</ins></code><ins class="diff-new">
+and
+the
+expanded-form
+is
+</ins><code><ins class="diff-new">
+http://xmlns.com/foaf/0.1/name
+</ins></code>.<ins class="diff-new">
+This
+vocabulary
+term
+identifies
+the
+given
+name
+for
+something,
+for
+example
+-
+a
+person's
+name.
+</ins>
+</p>
+<p>
+Developers,
+and
+machines,
+would
+be
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+Machines
+need
+the
+same
+sort
+of
+dictionary
+of
+terms,
+and
+URIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+<del class="diff-old">Non-prefixed
+terms
+should
+have
+term
+mappings
+declared
+in
+the
+default
+</del>
+<ins class="diff-chg">The
+</ins>
+context
+<del class="diff-old">so
+</del>
+<ins class="diff-chg">provides
+a
+collection
+of
+vocabulary
+terms
+</ins>
+that
+<del class="diff-old">they
+may
+</del>
+<ins class="diff-chg">can
+</ins>
+be
+<del class="diff-old">expanded
+later.
+</del>
+<ins class="diff-chg">used
+for
+a
+JSON
+object.
+</ins>
+</p>
+</div>
+<div id="unambiguous-identifiers-for-json" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">2.4
+</ins></span><ins class="diff-new">
+Unambiguous
+Identifiers
+for
+JSON
+</ins></h3>
+<p>
+If
+a
+set
+of
+terms,
+like
+<strong>
+Person
+</strong>,
+<strong>
+name
+</strong>,
+and
+<strong>
+homepage
+</strong>,
+are
+<del class="diff-old">pre-defined
+</del>
+<ins class="diff-chg">defined
+</ins>
+in
+<del class="diff-old">the
+default
+</del>
+<ins class="diff-chg">a
+</ins>
+context,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+JSON
+objects,
+machines
+could
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "",
+</del>
+<ins class="diff-chg">  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+</ins>
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+<del class="diff-old">  ""
+</del>
+<ins class="diff-chg">  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+</ins>
+}
+</pre>
+<del class="diff-old">In
+order
+to
+differentiate
+between
+plain
+text
+and
+IRIs,
+the
+&lt;
+&gt;
+are
+used
+around
+IRIs.
+</del>
+<p>
+Doing
+this
+would
+mean
+that
+JSON
+would
+start
+to
+become
+unambiguously
+machine-readable,
+play
+well
+with
+the
+semantic
+web,
+and
+basic
+markup
+wouldn't
+be
+that
+much
+more
+complex
+than
+basic
+JSON
+markup.
+A
+win,
+all
+around.
+</p>
+</div>
+<div id="mashing-up-vocabularies" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">2.4
+</del>
+<ins class="diff-chg">2.5
+</ins>
+</span>
+Mashing
+Up
+Vocabularies
+</h3>
+<p>
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</p>
+<ul>
+<li>
+<ins class="diff-new">RDF
+-
+for
+describing
+information
+about
+objects
+on
+the
+semantic
+web.
+</ins></li><li><ins class="diff-new">
+RDFS
+-
+for
+expressing
+things
+like
+labels
+and
+comments.
+</ins></li><li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+<del class="diff-old">A
+JSON-LD
+Web
+Service
+could
+define
+</del>
+<ins class="diff-chg">Since
+</ins>
+these
+<del class="diff-old">as
+prefix
+es
+</del>
+<ins class="diff-chg">vocabularies
+are
+very
+popular,
+they
+are
+pre-defined
+</ins>
+in
+<del class="diff-old">their
+</del>
+<ins class="diff-chg">something
+called
+the
+</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
+default
+context
+<del class="diff-old">beside
+the
+terms
+</del>
+</a>,
+<ins class="diff-chg">which
+is
+a
+set
+of
+vocabulary
+prefixes
+</ins>
+that
+are
+<del class="diff-old">already
+defined.
+Using
+</del>
+<ins class="diff-chg">pre-loaded
+in
+all
+JSON-LD
+processors.
+The
+contents
+of
+the
+</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-chg">
+default
+context
+</ins></a><ins class="diff-chg">
+are
+provided
+later
+in
+</ins>
+this
+<del class="diff-old">feature,
+</del>
+<ins class="diff-chg">document.
+Using
+the
+</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-chg">
+default
+context
+</ins></a><ins class="diff-chg">
+allows
+</ins>
+developers
+<del class="diff-old">could
+also
+</del>
+<ins class="diff-chg">to
+</ins>
+express
+<del class="diff-old">markup
+</del>
+<ins class="diff-chg">data
+unambiguously,
+</ins>
+like
+<del class="diff-old">this:
+</del>
+<ins class="diff-chg">so:
+</ins>
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "",
+</del>
+<ins class="diff-chg">  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+</ins>
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+<del class="diff-old">  ",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;"
+</del>
+<ins class="diff-chg">  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+</ins>
+}
+</pre>
+<p>
+Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+default
+context
+in-line
+using
+the
+<code>
+<del class="diff-old">#
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">character,
+</del>
+<ins class="diff-chg">keyword,
+</ins>
+like
+so:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  ,
+  "a": "&lt;foaf:Person&gt;",
+</del>
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+<ins class="diff-chg">  "a": "foaf:Person",
+</ins>
+  "foaf:name": "Manu Sporny",
+<del class="diff-old">  "foaf:homepage": "&lt;http://manu.sporny.org/&gt;",
+  "sioc:avatar": "&lt;http://twitter.com/account/profile_image/manusporny&gt;",
+  "myvocab:credits": 500
+</del>
+<ins class="diff-chg">  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">Think
+of
+the
+</del>
+<ins class="diff-chg">The
+</ins>
+<code>
+<del class="diff-old">#
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">character
+as
+a
+"
+hash
+table",
+which
+maps
+</del>
+<ins class="diff-chg">keyword
+is
+used
+to
+change
+how
+the
+JSON-LD
+processor
+evaluates
+key-value
+pairs.
+In
+this
+case,
+it
+was
+used
+to
+map
+</ins>
+one
+string
+<ins class="diff-new">('myvocab')
+</ins>
+to
+another
+<del class="diff-old">string.
+</del>
+<ins class="diff-chg">string,
+which
+is
+interpreted
+as
+a
+IRI.
+</ins>
+In
+the
+example
+above,
+the
+<code>
+myvocab
+</code>
+string
+is
+replaced
+with
+"
+<code>
+http://example.org/myvocab#
+</code>
+"
+when
+it
+is
+<del class="diff-old">detected
+above.
+</del>
+<ins class="diff-chg">detected.
+</ins>
+In
+the
+example
+above,
+"
+<code>
+<del class="diff-old">myvocab:credits
+</del>
+<ins class="diff-chg">myvocab:personality
+</ins>
+</code>
+"
+would
+expand
+to
+"
+<code>
+<del class="diff-old">http://example.org/myvocab#credits
+</del>
+<ins class="diff-chg">http://example.org/myvocab#personality
+</ins>
+</code>
+".
+</p>
+<p>
+This
+mechanism
+is
+a
+short-hand
+for
+RDF,
+<ins class="diff-new">called
+a
+CURIE,
+</ins>
+and
+<del class="diff-old">if
+defined,
+will
+give
+</del>
+<ins class="diff-chg">provides
+</ins>
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</p>
+<p>
+</p>
+</div>
+<div id="an-example-of-a-context" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">2.5
+</del>
+<ins class="diff-chg">2.6
+</ins>
+</span>
+An
+Example
+of
+a
+<del class="diff-old">Default
+</del>
+Context
+</h3>
+<p>
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+A
+JSON-LD
+aware
+Web
+Service
+<em class="rfc2119" title="may">
+may
+</em>
+define
+a
+<del class="diff-old">default
+</del>
+<ins class="diff-chg">known
+</ins>
+context.
+For
+example,
+the
+following
+default
+context
+could
+apply
+to
+all
+incoming
+Web
+Service
+calls
+previously
+accepting
+only
+JSON
+data:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "#": 
+</del>
+<ins class="diff-chg">  "@context": 
+</ins>
+  {
+<del class="diff-old">    "#vocab": "http://example.org/default-vocab#",
+    "#base": "http://example.org/baseurl/",
+</del>
+<ins class="diff-chg">    "@vocab": "http://example.org/default-vocab#",
+    "@base": "http://example.org/baseurl/",
+</ins>
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+<ins class="diff-new">    "@coerce": 
+    {
+      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+</ins>
+  }
+}
+</pre>
+<p>
+The
+<code>
+<del class="diff-old">#vocab
+</del>
+<ins class="diff-chg">@vocab
+</ins>
+</code>
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+term
+that
+doesn't
+resolve
+to
+a
+term
+or
+a
+prefix
+should
+be
+appended
+to
+the
+<code>
+<del class="diff-old">#vocab
+</del>
+<ins class="diff-chg">@vocab
+</ins>
+</code>
+IRI.
+This
+is
+done
+to
+ensure
+that
+terms
+can
+be
+transformed
+to
+an
+IRI
+at
+all
+times.
+</p>
+<p>
+The
+<code>
+<del class="diff-old">#base
+</del>
+<ins class="diff-chg">@base
+</ins>
+</code>
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+relative
+IRI
+<em class="rfc2119" title="must">
+must
+</em>
+be
+appended
+to
+the
+string
+specified
+by
+<code>
+<del class="diff-old">#base
+</del>
+<ins class="diff-chg">@base
+</ins></code>.</p><p><ins class="diff-chg">
+The
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+keyword
+is
+used
+to
+specify
+type
+coersion
+rules
+for
+the
+data.
+For
+each
+key
+in
+the
+map,
+the
+key
+is
+the
+type
+to
+be
+coerced
+to
+and
+the
+value
+is
+the
+vocabulary
+term
+to
+be
+coerced.
+Type
+coersion
+for
+the
+key
+</ins><code><ins class="diff-chg">
+xsd:anyURI
+</ins></code><ins class="diff-chg">
+asserts
+that
+all
+vocabulary
+terms
+listed
+should
+undergo
+coercion
+to
+an
+IRI,
+including
+</ins><code><ins class="diff-chg">
+@base
+</ins></code><ins class="diff-chg">
+processing
+for
+relative
+IRIs
+and
+CURIE
+processing
+for
+compact
+URI
+Expressions
+like
+</ins><code><ins class="diff-chg">
+foaf:homepage
+</ins>
+</code>.
+</p>
+</div>
+</div>
+<div id="markup-examples" class="section">
+<h2>
+<span class="secno">
+3.
+</span>
+Markup
+Examples
+</h2>
+<p>
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</p>
+<div id="rdfa" class="section">
+<h3>
+<span class="secno">
+3.1
+</span>
+RDFa
+</h3>
+<p>
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</p>
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</pre>
+<p>
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</p>
+<pre class="example">
+[
+ {
+<del class="diff-old">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+</del>
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+<del class="diff-old">   "foaf:homepage": "&lt;http://example.com/bob/&gt;",
+</del>
+<ins class="diff-chg">   "foaf:homepage": "http://example.com/bob/",
+</ins>
+   "foaf:name": "Bob"
+ },
+ {
+<del class="diff-old">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+</del>
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+<del class="diff-old">   "foaf:homepage": "&lt;http://example.com/eve/&gt;",
+</del>
+<ins class="diff-chg">   "foaf:homepage": "http://example.com/eve/",
+</ins>
+   "foaf:name": "Eve"
+ },
+ {
+<del class="diff-old">   "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+</del>
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+<del class="diff-old">   "foaf:homepage": "&lt;http://example.com/manu/&gt;",
+</del>
+<ins class="diff-chg">   "foaf:homepage": "http://example.com/manu/",
+</ins>
+   "foaf:name": "Manu"
+ }
+]
+</pre>
+</div>
+<div id="microformats" class="section">
+<h3>
+<span class="secno">
+3.2
+</span>
+Microformats
+</h3>
+<p>
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</p>
+<pre class="example">
+&lt;div class="vcard"&gt;
+<del class="diff-old"> &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+</del>
+<ins class="diff-chg"> &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+</ins>
+&lt;/div&gt;
+</pre>
+<p>
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+<code>
+url
+</code>
+and
+<code>
+fn
+</code>
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+<code>
+http://tantek.com
+</code>.
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "#": 
+</del>
+<ins class="diff-chg">  "@context": 
+</ins>
+  {
+<del class="diff-old">    "vcard": "http://microformats.org/profile/hcard#vcard"
+    "url": "http://microformats.org/profile/hcard#url"
+    "fn": "http://microformats.org/profile/hcard#fn"
+</del>
+<ins class="diff-chg">    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+</ins>
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+<del class="diff-old">  "url": "&lt;http://tantek.com/&gt;",
+  "fn": "Tantek Çelik"
+</del>
+<ins class="diff-chg">  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+</ins>
+}
+</pre>
+</div>
+<div id="microdata" class="section">
+<h3>
+<span class="secno">
+3.3
+</span>
+Microdata
+</h3>
+<p>
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</p>
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</pre>
+<p>
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</p>
+<pre class="example">
+[
+  {
+<del class="diff-old">    "@": "&lt;http://purl.oreilly.com/works/45U8QJGZSQKDH8N&gt;",
+</del>
+<ins class="diff-chg">    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+</ins>
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+<del class="diff-old">      ["&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;", "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;"]
+</del>
+<ins class="diff-chg">      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+</ins>
+  },
+  {
+<del class="diff-old">    "@": "&lt;http://purl.oreilly.com/products/9780596007683.BOOK&gt;",
+    "a": "&lt;http://purl.org/vocab/frbr/core#Expression&gt;",
+    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/BOOK&gt;"
+</del>
+<ins class="diff-chg">    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+</ins>
+  },
+  {
+<del class="diff-old">    "@": "&lt;http://purl.oreilly.com/products/9780596802189.EBOOK&gt;",
+</del>
+<ins class="diff-chg">    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+</ins>
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+<del class="diff-old">    "http://purl.org/dc/terms/type": "&lt;http://purl.oreilly.com/product-types/EBOOK&gt;"
+</del>
+<ins class="diff-chg">    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+</ins>
+  }
+]
+</pre>
+</div>
+</div>
+<div id="the-json-ld-processing-algorithm" class="section">
+<h2>
+<span class="secno">
+4.
+</span>
+The
+JSON-LD
+Processing
+Algorithm
+</h2>
+<p>
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<p class="issue">
+The
+Processing
+Algorithm
+is
+a
+work
+in
+progress,
+there
+are
+still
+major
+bugs
+in
+the
+algorithm
+and
+it's
+difficult
+to
+follow.
+It's
+provided
+only
+to
+very
+early
+implementers
+to
+give
+them
+an
+idea
+of
+how
+to
+implement
+a
+processor.
+</p>
+<h4 id="processing-algorithm-terms">
+Processing
+Algorithm
+Terms
+</h4>
+<ul>
+<li>
+<dfn title="default_context" id="dfn-default_context">
+default
+context
+</dfn>
+-
+a
+context
+that
+is
+specified
+to
+the
+JSON-LD
+processing
+algorithm
+before
+processing
+begins.
+</li>
+<li>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+-
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</li>
+<li>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+-
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="inherited_subject" id="dfn-inherited_subject">
+inherited
+subject
+</dfn>
+-
+a
+subject
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+<a class="tref" title="current_subject">
+current
+subject
+</a>
+is
+discovered
+or
+generated.
+</li>
+<li>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+-
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="inherited_property" id="dfn-inherited_property">
+inherited
+property
+</dfn>
+-
+a
+property
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+<a class="tref" title="current_subject">
+current
+subject
+</a>
+is
+discovered
+or
+generated.
+</li>
+<li>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+-
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</li>
+<li>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+-
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+top-most
+item
+on
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+</li>
+<li>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+-
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+<code>
+<del class="diff-old">#
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">key.
+</del>
+<ins class="diff-chg">keyword.
+</ins>
+</li>
+<li>
+<dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</dfn>
+-
+A
+list
+of
+triples
+that
+have
+yet
+to
+have
+their
+subject
+set.
+</li>
+<li>
+<dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</dfn>
+-
+A
+list
+of
+objects
+that
+cannot
+be
+processed
+until
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+detected
+or
+the
+end
+of
+the
+current
+associative-array
+is
+detected.
+</li>
+<li>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+-
+the
+processor
+state,
+which
+includes
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack,
+<a class="tref" title="current_subject">
+current
+subject
+</a>,
+<a class="tref" title="current_property">
+current
+property
+</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</a>,
+and
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>.
+</li>
+</ul>
+<h4 id="processing-tokens-and-keywords">
+Processing
+Tokens
+and
+Keywords
+</h4>
+<ul>
+<li>
+<code>
+<del class="diff-old">#
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+-
+Used
+to
+set
+the
+active
+context.
+</li>
+<li>
+<code>
+<del class="diff-old">#base
+</del>
+<ins class="diff-chg">@base
+</ins>
+</code>
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+active
+context.
+</li>
+<li>
+<code>
+<del class="diff-old">#vocab
+</del>
+<ins class="diff-chg">@vocab
+</ins>
+</code>
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+active
+context.
+</li>
+<li>
+<code>
+<del class="diff-old">#types
+</del>
+<ins class="diff-chg">@coerce
+</ins>
+</code>
+-
+Used
+to
+specify
+type
+<del class="diff-old">coercion.
+</del>
+<ins class="diff-chg">coercion
+rules.
+</ins>
+</li>
+<li>
+<code>
+<ins class="diff-new">@literal
+</ins></code><ins class="diff-new">
+-
+Used
+to
+specify
+a
+literal
+value.
+</ins></li><li>
+<del class="diff-old">&lt;
+&gt;
+</del>
+<code>
+<ins class="diff-chg">@iri
+</ins></code><ins class="diff-chg">
+-
+Used
+to
+specify
+an
+IRI
+value.
+</ins></li><li>
+<code>
+<ins class="diff-new">@language
+</ins>
+</code>
+-
+Used
+to
+<del class="diff-old">express
+IRIs
+in
+JSON
+values.
+</del>
+<ins class="diff-chg">specify
+the
+language
+for
+a
+literal.
+</ins></li><li><code><ins class="diff-chg">
+@datatype
+</ins></code><ins class="diff-chg">
+-
+Used
+to
+specify
+the
+datatype
+for
+a
+literal.
+</ins>
+</li>
+<li>
+<code>:
+</code>
+-
+The
+separator
+for
+CURIEs
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+</li>
+<li>
+<code>
+@
+</code>
+-
+Sets
+the
+active
+subjects.
+</li>
+<li>
+<code>
+a
+</code>
+-
+Used
+to
+set
+the
+rdf:type
+of
+the
+active
+subjects.
+</li>
+<del class="diff-old">\
+-
+Used
+as
+an
+escape
+character
+to
+escape
+all
+the
+special
+tokens
+and
+keywords.
+^^
+-
+Used
+to
+express
+the
+data
+type
+for
+Typed
+Literals.
+</del>
+</ul>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+streaming
+(SAX-based)
+implementations.
+Implementers
+will
+find
+that
+non-streaming
+(document-based)
+implementations
+will
+be
+much
+easier
+to
+implement
+as
+full
+access
+to
+the
+JSON
+object
+model
+eliminates
+some
+of
+the
+steps
+that
+are
+necessary
+for
+streaming
+implementations.
+A
+conforming
+JSON-LD
+processor
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<ol class="algorithm">
+<li id="processing-step-default-context">
+<del class="diff-old">If
+a
+</del>
+<ins class="diff-chg">Push
+the
+</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
+default
+context
+</a>
+<del class="diff-old">is
+supplied
+to
+the
+processing
+algorithm,
+push
+it
+</del>
+onto
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+</li>
+<li id="processing-step-associative">
+If
+an
+associative
+array
+is
+detected,
+create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+Copy
+the
+<a class="tref" title="current_context">
+current
+context
+</a>
+stack
+to
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+Push
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+onto
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+'s
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+stack.
+For
+each
+key-value
+pair
+in
+the
+associative
+array,
+using
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+do
+the
+following:
+<ol class="algorithm">
+<li>
+If
+a
+<code>
+<del class="diff-old">#
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">keyword
+</ins>
+is
+found,
+the
+processor
+merges
+each
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+overwriting
+any
+duplicate
+values
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+<ins class="diff-new">If
+the
+</ins><code><ins class="diff-new">
+@coerce
+</ins></code><ins class="diff-new">
+key
+is
+found,
+the
+processor
+merges
+each
+key-value
+pair
+in
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a><ins class="diff-new">
+'s
+</ins><code><ins class="diff-new">
+@coerce
+</ins></code><ins class="diff-new">
+mapping
+into
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+'s
+</ins><code><ins class="diff-new">
+@coerce
+</ins></code><ins class="diff-new">
+mapping,
+overwriting
+any
+duplicate
+values
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+'s
+</ins><code><ins class="diff-new">
+@coerce
+</ins></code><ins class="diff-new">
+mapping.
+</ins>
+Process
+each
+object
+in
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>,
+starting
+at
+<a href="#processing-subject">
+Step
+2.2
+</a>.
+</li>
+<li id="processing-associative">
+If
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+has
+not
+been
+detected,
+the
+current
+key-value
+pair
+is
+placed
+into
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>
+and
+processing
+proceeds
+to
+the
+next
+key-value
+pair.
+Otherwise,
+if
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+known
+perform
+the
+following
+steps:
+</li>
+<ol class="algorithm">
+<li id="processing-subject">
+If
+a
+<code>
+@
+</code>
+key
+is
+found,
+the
+processor
+sets
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+value
+after
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+has
+been
+performed.
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+and
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+values
+are
+specified,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+for
+the
+subject,
+the
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+for
+the
+property,
+and
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+for
+the
+object.
+</li>
+<li>
+If
+there
+are
+any
+triples
+in
+the
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">
+list
+of
+incomplete
+triples
+</a>,
+complete
+each
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+as
+the
+subject
+for
+each
+triple.
+</li>
+</ol>
+</li>
+<li>
+If
+an
+<code>
+a
+</code>
+key
+is
+found,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+http://www.w3.org/1999/02/22-rdf-syntax-ns#type
+</code>.
+</li>
+<li>
+If
+a
+key
+that
+is
+not
+<code>
+<del class="diff-old">#
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>,
+<code>
+@
+</code>,
+or
+<code>
+a
+<del class="diff-old">is
+found,
+</del>
+</code>,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Property
+Processing
+</a>
+on
+the
+key.
+</li>
+<li>
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+an
+associative
+array,
+then
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+then
+process
+the
+value
+starting
+at
+<a href="#processing-step-array">
+Step
+3
+</a>
+ensuring
+that
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+are
+copied
+to
+a
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+<li>
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+was
+not
+discovered,
+then:
+<ol class="algorithm">
+<li>
+Generate
+a
+<a class="tref" title="blank_node_identifier">
+blank
+node
+identifier
+</a>
+and
+set
+it
+as
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>.
+</li>
+<li>
+Complete
+any
+previously
+incomplete
+triples
+by
+running
+all
+substeps
+of
+<a href="#processing-subject">
+Step
+2.2.1
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+was
+not
+discovered,
+then
+assume
+that
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+unmodified
+and
+run
+all
+substeps
+of
+<a href="#processing-associative">
+Step
+2.2
+</a>
+on
+the
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">
+list
+of
+unprocessed
+items
+</a>.
+</li>
+</ol>
+</ol>
+</li>
+<li id="processing-step-array">
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+an
+associative
+array,
+processes
+per
+<a href="#processing-step-associative">
+Step
+2
+</a>,
+ensuring
+to
+set
+the
+<a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">
+inherited
+subject
+</a>
+to
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+the
+<a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">
+inherited
+property
+</a>
+to
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+in
+the
+newly
+created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#markup-of-rdf-concepts">
+Object
+Processing
+</a>
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+place
+it
+into
+the
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+Processing?
+<div class="issue">
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+generation
+of
+triples?
+For
+example,
+would
+implementing
+this
+be
+worth
+the
+more
+complex
+processing
+rules:
+"ex:orderedItems"
+:
+[["one",
+"two",
+"three"]]
+</div>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="markup-of-rdf-concepts" class="section">
+<h2>
+<span class="secno">
+5.
+</span>
+Markup
+of
+RDF
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+most
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+Javascript
+objects
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+Since
+RDF
+is
+also
+an
+important
+sub-community
+of
+the
+Linked
+Data
+movement,
+it
+is
+important
+that
+all
+RDF
+concepts
+are
+well-represented
+in
+this
+specification.
+This
+section
+details
+how
+each
+RDF
+concept
+can
+be
+expressed
+in
+JSON-LD.
+</p>
+<del class="diff-old">The
+current
+specification
+relies
+on
+microsyntaxes
+to
+express
+things
+like
+IRIs,
+typed
+literals
+and
+CURIEs.
+There
+is
+a
+small
+amount
+of
+debate
+on
+whether
+or
+not
+to
+use
+full-blown
+JSON
+objects
+containing
+things
+like
+"value"
+and
+"datatype".
+The
+original
+authors
+of
+the
+JSON-LD
+specification
+feel
+that
+microsyntaxes
+allow
+a
+much
+simpler,
+less
+error-prone
+structure
+in
+the
+JSON-LD
+objects.
+Proponents
+of
+the
+verbose
+mechanism
+assert
+that
+there
+would
+be
+less
+chance
+of
+data
+markup
+issues
+concerning
+proper
+escaping
+and
+that
+the
+objects,
+while
+more
+verbose,
+would
+be
+easier
+to
+work
+with
+within
+JavaScript
+environments.
+Feedback
+on
+this
+issue
+would
+be
+appreciated.
+</del>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+5.1
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+subjects
+and
+many
+objects
+are
+identified.
+IRIs
+can
+be
+expressed
+<del class="diff-old">by
+wrapping
+</del>
+<ins class="diff-chg">in
+</ins>
+a
+<del class="diff-old">text
+string
+with
+the
+&lt;
+&gt;
+characters.
+</del>
+<ins class="diff-chg">variety
+of
+different
+ways
+in
+JSON-LD.
+</ins>
+</p>
+<del class="diff-old">{
+...
+  "foaf:homepage": "",
+...
+}
+The
+example
+above
+would
+set
+the
+object
+to
+</del>
+<ol>
+<li>
+<ins class="diff-chg">In
+general,
+</ins>
+an
+IRI
+<del class="diff-old">with
+</del>
+<ins class="diff-chg">is
+generated
+if
+it
+is
+in
+</ins>
+the
+<del class="diff-old">value
+of
+http://manu.sporny.org
+.
+As
+a
+general
+rule,
+all
+CURIEs
+and
+IRIs
+may
+be
+wrapped
+</del>
+<ins class="diff-chg">key
+position
+in
+an
+associative
+array.
+There
+are
+special
+rules
+for
+processing
+keys
+</ins>
+in
+<code>
+<del class="diff-old">&lt;
+&gt;
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">characters.
+This
+is
+to
+ensure
+that
+there
+is
+a
+simple,
+consistent
+rule
+that
+can
+be
+followed
+</del>
+<ins class="diff-chg">and
+</ins>
+when
+<del class="diff-old">authoring
+JSON-LD
+data.
+There
+are,
+however,
+several
+instances
+where
+angle
+brackets
+may
+be
+omitted,
+without
+introducing
+ambiguity,
+to
+ease
+authoring
+burden.
+These
+instances
+are:
+When
+specifying
+</del>
+<ins class="diff-chg">dealing
+with
+keys
+that
+start
+with
+</ins>
+the
+<del class="diff-old">subject
+</del>
+<code>
+<ins class="diff-chg">@
+</ins></code><ins class="diff-chg">
+character.
+</ins></li><li><ins class="diff-chg">
+An
+</ins>
+IRI
+<ins class="diff-new">is
+generated
+for
+the
+value
+specified
+</ins>
+using
+<code>
+@
+<del class="diff-old">.
+</del>
+</code>,
+<ins class="diff-chg">if
+it
+is
+a
+string.
+</ins>
+</li>
+<li>
+<del class="diff-old">When
+specifying
+the
+RDF
+type
+</del>
+<ins class="diff-chg">An
+</ins>
+IRI
+<ins class="diff-new">is
+generated
+for
+the
+value
+specified
+</ins>
+using
+<code>
+a
+</code>.
+</li>
+<li>
+<del class="diff-old">Any
+CURIE
+in
+</del>
+<ins class="diff-chg">An
+IRI
+is
+generated
+for
+</ins>
+the
+<del class="diff-old">key
+portion
+of
+a
+JSON
+associative
+array.
+Wrapping
+IRIs
+with
+</del>
+<ins class="diff-chg">value
+specified
+using
+</ins>
+the
+<code>
+<del class="diff-old">&lt;
+&gt;
+</del>
+<ins class="diff-chg">@iri
+</ins>
+</code>
+<del class="diff-old">characters
+are
+only
+mandatory
+</del>
+<ins class="diff-chg">keyword.
+</ins></li><li><ins class="diff-chg">
+An
+IRI
+is
+generated
+</ins>
+when
+<del class="diff-old">IRIs
+</del>
+<ins class="diff-chg">there
+</ins>
+are
+<del class="diff-old">specified
+as
+values
+</del>
+<code>
+<ins class="diff-chg">@coerce
+</ins></code><ins class="diff-chg">
+rules
+</ins>
+in
+<del class="diff-old">the
+JSON
+key-value
+pairs.
+</del>
+<ins class="diff-chg">effect
+for
+</ins><code><ins class="diff-chg">
+xsd:anyURI
+</ins></code><ins class="diff-chg">
+for
+a
+particular
+vocabulary
+term.
+</ins></li></ol>
+<p>
+<ins class="diff-chg">An
+example
+of
+IRI
+generation
+for
+a
+key
+outside
+of
+a
+</ins><code><ins class="diff-chg">
+@context
+</ins></code>:
+</p>
+<pre class="example">
+<ins class="diff-new">{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}
+</ins></pre>
+<p>
+<del class="diff-old">To
+further
+illustrate,
+</del>
+<ins class="diff-chg">In
+</ins>
+the
+<del class="diff-old">following
+</del>
+example
+<del class="diff-old">omissions
+of
+</del>
+<ins class="diff-chg">above,
+</ins>
+the
+<ins class="diff-new">key
+</ins>
+<code>
+<del class="diff-old">&lt;
+&gt;
+</del>
+<ins class="diff-chg">http://xmlns.com/foaf/0.1/name
+</ins>
+</code>
+<del class="diff-old">characters
+are
+allowed:
+</del>
+<ins class="diff-chg">is
+interpreted
+as
+an
+IRI,
+as
+opposed
+to
+being
+interpreted
+as
+a
+string..
+</ins></p><p><ins class="diff-chg">
+CURIE
+expansion
+also
+occurs
+for
+keys
+in
+JSON-LD:
+</ins>
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "@": "",
+  // CURIE/IRI when specifying the subject can be minimized.
+  "@": "http://manu.sporny.org/about#manu",
+</del>
+<ins class="diff-chg">  "<span class="diff">foaf:name</span>": "Manu Sporny",
+</ins>
+...
+<del class="diff-old">  "a": "",
+  // CURIE/IRI when specifying the type of an object can be minimized.
+  "a": "foaf:Person",
+</del>
+<ins class="diff-chg">}
+</ins></pre><p><code><ins class="diff-chg">
+foaf:name
+</ins></code><ins class="diff-chg">
+above
+will
+automatically
+expand
+out
+to
+the
+IRI
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/name
+</ins></code>.</p><p><ins class="diff-chg">
+An
+IRI
+is
+generated
+when
+a
+value
+is
+associated
+with
+a
+key
+using
+the
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code><ins class="diff-chg">
+keyword:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+</ins>
+...
+<del class="diff-old">  "": "&lt;http://manu.sporny.org&gt;",
+  // CURIE/IRI when specifying a property can be minimized.
+  "foaf:homepage": "&lt;http://manu.sporny.org&gt;",
+</del>
+<ins class="diff-chg">  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+</ins>
+...
+}
+</pre>
+<p>
+<del class="diff-old">At
+all
+other
+times,
+CURIEs
+and
+IRIs
+must
+be
+wrapped
+with
+</del>
+<ins class="diff-chg">If
+type
+coercion
+rules
+are
+specified
+in
+</ins>
+the
+<code>
+<del class="diff-old">&lt;
+&gt;
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">characters.
+</del>
+<ins class="diff-chg">for
+a
+particular
+vocabulary
+term,
+an
+IRI
+is
+generated:
+</ins>
+</p>
+<pre class="example">
+<ins class="diff-new">{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:anyURI": "foaf:homepage"
+    } 
+  }</span>
+...
+  "foaf:homepage": "http://manu.sporny.org",
+...
+}
+</ins></pre>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+5.2
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+A
+subject
+is
+declared
+using
+the
+<code>
+@
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+<del class="diff-old">predicate,
+</del>
+<ins class="diff-chg">property,
+</ins>
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "",
+</del>
+<ins class="diff-chg">  "<span class="diff">@</span>": "<span class="diff">http://example.org/people#joebob</span>",
+</ins>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+the
+IRI
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+<del class="diff-old">Note
+that
+subject
+do
+not
+need
+to
+be
+wrapped
+in
+angle
+brackets.
+The
+following
+example
+is
+valid
+JSON-LD
+markup:
+{
+...
+  "@": "http://example.org/people#joebob",
+...
+}
+</del>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+5.3
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+a
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-url).
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "@": "&lt;http://example.org/people#joebob&gt;",
+  "",
+</del>
+<ins class="diff-chg">  "@": "http://example.org/people#joebob",
+  "<span class="diff">a</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+</ins>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+(in
+N-Triples
+notation):
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<del class="diff-old">Note
+that
+the
+type
+IRI
+does
+not
+need
+to
+be
+wrapped
+in
+angle
+brackets.
+The
+following
+example
+is
+valid
+JSON-LD
+markup:
+{
+...
+  "@": "http://example.org/people#joebob",
+  "a": "http://xmlns.com/foaf/0.1/Person",
+...
+}
+</del>
+</div>
+<div id="plain-literals" class="section">
+<h3>
+<span class="secno">
+5.4
+</span>
+Plain
+Literals
+</h3>
+<p>
+Regular
+text
+strings
+are
+called
+"plain
+literals"
+in
+RDF
+and
+are
+easily
+expressed
+using
+regular
+JSON
+strings.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}
+</pre>
+</div>
+<div id="language-specification-in-plain-literals" class="section">
+<h3>
+<span class="secno">
+5.5
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</h3>
+<p>
+JSON-LD
+<del class="diff-old">attempts
+to
+make
+sure
+that
+it
+is
+easy
+to
+express
+triples
+in
+other
+languages
+while
+simultaneously
+ensuring
+</del>
+<ins class="diff-chg">makes
+an
+assumption
+</ins>
+that
+<del class="diff-old">hefty
+data
+structures
+aren't
+required
+to
+accomplish
+simple
+</del>
+<ins class="diff-chg">plain
+literals
+with
+associated
+</ins>
+language
+<del class="diff-old">markup.
+When
+the
+@
+symbol
+</del>
+<ins class="diff-chg">encoding
+information
+</ins>
+is
+<ins class="diff-new">not
+very
+common
+when
+</ins>
+used
+in
+<ins class="diff-new">JavaScript
+and
+Web
+Services.
+Thus,
+it
+takes
+</ins>
+a
+<del class="diff-old">literal,
+the
+JSON-LD
+processor
+tags
+the
+literal
+text
+with
+the
+language
+tag
+that
+follows
+the
+@
+symbol.
+</del>
+<ins class="diff-chg">little
+more
+effort
+to
+express
+plain
+literals
+in
+a
+specified
+language.
+</ins>
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "foaf:name": "",
+</del>
+<ins class="diff-chg">  "foaf:name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+</ins>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+plain
+literal
+for
+<em>
+<del class="diff-old">??
+</del>
+<ins class="diff-chg">花澄
+</ins>
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+tag
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="typed-literals" class="section">
+<h3>
+<span class="secno">
+5.6
+</span>
+Typed
+Literals
+</h3>
+<p>
+Literals
+may
+also
+be
+typed
+in
+JSON-LD
+<del class="diff-old">by
+using
+</del>
+<ins class="diff-chg">in
+two
+ways:
+</ins></p><ol><li><ins class="diff-chg">
+By
+utilizing
+</ins>
+the
+<code>
+<del class="diff-old">^^
+</del>
+<ins class="diff-chg">@coerce
+</ins>
+</code>
+<del class="diff-old">sequence
+at
+</del>
+<ins class="diff-chg">keyword.
+</ins></li><li><ins class="diff-chg">
+By
+utilizing
+</ins>
+the
+<del class="diff-old">end
+of
+</del>
+<ins class="diff-chg">expanded
+form
+for
+specifying
+objects.
+</ins></li></ol><p><ins class="diff-chg">
+The
+first
+example
+uses
+</ins>
+the
+<del class="diff-old">text
+string.
+</del>
+<code>
+<ins class="diff-chg">@coerce
+</ins></code><ins class="diff-chg">
+keyword
+to
+express
+a
+typed
+literal:
+</ins>
+</p>
+<pre class="example">
+<del class="diff-old">{
+</del>
+<ins class="diff-chg">{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }</span>
+</ins>
+...
+<del class="diff-old">  "dc:modified": "",
+</del>
+<ins class="diff-chg">  "dc:modified": "2010-05-29T14:17:39+02:00",
+</ins>
+...
+}
+</pre>
+<p>
+The
+<ins class="diff-new">second
+</ins>
+example
+<ins class="diff-new">uses
+the
+expanded
+form
+for
+specifying
+objects:
+</ins></p><pre class="example"><ins class="diff-new">
+{
+...
+  "dc:modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }</span>
+...
+}
+</ins></pre><p><ins class="diff-new">
+Both
+examples
+</ins>
+above
+would
+generate
+an
+object
+with
+the
+<ins class="diff-new">literal
+</ins>
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+5.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+arrays.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+array.
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "@": "&lt;http://example.org/people#joebob&gt;",
+  "foaf:nick": ,
+</del>
+<ins class="diff-chg">  "@": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+</ins>
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+<del class="diff-old">      "stu" .
+</del>
+<ins class="diff-chg">      "joe" .
+</ins>
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+<del class="diff-old">      "groknar" .
+</del>
+<ins class="diff-chg">      "bob" .
+</ins>
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+<del class="diff-old">"radface"
+</del>
+<ins class="diff-chg">"jaybee"
+</ins>
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+5.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+typed
+literals
+<del class="diff-old">are
+</del>
+<ins class="diff-chg">may
+also
+be
+</ins>
+expressed
+<del class="diff-old">very
+much
+in
+</del>
+<ins class="diff-chg">using
+</ins>
+the
+<del class="diff-old">same
+way
+as
+multiple
+properties:
+</del>
+<ins class="diff-chg">expanded
+form
+for
+objects:
+</ins>
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "@": "&lt;http://example.org/articles/8&gt;",
+  "dcterms:modified": ],
+</del>
+<ins class="diff-chg">  "@": "http://example.org/articles/8",
+  "dcterms:modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]</span>
+</ins>
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="blank-nodes" class="section">
+<h3>
+<span class="secno">
+5.9
+</span>
+Blank
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+is
+where
+blank
+nodes
+come
+into
+play.
+In
+JSON-LD,
+blank
+node
+identifiers
+are
+automatically
+created
+if
+a
+subject
+is
+not
+specified
+using
+the
+<code>
+@
+</code>
+<del class="diff-old">key.
+</del>
+<ins class="diff-chg">keyword.
+</ins>
+However,
+authors
+may
+name
+blank
+nodes
+by
+using
+the
+special
+<code>
+_
+</code>
+CURIE
+prefix.
+</p>
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+named
+blank
+node.
+</p>
+</div>
+</div>
+<div id="advanced-features" class="section">
+<h2>
+<span class="secno">
+6.
+</span>
+Advanced
+Features
+</h2>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+provided
+by
+RDF.
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</p>
+<del class="diff-old">6.1
+Escape
+Character
+Special
+characters
+in
+property
+values
+must
+be
+escaped
+in
+order
+to
+not
+be
+interpreted
+as
+CURIEs,
+IRIs,
+language
+tags,
+or
+TypedLiterals.
+The
+special
+characters
+that
+need
+to
+be
+escaped
+in
+property
+values
+are:
+&lt;
+&gt;
+(at
+the
+end
+of
+a
+string),
+@
+,
+and
+^
+.
+{
+...
+  "example:code": ,
+...
+}
+</del>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+doubles,
+integers,
+and
+boolean
+values.
+As
+demonstrated
+below,
+JSON-LD
+utilizes
+that
+information
+to
+create
+<a href="#typed-literals">
+Typed
+Literals
+</a>:
+</p>
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+<del class="diff-old">  "measure:stones": ,
+</del>
+<ins class="diff-chg">  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+</ins>
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}
+</pre>
+<p class="note">
+When
+dealing
+with
+a
+number
+of
+modern
+programming
+languages,
+including
+JavaScript
+ECMA-262,
+there
+is
+no
+distinction
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>
+values.
+That
+is,
+the
+number
+<code>
+5.3
+</code>
+and
+the
+number
+<code>
+5.3e0
+</code>
+are
+treated
+as
+if
+they
+were
+the
+same.
+When
+converting
+from
+JSON-LD
+to
+a
+language-native
+format
+and
+back,
+datatype
+information
+is
+lost
+in
+a
+number
+of
+these
+languages.
+Thus,
+one
+could
+say
+that
+<code>
+5.3
+</code>
+is
+a
+<strong>
+xsd:decimal
+</strong>
+and
+<code>
+5.3e0
+</code>
+is
+an
+<strong>
+xsd:double
+</strong>
+in
+JSON-LD,
+but
+when
+both
+values
+are
+converted
+to
+a
+language-native
+format
+the
+datatype
+difference
+between
+the
+two
+is
+lost
+because
+the
+machine-level
+representation
+will
+almost
+always
+be
+a
+<strong>
+double
+</strong>.
+Implementers
+should
+be
+aware
+of
+this
+potential
+round-tripping
+issue
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>.
+Specifically
+objects
+with
+a
+datatype
+of
+<strong>
+xsd:decimal
+</strong>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+converted
+to
+a
+language
+native
+type.
+</p>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.3
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+Type
+Coercion
+</h3>
+<p>
+JSON-LD
+supports
+the
+coercion
+of
+types
+to
+ensure
+that
+the
+zero-edit
+goal
+of
+JSON-LD
+can
+be
+accomplished.
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+and
+incoming
+or
+outgoing
+types
+to
+the
+proper
+RDF
+type
+based
+on
+a
+mapping
+of
+type
+IRIs
+to
+RDF
+types.
+Using
+type
+conversion,
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+plain
+literals,
+typed
+literals
+and
+IRIs.
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "#": 
+</del>
+<ins class="diff-chg">  "@context": 
+</ins>
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<del class="diff-old">     "#types":
+</del>
+<span class="diff">     "@type":
+     {
+<del class="diff-old">        "name": "rdf:PlainLiteral",
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+</del>
+<ins class="diff-chg">        "xsd:integer": "age",
+        "xsd:anyURI": "homepage",
+</ins>
+     }</span>
+  },
+<del class="diff-old">  "name": ,
+</del>
+<ins class="diff-chg">  "name": "John Smith",
+</ins>
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+<del class="diff-old">      "&lt;John Smith&gt;" .
+</del>
+<ins class="diff-chg">      "John Smith" .
+</ins>
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+</div>
+<div id="best-practices" class="section">
+<h2>
+<span class="secno">
+7.
+</span>
+Best
+Practices
+</h2>
+<p>
+The
+nature
+of
+Web
+programming
+allows
+one
+to
+use
+basic
+technologies,
+such
+as
+JSON-LD,
+across
+a
+variety
+of
+systems
+and
+environments.
+This
+section
+attempts
+to
+describe
+some
+of
+those
+environments
+and
+the
+way
+in
+which
+JSON-LD
+can
+be
+integrated
+in
+order
+to
+help
+alleviate
+certain
+development
+headaches.
+</p>
+<div id="javascript" class="section">
+<h3>
+<span class="secno">
+7.1
+</span>
+JavaScript
+</h3>
+<p class="issue">
+It
+is
+expected
+that
+JSON-LD
+will
+be
+used
+quite
+a
+bit
+in
+JavaScript
+environments,
+however,
+features
+like
+<del class="diff-old">IRIs
+requiring
+angled
+brackets
+in
+JSON-LD
+means
+</del>
+<ins class="diff-chg">the
+expanded
+form
+for
+object
+values
+mean
+</ins>
+that
+using
+JSON-LD
+directly
+in
+JavaScript
+<del class="diff-old">is
+going
+to
+</del>
+<ins class="diff-chg">may
+</ins>
+be
+annoying
+without
+a
+middleware
+layer
+such
+as
+a
+simple
+library
+that
+<del class="diff-old">strips
+</del>
+<ins class="diff-chg">converts
+</ins>
+JSON-LD
+markup
+before
+JavaScript
+uses
+it.
+One
+could
+say
+that
+JSON-LD
+is
+a
+good
+fit
+for
+the
+<del class="diff-old">RDFa
+</del>
+<ins class="diff-chg">RDF
+</ins>
+API,
+which
+<del class="diff-old">would
+enable
+</del>
+<ins class="diff-chg">enables
+</ins>
+a
+<del class="diff-old">triple-store
+in
+the
+browser,
+</del>
+<ins class="diff-chg">variety
+of
+RDF-based
+Web
+Applications,
+</ins>
+but
+some
+don't
+want
+to
+require
+that
+level
+of
+functionality
+just
+to
+use
+JSON-LD.
+The
+group
+is
+still
+discussing
+the
+best
+way
+to
+proceed,
+so
+input
+on
+how
+JSON-LD
+could
+more
+easily
+be
+utilized
+in
+JavaScript
+environments
+would
+be
+very
+much
+appreciated.
+</p>
+</div>
+<div id="schema-less-databases" class="section">
+<h3>
+<span class="secno">
+7.2
+</span>
+Schema-less
+Databases
+</h3>
+<p class="issue">
+Databases
+such
+as
+CouchDB
+and
+MongoDB
+allow
+the
+creation
+of
+schema-less
+data
+stores.
+RDF
+is
+a
+type
+of
+schema-less
+data
+model
+and
+thus
+lends
+itself
+to
+databases
+such
+as
+CouchDB
+and
+MongoDB.
+Both
+of
+these
+databases
+can
+use
+JSON-LD
+as
+their
+storage
+format.
+The
+group
+needs
+feedback
+from
+CouchDB
+and
+MongoDB
+experts
+regarding
+the
+usefulness
+of
+JSON-LD
+in
+those
+environments.
+</p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+8.
+</span>
+Advanced
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+<del class="diff-old">taken
+with
+a
+grain
+of
+salt;
+</del>
+<ins class="diff-chg">considered
+as
+discussion
+points;
+</ins>
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<div id="vocabulary-profiles" class="section">
+<h3>
+<span class="secno">
+8.1
+</span>
+Vocabulary
+Profiles
+</h3>
+<p>
+One
+of
+the
+more
+powerful
+features
+of
+RDFa
+1.1
+Core
+is
+the
+ability
+to
+specify
+a
+collection
+of
+prefixes
+and
+terms
+that
+can
+be
+re-used
+by
+a
+processor
+to
+simplfy
+markup.
+JSON-LD
+provides
+a
+similar
+mechanism
+called
+Vocabulary
+Profiles,
+which
+is
+the
+inclusion
+of
+a
+context
+external
+to
+the
+JSON-LD
+document.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+one
+may
+specify
+an
+external
+Vocabulary
+Profile.
+Assume
+the
+following
+profile
+exists
+at
+this
+imaginary
+URL:
+<code>
+http://example.org/profiles/contacts
+</code>.
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "#": 
+</del>
+<ins class="diff-chg">  "@context": 
+</ins>
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}
+</pre>
+<p>
+The
+profile
+listed
+above
+can
+be
+used
+in
+the
+following
+way:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "#": { "#profile": "http://example.org/profiles/contacts" },
+</del>
+<ins class="diff-chg">  "@profile": "http://example.org/profiles/contacts",
+</ins>
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+8.2
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+array
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+JSON-LD
+associative
+array.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "#": { "foaf": "http://xmlns.com/foaf/0.1/" },
+</del>
+  "@": 
+  [
+    {
+<del class="diff-old">      "@": "&lt;http://example.org/people#john&gt;",
+</del>
+<ins class="diff-chg">      "@": "http://example.org/people#john",
+</ins>
+      "a": "foaf:Person"
+    },
+    {
+<del class="diff-old">      "@": "&lt;http://example.org/people#jane&gt;",
+</del>
+<ins class="diff-chg">      "@": "http://example.org/people#jane",
+</ins>
+      "a": "foaf:Person"
+    }
+  ]
+}
+</pre>
+<p>
+<ins class="diff-new">A
+disjoint
+graph
+could
+also
+be
+expressed
+like
+so:
+</ins></p><pre class="example"><ins class="diff-new">
+[
+  {
+    "@": "http://example.org/people#john",
+    "a": "foaf:Person"
+  },
+  {
+    "@": "http://example.org/people#jane",
+    "a": "foaf:Person"
+  }
+]
+</ins></pre>
+</div>
+<div id="the-json-ld-api" class="section">
+<h3>
+<span class="secno">
+8.3
+</span>
+The
+JSON-LD
+API
+</h3>
+<p>
+This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+format
+that
+is
+easier
+to
+work
+with
+in
+various
+programming
+languages.
+</p>
+<pre class="idl">
+<del class="diff-old">]
+interface  {
+</del>
+<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDProcessor</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+};</span>
+</pre>
+<div id="methods" class="section">
+<h4>
+<span class="secno">
+8.3.1
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">
+<code>
+<del class="diff-old">toObject
+</del>
+<ins class="diff-chg">toGraph
+</ins>
+</code>
+</dt>
+<dd>
+Parses
+JSON-LD
+<del class="diff-old">text
+</del>
+<ins class="diff-chg">and
+transforms
+the
+data
+</ins>
+into
+an
+<del class="diff-old">object
+that
+allows
+at
+least
+attribute-based
+or
+key-based
+access
+to
+the
+data.
+If
+</del>
+<ins class="diff-chg">Graph,
+which
+is
+compatible
+with
+</ins>
+the
+<del class="diff-old">contents
+are
+a
+disjoint
+graph,
+an
+array
+of
+objects
+are
+returned.
+If
+</del>
+<ins class="diff-chg">RDF
+Interfaces
+API
+specification
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES"><ins class="diff-chg">
+RDF-INTERFACES
+</ins></a></cite><ins class="diff-chg">
+].
+This
+method
+will
+return
+</ins><code><ins class="diff-chg">
+null
+</ins></code><ins class="diff-chg">
+if
+</ins>
+there
+are
+any
+errors,
+<del class="diff-old">null
+</del>
+<ins class="diff-chg">or
+if
+the
+RDF
+Interfaces
+API
+</ins>
+is
+<del class="diff-old">returned.
+</del>
+<ins class="diff-chg">not
+available
+for
+use.
+</ins>
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+jsonld
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+<del class="diff-old">return
+object.
+map
+object
+?
+?
+The
+map
+from
+IRIs
+to
+attribute
+names
+for
+the
+resulting
+object.
+Any
+term
+mapping
+that
+is
+not
+mentioned
+in
+the
+map
+will
+not
+be
+available
+in
+the
+resulting
+object.
+You
+may
+map
+rdf:type
+using
+the
+a
+key
+or
+the
+rdf:type
+IRI.
+You
+may
+map
+the
+subject
+by
+using
+the
+@
+key.
+options
+object
+?
+?
+An
+associative-array
+of
+processing
+options
+to
+enable
+or
+disable
+when
+processing
+the
+JSON-LD
+string.
+A
+conforming
+JSON-LD
+processor
+must
+support
+the
+following
+options:
+indexBySubject
+If
+set
+to
+true,
+the
+returned
+object
+will
+be
+indexed
+by
+subject.
+preserveDatatypes
+If
+set
+to
+true,
+preserves
+the
+datatype
+for
+object
+literals.
+preserveLanguage
+If
+set
+to
+true,
+preserves
+the
+languages
+for
+object
+literals.
+</del>
+<ins class="diff-chg">RDFGraph.
+</ins>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+callback
+</td>
+<td class="prmType">
+<code>
+<a>
+JSONLDParserCallback
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✔
+</ins>
+</td>
+<td class="prmOptTrue">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✔
+</ins>
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">Graph
+</ins>
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">
+<code>
+<del class="diff-old">toRDFGraph
+</del>
+<ins class="diff-chg">toProjection
+</ins>
+</code>
+</dt>
+<dd>
+Parses
+JSON-LD
+<del class="diff-old">and
+transforms
+the
+data
+</del>
+<ins class="diff-chg">text
+</ins>
+into
+an
+<del class="diff-old">RDFGraph,
+which
+is
+compatible
+with
+</del>
+<ins class="diff-chg">RDF
+API
+Projection
+object
+as
+specified
+by
+</ins>
+the
+<del class="diff-old">RDFa
+</del>
+<ins class="diff-chg">RDF
+</ins>
+API
+<del class="diff-old">specification.
+This
+method
+will
+return
+null
+if
+</del>
+<ins class="diff-chg">specification
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDF-API"><ins class="diff-chg">
+RDF-API
+</ins></a></cite><ins class="diff-chg">
+].
+If
+</ins>
+there
+are
+any
+errors,
+<del class="diff-old">or
+if
+the
+RDFa
+API
+</del>
+<code>
+<ins class="diff-chg">null
+</ins></code>
+is
+<del class="diff-old">not
+available
+for
+use.
+</del>
+<ins class="diff-chg">returned.
+</ins>
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+jsonld
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+<del class="diff-old">RDFGraph.
+</del>
+<ins class="diff-chg">Projection.
+</ins>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">callback
+</del>
+<ins class="diff-chg">template
+</ins>
+</td>
+<td class="prmType">
+<code>
+<a>
+<ins class="diff-chg">object
+</ins></a></code></td><td class="prmNullTrue"><ins class="diff-chg">
+✔
+</ins></td><td class="prmOptFalse"><ins class="diff-chg">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-chg">
+The
+Projection
+template
+to
+use
+when
+building
+the
+Projection.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-chg">
+subject
+</ins></td><td class="prmType">
+<code>
+<del class="diff-old">JSONLDParserCallback
+</del>
+<a>
+<ins class="diff-chg">DOMString
+</ins></a>
+</code>
+</td>
+<td class="prmNullTrue">
+<ins class="diff-new">✔
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+subject
+to
+use
+when
+building
+the
+Projection.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+JSONLDParserCallback
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✔
+</ins>
+</td>
+<td class="prmOptTrue">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✔
+</ins>
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+<del class="diff-old">RDFGraph
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<p>
+The
+JSONLDParserCallback
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+input
+data.
+</p>
+<pre class="idl">
+<del class="diff-old">]
+interface  {
+</del>
+<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre>
+<div id="methods-1" class="section">
+<h4>
+<span class="secno">
+8.3.2
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error">
+<code>
+error
+</code>
+</dt>
+<dd>
+This
+callback
+is
+invoked
+whenever
+an
+error
+occurs
+during
+processing.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+error
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmDesc">
+A
+descriptive
+error
+string
+returned
+by
+the
+processor.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+void
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<p>
+The
+following
+example
+demonstrates
+how
+to
+convert
+JSON-LD
+to
+a
+<del class="diff-old">JSON
+object
+</del>
+<ins class="diff-chg">projection
+</ins>
+that
+is
+directly
+usable
+in
+a
+programming
+environment:
+</p>
+<pre class="example">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+<del class="diff-old">var myMap = { "http://xmlns.com/foaf/0.1/name" : "name",
+              "http://xmlns.com/foaf/0.1/age" : "age",
+              "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+</del>
+<ins class="diff-chg">var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+</ins>
+// Map the JSON-LD to a language-native object
+<del class="diff-old">var person = jsonld.toObject(jsonldString, myMap);
+</del>
+<ins class="diff-chg">var person = jsonld.toProjection(jsonldString, myTemplate);
+</ins>
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+"Their
+homepage
+is:
+"
++
+person.homepage);
+</pre>
+<p>
+A
+JSON-LD
+Serializer
+is
+also
+available
+to
+map
+a
+language-native
+object
+to
+JSON-LD.
+</p><pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
+};</span>
+</pre>
+<div id="methods-2" class="section">
+<h4>
+<span class="secno">
+8.3.3
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj">
+<code>
+normalize
+</code>
+</dt>
+<dd>
+Serializes
+a
+language-native
+object
+into
+a
+normalized
+JSON-LD
+string.
+Normalization
+is
+important
+when
+performing
+things
+like
+equality
+comparison
+and
+digital
+signature
+creation
+and
+verification.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+obj
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">?
+</del>
+<ins class="diff-chg">✘
+</ins>
+</td>
+<td class="prmDesc">
+An
+associative
+array
+of
+key-value
+pairs
+that
+should
+be
+converted
+to
+a
+JSON-LD
+string.
+It
+is
+assumed
+that
+a
+map
+already
+exists
+for
+the
+data.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+DOMString
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<h3 id="the-normalization-algorithm">
+The
+Normalization
+Algorithm
+</h3>
+<p class="issue">
+This
+algorithm
+is
+very
+rough,
+untested,
+and
+probably
+contains
+many
+bugs.
+Use
+at
+your
+own
+risk.
+It
+will
+change
+in
+the
+coming
+months.
+</p>
+<p>
+The
+JSON-LD
+normalization
+algorithm
+is
+as
+follows:
+</p>
+<ol class="algorithm">
+<li>
+Remove
+the
+<code>
+<del class="diff-old">#
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+key
+and
+preserve
+it
+as
+the
+<dfn title="transformation_map" id="dfn-transformation_map">
+transformation
+map
+</dfn>
+while
+running
+this
+algorithm.
+</li>
+<li>
+For
+each
+key
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<del class="diff-old">If
+the
+transformed
+key
+is
+an
+IRI,
+ensure
+that
+it
+is
+surrounded
+by
+angle
+brackets.
+</del>
+</ol>
+</li>
+<li>
+For
+each
+value
+<ol class="algorithm">
+<li>
+If
+the
+value
+should
+be
+type
+coerced
+per
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>,
+ensure
+that
+it
+is
+transformed
+to
+the
+new
+value.
+</li>
+<li>
+If
+the
+value
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+Typed
+Literal
+and
+the
+type
+is
+a
+CURIE,
+expand
+it
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">When
+generating
+</ins>
+the
+final
+<ins class="diff-new">value,
+use
+expanded
+object
+</ins>
+value
+<del class="diff-old">is
+an
+IRI,
+ensure
+that
+it
+is
+surrounded
+by
+angle
+brackets.
+</del>
+<ins class="diff-chg">form
+to
+store
+all
+IRIs,
+typed
+literals
+and
+plain
+literals
+with
+language
+information.
+</ins>
+</li>
+</ol>
+</li>
+<li>
+Output
+each
+sorted
+key-value
+pair
+without
+any
+extraneous
+whitespace.
+If
+the
+value
+is
+an
+associative
+array,
+perform
+this
+algorithm,
+starting
+at
+step
+#1,
+recursively
+on
+the
+sub-tree.
+<ins class="diff-new">There
+should
+be
+no
+nesting
+in
+the
+outputted
+JSON
+data.
+That
+is,
+the
+top-most
+element
+should
+be
+an
+array.
+Each
+item
+in
+the
+array
+contains
+a
+single
+subject
+with
+a
+corresponding
+array
+of
+properties
+in
+UTF-8
+sort
+order.
+Any
+related
+objects
+that
+are
+complex
+objects
+themselves
+should
+be
+given
+a
+top-level
+object
+in
+the
+top-level
+array.
+</ins>
+</li>
+</ol>
+<p class="issue">
+<ins class="diff-chg">Note
+that
+normalizing
+named
+blank
+nodes
+is
+impossible
+at
+present
+since
+one
+would
+have
+to
+specify
+a
+blank
+node
+naming
+algorithm.
+For
+the
+time
+being,
+you
+cannot
+normalize
+graphs
+that
+contain
+named
+blank
+nodes.
+However,
+normalizing
+graphs
+that
+contain
+non-named
+blank
+nodes
+is
+supported.
+</ins>
+</p>
+<pre class="example">
+<del class="diff-old">var myObj = { "#" : { 
+</del>
+<ins class="diff-chg">var myObj = { "@context" : { 
+</ins>
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+<del class="diff-old">                "#types": {
+                   "age" : "xsd:nonNegativeInteger",
+                   "homepage" : "xsd:anyURI" 
+</del>
+<ins class="diff-chg">                "@type": {
+                   "xsd:nonNegativeInteger": "age",
+                   "xsd:anyURI": "homepage"
+</ins>
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : 42,
+              "homepage" : "http://example.org/people/joe" };
+// Map the language-native object to JSON-LD
+var
+jsonldText
+=
+jsonld.normalize(myObj);
+</pre>
+<p>
+After
+the
+code
+in
+the
+example
+above
+has
+executed,
+the
+<strong>
+jsonldText
+</strong>
+value
+will
+be
+(line-breaks
+added
+for
+readability):
+</p>
+<pre class="example">
+<del class="diff-old">{"&lt;http://xmlns.com/foaf/0.1/age&gt;":"42^^&lt;http://www.w3.org/2001/XMLSchema#nonNegativeInteger&gt;",
+"&lt;http://xmlns.com/foaf/0.1/homepage&gt;":"&lt;http://example.org/people/joe&gt;",
+"&lt;http://xmlns.com/foaf/0.1/name&gt;":"Joe
+Jackson"}
+</del>
+<ins class="diff-chg">[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
+"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
+"http://xmlns.com/foaf/0.1/name":"Joe
+Jackson"}]
+</ins>
+</pre>
+<p>
+When
+normalizing
+<strong>
+xsd:double
+</strong>
+values,
+implementers
+<em class="rfc2119" title="must">
+must
+</em>
+ensure
+that
+the
+normalized
+value
+is
+a
+string.
+In
+order
+to
+generate
+the
+string
+from
+a
+<strong>
+double
+</strong>
+value,
+output
+equivalent
+to
+the
+<code>
+printf("%1.6e",
+value)
+</code>
+function
+in
+C
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+<strong>
+"%1.6e"
+</strong>
+is
+the
+string
+formatter
+and
+<strong>
+value
+</strong>
+is
+the
+value
+to
+be
+converted.
+</p>
+<p>
+To
+convert
+the
+a
+double
+value
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</p>
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</pre>
+<p class="note">
+When
+data
+needs
+to
+be
+normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+that
+are
+going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+the
+lossy
+nature
+of
+<strong>
+xsd:double
+</strong>
+values.
+</p>
+</div>
+</div>
+<div class="appendix section" id="the-default-context">
+<h2>
+<span class="secno">
+A.
+</span>
+<ins class="diff-new">The
+Default
+Context
+</ins></h2><p><ins class="diff-new">
+The
+</ins><dfn title="default_context" id="dfn-default_context-1"><ins class="diff-new">
+default
+context
+</ins></dfn><ins class="diff-new">
+is
+provided
+to
+ensure
+that
+there
+are
+a
+reasonable
+set
+of
+prefixes
+and
+terms
+available
+to
+all
+JSON-LD
+developers.
+Mappings
+specified
+by
+the
+default
+context
+</ins><em class="rfc2119" title="should not"><ins class="diff-new">
+should
+not
+</ins></em><ins class="diff-new">
+be
+overwritten
+by
+JSON-LD
+authors.
+All
+JSON-LD
+processors
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+load
+the
+following
+context
+in
+as
+the
+intial
+context
+before
+processing
+JSON-LD
+text.
+</ins></p><pre><ins class="diff-new">
+{
+  "@context":
+  {
+    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dcterms": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "vcard": "http://www.w3.org/2006/vcard/ns# ",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "cc": "http://creativecommons.org/ns#",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "com": "http://purl.org/commerce#",
+    "ps": "http://purl.org/payswarm#",
+    "gr": "http://purl.org/goodrelations/v1#",
+    "sig": "http://purl.org/signature#",
+    "ccard": "http://purl.org/commerce/creditcard#"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+}
+</ins></pre></div><div class="appendix section" id="acknowledgements"><h2><span class="secno"><ins class="diff-new">
+B.
+</ins></span>
+Acknowledgements
+</h2>
+<p>
+The
+editor
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+rationale
+and
+reasoning
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+Longley
+who
+<del class="diff-old">reviewed
+and
+</del>
+<ins class="diff-chg">reviewed,
+</ins>
+provided
+<del class="diff-old">feedback
+</del>
+<ins class="diff-chg">feedback,
+and
+performed
+several
+implementation
+</ins>
+on
+the
+<del class="diff-old">overall
+specification
+and
+contexts,
+</del>
+<ins class="diff-chg">specification,
+</ins>
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+<ins class="diff-new">Nathan
+Rixham,
+</ins>
+Bradley
+P.
+Allen
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</p>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">C.
+</ins>
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">B.1
+</del>
+<ins class="diff-chg">C.1
+</ins>
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<dt id="bib-RDF-API">
+<ins class="diff-new">[RDF-API]
+</ins></dt><dd><ins class="diff-new">
+Manu
+Sporny,
+Benjamin
+Adrian,
+Nathan
+Rixham;
+et
+al.
+</ins><a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><cite><ins class="diff-new">
+RDF
+API
+</ins></cite></a><ins class="diff-new">
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+</ins><a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><ins class="diff-new">
+http://www.w3.org/2010/02/rdfa/sources/rdf-api/
+</ins></a></dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</a>
+</dd>
+<dt id="bib-RDF-INTERFACES">
+<ins class="diff-new">[RDF-INTERFACES]
+</ins></dt><dd><ins class="diff-new">
+Nathan
+Rixham,
+Manu
+Sporny,
+Benjamin
+Adrian;
+et
+al.
+</ins><a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><cite><ins class="diff-new">
+RDF
+Interfaces
+</ins></cite></a><ins class="diff-new">
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+</ins><a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><ins class="diff-new">
+http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/
+</ins></a></dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+<del class="diff-old">Crockford
+</del>
+<ins class="diff-chg">Crockford.
+</ins>
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+<cite>
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</cite>
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">B.2
+</del>
+<ins class="diff-chg">C.2
+</ins>
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+<del class="diff-old">26
+October
+2010.
+</del>
+<ins class="diff-chg">31
+March
+2011.
+</ins>
+W3C
+Working
+Draft.
+URL:
+<del class="diff-old">http://www.w3.org/TR/2010/WD-rdfa-core-20101026
+</del>
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+<ins class="diff-chg">http://www.w3.org/TR/2011/WD-rdfa-core-20110331
+</ins>
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110507/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,2016 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-07-may-2011">Unofficial Draft 07 May 2011</h2><dl><dt>Editor:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20110201.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+Developers that embed structured data in their Web pages can choose among
+a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
+and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
+incompatible at the syntax level, can be easily mapped to RDF. JSON has 
+proven to be a highly useful object serialization and messaging format. 
+In an attempt to harmonize the representation of Linked Data in JSON, 
+this specification outlines a common JSON representation format for 
+Linked Data that can be used to represent objects specified via RDFa, 
+Microformats and Microdata.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-json-ld-context" class="tocxref"><span class="secno">2.3 </span>The JSON-LD Context</a></li><li class="tocline"><a href="#unambiguous-identifiers-for-json" class="tocxref"><span class="secno">2.4 </span>Unambiguous Identifiers for JSON</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.5 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-context" class="tocxref"><span class="secno">2.6 </span>An Example of a Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">4. </span>The JSON-LD Processing Algorithm</a></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">5. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">5.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">5.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">5.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">5.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">5.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">5.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">5.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">5.9 </span>Blank Nodes</a></li></ul></li><li class="tocline"><a href="#advanced-features" class="tocxref"><span class="secno">6. </span>Advanced Features</a><ul class="toc"><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">6.1 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">6.2 </span>Type Coercion</a></li></ul></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">7. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">7.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">7.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">8. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-profiles" class="tocxref"><span class="secno">8.1 </span>Vocabulary Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">8.2 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">8.3 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">8.3.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">8.3.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">8.3.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">A. </span>The Default Context</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">B. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+JSON-LD is designed as a light-weight syntax that can be used to express 
+Linked Data. It is primarily intended to be a way to express Linked Data 
+in Javascript and other Web-based programming environments. It is also 
+useful when building interoperable Web Services and when storing Linked 
+Data in JSON-based document storage engines. It is practical and designed 
+to be as simple as possible, utilizing the large number of JSON parsers 
+and existing code that is in use today. It is designed to be able to 
+express key-value pairs, RDF data, Microformats data, and Microdata.
+That is, it supports every major Web-based structured data model in use 
+today. It does not require anyone to change their JSON, but easily add 
+meaning by adding context in a way that is out-of-band. The syntax is 
+designed to not disturb already deployed systems running on JSON, but 
+provide a smooth migration path from JSON to JSON with added
+semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a very small memory footprint in order to operate.
+<p></p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and 
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to write processors for JSON-LD.</li>
+</ul>
+
+<p>
+To understand this specification you must first be familiar with JSON, 
+which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>All comments and discussion takes place on the public mailing list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
+</li>
+
+<li>Specification bugs and issues should be reported in the 
+<a href="http://github.com/digitalbazaar/json-ld/issues">issue tracker</a>.</li>
+
+<li><a href="http://github.com/digitalbazaar/json-ld">Source code</a> for the 
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design-goals-and-rationale" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
+
+<p>The following section outlines the design goals and rationale behind the 
+JSON-LD markup language.
+</p>
+
+<div id="goals" class="section">
+<h3><span class="secno">2.1 </span>Goals</h3>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers don't need to know RDF in order to use the basic functionality
+ provided by JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
+ <dt>Expressiveness</dt>
+ <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable.</dd>
+ <dt>Zero Edits, most of the time</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers. At times, mapping JSON to 
+ RDF can become difficult - in these instances, rather than having JSON-LD
+ support esoteric markup, we chose not to support the use case and
+ support a simplified syntax instead. So, while we strive for Zero Edits,
+ it was not always possible without adding great complexity to the language.
+ </dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="map-terms-to-iris" class="section">
+<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
+
+<p>Establishing a mechanism to map JSON values to IRIs will
+help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
+be restrictive in declaring a set of terms, rather, experimentation and 
+innovation should be supported as part of the core design of JSON-LD. There are, 
+however, a number of very small design criteria that can ensure that developers 
+will generate good RDF data that will create value for the greater 
+semantic web community and JSON/REST-based Web Services community.
+</p>
+
+<p>We will be using the following JSON object as the example for this section:
+</p>
+
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+</div>
+
+<div id="the-json-ld-context" class="section">
+<h3><span class="secno">2.3 </span>The JSON-LD Context</h3>
+
+<p>A context is used in RDFa to allow developers to use aliases for 
+IRIs. The semantic web, just like the document-based web, uses IRIs for
+unambiguous identification. The idea is that these terms mean something, 
+which you will eventually want to query. The semantic web specifies this via 
+<em>Vocabulary Documents</em>. The IRI <em>http://xmlns.com/foaf/0.1/</em> 
+specifies a Vocabulary Document, and <strong>name</strong> is a term in 
+that vocabulary. Join the two items together and you have an unambiguous 
+identifier for a vocabulary term. The Compact URI Expression, or short-form,
+is <code>foaf:name</code> and the expanded-form is
+<code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary term identifies
+the given name for something, for example - a person's name.
+</p>
+
+<p>Developers, and machines, would be able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much like we can use WordNet today to 
+see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Machines need the same sort of 
+dictionary of terms, and URIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>The context provides a collection of vocabulary terms that can be used
+for a JSON object.</p>
+</div>
+
+<div id="unambiguous-identifiers-for-json" class="section">
+<h3><span class="secno">2.4 </span>Unambiguous Identifiers for JSON</h3>
+            
+<p>If a set of terms, like <strong>Person</strong>, 
+<strong>name</strong>, and <strong>homepage</strong>,
+are defined in a context, and that context is used to resolve the
+names in JSON objects, machines could automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Doing this would mean that JSON would start to become unambiguously
+machine-readable, play well with the semantic web, and basic markup wouldn't 
+be that much more complex than basic JSON markup. A win, all around.</p>
+</div>
+
+<div id="mashing-up-vocabularies" class="section">
+<h3><span class="secno">2.5 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>RDF - for describing information about objects on the semantic web.</li>
+   <li>RDFS - for expressing things like labels and comments.</li>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>Since these vocabularies are very popular, they are pre-defined in
+something called the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a>, which is a set of
+vocabulary prefixes that are pre-loaded in all JSON-LD processors. The
+contents of the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> are provided later in this 
+document. Using the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> allows developers to 
+express data unambiguously, like so:</p>
+
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+default context in-line using the <code>@context</code> keyword, like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}</pre>
+
+<p>The <code>@context</code> keyword is used to change how the JSON-LD
+processor evaluates key-value pairs. In this case, it was used to
+map one string ('myvocab') to another string, which is interpreted as
+a IRI. In the example above, the <code>myvocab</code> string is replaced 
+with "<code>http://example.org/myvocab#</code>" when it
+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 for RDF, called a CURIE, and provides
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div id="an-example-of-a-context" class="section">
+<h3><span class="secno">2.6 </span>An Example of a Context</h3>
+
+<p>JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> define a known context. For example, the
+following default context could apply to all incoming Web Service calls
+previously accepting only JSON data:</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+    "@vocab": "http://example.org/default-vocab#",
+    "@base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+}</pre>
+
+<p>The <code>@vocab</code> string is a special keyword that states 
+that any term that doesn't resolve to a term or a prefix should be 
+appended to the <code>@vocab</code> IRI. This is done to ensure that 
+terms can be transformed to an IRI at all times.
+</p>
+
+<p>The <code>@base</code> string is a special keyword that states 
+that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
+<code>@base</code>.
+</p>
+
+<p>The <code>@coerce</code> keyword is used to specify type coersion
+rules for the data. For each key in the map, the key is the type to
+be coerced to and the value is the vocabulary term to be coerced.
+Type coersion for the key <code>xsd:anyURI</code> asserts that all 
+vocabulary terms listed should undergo coercion to an IRI, including
+<code>@base</code> processing for relative IRIs and CURIE processing
+for compact URI Expressions like <code>foaf:homepage</code>.
+</p>
+
+</div>
+</div>
+
+<div id="markup-examples" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">3.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+[
+ {
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/bob/",
+   "foaf:name": "Bob"
+ },
+ {
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/eve/",
+   "foaf:name": "Eve"
+ },
+ {
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/manu/",
+   "foaf:name": "Manu"
+ }
+]</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">3.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">3.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]</pre>
+</div>
+</div>
+
+<div id="the-json-ld-processing-algorithm" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>The JSON-LD Processing Algorithm</h2>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The Processing Algorithm is a work in progress, there are
+still major bugs in the algorithm and it's difficult to follow. It's provided
+only to very early implementers to give them an idea of how to implement a
+processor.</p>
+
+<h4 id="processing-algorithm-terms">Processing Algorithm Terms</h4>
+<ul>
+<li><dfn title="default_context" id="dfn-default_context">default context</dfn> - a context that is specified to the
+JSON-LD processing algorithm before processing begins.</li>
+<li><dfn title="default_graph" id="dfn-default_graph">default graph</dfn> - the destination graph for all triples
+generated by JSON-LD markup.</li>
+<li><dfn title="active_subject" id="dfn-active_subject">active subject</dfn> - the currently active subject that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_subject" id="dfn-inherited_subject">inherited subject</dfn> - a subject that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_property" id="dfn-active_property">active property</dfn> - the currently active property that the
+processor should use when generating triples.</li>
+<li><dfn title="inherited_property" id="dfn-inherited_property">inherited property</dfn> - a property that was detected at a
+higher level of processing to be used to generate a triple once a 
+<a class="tref" title="current_subject">current subject</a> is discovered or generated.</li>
+<li><dfn title="active_object" id="dfn-active_object">active object</dfn> - the currently active object that the
+processor should use when generating triples.</li>
+<li><dfn title="active_context" id="dfn-active_context">active context</dfn> - a context that is used to resolve
+CURIEs while the processing algorithm is running. The 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the top-most item on the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+<li><dfn title="local_context" id="dfn-local_context">local context</dfn> - a context that is specified at the JSON
+associative-array level, specified via the <code>@context</code> keyword.</li>
+<li><dfn title="list_of_incomplete_triples" id="dfn-list_of_incomplete_triples">list of incomplete triples</dfn> - A list of triples that have
+yet to have their subject set.</li>
+<li><dfn title="list_of_unprocessed_items" id="dfn-list_of_unprocessed_items">list of unprocessed items</dfn> - A list of objects that cannot be
+processed until a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is detected or the end of the
+current associative-array is detected.</li>
+<li><dfn title="processor_state" id="dfn-processor_state">processor state</dfn> - the processor state, which includes
+the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack, <a class="tref" title="current_subject">current subject</a>, 
+<a class="tref" title="current_property">current property</a>,
+<a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, and the 
+<a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+</li></ul>
+
+<h4 id="processing-tokens-and-keywords">Processing Tokens and Keywords</h4>
+<ul>
+<li><code>@context</code> - Used to set the active context.</li>
+<li><code>@base</code> - Used to set the base IRI for all object IRIs affected 
+by the active context.</li>
+<li><code>@vocab</code> - Used to set the base IRI for all property IRIs
+affected by the active context.</li>
+<li><code>@coerce</code> - Used to specify type coercion rules.</li>
+<li><code>@literal</code> - Used to specify a literal value.</li>
+<li><code>@iri</code> - Used to specify an IRI value.</li>
+<li><code>@language</code> - Used to specify the language for a literal.</li>
+<li><code>@datatype</code> - Used to specify the datatype for a literal.</li>
+<li><code>:</code> - The separator for CURIEs when used in JSON keys or
+JSON values.</li>
+<li><code>@</code> - Sets the active subjects.</li>
+<li><code>a</code> - Used to set the rdf:type of the active subjects.</li>
+</ul>
+
+<p>The algorithm below is designed for streaming (SAX-based) implementations.
+Implementers will find that non-streaming (document-based) implementations will
+be much easier to implement as full access to the JSON object model eliminates 
+some of the steps that are necessary for streaming implementations. A conforming
+JSON-LD processor <em class="rfc2119" title="must">must</em> implement a processing algorithm that results in the 
+same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following algorithm generates:</p>
+
+<ol class="algorithm">
+<li id="processing-step-default-context">Push the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> 
+onto the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack.</li>
+
+<li id="processing-step-associative">If an associative array is 
+detected, create a new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Copy the <a class="tref" title="current_context">current context</a> stack to
+the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>. Push the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> onto the newly created 
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>'s <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> stack. For each 
+key-value pair in the associative array, using the newly created
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> do the following:
+
+  <ol class="algorithm">
+
+    <li>If a <code>@context</code> keyword is found, the processor
+    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> into the
+    <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
+    any duplicate values in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the 
+    <code>@coerce</code> key is found, the processor
+    merges each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
+    <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
+    <code>@coerce</code> mapping, overwriting any duplicate values in 
+    the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
+    Process each object in the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>, 
+    starting at <a href="#processing-subject">Step 2.2</a>.</li>
+
+    <li id="processing-associative">If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> has not 
+    been detected, the current
+    key-value pair is placed into the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>
+    and processing proceeds to the next key-value pair. Otherwise, if the
+    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is known perform the following steps:</li>
+
+    <ol class="algorithm">
+
+      <li id="processing-subject">If a <code>@</code> key is found, the 
+      processor sets the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the value after 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> has been 
+      performed.
+
+      <ol class="algorithm">
+        <li>If the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> and 
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> values are specified, generate a triple
+        using the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> for the subject, the
+        <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> for the property, and the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> for the object.
+        </li>
+ 
+        <li>If there are any triples in the 
+        <a class="tref internalDFN" title="list_of_incomplete_triples" href="#dfn-list_of_incomplete_triples">list of incomplete triples</a>, complete each triple using the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> as the subject for each triple.
+        </li>
+      </ol>
+
+      </li>
+
+      <li>If an <code>a</code> key is found, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+      to <code>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</code>.
+      </li>
+
+      <li>If a key that is not <code>@context</code>, 
+      <code>@</code>, or <code>a</code>, set the 
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> by performing 
+      <a href="#markup-of-rdf-concepts">Property Processing</a> on the key.
+      </li>
+
+      <li>If the value is not an array, set the 
+      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by performing 
+      <a href="#markup-of-rdf-concepts">Object Processing</a> on the value. 
+      Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the
+      <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.</li>
+
+      <li>If the value is an associative array, then
+      process the value starting at 
+      <a href="#processing-step-associative">Step 2</a>.</li>
+
+      <li>If the value is a regular array, then process the value 
+      starting at 
+      <a href="#processing-step-array">Step 3</a> ensuring that
+      the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      are copied to a newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> was not discovered, then:
+      
+      <ol class="algorithm">
+        <li>Generate a <a class="tref" title="blank_node_identifier">blank node identifier</a> and set it as the 
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>.</li>
+
+        <li>Complete any previously incomplete triples by running all substeps 
+        of <a href="#processing-subject">Step 2.2.1</a>.
+        </li>
+      </ol>
+
+      </li><li>If the end of the associative array is detected, and a
+      <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> was not discovered, then assume that the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is unmodified and run all substeps of
+      <a href="#processing-associative">Step 2.2</a>
+      on the <a class="tref internalDFN" title="list_of_unprocessed_items" href="#dfn-list_of_unprocessed_items">list of unprocessed items</a>.
+     </li></ol>
+    </ol>
+  </li>
+
+  <li id="processing-step-array">If a regular array is detected, 
+  process each value in the array by doing the following:
+
+    <ol class="algorithm">
+      <li>If the value is an associative array, processes per 
+      <a href="#processing-step-associative">Step 2</a>, ensuring to set
+      the <a class="tref internalDFN" title="inherited_subject" href="#dfn-inherited_subject">inherited subject</a> to the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>
+      and the <a class="tref internalDFN" title="inherited_property" href="#dfn-inherited_property">inherited property</a> to the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      in the newly created <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+
+      <li>If the value is not an array, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> 
+      by performing <a href="#markup-of-rdf-concepts">Object Processing</a> on 
+      the value. Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, 
+      the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and 
+      place it into the <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a>.</li>
+
+      <li>If the value is a regular array, should we support RDF 
+      List/Sequence Processing? 
+      <div class="issue">If the value is a regular array, should we support 
+      RDF List/Sequence generation of triples? For example, would implementing
+      this be worth the more complex processing rules: "ex:orderedItems" : 
+      [["one", "two", "three"]]</div></li>
+    </ol>
+  </li>
+</ol>
+
+</div>
+
+<div id="markup-of-rdf-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Markup of RDF Concepts</h2>
+
+<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked 
+up in a way that is simple to understand and author by Web developers. In many
+cases, Javascript objects can become Linked Data with the simple addition
+of a context. Since RDF is also an important sub-community of the Linked
+Data movement, it is important that all RDF concepts are well-represented
+in this specification. This section details how each RDF concept can be
+expressed in JSON-LD.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">5.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
+and many objects are identified. IRIs can be expressed in a variety of
+different ways in JSON-LD.</p>
+
+<ol>
+  <li>In general, an IRI is generated if it is in the key position in 
+    an associative array. There are special rules for processing keys in
+    <code>@context</code> and when dealing with keys that start with the
+    <code>@</code> character.</li>
+  <li>An IRI is generated for the value specified using <code>@</code>, if
+    it is a string.</li>
+  <li>An IRI is generated for the value specified using <code>a</code>.</li>
+  <li>An IRI is generated for the value specified using the <code>@iri</code> 
+    keyword.</li>
+  <li>An IRI is generated when there are <code>@coerce</code> rules in 
+    effect for <code>xsd:anyURI</code> for a particular vocabulary term.</li>
+</ol>
+
+<p>An example of IRI generation for a key outside of a <code>@context</code>:
+</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p>In the example above, the key 
+<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
+opposed to being interpreted as a string..</p>
+
+<p>CURIE expansion also occurs for keys in JSON-LD:</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><code>foaf:name</code> above will automatically expand out to the IRI
+<code>http://xmlns.com/foaf/0.1/name</code>.</p>
+
+<p>An IRI is generated when a value is associated with a key using 
+the <code>@iri</code> keyword:</p>
+
+<pre class="example">
+{
+...
+  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}</pre>
+
+<p>If type coercion rules are specified in the <code>@context</code> for
+a particular vocabulary term, an IRI is generated:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:anyURI": "foaf:homepage"
+    } 
+  }</span>
+...
+  "foaf:homepage": "http://manu.sporny.org",
+...
+}</pre>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">5.2 </span>Identifying the Subject</h3>
+
+<p>A subject is declared using the <code>@</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, property, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to the IRI 
+<code>http://example.org/people#joebob</code>.
+</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">5.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the <code>a</code>
+key. Specifying the type in this way will generate a triple of the form 
+(subject, type, type-url).</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "<span class="diff">a</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple 
+(in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+</div>
+
+<div id="plain-literals" class="section">
+<h3><span class="secno">5.4 </span>Plain Literals</h3>
+
+<p>Regular text strings are called "plain literals" in RDF and are easily
+expressed using regular JSON strings.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="language-specification-in-plain-literals" class="section">
+<h3><span class="secno">5.5 </span>Language Specification in Plain Literals</h3>
+
+<p>JSON-LD makes an assumption that plain literals with associated
+language encoding information is not very common when used in
+JavaScript and Web Services. Thus, it takes a little more
+effort to express plain literals in a specified language.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}</pre>
+
+<p>The example above would generate a plain literal for <em>花澄</em> and
+associate the <code>ja</code> language tag with the triple that is
+generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="typed-literals" class="section">
+<h3><span class="secno">5.6 </span>Typed Literals</h3>
+
+<p>Literals may also be typed in JSON-LD in two ways:</p>
+
+<ol>
+  <li>By utilizing the <code>@coerce</code> keyword.</li>
+  <li>By utilizing the expanded form for specifying objects.</li>
+</ol>
+
+<p>The first example uses the <code>@coerce</code> keyword to express a
+typed literal:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }</span>
+...
+  "dc:modified": "2010-05-29T14:17:39+02:00",
+...
+}</pre>
+
+<p>The second example uses the expanded form for specifying objects:</p>
+
+<pre class="example">
+{
+...
+  "dc:modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }</span>
+...
+}</pre>
+
+<p>Both examples above would generate an object with the literal value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">5.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+arrays. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an array.</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "jaybee" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">5.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple typed literals may also be expressed using the expanded
+form for objects:</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/articles/8",
+  "dcterms:modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]</span>
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="blank-nodes" class="section">
+<h3><span class="secno">5.9 </span>Blank Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this is where blank nodes come
+into play. In JSON-LD, blank node identifiers are automatically created if a 
+subject is not specified using the <code>@</code> keyword. However, authors 
+may name blank nodes by using the special <code>_</code> CURIE prefix.</p>
+
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+named blank node.
+</p>
+
+</div>
+
+</div>
+
+<div id="advanced-features" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>Advanced Features</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality provided by RDF. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">6.1 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as doubles, 
+integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
+information to create <a href="#typed-literals">Typed Literals</a>:</p>
+
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+<p class="note">When dealing with a number of modern programming languages,
+including JavaScript ECMA-262, there is no distinction between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
+the number <code>5.3</code> and the number 
+<code>5.3e0</code> are treated as if they were the same. When converting from 
+JSON-LD to a language-native format and back, datatype information is lost in a 
+number of these languages. Thus, one could say that <code>5.3</code> is a 
+<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
+<strong>xsd:double</strong> in JSON-LD, but when both values are 
+converted to a language-native format the datatype difference between the two 
+is lost because the machine-level representation will almost always be a 
+<strong>double</strong>. 
+Implementers should be aware of this potential round-tripping issue between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
+objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
+to a language native type.
+</p>
+
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">6.2 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
+JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
+coerce and incoming or outgoing types to the proper RDF type based on a
+mapping of type IRIs to RDF types. Using type conversion, one may convert
+simple JSON data to properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to 
+plain literals, typed literals and IRIs.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@type":
+     {
+        "xsd:integer": "age",
+        "xsd:anyURI": "homepage",
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+</div>
+
+<div id="best-practices" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">7. </span>Best Practices</h2>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be 
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<div id="javascript" class="section">
+<h3><span class="secno">7.1 </span>JavaScript</h3>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in 
+JavaScript environments, however, features like the expanded form for
+object values mean that using JSON-LD directly in JavaScript may be 
+annoying without a middleware layer such as a simple library that 
+converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDF API, which enables a variety of RDF-based
+Web Applications, but some don't want to require that level of functionality 
+just to use JSON-LD. The group is still discussing the best way to proceed, 
+so input on how JSON-LD could more easily be utilized in JavaScript 
+environments would be very much appreciated.
+</p>
+</div>
+
+<div id="schema-less-databases" class="section">
+<h3><span class="secno">7.2 </span>Schema-less Databases</h3>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from 
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">8. </span>Advanced Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear 
+whether or not the JSON-LD specification is going to support the complexity 
+necessary to support each concept. The entire section on Advanced Concepts 
+should be considered as discussion points; it is merely a list of 
+possibilities where all of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="vocabulary-profiles" class="section">
+<h3><span class="secno">8.1 </span>Vocabulary Profiles</h3>
+
+<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
+a collection of prefixes and terms that can be re-used by a processor to simplfy
+markup. JSON-LD provides a similar mechanism called Vocabulary Profiles, which is 
+the inclusion of a context external to the JSON-LD document.</p>
+
+<p>The example below demonstrates how one may specify an external Vocabulary
+Profile. Assume the following profile exists at this imaginary URL:
+<code>http://example.org/profiles/contacts</code>.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}</pre>
+
+<p>The profile listed above can be used in the following way:</p>
+
+<pre class="example">
+{
+  "@profile": "http://example.org/profiles/contacts",
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">8.2 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an array to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single JSON-LD associative
+array.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "@": 
+  [
+    {
+      "@": "http://example.org/people#john",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "http://example.org/people#jane",
+      "a": "foaf:Person"
+    }
+  ]
+}</pre>
+
+<p>A disjoint graph could also be expressed like so:</p>
+
+<pre class="example">
+[
+  {
+    "@": "http://example.org/people#john",
+    "a": "foaf:Person"
+  },
+  {
+    "@": "http://example.org/people#jane",
+    "a": "foaf:Person"
+  }
+]</pre>
+
+</div>
+
+<div id="the-json-ld-api" class="section">
+<h3><span class="secno">8.3 </span>The JSON-LD API</h3>
+
+<p>This API provides a clean mechanism that enables developers to convert 
+JSON-LD data into a format that is easier to work with in various programming
+languages.
+</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDProcessor</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+};</span>
+</pre><div id="methods" class="section"><h4><span class="secno">8.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback"><code>toGraph</code></dt><dd>Parses JSON-LD and transforms the data into an Graph, which is 
+  compatible with the RDF Interfaces API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">RDF-INTERFACES</a></cite>]. 
+  This method will 
+  return <code>null</code> if there are any errors, or if the RDF Interfaces 
+  API is not available for use.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>Graph</a></code></div></dd><dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback"><code>toProjection</code></dt><dd>Parses JSON-LD text into an RDF API Projection object as specified
+    by the RDF API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-API">RDF-API</a></cite>].
+    If there are any errors, <code>null</code> is returned.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the Projection.</td></tr><tr><td class="prmName">template</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The Projection template to use when building the Projection.</td></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject to use when building the Projection.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
+
+<p>The JSONLDParserCallback is called whenever a processing error occurs on
+input data.</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre><div id="methods-1" class="section"><h4><span class="secno">8.3.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+
+<p>The following example demonstrates how to convert JSON-LD to a projection
+that is directly usable in a programming environment:
+</p>
+
+<pre class="example">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+
+// Map the JSON-LD to a language-native object
+var person = jsonld.toProjection(jsonldString, myTemplate);
+
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+      "Their homepage is: " + person.homepage);</pre>
+
+<p>A JSON-LD Serializer is also available to map a language-native object
+to JSON-LD.
+
+</p><pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
+};</span>
+</pre><div id="methods-2" class="section"><h4><span class="secno">8.3.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
+  Normalization is important when performing things like equality comparison
+  and digital signature creation and verification.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An associative array of key-value pairs that should be converted
+     to a JSON-LD string. It is assumed that a map already exists for the
+     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
+
+<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
+
+<p class="issue">This algorithm is very rough, untested, and probably contains
+many bugs. Use at your own risk. It will change in the coming months.</p>
+
+<p>The JSON-LD normalization algorithm is as follows:</p>
+
+<ol class="algorithm">
+  <li>Remove the <code>@context</code> key and preserve it as the 
+  <dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
+  <li>For each key
+   <ol class="algorithm">
+    <li>If the key is a CURIE, expand the CURIE to an IRI using the
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+   </ol>
+  </li>
+  <li>For each value
+   <ol class="algorithm">
+    <li>If the value should be type coerced per the 
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
+        new value.</li>
+    <li>If the value is a CURIE, expand the CURIE to an IRI using the
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+    <li>If the value is a Typed Literal and the type is a CURIE,
+        expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+    <li>When generating the final value, use expanded object value form to
+      store all IRIs, typed literals and plain literals with language
+      information.</li>
+   </ol>
+  </li><li>Output each sorted key-value pair without any extraneous whitespace. If 
+  the value is an associative array, perform this algorithm, starting
+  at step #1, recursively on the sub-tree. There should be no nesting in
+  the outputted JSON data. That is, the top-most element should be an
+  array. Each item in the array contains a single subject with a 
+  corresponding array of properties in UTF-8 sort order. Any related 
+  objects that are complex objects themselves should be given a top-level 
+  object in the top-level array.</li>
+  
+</ol>
+
+<p class="issue">Note that normalizing named blank nodes is impossible at
+present since one would have to specify a blank node naming algorithm. For
+the time being, you cannot normalize graphs that contain named blank
+nodes. However, normalizing graphs that contain non-named blank nodes 
+is supported.</p>
+
+<pre class="example">
+var myObj = { "@context" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "@type": {
+                   "xsd:nonNegativeInteger": "age",
+                   "xsd:anyURI": "homepage"
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : 42,
+              "homepage" : "http://example.org/people/joe" };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);</pre>
+
+<p>After the code in the example above has executed, the 
+<strong>jsonldText</strong> value will be (line-breaks added for 
+readability):</p>
+
+<pre class="example">
+[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
+"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
+"http://xmlns.com/foaf/0.1/name":"Joe Jackson"}]</pre>
+
+<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
+ensure that the normalized value is a string. In order to generate the
+string from a <strong>double</strong> value, output equivalent to the
+<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
+<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
+is the value to be converted.</p>
+
+<p>To convert the a double value in JavaScript, implementers can use the 
+following snippet of code:</p>
+
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
+
+<p class="note">When data needs to be normalized, JSON-LD authors should
+not use values that are going to undergo automatic conversion. This is due
+to the lossy nature of <strong>xsd:double</strong> values.</p>
+
+</div>
+
+</div>
+
+
+
+<div class="appendix section" id="the-default-context">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>The Default Context</h2>
+
+<p>The <dfn title="default_context" id="dfn-default_context-1">default context</dfn> is provided to ensure that there are a
+reasonable set of prefixes and terms available to all JSON-LD developers.
+Mappings specified by the default context <em class="rfc2119" title="should not">should not</em> be overwritten by
+JSON-LD authors. All JSON-LD processors <em class="rfc2119" title="must">must</em> load the following context 
+in as the intial context before processing JSON-LD text.</p>
+
+<pre>
+{
+  "@context":
+  {
+    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dcterms": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "vcard": "http://www.w3.org/2006/vcard/ns# ",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "cc": "http://creativecommons.org/ns#",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "com": "http://purl.org/commerce#",
+    "ps": "http://purl.org/payswarm#",
+    "gr": "http://purl.org/goodrelations/v1#",
+    "sig": "http://purl.org/signature#",
+    "ccard": "http://purl.org/commerce/creditcard#"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+}
+</pre>
+</div>
+
+
+<div class="appendix section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">B. </span>Acknowledgements</h2>
+
+<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
+rationale and reasoning behind the JSON-LD work via his work on RDFj, 
+Dave Longley who reviewed, provided feedback, and performed several
+implementation on the specification, and Ian Davis, who created RDF/JSON. 
+Thanks also to Nathan Rixham, Bradley P. Allen and Richard Cyganiak for their 
+input on the specification.</p>
+</div>
+
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">C. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">C.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-API">[RDF-API]</dt><dd>Manu Sporny, Benjamin Adrian, Nathan Rixham; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><cite>RDF API</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">http://www.w3.org/2010/02/rdfa/sources/rdf-api/</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RDF-INTERFACES">[RDF-INTERFACES]</dt><dd>Nathan Rixham, Manu Sporny, Benjamin Adrian; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><cite>RDF Interfaces</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/</a>
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110507/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110615/diff-20110507.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,11363 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+-
+Linked
+Data
+Expression
+in
+JSON
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+Linked
+Data
+</h2>
+<h2 id="unofficial-draft-15-june-2011">
+Unofficial
+Draft
+<del class="diff-old">07
+May
+</del>
+<ins class="diff-chg">15
+June
+</ins>
+2011
+</h2>
+<dl>
+<dt>
+<del class="diff-old">Editor:
+</del>
+<ins class="diff-chg">Editors:
+</ins>
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+<ins class="diff-new">Gregg
+Kellogg
+</ins></a>,<ins class="diff-new">
+Kellogg
+Associates
+</ins></dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20110507.html">
+diff
+to
+previous
+version
+</a>.
+</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+Developers
+that
+embed
+structured
+data
+in
+their
+Web
+pages
+can
+choose
+among
+a
+number
+of
+languages
+such
+as
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+],
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+Each
+of
+these
+structured
+data
+languages,
+while
+incompatible
+at
+the
+syntax
+level,
+can
+be
+easily
+mapped
+to
+RDF.
+JSON
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+Linked
+Data
+that
+can
+be
+used
+to
+represent
+objects
+specified
+via
+RDFa,
+Microformats
+and
+Microdata.
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design-goals-and-rationale" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Goals
+</a>
+</li>
+<li class="tocline">
+<a href="#map-terms-to-iris" class="tocxref">
+<span class="secno">
+2.2
+</span>
+Map
+Terms
+to
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-context" class="tocxref">
+<span class="secno">
+2.3
+</span>
+The
+JSON-LD
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#unambiguous-identifiers-for-json" class="tocxref">
+<span class="secno">
+2.4
+</span>
+Unambiguous
+Identifiers
+for
+JSON
+</a>
+</li>
+<li class="tocline">
+<a href="#mashing-up-vocabularies" class="tocxref">
+<span class="secno">
+2.5
+</span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#an-example-of-a-context" class="tocxref">
+<span class="secno">
+2.6
+</span>
+An
+Example
+of
+a
+Context
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+3.
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+3.1
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+3.2
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+3.3
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<del class="diff-old">4.
+The
+JSON-LD
+Processing
+Algorithm
+</del>
+<a href="#markup-of-rdf-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+Markup
+of
+RDF
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">4.1
+</ins>
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">4.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.3
+</del>
+<ins class="diff-chg">4.3
+</ins>
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#plain-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.4
+</del>
+<ins class="diff-chg">4.4
+</ins>
+</span>
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#language-specification-in-plain-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.5
+</del>
+<ins class="diff-chg">4.5
+</ins>
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#typed-literals" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.6
+</del>
+<ins class="diff-chg">4.6
+</ins>
+</span>
+Typed
+Literals
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.7
+</del>
+<ins class="diff-chg">4.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.8
+</del>
+<ins class="diff-chg">4.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#blank-nodes" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.9
+</del>
+<ins class="diff-chg">4.9
+</ins>
+</span>
+Blank
+Nodes
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-features" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+Advanced
+Features
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+Automatic
+Typing
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+Type
+Coercion
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-processing-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">6.
+</ins></span><ins class="diff-chg">
+The
+JSON-LD
+Processing
+Algorithm
+</ins></a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno"><ins class="diff-chg">
+6.1
+</ins></span><ins class="diff-chg">
+Overview
+</ins></a></li><li class="tocline"><a href="#processing-algorithm-terms" class="tocxref"><span class="secno"><ins class="diff-chg">
+6.2
+</ins></span><ins class="diff-chg">
+Processing
+Algorithm
+Terms
+</ins></a></li><li class="tocline"><a href="#processing-tokens-and-keywords" class="tocxref"><span class="secno"><ins class="diff-chg">
+6.3
+</ins></span><ins class="diff-chg">
+Processing
+Tokens
+and
+Keywords
+</ins></a></li><li class="tocline"><a href="#context" class="tocxref"><span class="secno"><ins class="diff-chg">
+6.4
+</ins></span><ins class="diff-chg">
+Context
+</ins></a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno"><ins class="diff-chg">
+6.4.1
+</ins></span><ins class="diff-chg">
+Coerce
+</ins></a></li></ul></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno"><ins class="diff-chg">
+6.5
+</ins></span><ins class="diff-chg">
+Chaining
+</ins></a></li><li class="tocline"><a href="#iri-processing" class="tocxref"><span class="secno"><ins class="diff-chg">
+6.6
+</ins></span><ins class="diff-chg">
+IRI
+Processing
+</ins></a></li></ul></li><li class="tocline"><a href="#sequence" class="tocxref">
+<span class="secno">
+7.
+</span>
+<ins class="diff-new">Sequence
+</ins></a></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno"><ins class="diff-new">
+8.
+</ins></span>
+Best
+Practices
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#javascript" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.1
+</del>
+<ins class="diff-chg">8.1
+</ins>
+</span>
+JavaScript
+</a>
+</li>
+<li class="tocline">
+<a href="#schema-less-databases" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.2
+</del>
+<ins class="diff-chg">8.2
+</ins>
+</span>
+Schema-less
+Databases
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.
+</del>
+<ins class="diff-chg">9.
+</ins>
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#vocabulary-profiles" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.1
+</del>
+<ins class="diff-chg">9.1
+</ins>
+</span>
+Vocabulary
+Profiles
+</a>
+</li>
+<li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.2
+</del>
+<ins class="diff-chg">9.2
+</ins>
+</span>
+Disjoint
+Graphs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-api" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.3
+</del>
+<ins class="diff-chg">9.3
+</ins>
+</span>
+The
+JSON-LD
+API
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.3.1
+</del>
+<ins class="diff-chg">9.3.1
+</ins>
+</span>
+Methods
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.3.2
+</del>
+<ins class="diff-chg">9.3.2
+</ins>
+</span>
+Methods
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-2" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.3.3
+</del>
+<ins class="diff-chg">9.3.3
+</ins>
+</span>
+Methods
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-default-context" class="tocxref">
+<span class="secno">
+A.
+</span>
+The
+Default
+Context
+</a>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+B.
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+C.
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+C.1
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+C.2
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+JSON-LD
+is
+designed
+as
+a
+light-weight
+syntax
+that
+can
+be
+used
+to
+express
+Linked
+Data.
+It
+is
+primarily
+intended
+to
+be
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+and
+other
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+interoperable
+Web
+Services
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+document
+storage
+engines.
+It
+is
+practical
+and
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+and
+existing
+code
+that
+is
+in
+use
+today.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+Microformats
+data,
+and
+Microdata.
+That
+is,
+it
+supports
+every
+major
+Web-based
+structured
+data
+model
+in
+use
+today.
+It
+does
+not
+require
+anyone
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+out-of-band.
+The
+syntax
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+very
+small
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<p>
+<ins class="diff-new">JSON,
+as
+specified
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
+RFC4627
+</ins></a>
+</cite>
+<ins class="diff-new">],
+is
+a
+simple
+language
+for
+representing
+objects
+on
+the
+web.
+Linked
+Data
+is
+a
+way
+of
+describing
+content
+across
+different
+documents,
+or
+web
+resources.
+Web
+resources
+are
+described
+using
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a><ins class="diff-new">
+s,
+and
+typically
+are
+dereferencable
+entities
+that
+may
+be
+used
+to
+find
+more
+information,
+creating
+a
+"web
+of
+knowledge".
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+linked
+data
+in
+JSON.
+</ins>
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+write
+processors
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+and
+<ins class="diff-new">RDF
+as
+described
+in
+</ins>
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+All
+comments
+and
+discussion
+takes
+place
+on
+the
+public
+mailing
+list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
+public-linked-json@w3.org
+</a>
+</li>
+<li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="https://github.com/json-ld/json-ld.org/issues">
+issue
+tracker
+</a>.
+</li>
+<li>
+<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=#json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+</div>
+</div>
+<div id="design-goals-and-rationale" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+Goals
+and
+Rationale
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="goals" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+Goals
+</h3>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+don't
+need
+to
+know
+RDF
+in
+order
+to
+use
+the
+basic
+functionality
+provided
+by
+JSON-LD.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+should
+be
+100%
+compatible
+with
+JSON.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+All
+major
+RDF
+concepts
+must
+be
+expressible
+via
+the
+JSON-LD
+syntax.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable.
+</dd>
+<dt>
+Zero
+Edits,
+most
+of
+the
+time
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+At
+times,
+mapping
+JSON
+to
+RDF
+can
+become
+difficult
+-
+in
+these
+instances,
+rather
+than
+having
+JSON-LD
+support
+esoteric
+markup,
+we
+chose
+not
+to
+support
+the
+use
+case
+and
+support
+a
+simplified
+syntax
+instead.
+So,
+while
+we
+strive
+for
+Zero
+Edits,
+it
+was
+not
+always
+possible
+without
+adding
+great
+complexity
+to
+the
+language.
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<div id="map-terms-to-iris" class="section">
+<h3>
+<span class="secno">
+2.2
+</span>
+Map
+Terms
+to
+IRIs
+</h3>
+<p>
+<ins class="diff-new">An
+Internationalized
+Resource
+Identifier
+(
+</ins><dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></dfn><ins class="diff-new">
+)
+as
+described
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-new">
+RFC3987
+</ins></a></cite><ins class="diff-new">
+],
+is
+a
+mechanism
+for
+representing
+unique
+identifiers
+on
+the
+web.
+In
+Linked
+Data,
+IRIs
+(or
+URI
+references)
+are
+commonly
+used
+for
+describing
+entities
+and
+properties.
+</ins></p><p>
+Establishing
+a
+mechanism
+to
+map
+JSON
+values
+to
+IRIs
+will
+help
+in
+the
+mapping
+of
+JSON
+objects
+to
+RDF.
+This
+does
+not
+mean
+that
+JSON-LD
+must
+be
+restrictive
+in
+declaring
+a
+set
+of
+terms,
+rather,
+experimentation
+and
+innovation
+should
+be
+supported
+as
+part
+of
+the
+core
+design
+of
+JSON-LD.
+There
+are,
+however,
+a
+number
+of
+very
+small
+design
+criteria
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+RDF
+data
+that
+will
+create
+value
+for
+the
+greater
+semantic
+web
+community
+and
+JSON/REST-based
+Web
+Services
+community.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+object
+as
+the
+example
+for
+this
+section:
+</p>
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<div id="the-json-ld-context" class="section">
+<h3>
+<span class="secno">
+2.3
+</span>
+The
+JSON-LD
+Context
+</h3>
+<p>
+A
+context
+is
+used
+<del class="diff-old">in
+RDFa
+</del>
+to
+allow
+developers
+to
+use
+aliases
+for
+<del class="diff-old">IRIs.
+</del>
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+<ins class="diff-chg">IRI
+</ins></a><ins class="diff-chg">
+s.
+</ins>
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+terms
+mean
+something,
+which
+you
+will
+eventually
+want
+to
+query.
+<ins class="diff-new">A
+context
+allows
+the
+expression
+of
+a
+number
+of
+terms
+which
+map
+directly
+to
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a><ins class="diff-new">
+s.
+For
+example,
+the
+term
+</ins><code><ins class="diff-new">
+name
+</ins></code><ins class="diff-new">
+may
+map
+directly
+to
+the
+IRI
+</ins><code><ins class="diff-new">
+http://xmlns.com/foaf/0.1/name
+</ins></code>.<ins class="diff-new">
+This
+allows
+JSON-LD
+documents
+to
+be
+constructed
+using
+common
+JSON
+syntax
+of
+using
+simple
+name/value
+pairs.
+</ins></p><p><ins class="diff-new">
+To
+reduce
+the
+number
+of
+different
+terms
+that
+must
+be
+defined,
+JSON-LD
+also
+allows
+terms
+to
+be
+used
+to
+expand
+Compact
+URIs
+(
+</ins><abbr title="Compact URI"><ins class="diff-new">
+CURIE
+</ins></abbr><ins class="diff-new">
+).
+</ins>
+The
+semantic
+web
+specifies
+this
+via
+<em>
+Vocabulary
+Documents
+<del class="diff-old">.
+The
+</del>
+</em>,
+<ins class="diff-chg">in
+which
+a
+prefix
+is
+associated
+with
+a
+document,
+and
+a
+suffix
+is
+used
+to
+create
+an
+IRI
+based
+on
+this
+vocabulary.
+For
+example,
+the
+</ins>
+IRI
+<em>
+http://xmlns.com/foaf/0.1/
+</em>
+specifies
+a
+Vocabulary
+Document,
+and
+<strong>
+name
+</strong>
+is
+a
+term
+in
+that
+vocabulary.
+Join
+the
+two
+items
+together
+and
+you
+have
+an
+unambiguous
+identifier
+for
+a
+vocabulary
+term.
+The
+Compact
+URI
+Expression,
+or
+short-form,
+is
+<code>
+foaf:name
+</code>
+and
+the
+expanded-form
+is
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+vocabulary
+term
+identifies
+the
+given
+name
+for
+something,
+for
+example
+-
+a
+person's
+name.
+</p>
+<p>
+Developers,
+and
+machines,
+would
+be
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+Machines
+need
+the
+same
+sort
+of
+dictionary
+of
+terms,
+and
+URIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+The
+context
+provides
+a
+collection
+of
+vocabulary
+terms
+that
+can
+be
+used
+for
+a
+JSON
+object.
+</p>
+</div>
+<div id="unambiguous-identifiers-for-json" class="section">
+<h3>
+<span class="secno">
+2.4
+</span>
+Unambiguous
+Identifiers
+for
+JSON
+</h3>
+<p>
+If
+a
+set
+of
+terms,
+like
+<strong>
+Person
+</strong>,
+<strong>
+name
+</strong>,
+and
+<strong>
+homepage
+</strong>,
+are
+defined
+in
+a
+context,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+JSON
+objects,
+machines
+could
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+<p>
+Doing
+this
+would
+mean
+that
+JSON
+would
+start
+to
+become
+unambiguously
+machine-readable,
+play
+well
+with
+the
+semantic
+web,
+and
+basic
+markup
+wouldn't
+be
+that
+much
+more
+complex
+than
+basic
+JSON
+markup.
+A
+win,
+all
+around.
+</p>
+</div>
+<div id="mashing-up-vocabularies" class="section">
+<h3>
+<span class="secno">
+2.5
+</span>
+Mashing
+Up
+Vocabularies
+</h3>
+<p>
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</p>
+<ul>
+<li>
+RDF
+-
+for
+describing
+information
+about
+objects
+on
+the
+semantic
+web.
+</li>
+<li>
+RDFS
+-
+for
+expressing
+things
+like
+labels
+and
+comments.
+</li>
+<li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+Since
+these
+vocabularies
+are
+very
+popular,
+they
+are
+pre-defined
+in
+something
+called
+the
+<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
+default
+context
+</a>,
+which
+is
+a
+set
+of
+vocabulary
+prefixes
+that
+are
+pre-loaded
+in
+all
+JSON-LD
+processors.
+The
+contents
+of
+the
+<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
+default
+context
+</a>
+are
+provided
+later
+in
+this
+document.
+Using
+the
+<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
+default
+context
+</a>
+allows
+developers
+to
+express
+data
+unambiguously,
+like
+so:
+</p>
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+<p>
+Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+<del class="diff-old">default
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+</ins>
+context
+</a>
+in-line
+using
+the
+<code>
+@context
+</code>
+keyword,
+like
+so:
+</p>
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}
+</pre>
+<p>
+The
+<code>
+@context
+</code>
+keyword
+is
+used
+to
+change
+how
+the
+JSON-LD
+processor
+evaluates
+key-value
+pairs.
+In
+this
+case,
+it
+was
+used
+to
+map
+one
+string
+('myvocab')
+to
+another
+string,
+which
+is
+interpreted
+as
+a
+<del class="diff-old">IRI.
+</del>
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+<ins class="diff-chg">IRI
+</ins></a>.
+In
+the
+example
+above,
+the
+<code>
+myvocab
+</code>
+string
+is
+replaced
+with
+"
+<code>
+http://example.org/myvocab#
+</code>
+"
+when
+it
+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
+for
+RDF,
+called
+a
+CURIE,
+and
+provides
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</p>
+<p>
+</p>
+</div>
+<div id="an-example-of-a-context" class="section">
+<h3>
+<span class="secno">
+2.6
+</span>
+An
+Example
+of
+a
+Context
+</h3>
+<p>
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+A
+JSON-LD
+aware
+Web
+Service
+<em class="rfc2119" title="may">
+may
+</em>
+define
+a
+known
+context.
+For
+example,
+the
+following
+<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
+default
+context
+</a>
+could
+apply
+to
+all
+incoming
+Web
+Service
+calls
+previously
+accepting
+only
+JSON
+data:
+</p>
+<pre class="example">
+{
+  "@context": 
+  {
+    "@vocab": "http://example.org/default-vocab#",
+    "@base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+    "@coerce": 
+    {
+<del class="diff-old">      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
+</del>
+<ins class="diff-chg">      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
+</ins>
+      "xsd:integer": "foaf:age"
+    }
+  }
+}
+</pre>
+<p>
+The
+<code>
+@vocab
+</code>
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+term
+that
+doesn't
+resolve
+to
+a
+term
+or
+a
+prefix
+should
+be
+appended
+to
+the
+<code>
+@vocab
+</code>
+IRI.
+This
+is
+done
+to
+ensure
+that
+terms
+can
+be
+transformed
+to
+an
+IRI
+at
+all
+times.
+</p>
+<p>
+The
+<code>
+@base
+</code>
+string
+is
+a
+special
+keyword
+that
+states
+that
+any
+relative
+IRI
+<em class="rfc2119" title="must">
+must
+</em>
+be
+appended
+to
+the
+string
+specified
+by
+<code>
+@base
+</code>.
+</p>
+<p>
+The
+<code>
+@coerce
+</code>
+keyword
+is
+used
+to
+specify
+type
+<del class="diff-old">coersion
+</del>
+<ins class="diff-chg">coercion
+</ins>
+rules
+for
+the
+data.
+For
+each
+key
+in
+the
+map,
+the
+key
+is
+the
+type
+to
+be
+coerced
+to
+and
+the
+value
+is
+the
+vocabulary
+term
+to
+be
+coerced.
+Type
+<del class="diff-old">coersion
+</del>
+<ins class="diff-chg">coercion
+</ins>
+for
+the
+key
+<code>
+xsd:anyURI
+</code>
+asserts
+that
+all
+vocabulary
+terms
+listed
+should
+undergo
+coercion
+to
+an
+IRI,
+including
+<code>
+@base
+</code>
+processing
+for
+relative
+IRIs
+and
+CURIE
+processing
+for
+compact
+URI
+Expressions
+<del class="diff-old">like
+</del>
+<ins class="diff-chg">such
+as
+</ins>
+<code>
+foaf:homepage
+</code>.
+</p>
+</div>
+</div>
+<div id="markup-examples" class="section">
+<h2>
+<span class="secno">
+3.
+</span>
+Markup
+Examples
+</h2>
+<p>
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</p>
+<div id="rdfa" class="section">
+<h3>
+<span class="secno">
+3.1
+</span>
+RDFa
+</h3>
+<p>
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</p>
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</pre>
+<p>
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</p>
+<pre class="example">
+[
+ {
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/bob/",
+   "foaf:name": "Bob"
+ },
+ {
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/eve/",
+   "foaf:name": "Eve"
+ },
+ {
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/manu/",
+   "foaf:name": "Manu"
+ }
+]
+</pre>
+</div>
+<div id="microformats" class="section">
+<h3>
+<span class="secno">
+3.2
+</span>
+Microformats
+</h3>
+<p>
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</p>
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+</pre>
+<p>
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+<code>
+url
+</code>
+and
+<code>
+fn
+</code>
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+<code>
+http://tantek.com
+</code>.
+</p>
+<pre class="example">
+{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}
+</pre>
+</div>
+<div id="microdata" class="section">
+<h3>
+<span class="secno">
+3.3
+</span>
+Microdata
+</h3>
+<p>
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</p>
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</pre>
+<p>
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</p>
+<pre class="example">
+[
+  {
+    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]
+</pre>
+</div>
+</div>
+<del class="diff-old">4.
+The
+JSON-LD
+Processing
+Algorithm
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+The
+Processing
+Algorithm
+is
+a
+work
+in
+progress,
+there
+are
+still
+major
+bugs
+in
+the
+algorithm
+and
+it's
+difficult
+to
+follow.
+It's
+provided
+only
+to
+very
+early
+implementers
+to
+give
+them
+an
+idea
+of
+how
+to
+implement
+a
+processor.
+Processing
+Algorithm
+Terms
+default
+context
+-
+a
+context
+that
+is
+specified
+to
+the
+JSON-LD
+processing
+algorithm
+before
+processing
+begins.
+default
+graph
+-
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+active
+subject
+-
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+inherited
+subject
+-
+a
+subject
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+current
+subject
+is
+discovered
+or
+generated.
+active
+property
+-
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+inherited
+property
+-
+a
+property
+that
+was
+detected
+at
+a
+higher
+level
+of
+processing
+to
+be
+used
+to
+generate
+a
+triple
+once
+a
+current
+subject
+is
+discovered
+or
+generated.
+active
+object
+-
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+active
+context
+-
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+active
+context
+is
+the
+top-most
+item
+on
+the
+active
+context
+stack.
+local
+context
+-
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+@context
+keyword.
+list
+of
+incomplete
+triples
+-
+A
+list
+of
+triples
+that
+have
+yet
+to
+have
+their
+subject
+set.
+list
+of
+unprocessed
+items
+-
+A
+list
+of
+objects
+that
+cannot
+be
+processed
+until
+a
+local
+context
+is
+detected
+or
+the
+end
+of
+the
+current
+associative-array
+is
+detected.
+processor
+state
+-
+the
+processor
+state,
+which
+includes
+the
+active
+context
+stack,
+current
+subject
+,
+current
+property
+,
+list
+of
+incomplete
+triples
+,
+and
+the
+list
+of
+unprocessed
+items
+.
+Processing
+Tokens
+and
+Keywords
+@context
+-
+Used
+to
+set
+the
+active
+context.
+@base
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+active
+context.
+@vocab
+-
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+active
+context.
+@coerce
+-
+Used
+to
+specify
+type
+coercion
+rules.
+@literal
+-
+Used
+to
+specify
+a
+literal
+value.
+@iri
+-
+Used
+to
+specify
+an
+IRI
+value.
+@language
+-
+Used
+to
+specify
+the
+language
+for
+a
+literal.
+@datatype
+-
+Used
+to
+specify
+the
+datatype
+for
+a
+literal.
+:
+-
+The
+separator
+for
+CURIEs
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+@
+-
+Sets
+the
+active
+subjects.
+a
+-
+Used
+to
+set
+the
+rdf:type
+of
+the
+active
+subjects.
+The
+algorithm
+below
+is
+designed
+for
+streaming
+(SAX-based)
+implementations.
+Implementers
+will
+find
+that
+non-streaming
+(document-based)
+implementations
+will
+be
+much
+easier
+to
+implement
+as
+full
+access
+to
+the
+JSON
+object
+model
+eliminates
+some
+of
+the
+steps
+that
+are
+necessary
+for
+streaming
+implementations.
+A
+conforming
+JSON-LD
+processor
+must
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+default
+graph
+that
+the
+following
+algorithm
+generates:
+Push
+the
+default
+context
+onto
+the
+active
+context
+stack.
+If
+an
+associative
+array
+is
+detected,
+create
+a
+new
+processor
+state
+.
+Copy
+the
+current
+context
+stack
+to
+the
+newly
+created
+processor
+state
+.
+Push
+the
+active
+context
+onto
+the
+newly
+created
+processor
+state
+'s
+active
+context
+stack.
+For
+each
+key-value
+pair
+in
+the
+associative
+array,
+using
+the
+newly
+created
+processor
+state
+do
+the
+following:
+If
+a
+@context
+keyword
+is
+found,
+the
+processor
+merges
+each
+key-value
+pair
+in
+the
+local
+context
+into
+the
+active
+context
+,
+overwriting
+any
+duplicate
+values
+in
+the
+active
+context
+.
+If
+the
+@coerce
+key
+is
+found,
+the
+processor
+merges
+each
+key-value
+pair
+in
+the
+local
+context
+'s
+@coerce
+mapping
+into
+the
+active
+context
+'s
+@coerce
+mapping,
+overwriting
+any
+duplicate
+values
+in
+the
+active
+context
+'s
+@coerce
+mapping.
+Process
+each
+object
+in
+the
+list
+of
+unprocessed
+items
+,
+starting
+at
+Step
+2.2
+.
+If
+the
+local
+context
+has
+not
+been
+detected,
+the
+current
+key-value
+pair
+is
+placed
+into
+the
+list
+of
+unprocessed
+items
+and
+processing
+proceeds
+to
+the
+next
+key-value
+pair.
+Otherwise,
+if
+the
+local
+context
+is
+known
+perform
+the
+following
+steps:
+If
+a
+@
+key
+is
+found,
+the
+processor
+sets
+the
+active
+subject
+to
+the
+value
+after
+Object
+Processing
+has
+been
+performed.
+If
+the
+inherited
+subject
+and
+inherited
+property
+values
+are
+specified,
+generate
+a
+triple
+using
+the
+inherited
+subject
+for
+the
+subject,
+the
+inherited
+property
+for
+the
+property,
+and
+the
+active
+subject
+for
+the
+object.
+If
+there
+are
+any
+triples
+in
+the
+list
+of
+incomplete
+triples
+,
+complete
+each
+triple
+using
+the
+active
+subject
+as
+the
+subject
+for
+each
+triple.
+If
+an
+a
+key
+is
+found,
+set
+the
+active
+property
+to
+http://www.w3.org/1999/02/22-rdf-syntax-ns#type
+.
+If
+a
+key
+that
+is
+not
+@context
+,
+@
+,
+or
+a
+,
+set
+the
+active
+property
+by
+performing
+Property
+Processing
+on
+the
+key.
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+active
+object
+by
+performing
+Object
+Processing
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+active
+subject
+,
+the
+active
+property
+and
+the
+active
+object
+.
+If
+the
+value
+is
+an
+associative
+array,
+then
+process
+the
+value
+starting
+at
+Step
+2
+.
+If
+the
+value
+is
+a
+regular
+array,
+then
+process
+the
+value
+starting
+at
+Step
+3
+ensuring
+that
+the
+active
+subject
+and
+the
+active
+property
+are
+copied
+to
+a
+newly
+created
+processor
+state
+.
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+active
+subject
+was
+not
+discovered,
+then:
+Generate
+a
+blank
+node
+identifier
+and
+set
+it
+as
+the
+active
+subject
+.
+Complete
+any
+previously
+incomplete
+triples
+by
+running
+all
+substeps
+of
+Step
+2.2.1
+.
+If
+the
+end
+of
+the
+associative
+array
+is
+detected,
+and
+a
+local
+context
+was
+not
+discovered,
+then
+assume
+that
+the
+active
+context
+is
+unmodified
+and
+run
+all
+substeps
+of
+Step
+2.2
+on
+the
+list
+of
+unprocessed
+items
+.
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following:
+If
+the
+value
+is
+an
+associative
+array,
+processes
+per
+Step
+2
+,
+ensuring
+to
+set
+the
+inherited
+subject
+to
+the
+active
+subject
+and
+the
+inherited
+property
+to
+the
+active
+property
+in
+the
+newly
+created
+processor
+state
+.
+If
+the
+value
+is
+not
+an
+array,
+set
+the
+active
+object
+by
+performing
+Object
+Processing
+on
+the
+value.
+Generate
+a
+triple
+representing
+the
+active
+subject
+,
+the
+active
+property
+and
+the
+active
+object
+and
+place
+it
+into
+the
+default
+graph
+.
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+Processing?
+If
+the
+value
+is
+a
+regular
+array,
+should
+we
+support
+RDF
+List/Sequence
+generation
+of
+triples?
+For
+example,
+would
+implementing
+this
+be
+worth
+the
+more
+complex
+processing
+rules:
+"ex:orderedItems"
+:
+[["one",
+"two",
+"three"]]
+</del>
+<div id="markup-of-rdf-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+Markup
+of
+RDF
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+most
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+Javascript
+objects
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+Since
+RDF
+is
+also
+an
+important
+sub-community
+of
+the
+Linked
+Data
+movement,
+it
+is
+important
+that
+all
+RDF
+concepts
+are
+well-represented
+in
+this
+specification.
+This
+section
+details
+how
+each
+RDF
+concept
+can
+be
+expressed
+in
+JSON-LD.
+</p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">4.1
+</ins>
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+subjects
+and
+many
+objects
+are
+identified.
+IRIs
+can
+be
+expressed
+in
+a
+variety
+of
+different
+ways
+in
+JSON-LD.
+</p>
+<ol>
+<li>
+In
+general,
+an
+IRI
+is
+generated
+if
+it
+is
+in
+the
+key
+position
+in
+an
+associative
+array.
+There
+are
+special
+rules
+for
+processing
+keys
+in
+<code>
+@context
+</code>
+and
+when
+dealing
+with
+keys
+that
+start
+with
+the
+<code>
+@
+</code>
+character.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+@
+</code>,
+if
+it
+is
+a
+string.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+a
+</code>.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+the
+<code>
+@iri
+</code>
+keyword.
+</li>
+<li>
+An
+IRI
+is
+generated
+when
+there
+are
+<code>
+@coerce
+</code>
+rules
+in
+effect
+for
+<code>
+xsd:anyURI
+</code>
+for
+a
+particular
+vocabulary
+term.
+</li>
+</ol>
+<p>
+An
+example
+of
+IRI
+generation
+for
+a
+key
+outside
+of
+a
+<code>
+@context
+</code>:
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+In
+the
+example
+above,
+the
+key
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+is
+interpreted
+as
+an
+IRI,
+as
+opposed
+to
+being
+interpreted
+as
+a
+string..
+</p>
+<p>
+<ins class="diff-new">Term
+expansion
+occurs
+for
+IRIs
+if
+a
+term
+is
+defined
+within
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>:</p><pre class="example"><ins class="diff-new">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}
+</ins></pre><p>
+CURIE
+expansion
+also
+occurs
+for
+keys
+in
+JSON-LD:
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+<code>
+foaf:name
+</code>
+above
+will
+automatically
+expand
+out
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+</p>
+<p>
+An
+IRI
+is
+generated
+when
+a
+value
+is
+associated
+with
+a
+key
+using
+the
+<code>
+@iri
+</code>
+keyword:
+</p>
+<pre class="example">
+{
+...
+  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}
+</pre>
+<p>
+If
+type
+coercion
+rules
+are
+specified
+in
+the
+<code>
+@context
+</code>
+for
+a
+particular
+vocabulary
+term,
+an
+IRI
+is
+generated:
+</p>
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:anyURI": "foaf:homepage"
+    } 
+  }</span>
+...
+  "foaf:homepage": "http://manu.sporny.org",
+...
+}
+</pre>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">4.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+A
+subject
+is
+declared
+using
+the
+<code>
+@
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+property,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+the
+IRI
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.3
+</del>
+<ins class="diff-chg">4.3
+</ins>
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+a
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-url).
+</p>
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "<span class="diff">a</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+(in
+N-Triples
+notation):
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+</div>
+<div id="plain-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.4
+</del>
+<ins class="diff-chg">4.4
+</ins>
+</span>
+Plain
+Literals
+</h3>
+<p>
+Regular
+text
+strings
+are
+called
+<del class="diff-old">"plain
+literals"
+</del>
+<ins class="diff-chg">a
+</ins><dfn title="plain_literal" id="dfn-plain_literal"><ins class="diff-chg">
+plain
+literal
+</ins></dfn>
+in
+RDF
+and
+are
+easily
+expressed
+using
+regular
+JSON
+strings.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}
+</pre>
+</div>
+<div id="language-specification-in-plain-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.5
+</del>
+<ins class="diff-chg">4.5
+</ins>
+</span>
+Language
+Specification
+in
+Plain
+Literals
+</h3>
+<p>
+JSON-LD
+makes
+an
+assumption
+that
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+<del class="diff-old">literals
+</del>
+<ins class="diff-chg">literal
+</ins></a><ins class="diff-chg">
+s
+</ins>
+with
+associated
+language
+encoding
+information
+is
+not
+very
+common
+when
+used
+in
+JavaScript
+and
+Web
+Services.
+Thus,
+it
+takes
+a
+little
+more
+effort
+to
+express
+plain
+literals
+in
+a
+specified
+language.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+for
+<em>
+花澄
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+tag
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="typed-literals" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.6
+</del>
+<ins class="diff-chg">4.6
+</ins>
+</span>
+Typed
+Literals
+</h3>
+<p>
+<ins class="diff-new">A
+</ins><dfn title="typed_literal" id="dfn-typed_literal"><ins class="diff-new">
+typed
+literal
+</ins></dfn><ins class="diff-new">
+is
+indicated
+by
+attaching
+a
+IRI
+to
+the
+end
+of
+a
+</ins><a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal"><ins class="diff-new">
+plain
+literal
+</ins></a>,<ins class="diff-new">
+and
+this
+IRI
+indicates
+the
+literal's
+datatype.
+</ins>
+Literals
+may
+<del class="diff-old">also
+</del>
+be
+typed
+in
+JSON-LD
+in
+<del class="diff-old">two
+</del>
+<ins class="diff-chg">three
+</ins>
+ways:
+</p>
+<ol>
+<li>
+By
+utilizing
+the
+<code>
+@coerce
+</code>
+keyword.
+</li>
+<li>
+By
+utilizing
+the
+expanded
+form
+for
+specifying
+objects.
+</li>
+<li>
+<ins class="diff-new">By
+using
+a
+native
+JSON
+datatype.
+</ins></li>
+</ol>
+<p>
+The
+first
+example
+uses
+the
+<code>
+@coerce
+</code>
+keyword
+to
+express
+a
+typed
+literal:
+</p>
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }</span>
+...
+  "dc:modified": "2010-05-29T14:17:39+02:00",
+...
+}
+</pre>
+<p>
+The
+second
+example
+uses
+the
+expanded
+form
+for
+specifying
+objects:
+</p>
+<pre class="example">
+{
+...
+  "dc:modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }</span>
+...
+}
+</pre>
+<p>
+Both
+examples
+above
+would
+generate
+an
+object
+with
+the
+literal
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.7
+</del>
+<ins class="diff-chg">4.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+arrays.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+array.
+</p>
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+"jaybee"
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.8
+</del>
+<ins class="diff-chg">4.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+<del class="diff-old">literals
+</del>
+<ins class="diff-chg">literal
+</ins></a><ins class="diff-chg">
+s
+</ins>
+may
+also
+be
+expressed
+using
+the
+expanded
+form
+for
+objects:
+</p>
+<pre class="example">
+{
+...
+  "@": "http://example.org/articles/8",
+  "dcterms:modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]</span>
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="blank-nodes" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.9
+</del>
+<ins class="diff-chg">4.9
+</ins>
+</span>
+Blank
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+is
+where
+blank
+nodes
+come
+into
+play.
+In
+JSON-LD,
+blank
+node
+identifiers
+are
+automatically
+created
+if
+a
+subject
+is
+not
+specified
+using
+the
+<code>
+@
+</code>
+keyword.
+However,
+authors
+may
+name
+blank
+nodes
+by
+using
+the
+special
+<code>
+_
+</code>
+CURIE
+prefix.
+</p>
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+named
+blank
+node.
+</p>
+</div>
+</div>
+<div id="advanced-features" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+Advanced
+Features
+</h2>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+provided
+by
+RDF.
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</p>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+doubles,
+integers,
+and
+boolean
+values.
+As
+demonstrated
+below,
+JSON-LD
+utilizes
+that
+information
+to
+create
+<del class="diff-old">Typed
+Literals
+:
+</del>
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+<ins class="diff-chg">typed
+literal
+</ins></a><ins class="diff-chg">
+s:
+</ins>
+</p>
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}
+</pre>
+<p class="note">
+When
+dealing
+with
+a
+number
+of
+modern
+programming
+languages,
+including
+JavaScript
+ECMA-262,
+there
+is
+no
+distinction
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>
+values.
+That
+is,
+the
+number
+<code>
+5.3
+</code>
+and
+the
+number
+<code>
+5.3e0
+</code>
+are
+treated
+as
+if
+they
+were
+the
+same.
+When
+converting
+from
+JSON-LD
+to
+a
+language-native
+format
+and
+back,
+datatype
+information
+is
+lost
+in
+a
+number
+of
+these
+languages.
+Thus,
+one
+could
+say
+that
+<code>
+5.3
+</code>
+is
+a
+<strong>
+xsd:decimal
+</strong>
+and
+<code>
+5.3e0
+</code>
+is
+an
+<strong>
+xsd:double
+</strong>
+in
+JSON-LD,
+but
+when
+both
+values
+are
+converted
+to
+a
+language-native
+format
+the
+datatype
+difference
+between
+the
+two
+is
+lost
+because
+the
+machine-level
+representation
+will
+almost
+always
+be
+a
+<strong>
+double
+</strong>.
+Implementers
+should
+be
+aware
+of
+this
+potential
+round-tripping
+issue
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>.
+Specifically
+objects
+with
+a
+datatype
+of
+<strong>
+xsd:decimal
+</strong>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+converted
+to
+a
+language
+native
+type.
+</p>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+Type
+Coercion
+</h3>
+<p>
+JSON-LD
+supports
+the
+coercion
+of
+types
+to
+ensure
+that
+the
+zero-edit
+goal
+of
+JSON-LD
+can
+be
+accomplished.
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+and
+incoming
+or
+outgoing
+types
+to
+the
+proper
+RDF
+type
+based
+on
+a
+mapping
+of
+type
+IRIs
+to
+RDF
+types.
+Using
+type
+conversion,
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+<del class="diff-old">literals,
+</del>
+<ins class="diff-chg">literal
+</ins></a><ins class="diff-chg">
+s,
+</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+<del class="diff-old">literals
+</del>
+<ins class="diff-chg">literal
+</ins></a><ins class="diff-chg">
+s
+</ins>
+and
+IRIs.
+</p>
+<pre class="example">
+{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<del class="diff-old">     "@type":
+</del>
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+        "xsd:anyURI": "homepage",
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+</div>
+<div id="the-json-ld-processing-algorithm" class="section">
+<h2>
+<span class="secno">
+<ins class="diff-chg">6.
+</ins></span><ins class="diff-chg">
+The
+JSON-LD
+Processing
+Algorithm
+</ins></h2><p><ins class="diff-chg">
+The
+JSON-LD
+Processing
+Model
+describes
+processing
+rules
+for
+extracting
+RDF
+from
+a
+JSON-LD
+document.
+Note
+that
+many
+uses
+of
+JSON-LD
+may
+not
+require
+generation
+of
+RDF.
+</ins></p><p><ins class="diff-chg">
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</ins></p><p class="issue"><ins class="diff-chg">
+The
+Processing
+Algorithm
+is
+a
+work
+in
+progress.
+</ins></p><div class="informative section" id="overview"><h3><span class="secno"><ins class="diff-chg">
+6.1
+</ins></span><ins class="diff-chg">
+Overview
+</ins></h3><p><em><ins class="diff-chg">
+This
+section
+is
+non-normative.
+</ins></em></p><p><ins class="diff-chg">
+JSON-LD
+is
+intended
+to
+have
+an
+easy
+to
+parse
+grammar
+that
+closely
+models
+existing
+practice
+in
+using
+JSON
+for
+describing
+object
+representations.
+This
+allows
+the
+use
+of
+existing
+libraries
+for
+parsing
+JSON
+in
+a
+document-oriented
+fashion,
+or
+can
+allow
+for
+stream-based
+parsing
+similar
+to
+SAX.
+</ins></p><p><ins class="diff-chg">
+As
+with
+other
+grammars
+used
+for
+describing
+linked
+data,
+a
+key
+concept
+is
+that
+of
+a
+</ins><em><ins class="diff-chg">
+resource
+</ins></em>.<ins class="diff-chg">
+Resources
+may
+be
+of
+three
+basic
+types:
+</ins><em><ins class="diff-chg">
+IRI
+</ins></em><ins class="diff-chg">
+s,
+for
+describing
+externally
+named
+entities,
+</ins><em><ins class="diff-chg">
+BNodes
+</ins></em>,<ins class="diff-chg">
+resources
+for
+which
+an
+external
+name
+does
+not
+exist,
+or
+is
+not
+known,
+and
+Literals,
+which
+describe
+terminal
+entities
+such
+as
+strings,
+dates
+and
+other
+representations
+having
+a
+lexical
+representation
+possibly
+including
+an
+explicit
+language
+or
+datatype.
+</ins></p><p><ins class="diff-chg">
+Data
+described
+with
+JSON-LD
+may
+be
+considered
+to
+be
+the
+representation
+of
+a
+graph
+made
+up
+of
+</ins><em><ins class="diff-chg">
+subject
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+object
+</ins></em><ins class="diff-chg">
+resources
+related
+via
+a
+</ins><em><ins class="diff-chg">
+predicate
+</ins></em><ins class="diff-chg">
+resource.
+However,
+specific
+implementations
+may
+choose
+to
+operate
+on
+the
+document
+as
+a
+normal
+JSON
+description
+of
+objects
+having
+attributes.
+</ins></p></div><div id="processing-algorithm-terms" class="section"><h3><span class="secno"><ins class="diff-chg">
+6.2
+</ins></span><ins class="diff-chg">
+Processing
+Algorithm
+Terms
+</ins></h3><dl><dt><dfn title="default_context" id="dfn-default_context"><ins class="diff-chg">
+default
+context
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+context
+that
+is
+specified
+to
+the
+JSON-LD
+processing
+algorithm
+before
+processing
+begins.
+</ins></dd><dt><dfn title="default_graph" id="dfn-default_graph"><ins class="diff-chg">
+default
+graph
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</ins></dd><dt><dfn title="active_subject" id="dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</ins></dd><dt><dfn title="active_property" id="dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</ins></dd><dt><dfn title="active_object" id="dfn-active_object"><ins class="diff-chg">
+active
+object
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</ins></dd><dt><dfn title="active_context" id="dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+is
+the
+context
+contained
+within
+the
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a>.</dd><dt><dfn title="local_context" id="dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+keyword.
+</ins></dd><dt><dfn title="processor_state" id="dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a>,<ins class="diff-chg">
+which
+includes
+the
+</ins><a class="tref" title="active__context"><ins class="diff-chg">
+active
+context
+</ins></a>,<a class="tref" title="current_subject"><ins class="diff-chg">
+current
+subject
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a class="tref" title="current_property"><ins class="diff-chg">
+current
+property
+</ins></a>.<ins class="diff-chg">
+The
+</ins><a class="tref" title="processor__state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+is
+managed
+as
+a
+stack
+with
+elements
+from
+the
+previous
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+copied
+into
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+when
+entering
+a
+new
+associative
+array.
+</ins></dd></dl></div><div id="processing-tokens-and-keywords" class="section"><h3><span class="secno"><ins class="diff-chg">
+6.3
+</ins></span><ins class="diff-chg">
+Processing
+Tokens
+and
+Keywords
+</ins></h3><dl><dt><code><ins class="diff-chg">
+@context
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+set
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>.</dd><dt><code><ins class="diff-chg">
+@base
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>.</dd><dt><code><ins class="diff-chg">
+@profile
+</ins></code></dt><dd><ins class="diff-chg">
+A
+reference
+to
+a
+remote
+context
+description
+used
+to
+set
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>.</dd><dt><code><ins class="diff-chg">
+@vocab
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>.</dd><dt><code><ins class="diff-chg">
+@coerce
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+specify
+type
+coercion
+rules.
+</ins></dd><dt><code><ins class="diff-chg">
+@literal
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+specify
+a
+literal
+value.
+</ins></dd><dt><code><ins class="diff-chg">
+@iri
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+specify
+an
+IRI
+value.
+</ins></dd><dt><code><ins class="diff-chg">
+@language
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+specify
+the
+language
+for
+a
+literal.
+</ins></dd><dt><code><ins class="diff-chg">
+@datatype
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+specify
+the
+datatype
+for
+a
+literal.
+</ins></dd><dt><code>:</code></dt><dd><ins class="diff-chg">
+The
+separator
+for
+CURIEs
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+</ins></dd><dt><code><ins class="diff-chg">
+@
+</ins></code></dt><dd><ins class="diff-chg">
+Sets
+the
+active
+subjects.
+</ins></dd><dt><code><ins class="diff-chg">
+a
+</ins></code></dt><dd><ins class="diff-chg">
+Used
+to
+set
+the
+rdf:type
+of
+the
+active
+subjects.
+This
+token
+may
+be
+conferred
+as
+syntactic
+sugar
+for
+rdf:type.
+</ins></dd></dl><p class="issue"><ins class="diff-chg">
+Use
+</ins><code><ins class="diff-chg">
+@source
+</ins></code><ins class="diff-chg">
+instead
+of
+</ins><code><ins class="diff-chg">
+@
+</ins></code><ins class="diff-chg">
+?
+</ins></p><p class="issue"><ins class="diff-chg">
+Use
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+instead
+of
+</ins><code><ins class="diff-chg">
+a
+</ins></code><ins class="diff-chg">
+?
+Note
+that
+both
+are
+just
+semantic
+sugar
+for
+</ins><code><ins class="diff-chg">
+rdf:type
+</ins></code>.</p></div><div id="context" class="section"><h3><span class="secno"><ins class="diff-chg">
+6.4
+</ins></span><ins class="diff-chg">
+Context
+</ins></h3><p><ins class="diff-chg">
+Processing
+of
+JSON-LD
+is
+managed
+recursively
+using
+a
+process
+described
+in
+</ins><a href="sequence"><ins class="diff-chg">
+Sequence
+</ins></a>.<ins class="diff-chg">
+During
+processing,
+each
+rule
+is
+applied
+using
+information
+provided
+by
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>.<ins class="diff-chg">
+Processing
+begins
+by
+pushing
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+onto
+the
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+stack
+and
+initializing
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+with
+the
+</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-chg">
+default
+context
+</ins></a>.<ins class="diff-chg">
+If
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+is
+encountered,
+information
+from
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+is
+merged
+into
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>.</p><p class="issue"><ins class="diff-chg">
+Should
+the
+document
+URL
+be
+used
+as
+the
+default
+for
+</ins><code><ins class="diff-chg">
+@base
+</ins></code><ins class="diff-chg">
+in
+the
+</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-chg">
+default
+context
+</ins></a><ins class="diff-chg">
+?
+</ins></p><p><ins class="diff-chg">
+The
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+is
+used
+for
+expanding
+keys
+and
+values
+of
+an
+associative
+array
+(or
+elements
+of
+a
+list
+(see
+</ins><span a="#list-processing"><ins class="diff-chg">
+List
+Processing
+</ins></span><ins class="diff-chg">
+)).
+</ins></p><p><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+is
+identified
+within
+an
+associative
+array
+having
+a
+key
+of
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+with
+an
+associative
+array
+value.
+When
+processing
+a
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>,<ins class="diff-chg">
+special
+rules
+apply:
+</ins></p><ul><li><ins class="diff-chg">
+The
+key
+</ins><code><ins class="diff-chg">
+@base
+</ins></code><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+IRI
+and
+is
+saved
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+to
+perform
+term
+mapping
+as
+described
+in
+</ins><a href="#iri-processing"><ins class="diff-chg">
+IRI
+Processing
+</ins></a>.</li><li><ins class="diff-chg">
+The
+key
+</ins><code><ins class="diff-chg">
+@vocab
+</ins></code><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+IRI
+and
+is
+saved
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+to
+perform
+term
+mapping
+as
+described
+in
+</ins><a href="#iri-processing"><ins class="diff-chg">
+IRI
+Processing
+</ins></a>.</li><li><ins class="diff-chg">
+The
+key
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+have
+a
+value
+of
+an
+associative
+array.
+Processing
+of
+the
+associative
+array
+is
+described
+</ins><a href="#coerce"><ins class="diff-chg">
+below
+</ins></a></li><li><ins class="diff-chg">
+Otherwise,
+the
+key
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+have
+the
+lexical
+form
+of
+</ins><cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName"><ins class="diff-chg">
+NCName
+</ins></a></cite><ins class="diff-chg">
+and
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+have
+the
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+IRI.
+Merge
+each
+key-value
+pair
+into
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+overwriting
+any
+duplicate
+values.
+</ins></li></ul><p><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+may
+also
+be
+loaded
+from
+an
+external
+document
+using
+the
+</ins><code><ins class="diff-chg">
+@profile
+</ins></code><ins class="diff-chg">
+key
+as
+described
+in
+</ins><a href="#vocabulary-profiles"><ins class="diff-chg">
+Vocabulary
+Profiles
+</ins></a>.</p><div id="coerce" class="section"><h4><span class="secno"><ins class="diff-chg">
+6.4.1
+</ins></span><ins class="diff-chg">
+Coerce
+</ins></h4><p><ins class="diff-chg">
+Map
+each
+key-value
+pair
+in
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+'s
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+mapping
+into
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+'s
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+mapping,
+overwriting
+any
+duplicate
+values
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+'s
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+mapping.
+The
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+mapping
+has
+a
+either
+of
+a
+single
+CURIE
+or
+of
+an
+array
+of
+CURIEs.
+When
+merging
+with
+an
+existing
+mapping
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+map
+all
+CURIE
+values
+to
+array
+form
+and
+replace
+with
+the
+union
+of
+the
+value
+from
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+and
+the
+value
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>.<ins class="diff-chg">
+If
+the
+result
+is
+an
+array
+with
+a
+single
+CURIE,
+the
+processor
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+represent
+this
+as
+a
+string
+value.
+</ins></p></div></div><div id="chaining" class="section"><h3><span class="secno"><ins class="diff-chg">
+6.5
+</ins></span><ins class="diff-chg">
+Chaining
+</ins></h3><p><ins class="diff-chg">
+Object
+</ins><dfn title="chaining" id="dfn-chaining"><ins class="diff-chg">
+chaining
+</ins></dfn><ins class="diff-chg">
+is
+a
+JSON-LD
+feature
+that
+allows
+an
+author
+to
+use
+the
+definition
+of
+JSON-LD
+objects
+as
+</ins><a class="tref" title="property"><ins class="diff-chg">
+property
+</ins></a><ins class="diff-chg">
+values.
+This
+is
+a
+commonly
+used
+mechanism
+for
+creating
+a
+parent-child
+relationship
+between
+objects.
+</ins></p><p><ins class="diff-chg">
+The
+example
+shows
+an
+two
+objects
+related
+by
+a
+property
+from
+the
+first
+object:
+</ins></p>  <pre class="example"><ins class="diff-chg">
+{
+...
+  "foaf:name": "Manu Sporny",
+  "<span class="diff">foaf:knows</span>": {
+    "<span class="diff">a</span>": "<span class="diff">foaf:Person</span>",
+    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}
+</ins></pre><p><ins class="diff-chg">
+An
+object
+definition
+may
+be
+used
+anyplace
+a
+value
+is
+legal
+in
+JSON-LD.
+</ins></p></div><div id="iri-processing" class="section"><h3><span class="secno"><ins class="diff-chg">
+6.6
+</ins></span><ins class="diff-chg">
+IRI
+Processing
+</ins></h3><p><ins class="diff-chg">
+Keys
+and
+some
+values
+are
+evaluated
+to
+produce
+an
+IRI.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+a
+value
+representing
+an
+IRI
+into
+an
+actual
+IRI.
+</ins></p><p><ins class="diff-chg">
+IRIs
+may
+be
+represented
+as
+an
+explicit
+string,
+or
+as
+a
+CURIE,
+as
+a
+value
+relative
+to
+</ins><code><ins class="diff-chg">
+@base
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+@vocab
+</ins></code>.</p><p><ins class="diff-chg">
+CURIEs
+are
+defined
+more
+formally
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-chg">
+RDFA-CORE
+</ins></a></cite><ins class="diff-chg">
+]
+</ins><cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies"><ins class="diff-chg">
+section
+6
+"CURIE
+Syntax
+Definition"
+</ins></a></cite>.<ins class="diff-chg">
+Generally,
+a
+CURIE
+is
+composed
+of
+a
+</ins><em><ins class="diff-chg">
+prefix
+</ins></em><ins class="diff-chg">
+and
+a
+</ins><em><ins class="diff-chg">
+suffix
+</ins></em><ins class="diff-chg">
+separated
+by
+a
+':'.
+In
+JSON-LD,
+either
+the
+prefix
+may
+be
+the
+empty
+string,
+denoting
+the
+</ins><dfn title="default_prefix" id="dfn-default_prefix"><ins class="diff-chg">
+default
+prefix
+</ins></dfn>.</p><p><ins class="diff-chg">
+The
+procedure
+for
+generating
+an
+IRI
+is:
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Split
+the
+value
+into
+a
+</ins><em><ins class="diff-chg">
+prefix
+</ins></em><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+suffix
+</ins></em><ins class="diff-chg">
+from
+the
+first
+occurrence
+of
+':'.
+</ins></li><li><ins class="diff-chg">
+If
+the
+prefix
+is
+a
+'_',
+generate
+a
+named
+BNode
+using
+the
+suffix
+as
+the
+name.
+</ins></li><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+contains
+a
+mapping
+for
+</ins><em><ins class="diff-chg">
+prefix
+</ins></em>,<ins class="diff-chg">
+generate
+an
+IRI
+by
+prepending
+the
+mapped
+prefix
+to
+the
+(possibly
+empty)
+suffix.
+Note
+that
+an
+empty
+suffix
+and
+no
+suffix
+(meaning
+the
+value
+contains
+no
+':'
+string
+at
+all)
+are
+treated
+equivalently.
+</ins></li><li><ins class="diff-chg">
+If
+the
+IRI
+being
+processed
+is
+for
+a
+property
+(i.e.,
+a
+key
+value
+in
+an
+associative
+array,
+or
+a
+value
+in
+a
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+mapping)
+and
+the
+active
+context
+has
+a
+</ins><code><ins class="diff-chg">
+@vocab
+</ins></code><ins class="diff-chg">
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+the
+method
+described
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-chg">
+RFC3987
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></li><li><ins class="diff-chg">
+If
+the
+IRI
+being
+processed
+is
+for
+a
+subject
+or
+object
+(i.e.,
+not
+a
+property)
+and
+the
+active
+context
+has
+a
+</ins><code><ins class="diff-chg">
+@base
+</ins></code><ins class="diff-chg">
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+the
+method
+described
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-chg">
+RFC3987
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+use
+the
+value
+directly
+as
+an
+IRI.
+</ins></li></ol><p></p></div></div><div id="sequence" class="section">
+<h2>
+<span class="secno">
+7.
+</span>
+<ins class="diff-new">Sequence
+</ins></h2><p><ins class="diff-new">
+The
+algorithm
+below
+is
+designed
+for
+in-memory
+implementations
+with
+random
+access
+to
+associative
+array
+elements.
+For
+a
+description
+of
+a
+streaming
+implementation,
+see
+</ins><a href="streaming-processors"><ins class="diff-new">
+Appendix
+B
+</ins></a>.</p><p><ins class="diff-new">
+A
+conforming
+JSON-LD
+processor
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-new">
+default
+graph
+</ins></a><ins class="diff-new">
+that
+the
+following
+algorithm
+generates:
+</ins></p><ol class="algorithm"><li id="processing-step-default-context"><ins class="diff-new">
+Create
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a><ins class="diff-new">
+with
+with
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+set
+to
+the
+</ins><a class="tref internalDFN" title="default_context" href="#dfn-default_context-1"><ins class="diff-new">
+default
+context
+</ins></a><ins class="diff-new">
+and
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+initialized
+to
+NULL.
+</ins></li><li id="processing-step-associative"><ins class="diff-new">
+If
+an
+associative
+array
+is
+detected,
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+associative
+array
+has
+a
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+key,
+process
+the
+local
+context
+as
+described
+in
+</ins><a href="context"><ins class="diff-new">
+Context
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+associative
+array
+has
+an
+</ins><code><ins class="diff-new">
+@iri
+</ins></code><ins class="diff-new">
+key,
+set
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+by
+performing
+</ins><a href="#iri-processing"><ins class="diff-new">
+IRI
+Processing
+</ins></a><ins class="diff-new">
+on
+the
+associated
+value.
+Generate
+a
+triple
+representing
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<ins class="diff-new">
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a>.<ins class="diff-new">
+Return
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+to
+the
+calling
+location.
+</ins></li><li><ins class="diff-new">
+If
+the
+associative
+array
+has
+a
+</ins><code><ins class="diff-new">
+@literal
+</ins></code><ins class="diff-new">
+key,
+set
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+to
+a
+literal
+value
+as
+follows:
+</ins><ul><li><ins class="diff-new">
+as
+a
+</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"><ins class="diff-new">
+typed
+literal
+</ins></a><ins class="diff-new">
+if
+the
+associative
+array
+contains
+a
+</ins><code><ins class="diff-new">
+@datatype
+</ins></code><ins class="diff-new">
+key
+after
+performing
+</ins><a href="#iri-processing"><ins class="diff-new">
+IRI
+Processing
+</ins></a><ins class="diff-new">
+on
+the
+specified
+</ins><code><ins class="diff-new">
+@datatype
+</ins></code>.</li><li><ins class="diff-new">
+otherwise,
+as
+a
+</ins><a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal"><ins class="diff-new">
+plain
+literal
+</ins></a>.<ins class="diff-new">
+If
+the
+associative
+array
+contains
+a
+</ins><code><ins class="diff-new">
+@language
+</ins></code><ins class="diff-new">
+key,
+use
+it's
+value
+to
+set
+the
+language
+of
+the
+plain
+literal.
+</ins></li></ul><ins class="diff-new">
+Generate
+a
+triple
+representing
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<ins class="diff-new">
+the
+</ins><a class="tref" title="active__property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a>.<ins class="diff-new">
+Return
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+to
+the
+calling
+location.
+</ins></li><li><ins class="diff-new">
+If
+the
+associative
+array
+has
+a
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+key:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+value
+is
+a
+string,
+set
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+to
+the
+result
+of
+performing
+</ins><a href="#iri-processing"><ins class="diff-new">
+IRI
+Processing
+</ins></a>.<ins class="diff-new">
+Generate
+a
+triple
+representing
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<ins class="diff-new">
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a>.<ins class="diff-new">
+Set
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a>.</li><li><ins class="diff-new">
+Create
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a><ins class="diff-new">
+using
+copies
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>,<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+process
+the
+value
+starting
+at
+</ins><a href="#processing-step-associative"><ins class="diff-new">
+Step
+2
+</ins></a>,<ins class="diff-new">
+set
+the
+</ins><a class="tref" title="active__subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+to
+the
+result
+and
+proceed
+using
+the
+previous
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a>.</li></ol></li><li><ins class="diff-new">
+If
+the
+associative
+array
+does
+not
+have
+a
+</ins><code><ins class="diff-new">
+@
+</ins></code><ins class="diff-new">
+key,
+set
+the
+</ins><a class="tref" title="active__object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+to
+newly
+generated
+</ins><a class="tref" title="blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifier
+</ins></a>.<ins class="diff-new">
+Generate
+a
+triple
+representing
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<ins class="diff-new">
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a>.<ins class="diff-new">
+Set
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref" title="active__object"><ins class="diff-new">
+active
+object
+</ins></a>.</li><li><ins class="diff-new">
+For
+each
+key
+in
+the
+associative
+array
+that
+has
+not
+already
+been
+processed,
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+key
+is
+</ins><code><ins class="diff-new">
+a
+</ins></code>,<ins class="diff-new">
+set
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+to
+</ins><code><ins class="diff-new">
+rdf:type
+</ins></code>.</li><li><ins class="diff-new">
+Otherwise,
+set
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+to
+the
+result
+of
+performing
+</ins><a href="#iri-processing"><ins class="diff-new">
+IRI
+Processing
+</ins></a><ins class="diff-new">
+on
+the
+key.
+</ins></li><li><ins class="diff-new">
+Create
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a><ins class="diff-new">
+copies
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>,<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+process
+the
+value
+starting
+at
+</ins><a href="#processing-step-associative"><ins class="diff-new">
+Step
+2
+</ins></a><ins class="diff-new">
+and
+proceed
+using
+the
+previous
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a>.</li></ol></li><li><ins class="diff-new">
+Return
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+to
+the
+calling
+location.
+</ins></li></ol></li><li><ins class="diff-new">
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following
+returning
+the
+result
+of
+processing
+the
+last
+value
+in
+the
+array:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+value
+is
+a
+regular
+array,
+generate
+an
+RDF
+List
+by
+linking
+each
+element
+of
+the
+list
+using
+</ins><code><ins class="diff-new">
+rdf:first
+</ins></code><ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+rdf:next
+</ins></code>,<ins class="diff-new">
+terminating
+the
+list
+with
+</ins><code><ins class="diff-new">
+rdf:nil
+</ins></code><ins class="diff-new">
+using
+the
+following
+sequence:
+</ins><ol><li><ins class="diff-new">
+If
+the
+list
+has
+no
+element,
+generate
+a
+triple
+using
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+rdf:nil
+</ins></code>.</li><li><ins class="diff-new">
+Otherwise,
+generate
+a
+triple
+using
+using
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+a
+newly
+generated
+BNode
+identified
+as
+</ins><em><ins class="diff-new">
+first
+bnode
+</ins></em>.</li><li><ins class="diff-new">
+For
+each
+element
+other
+than
+the
+last
+element
+in
+the
+list:
+</ins><ol><li><ins class="diff-new">
+Create
+a
+processor
+state
+using
+the
+active
+context,
+</ins><em><ins class="diff-new">
+first
+bnode
+</ins></em><ins class="diff-new">
+as
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+rdf:first
+</ins></code><ins class="diff-new">
+as
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a>.</li><li><ins class="diff-new">
+Unless
+this
+is
+the
+last
+element
+in
+the
+list,
+generate
+a
+new
+BNode
+identified
+as
+</ins><em><ins class="diff-new">
+rest
+bnode
+</ins></em>,<ins class="diff-new">
+otherwise
+use
+</ins><code><ins class="diff-new">
+rdf:nil
+</ins></code>.</li><li><ins class="diff-new">
+Generate
+a
+new
+triple
+using
+</ins><em><ins class="diff-new">
+first
+bnode
+</ins></em>,<code><ins class="diff-new">
+rdf:rest
+</ins></code><ins class="diff-new">
+and
+</ins><em><ins class="diff-new">
+rest
+bnode
+</ins></em>.</li><li><ins class="diff-new">
+Set
+</ins><em><ins class="diff-new">
+first
+bnode
+</ins></em><ins class="diff-new">
+to
+</ins><em><ins class="diff-new">
+rest
+bnode
+</ins></em>.</li></ol></li></ol></li><li><ins class="diff-new">
+Otherwise,
+create
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a><ins class="diff-new">
+copies
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>,<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a><ins class="diff-new">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+process
+the
+value
+starting
+at
+</ins><a href="#processing-step-associative"><ins class="diff-new">
+Step
+2
+</ins></a><ins class="diff-new">
+and
+proceed
+using
+the
+previous
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-new">
+processor
+state
+</ins></a>.</li></ol></li><li><ins class="diff-new">
+If
+a
+string
+is
+detected,
+generate
+a
+triple
+using
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+and
+a
+</ins><a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal"><ins class="diff-new">
+plain
+literal
+</ins></a><ins class="diff-new">
+value
+created
+from
+the
+string.
+</ins></li><li><ins class="diff-new">
+If
+a
+number
+is
+detected,
+generate
+a
+</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"><ins class="diff-new">
+typed
+literal
+</ins></a><ins class="diff-new">
+using
+a
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+either
+</ins><code><ins class="diff-new">
+xsd:integer
+</ins></code><ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
+xsd:double
+</ins></code>,<ins class="diff-new">
+depending
+on
+if
+the
+value
+contains
+a
+fractional
+and/or
+an
+exponential
+component.
+Generate
+a
+triple
+using
+the
+</ins><a class="tref" title="active__subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+and
+the
+generated
+typed
+literal.
+</ins></li><li><ins class="diff-new">
+Otherwise,
+if
+</ins><strong><ins class="diff-new">
+true
+</ins></strong><ins class="diff-new">
+or
+</ins><strong><ins class="diff-new">
+false
+</ins></strong><ins class="diff-new">
+is
+detected,
+generate
+a
+triple
+using
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+and
+a
+</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"><ins class="diff-new">
+typed
+literal
+</ins></a><ins class="diff-new">
+value
+created
+from
+the
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+</ins><code><ins class="diff-new">
+xsd:boolean
+</ins></code>.</li></ol></div><div id="best-practices" class="section"><h2><span class="secno"><ins class="diff-new">
+8.
+</ins></span>
+Best
+Practices
+</h2>
+<p>
+The
+nature
+of
+Web
+programming
+allows
+one
+to
+use
+basic
+technologies,
+such
+as
+JSON-LD,
+across
+a
+variety
+of
+systems
+and
+environments.
+This
+section
+attempts
+to
+describe
+some
+of
+those
+environments
+and
+the
+way
+in
+which
+JSON-LD
+can
+be
+integrated
+in
+order
+to
+help
+alleviate
+certain
+development
+headaches.
+</p>
+<div id="javascript" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">7.1
+</del>
+<ins class="diff-chg">8.1
+</ins>
+</span>
+JavaScript
+</h3>
+<p class="issue">
+It
+is
+expected
+that
+JSON-LD
+will
+be
+used
+quite
+a
+bit
+in
+JavaScript
+environments,
+however,
+features
+like
+the
+expanded
+form
+for
+object
+values
+mean
+that
+using
+JSON-LD
+directly
+in
+JavaScript
+may
+be
+annoying
+without
+a
+middleware
+layer
+such
+as
+a
+simple
+library
+that
+converts
+JSON-LD
+markup
+before
+JavaScript
+uses
+it.
+One
+could
+say
+that
+JSON-LD
+is
+a
+good
+fit
+for
+the
+RDF
+API,
+which
+enables
+a
+variety
+of
+RDF-based
+Web
+Applications,
+but
+some
+don't
+want
+to
+require
+that
+level
+of
+functionality
+just
+to
+use
+JSON-LD.
+The
+group
+is
+still
+discussing
+the
+best
+way
+to
+proceed,
+so
+input
+on
+how
+JSON-LD
+could
+more
+easily
+be
+utilized
+in
+JavaScript
+environments
+would
+be
+very
+much
+appreciated.
+</p>
+</div>
+<div id="schema-less-databases" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">7.2
+</del>
+<ins class="diff-chg">8.2
+</ins>
+</span>
+Schema-less
+Databases
+</h3>
+<p class="issue">
+Databases
+such
+as
+CouchDB
+and
+MongoDB
+allow
+the
+creation
+of
+schema-less
+data
+stores.
+RDF
+is
+a
+type
+of
+schema-less
+data
+model
+and
+thus
+lends
+itself
+to
+databases
+such
+as
+CouchDB
+and
+MongoDB.
+Both
+of
+these
+databases
+can
+use
+JSON-LD
+as
+their
+storage
+format.
+The
+group
+needs
+feedback
+from
+CouchDB
+and
+MongoDB
+experts
+regarding
+the
+usefulness
+of
+JSON-LD
+in
+those
+environments.
+</p>
+<p class="issue">
+<ins class="diff-new">MongoDB
+does
+not
+allow
+the
+'.'
+character
+to
+be
+used
+in
+key
+names.
+This
+prevents
+developers
+from
+storing
+IRIs
+as
+keys,
+which
+also
+prevents
+storage
+of
+the
+data
+in
+normalized
+form.
+While
+this
+issue
+can
+be
+avoided
+by
+using
+CURIEs
+for
+key
+values,
+it
+is
+not
+known
+if
+this
+mechanism
+is
+enough
+to
+allow
+JSON-LD
+to
+be
+used
+in
+MongoDB
+in
+a
+way
+that
+is
+useful
+to
+developers.
+</ins></p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">8.
+</del>
+<ins class="diff-chg">9.
+</ins>
+</span>
+Advanced
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+considered
+as
+discussion
+points;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<div id="vocabulary-profiles" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">8.1
+</del>
+<ins class="diff-chg">9.1
+</ins>
+</span>
+Vocabulary
+Profiles
+</h3>
+<p>
+One
+of
+the
+more
+powerful
+features
+of
+RDFa
+1.1
+Core
+is
+the
+ability
+to
+specify
+a
+collection
+of
+prefixes
+and
+terms
+that
+can
+be
+re-used
+by
+a
+processor
+to
+simplfy
+markup.
+JSON-LD
+provides
+a
+similar
+mechanism
+called
+Vocabulary
+Profiles,
+which
+is
+the
+inclusion
+of
+a
+context
+external
+to
+the
+JSON-LD
+document.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+one
+may
+specify
+an
+external
+Vocabulary
+Profile.
+Assume
+the
+following
+profile
+exists
+at
+this
+imaginary
+URL:
+<code>
+http://example.org/profiles/contacts
+</code>.
+</p>
+<pre class="example">
+{
+  "@context": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}
+</pre>
+<p>
+The
+profile
+listed
+above
+can
+be
+used
+in
+the
+following
+way:
+</p>
+<pre class="example">
+{
+  "@profile": "http://example.org/profiles/contacts",
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">8.2
+</del>
+<ins class="diff-chg">9.2
+</ins>
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+array
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+JSON-LD
+associative
+array.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<pre class="example">
+{
+  "@": 
+  [
+    {
+      "@": "http://example.org/people#john",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "http://example.org/people#jane",
+      "a": "foaf:Person"
+    }
+  ]
+}
+</pre>
+<p>
+A
+disjoint
+graph
+could
+also
+be
+expressed
+like
+so:
+</p>
+<pre class="example">
+[
+  {
+    "@": "http://example.org/people#john",
+    "a": "foaf:Person"
+  },
+  {
+    "@": "http://example.org/people#jane",
+    "a": "foaf:Person"
+  }
+]
+</pre>
+</div>
+<div id="the-json-ld-api" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">8.3
+</del>
+<ins class="diff-chg">9.3
+</ins>
+</span>
+The
+JSON-LD
+API
+</h3>
+<p>
+This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+format
+that
+is
+easier
+to
+work
+with
+in
+various
+programming
+languages.
+</p>
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDProcessor</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+};</span>
+</pre>
+<div id="methods" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">8.3.1
+</del>
+<ins class="diff-chg">9.3.1
+</ins>
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">
+<code>
+toGraph
+</code>
+</dt>
+<dd>
+Parses
+JSON-LD
+and
+transforms
+the
+data
+into
+an
+Graph,
+which
+is
+compatible
+with
+the
+RDF
+Interfaces
+API
+specification
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">
+RDF-INTERFACES
+</a>
+</cite>
+].
+This
+method
+will
+return
+<code>
+null
+</code>
+if
+there
+are
+any
+errors,
+or
+if
+the
+RDF
+Interfaces
+API
+is
+not
+available
+for
+use.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+jsonld
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+RDFGraph.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+callback
+</td>
+<td class="prmType">
+<code>
+<a>
+JSONLDParserCallback
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptTrue">
+✔
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+Graph
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">
+<code>
+toProjection
+</code>
+</dt>
+<dd>
+Parses
+JSON-LD
+text
+into
+an
+RDF
+API
+Projection
+object
+as
+specified
+by
+the
+RDF
+API
+specification
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-API">
+RDF-API
+</a>
+</cite>
+].
+If
+there
+are
+any
+errors,
+<code>
+null
+</code>
+is
+returned.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+jsonld
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+Projection.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+template
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+Projection
+template
+to
+use
+when
+building
+the
+Projection.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+subject
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+subject
+to
+use
+when
+building
+the
+Projection.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+callback
+</td>
+<td class="prmType">
+<code>
+<a>
+JSONLDParserCallback
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptTrue">
+✔
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+object
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<p>
+The
+JSONLDParserCallback
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+input
+data.
+</p>
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre>
+<div id="methods-1" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">8.3.2
+</del>
+<ins class="diff-chg">9.3.2
+</ins>
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error">
+<code>
+error
+</code>
+</dt>
+<dd>
+This
+callback
+is
+invoked
+whenever
+an
+error
+occurs
+during
+processing.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+error
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+A
+descriptive
+error
+string
+returned
+by
+the
+processor.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+void
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<p>
+The
+following
+example
+demonstrates
+how
+to
+convert
+JSON-LD
+to
+a
+projection
+that
+is
+directly
+usable
+in
+a
+programming
+environment:
+</p>
+<pre class="example">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+// Map the JSON-LD to a language-native object
+var person = jsonld.toProjection(jsonldString, myTemplate);
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+"Their
+homepage
+is:
+"
++
+person.homepage);
+</pre>
+<p>
+A
+JSON-LD
+Serializer
+is
+also
+available
+to
+map
+a
+language-native
+object
+to
+JSON-LD.
+</p><pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
+};</span>
+</pre>
+<div id="methods-2" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">8.3.3
+</del>
+<ins class="diff-chg">9.3.3
+</ins>
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj">
+<code>
+normalize
+</code>
+</dt>
+<dd>
+Serializes
+a
+language-native
+object
+into
+a
+normalized
+JSON-LD
+string.
+Normalization
+is
+important
+when
+performing
+things
+like
+equality
+comparison
+and
+digital
+signature
+creation
+and
+verification.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+obj
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+An
+associative
+array
+of
+key-value
+pairs
+that
+should
+be
+converted
+to
+a
+JSON-LD
+string.
+It
+is
+assumed
+that
+a
+map
+already
+exists
+for
+the
+data.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+DOMString
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<h3 id="the-normalization-algorithm">
+The
+Normalization
+Algorithm
+</h3>
+<p class="issue">
+This
+algorithm
+is
+very
+rough,
+untested,
+and
+probably
+contains
+many
+bugs.
+Use
+at
+your
+own
+risk.
+It
+will
+change
+in
+the
+coming
+months.
+</p>
+<p>
+The
+JSON-LD
+normalization
+algorithm
+is
+as
+follows:
+</p>
+<ol class="algorithm">
+<li>
+Remove
+the
+<code>
+@context
+</code>
+key
+and
+preserve
+it
+as
+the
+<dfn title="transformation_map" id="dfn-transformation_map">
+transformation
+map
+</dfn>
+while
+running
+this
+algorithm.
+</li>
+<li>
+For
+each
+key
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+</ol>
+</li>
+<li>
+For
+each
+value
+<ol class="algorithm">
+<li>
+If
+the
+value
+should
+be
+type
+coerced
+per
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>,
+ensure
+that
+it
+is
+transformed
+to
+the
+new
+value.
+</li>
+<li>
+If
+the
+value
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+<del class="diff-old">Typed
+Literal
+</del>
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+<ins class="diff-chg">typed
+literal
+</ins></a>
+and
+the
+type
+is
+a
+CURIE,
+expand
+it
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+When
+generating
+the
+final
+value,
+use
+expanded
+object
+value
+form
+to
+store
+all
+IRIs,
+typed
+literals
+and
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+<del class="diff-old">literals
+</del>
+<ins class="diff-chg">literal
+</ins></a><ins class="diff-chg">
+s
+</ins>
+with
+language
+information.
+</li>
+</ol>
+</li>
+<li>
+Output
+each
+sorted
+key-value
+pair
+without
+any
+extraneous
+whitespace.
+If
+the
+value
+is
+an
+associative
+array,
+perform
+this
+algorithm,
+starting
+at
+step
+#1,
+recursively
+on
+the
+sub-tree.
+There
+should
+be
+no
+nesting
+in
+the
+outputted
+JSON
+data.
+That
+is,
+the
+top-most
+element
+should
+be
+an
+array.
+Each
+item
+in
+the
+array
+contains
+a
+single
+subject
+with
+a
+corresponding
+array
+of
+properties
+in
+UTF-8
+sort
+order.
+Any
+related
+objects
+that
+are
+complex
+objects
+themselves
+should
+be
+given
+a
+top-level
+object
+in
+the
+top-level
+array.
+</li>
+</ol>
+<p class="issue">
+Note
+that
+normalizing
+named
+blank
+nodes
+is
+impossible
+at
+present
+since
+one
+would
+have
+to
+specify
+a
+blank
+node
+naming
+algorithm.
+For
+the
+time
+being,
+you
+cannot
+normalize
+graphs
+that
+contain
+named
+blank
+nodes.
+However,
+normalizing
+graphs
+that
+contain
+non-named
+blank
+nodes
+is
+supported.
+</p>
+<pre class="example">
+var myObj = { "@context" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+<del class="diff-old">                "@type": {
+</del>
+<ins class="diff-chg">                "@coerce": {
+</ins>
+                   "xsd:nonNegativeInteger": "age",
+                   "xsd:anyURI": "homepage"
+                }
+              },
+              "name" : "Joe Jackson",
+<del class="diff-old">              "age" : 42,
+</del>
+<ins class="diff-chg">              "age" : "42",
+</ins>
+              "homepage" : "http://example.org/people/joe" };
+// Map the language-native object to JSON-LD
+var
+jsonldText
+=
+jsonld.normalize(myObj);
+</pre>
+<p>
+After
+the
+code
+in
+the
+example
+above
+has
+executed,
+the
+<strong>
+jsonldText
+</strong>
+value
+will
+be
+(line-breaks
+added
+for
+readability):
+</p>
+<pre class="example">
+[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
+"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
+"http://xmlns.com/foaf/0.1/name":"Joe
+Jackson"}]
+</pre>
+<p>
+When
+normalizing
+<strong>
+xsd:double
+</strong>
+values,
+implementers
+<em class="rfc2119" title="must">
+must
+</em>
+ensure
+that
+the
+normalized
+value
+is
+a
+string.
+In
+order
+to
+generate
+the
+string
+from
+a
+<strong>
+double
+</strong>
+value,
+output
+equivalent
+to
+the
+<code>
+printf("%1.6e",
+value)
+</code>
+function
+in
+C
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+<strong>
+"%1.6e"
+</strong>
+is
+the
+string
+formatter
+and
+<strong>
+value
+</strong>
+is
+the
+value
+to
+be
+converted.
+</p>
+<p>
+To
+convert
+the
+a
+double
+value
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</p>
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</pre>
+<p class="note">
+When
+data
+needs
+to
+be
+normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+that
+are
+going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+the
+lossy
+nature
+of
+<strong>
+xsd:double
+</strong>
+values.
+</p>
+<p class="issue">
+<ins class="diff-new">Round-tripping
+data
+can
+be
+problematic
+if
+we
+mix
+and
+match
+@coerce
+rules
+with
+JSON-native
+datatypes,
+like
+integers.
+Consider
+the
+following
+code
+example:
+</ins></p><pre class="example"><ins class="diff-new">
+var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+// Convert the normalized object back to a JavaScript object
+var
+myObj2
+=
+jsonld.parse(jsonldText);
+</ins></pre><p class="issue"><ins class="diff-new">
+At
+this
+point,
+myObj2
+and
+myObj
+will
+have
+different
+values
+for
+the
+"number"
+value.
+myObj
+will
+be
+the
+number
+42,
+while
+myObj2
+will
+be
+the
+string
+"42".
+This
+type
+of
+data
+round-tripping
+error
+can
+bite
+developers.
+We
+are
+currently
+wondering
+if
+having
+a
+"coerce
+validation"
+phase
+in
+the
+parsing/normalization
+phases
+would
+be
+a
+good
+idea.
+It
+would
+prevent
+data
+round-tripping
+issues
+like
+the
+one
+mentioned
+above.
+</ins></p>
+</div>
+</div>
+<div class="appendix section" id="the-default-context">
+<h2>
+<span class="secno">
+A.
+</span>
+The
+Default
+Context
+</h2>
+<p>
+The
+<dfn title="default_context" id="dfn-default_context-1">
+default
+context
+</dfn>
+is
+provided
+to
+ensure
+that
+there
+are
+a
+reasonable
+set
+of
+prefixes
+and
+terms
+available
+to
+all
+JSON-LD
+developers.
+Mappings
+specified
+by
+the
+<a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">
+default
+context
+</a>
+<em class="rfc2119" title="should not">
+should
+not
+</em>
+be
+overwritten
+by
+JSON-LD
+authors.
+All
+JSON-LD
+processors
+<em class="rfc2119" title="must">
+must
+</em>
+load
+the
+following
+context
+in
+as
+the
+intial
+context
+before
+processing
+JSON-LD
+text.
+</p>
+<pre>
+{
+  "@context":
+  {
+<ins class="diff-new">    "@vocab": "",
+</ins>
+    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dcterms": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "vcard": "http://www.w3.org/2006/vcard/ns# ",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "cc": "http://creativecommons.org/ns#",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "com": "http://purl.org/commerce#",
+    "ps": "http://purl.org/payswarm#",
+    "gr": "http://purl.org/goodrelations/v1#",
+    "sig": "http://purl.org/signature#",
+    "ccard": "http://purl.org/commerce/creditcard#"
+    "@coerce": 
+    {
+<del class="diff-old">      "xsd:anyURI": ["foaf:homepage", "foaf:member"],
+</del>
+<ins class="diff-chg">      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
+</ins>
+      "xsd:integer": "foaf:age"
+    }
+  }
+}
+</pre>
+</div>
+<div class="appendix section" id="acknowledgements">
+<h2>
+<span class="secno">
+B.
+</span>
+Acknowledgements
+</h2>
+<p>
+The
+editor
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+rationale
+and
+reasoning
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+Longley
+who
+reviewed,
+provided
+feedback,
+and
+performed
+several
+implementation
+on
+the
+specification,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+Allen
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</p>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+C.
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+C.1
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<dt id="bib-RDF-API">
+[RDF-API]
+</dt>
+<dd>
+Manu
+Sporny,
+Benjamin
+Adrian,
+Nathan
+Rixham;
+et
+al.
+<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">
+<cite>
+RDF
+API
+</cite>
+</a>
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">
+http://www.w3.org/2010/02/rdfa/sources/rdf-api/
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</a>
+</dd>
+<dt id="bib-RDF-INTERFACES">
+[RDF-INTERFACES]
+</dt>
+<dd>
+Nathan
+Rixham,
+Manu
+Sporny,
+Benjamin
+Adrian;
+et
+al.
+<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">
+<cite>
+RDF
+Interfaces
+</cite>
+</a>
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">
+http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/
+</a>
+</dd>
+<dt id="bib-RFC3987">
+<ins class="diff-new">[RFC3987]
+</ins></dt><dd><ins class="diff-new">
+M.
+Dürst;
+M.
+Suignard.
+</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><cite><ins class="diff-new">
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</ins></cite></a><ins class="diff-new">
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+</ins><a href="http://www.ietf.org/rfc/rfc3987.txt"><ins class="diff-new">
+http://www.ietf.org/rfc/rfc3987.txt
+</ins>
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford.
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+<cite>
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</cite>
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+C.2
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+31
+March
+2011.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+http://www.w3.org/TR/2011/WD-rdfa-core-20110331
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110615/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,2255 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD - Linked Data Expression in JSON</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  medium dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD - Linked Data Expression in JSON</h1><h2 id="subtitle">A Context-based JSON Serialization for Linked Data</h2><h2 id="unofficial-draft-15-june-2011">Unofficial Draft 15 June 2011</h2><dl><dt>Editors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
+<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20110507.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+Developers that embed structured data in their Web pages can choose among
+a number of languages such as RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>], Microformats [<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] 
+and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. Each of these structured data languages, while
+incompatible at the syntax level, can be easily mapped to RDF. JSON has 
+proven to be a highly useful object serialization and messaging format. 
+In an attempt to harmonize the representation of Linked Data in JSON, 
+this specification outlines a common JSON representation format for 
+Linked Data that can be used to represent objects specified via RDFa, 
+Microformats and Microdata.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design-goals-and-rationale" class="tocxref"><span class="secno">2. </span>Design Goals and Rationale</a><ul class="toc"><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2.1 </span>Goals</a></li><li class="tocline"><a href="#map-terms-to-iris" class="tocxref"><span class="secno">2.2 </span>Map Terms to IRIs</a></li><li class="tocline"><a href="#the-json-ld-context" class="tocxref"><span class="secno">2.3 </span>The JSON-LD Context</a></li><li class="tocline"><a href="#unambiguous-identifiers-for-json" class="tocxref"><span class="secno">2.4 </span>Unambiguous Identifiers for JSON</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">2.5 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#an-example-of-a-context" class="tocxref"><span class="secno">2.6 </span>An Example of a Context</a></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">3. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">3.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">3.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">3.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#markup-of-rdf-concepts" class="tocxref"><span class="secno">4. </span>Markup of RDF Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">4.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">4.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">4.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#plain-literals" class="tocxref"><span class="secno">4.4 </span>Plain Literals</a></li><li class="tocline"><a href="#language-specification-in-plain-literals" class="tocxref"><span class="secno">4.5 </span>Language Specification in Plain Literals</a></li><li class="tocline"><a href="#typed-literals" class="tocxref"><span class="secno">4.6 </span>Typed Literals</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">4.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">4.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#blank-nodes" class="tocxref"><span class="secno">4.9 </span>Blank Nodes</a></li></ul></li><li class="tocline"><a href="#advanced-features" class="tocxref"><span class="secno">5. </span>Advanced Features</a><ul class="toc"><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">5.1 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">5.2 </span>Type Coercion</a></li></ul></li><li class="tocline"><a href="#the-json-ld-processing-algorithm" class="tocxref"><span class="secno">6. </span>The JSON-LD Processing Algorithm</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">6.1 </span>Overview</a></li><li class="tocline"><a href="#processing-algorithm-terms" class="tocxref"><span class="secno">6.2 </span>Processing Algorithm Terms</a></li><li class="tocline"><a href="#processing-tokens-and-keywords" class="tocxref"><span class="secno">6.3 </span>Processing Tokens and Keywords</a></li><li class="tocline"><a href="#context" class="tocxref"><span class="secno">6.4 </span>Context</a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno">6.4.1 </span>Coerce</a></li></ul></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">6.5 </span>Chaining</a></li><li class="tocline"><a href="#iri-processing" class="tocxref"><span class="secno">6.6 </span>IRI Processing</a></li></ul></li><li class="tocline"><a href="#sequence" class="tocxref"><span class="secno">7. </span>Sequence</a></li><li class="tocline"><a href="#best-practices" class="tocxref"><span class="secno">8. </span>Best Practices</a><ul class="toc"><li class="tocline"><a href="#javascript" class="tocxref"><span class="secno">8.1 </span>JavaScript</a></li><li class="tocline"><a href="#schema-less-databases" class="tocxref"><span class="secno">8.2 </span>Schema-less Databases</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">9. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-profiles" class="tocxref"><span class="secno">9.1 </span>Vocabulary Profiles</a></li><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">9.2 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">9.3 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">9.3.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">9.3.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">9.3.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#the-default-context" class="tocxref"><span class="secno">A. </span>The Default Context</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">B. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">C.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">C.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p>
+JSON-LD is designed as a light-weight syntax that can be used to express 
+Linked Data. It is primarily intended to be a way to express Linked Data 
+in Javascript and other Web-based programming environments. It is also 
+useful when building interoperable Web Services and when storing Linked 
+Data in JSON-based document storage engines. It is practical and designed 
+to be as simple as possible, utilizing the large number of JSON parsers 
+and existing code that is in use today. It is designed to be able to 
+express key-value pairs, RDF data, Microformats data, and Microdata.
+That is, it supports every major Web-based structured data model in use 
+today. It does not require anyone to change their JSON, but easily add 
+meaning by adding context in a way that is out-of-band. The syntax is 
+designed to not disturb already deployed systems running on JSON, but 
+provide a smooth migration path from JSON to JSON with added
+semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a very small memory footprint in order to operate.
+</p>
+
+<p>
+  JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing objects on the web.
+  Linked Data is a way of describing content across different documents, or web resources. Web
+  resources are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s, and typically are dereferencable entities that may be used
+  to find more information, creating a "web of knowledge". JSON-LD is intended to be a simple
+  publishing method for expressing linked data in JSON.
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and 
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to write processors for JSON-LD.</li>
+</ul>
+
+<p>
+To understand this specification you must first be familiar with JSON, 
+which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] and RDF as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>All comments and discussion takes place on the public mailing list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
+</li>
+
+<li>Specification bugs and issues should be reported in the 
+<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
+
+<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the 
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design-goals-and-rationale" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design Goals and Rationale</h2>
+
+<p>The following section outlines the design goals and rationale behind the 
+JSON-LD markup language.
+</p>
+
+<div id="goals" class="section">
+<h3><span class="secno">2.1 </span>Goals</h3>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers don't need to know RDF in order to use the basic functionality
+ provided by JSON-LD.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup should be 100% compatible with JSON.</dd>
+ <dt>Expressiveness</dt>
+ <dd>All major RDF concepts must be expressible via the JSON-LD syntax.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable.</dd>
+ <dt>Zero Edits, most of the time</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers. At times, mapping JSON to 
+ RDF can become difficult - in these instances, rather than having JSON-LD
+ support esoteric markup, we chose not to support the use case and
+ support a simplified syntax instead. So, while we strive for Zero Edits,
+ it was not always possible without adding great complexity to the language.
+ </dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="map-terms-to-iris" class="section">
+<h3><span class="secno">2.2 </span>Map Terms to IRIs</h3>
+
+<p>
+  An Internationalized Resource Identifier (<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>)
+  as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique identifiers on the web. In Linked Data,
+  IRIs (or URI references) are commonly used for describing entities and properties.
+</p>
+
+<p>Establishing a mechanism to map JSON values to IRIs will
+help in the mapping of JSON objects to RDF. This does not mean that JSON-LD must
+be restrictive in declaring a set of terms, rather, experimentation and 
+innovation should be supported as part of the core design of JSON-LD. There are, 
+however, a number of very small design criteria that can ensure that developers 
+will generate good RDF data that will create value for the greater 
+semantic web community and JSON/REST-based Web Services community.
+</p>
+
+<p>We will be using the following JSON object as the example for this section:
+</p>
+
+<pre class="example">
+{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+</div>
+
+<div id="the-json-ld-context" class="section">
+<h3><span class="secno">2.3 </span>The JSON-LD Context</h3>
+
+<p>A context is used to allow developers to use aliases for 
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. The semantic web, just like the document-based web, uses IRIs for
+unambiguous identification. The idea is that these terms mean something, 
+which you will eventually want to query. A context allows the expression of a number of
+terms which map directly to <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. For example, the term <code>name</code>
+may map directly to the IRI <code>http://xmlns.com/foaf/0.1/name</code>. This allows
+JSON-LD documents to be constructed using common JSON syntax of using simple name/value
+pairs.
+</p>
+<p>
+To reduce the number of different terms that must be defined, JSON-LD also allows terms
+to be used to expand Compact URIs (<abbr title="Compact URI">CURIE</abbr>).
+The semantic web specifies this via <em>Vocabulary Documents</em>, in which a prefix is
+associated with a document, and a suffix is used to create an IRI based on this vocabulary.
+For example, the IRI <em>http://xmlns.com/foaf/0.1/</em> 
+specifies a Vocabulary Document, and <strong>name</strong> is a term in 
+that vocabulary. Join the two items together and you have an unambiguous 
+identifier for a vocabulary term. The Compact URI Expression, or short-form,
+is <code>foaf:name</code> and the expanded-form is
+<code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary term identifies
+the given name for something, for example - a person's name.
+</p>
+
+<p>Developers, and machines, would be able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much like we can use WordNet today to 
+see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Machines need the same sort of 
+dictionary of terms, and URIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>The context provides a collection of vocabulary terms that can be used
+for a JSON object.</p>
+</div>
+
+<div id="unambiguous-identifiers-for-json" class="section">
+<h3><span class="secno">2.4 </span>Unambiguous Identifiers for JSON</h3>
+            
+<p>If a set of terms, like <strong>Person</strong>, 
+<strong>name</strong>, and <strong>homepage</strong>,
+are defined in a context, and that context is used to resolve the
+names in JSON objects, machines could automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://www.w3.org/1999/02/22-rdf-syntax-ns#type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Doing this would mean that JSON would start to become unambiguously
+machine-readable, play well with the semantic web, and basic markup wouldn't 
+be that much more complex than basic JSON markup. A win, all around.</p>
+</div>
+
+<div id="mashing-up-vocabularies" class="section">
+<h3><span class="secno">2.5 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>RDF - for describing information about objects on the semantic web.</li>
+   <li>RDFS - for expressing things like labels and comments.</li>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>Since these vocabularies are very popular, they are pre-defined in
+something called the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a>, which is a set of
+vocabulary prefixes that are pre-loaded in all JSON-LD processors. The
+contents of the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> are provided later in this 
+document. Using the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> allows developers to 
+express data unambiguously, like so:</p>
+
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword, like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}</pre>
+
+<p>The <code>@context</code> keyword is used to change how the JSON-LD
+processor evaluates key-value pairs. In this case, it was used to
+map one string ('myvocab') to another string, which is interpreted as
+a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced 
+with "<code>http://example.org/myvocab#</code>" when it
+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 for RDF, called a CURIE, and provides
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div id="an-example-of-a-context" class="section">
+<h3><span class="secno">2.6 </span>An Example of a Context</h3>
+
+<p>JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> define a known context. For example, the
+following <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> could apply to all incoming Web Service calls
+previously accepting only JSON data:</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+    "@vocab": "http://example.org/default-vocab#",
+    "@base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+}</pre>
+
+<p>The <code>@vocab</code> string is a special keyword that states 
+that any term that doesn't resolve to a term or a prefix should be 
+appended to the <code>@vocab</code> IRI. This is done to ensure that 
+terms can be transformed to an IRI at all times.
+</p>
+
+<p>The <code>@base</code> string is a special keyword that states 
+that any relative IRI <em class="rfc2119" title="must">must</em> be appended to the string specified by
+<code>@base</code>.
+</p>
+
+<p>The <code>@coerce</code> keyword is used to specify type coercion
+rules for the data. For each key in the map, the key is the type to
+be coerced to and the value is the vocabulary term to be coerced.
+Type coercion for the key <code>xsd:anyURI</code> asserts that all 
+vocabulary terms listed should undergo coercion to an IRI, including
+<code>@base</code> processing for relative IRIs and CURIE processing
+for compact URI Expressions such as <code>foaf:homepage</code>.
+</p>
+
+</div>
+</div>
+
+<div id="markup-examples" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">3.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+[
+ {
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/bob/",
+   "foaf:name": "Bob"
+ },
+ {
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/eve/",
+   "foaf:name": "Eve"
+ },
+ {
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/manu/",
+   "foaf:name": "Manu"
+ }
+]</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">3.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">3.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]</pre>
+</div>
+</div>
+
+<div id="markup-of-rdf-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Markup of RDF Concepts</h2>
+
+<p>JSON-LD is designed to ensure that most Linked Data concepts can be marked 
+up in a way that is simple to understand and author by Web developers. In many
+cases, Javascript objects can become Linked Data with the simple addition
+of a context. Since RDF is also an important sub-community of the Linked
+Data movement, it is important that all RDF concepts are well-represented
+in this specification. This section details how each RDF concept can be
+expressed in JSON-LD.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">4.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most subjects
+and many objects are identified. IRIs can be expressed in a variety of
+different ways in JSON-LD.</p>
+
+<ol>
+  <li>In general, an IRI is generated if it is in the key position in 
+    an associative array. There are special rules for processing keys in
+    <code>@context</code> and when dealing with keys that start with the
+    <code>@</code> character.</li>
+  <li>An IRI is generated for the value specified using <code>@</code>, if
+    it is a string.</li>
+  <li>An IRI is generated for the value specified using <code>a</code>.</li>
+  <li>An IRI is generated for the value specified using the <code>@iri</code> 
+    keyword.</li>
+  <li>An IRI is generated when there are <code>@coerce</code> rules in 
+    effect for <code>xsd:anyURI</code> for a particular vocabulary term.</li>
+</ol>
+
+<p>An example of IRI generation for a key outside of a <code>@context</code>:
+</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p>In the example above, the key 
+<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
+opposed to being interpreted as a string..</p>
+
+<p>Term expansion occurs for IRIs if a term is defined within the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p>CURIE expansion also occurs for keys in JSON-LD:</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><code>foaf:name</code> above will automatically expand out to the IRI
+<code>http://xmlns.com/foaf/0.1/name</code>.</p>
+
+<p>An IRI is generated when a value is associated with a key using 
+the <code>@iri</code> keyword:</p>
+
+<pre class="example">
+{
+...
+  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}</pre>
+
+<p>If type coercion rules are specified in the <code>@context</code> for
+a particular vocabulary term, an IRI is generated:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:anyURI": "foaf:homepage"
+    } 
+  }</span>
+...
+  "foaf:homepage": "http://manu.sporny.org",
+...
+}</pre>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">4.2 </span>Identifying the Subject</h3>
+
+<p>A subject is declared using the <code>@</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, property, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to the IRI 
+<code>http://example.org/people#joebob</code>.
+</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">4.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the <code>a</code>
+key. Specifying the type in this way will generate a triple of the form 
+(subject, type, type-url).</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "<span class="diff">a</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple 
+(in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+</div>
+
+<div id="plain-literals" class="section">
+<h3><span class="secno">4.4 </span>Plain Literals</h3>
+
+<p>Regular text strings are called a <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn> in RDF and are easily
+expressed using regular JSON strings.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="language-specification-in-plain-literals" class="section">
+<h3><span class="secno">4.5 </span>Language Specification in Plain Literals</h3>
+
+<p>JSON-LD makes an assumption that <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s with associated
+language encoding information is not very common when used in
+JavaScript and Web Services. Thus, it takes a little more
+effort to express plain literals in a specified language.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}</pre>
+
+<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for <em>花澄</em> and
+associate the <code>ja</code> language tag with the triple that is
+generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="typed-literals" class="section">
+<h3><span class="secno">4.6 </span>Typed Literals</h3>
+
+<p>
+  A <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn> is indicated by attaching a IRI to the end of a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>, and this
+  IRI indicates the literal's datatype. Literals may be typed in JSON-LD in three ways:
+</p>
+
+<ol>
+  <li>By utilizing the <code>@coerce</code> keyword.</li>
+  <li>By utilizing the expanded form for specifying objects.</li>
+  <li>By using a native JSON datatype.</li>
+</ol>
+
+<p>The first example uses the <code>@coerce</code> keyword to express a
+typed literal:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }</span>
+...
+  "dc:modified": "2010-05-29T14:17:39+02:00",
+...
+}</pre>
+
+<p>The second example uses the expanded form for specifying objects:</p>
+
+<pre class="example">
+{
+...
+  "dc:modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }</span>
+...
+}</pre>
+
+<p>Both examples above would generate an object with the literal value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">4.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+arrays. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an array.</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "jaybee" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">4.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
+form for objects:</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/articles/8",
+  "dcterms:modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]</span>
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="blank-nodes" class="section">
+<h3><span class="secno">4.9 </span>Blank Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this is where blank nodes come
+into play. In JSON-LD, blank node identifiers are automatically created if a 
+subject is not specified using the <code>@</code> keyword. However, authors 
+may name blank nodes by using the special <code>_</code> CURIE prefix.</p>
+
+<pre class="example">
+{
+...
+  "@": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+named blank node.
+</p>
+
+</div>
+</div>
+
+<div id="advanced-features" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Advanced Features</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality provided by RDF. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">5.1 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as doubles, 
+integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
+information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
+
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+<p class="note">When dealing with a number of modern programming languages,
+including JavaScript ECMA-262, there is no distinction between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
+the number <code>5.3</code> and the number 
+<code>5.3e0</code> are treated as if they were the same. When converting from 
+JSON-LD to a language-native format and back, datatype information is lost in a 
+number of these languages. Thus, one could say that <code>5.3</code> is a 
+<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
+<strong>xsd:double</strong> in JSON-LD, but when both values are 
+converted to a language-native format the datatype difference between the two 
+is lost because the machine-level representation will almost always be a 
+<strong>double</strong>. 
+Implementers should be aware of this potential round-tripping issue between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
+objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
+to a language native type.
+</p>
+
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">5.2 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of types to ensure that the zero-edit goal of
+JSON-LD can be accomplished. Type coercion allows someone deploying JSON-LD to
+coerce and incoming or outgoing types to the proper RDF type based on a
+mapping of type IRIs to RDF types. Using type conversion, one may convert
+simple JSON data to properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to 
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+        "xsd:anyURI": "homepage",
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+</div>
+
+<div id="the-json-ld-processing-algorithm" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>The JSON-LD Processing Algorithm</h2>
+<p>
+  The JSON-LD Processing Model describes processing rules for extracting RDF
+  from a JSON-LD document. Note that many uses of JSON-LD may not require generation of RDF.
+</p>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The Processing Algorithm is a work in progress.</p>
+
+<div class="informative section" id="overview">
+  <h3><span class="secno">6.1 </span>Overview</h3><p><em>This section is non-normative.</em></p>
+  <p>
+    JSON-LD is intended to have an easy to parse grammar that closely models existing
+    practice in using JSON for describing object representations. This allows the use
+    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
+    for stream-based parsing similar to SAX.
+  </p>
+  <p>
+    As with other grammars used for describing linked data, a key concept is that of
+    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
+    externally named entities, <em>BNodes</em>, resources for which an external name does not
+    exist, or is not known, and Literals, which describe terminal entities such as strings,
+    dates and other representations having a lexical representation possibly including
+    an explicit language or datatype.
+  </p>
+  <p>
+    Data described with JSON-LD may be considered to be the representation of a graph made
+    up of <em>subject</em> and <em>object</em> resources related via a <em>predicate</em> resource.
+    However, specific implementations may choose to operate on the document as a normal
+    JSON description of objects having attributes.
+  </p>
+</div>
+
+<div id="processing-algorithm-terms" class="section">
+  <h3><span class="secno">6.2 </span>Processing Algorithm Terms</h3>
+  <dl>
+    <dt><dfn title="default_context" id="dfn-default_context">default context</dfn></dt>
+    <dd>
+      a context that is specified to the JSON-LD processing algorithm
+      before processing begins.
+    </dd>
+    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
+    <dd>
+      the destination graph for all triples generated by JSON-LD markup.
+    </dd>
+    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
+    <dd>
+      the currently active subject that the processor should use when
+      generating triples.
+    </dd>
+    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
+    <dd>
+      the currently active property that the processor should use when
+      generating triples.
+    </dd>
+    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
+    <dd>
+      the currently active object that the processor should use when
+      generating triples.
+    </dd>
+    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
+    <dd>
+      a context that is used to resolve CURIEs while the processing
+      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context contained within the
+      <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+    </dd>
+    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
+    <dd>
+      a context that is specified at the JSON associative-array level,
+      specified via the <code>@context</code> keyword.
+    </dd>
+    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
+    <dd>
+      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
+      context</a>, <a class="tref" title="current_subject">current subject</a>, and <a class="tref" title="current_property">current property</a>. The <a class="tref" title="processor__state">processor
+      state</a> is managed as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
+      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new associative array.
+    </dd>
+  </dl>
+</div>
+
+<div id="processing-tokens-and-keywords" class="section">
+  <h3><span class="secno">6.3 </span>Processing Tokens and Keywords</h3>
+  <dl>
+  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
+  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@profile</code></dt><dd>A reference to a remote context description used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
+  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
+  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
+  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
+  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
+  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+  <dt><code>:</code></dt><dd>The separator for CURIEs when used in JSON keys or JSON values.</dd>
+  <dt><code>@</code></dt><dd>Sets the active subjects.</dd>
+  <dt><code>a</code></dt><dd>Used to set the rdf:type of the active subjects. This token may be conferred as syntactic sugar for rdf:type.</dd>
+  </dl>
+  <p class="issue">Use <code>@source</code> instead of <code>@</code>?</p>
+  <p class="issue">Use <code>@type</code> instead of <code>a</code>? Note that both are just semantic sugar for <code>rdf:type</code>.</p>
+</div>
+
+<div id="context" class="section">
+  <h3><span class="secno">6.4 </span>Context</h3>
+  <p>
+    Processing of JSON-LD is managed recursively using a process described in <a href="sequence">Sequence</a>.
+    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
+    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
+    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+  </p>
+  <p class="issue">Should the document URL be used as the default for <code>@base</code> in the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a>?</p>
+  <p>
+    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of an associative array (or elements
+    of a list (see <span a="#list-processing">List Processing</span>)).
+  </p>
+  <p>
+    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within an associative array having a key of <code>@context</code> with an associative
+    array value. When processing a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, special rules apply:
+  </p>
+  <ul>
+    <li>The key <code>@base</code> <em class="rfc2119" title="must">must</em> have a value of a simple string with the lexical
+    form of IRI and is saved in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to perform term mapping as described in <a href="#iri-processing">IRI Processing</a>.</li>
+    <li>The key <code>@vocab</code> <em class="rfc2119" title="must">must</em> have a value of a simple string with the lexical
+    form of IRI and is saved in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to perform term mapping as described in <a href="#iri-processing">IRI Processing</a>.</li>
+    <li>The key <code>@coerce</code> <em class="rfc2119" title="must">must</em> have a value of an associative array. Processing
+      of the associative array is described <a href="#coerce">below</a></li>
+    <li>Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of
+      <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite>
+      and <em class="rfc2119" title="must">must</em> have the value of a simple string with the lexical form of IRI.
+      Merge each key-value pair into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
+      any duplicate values.
+    </li>
+  </ul>
+  <p>A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> may also be loaded from an external document using the <code>@profile</code>
+    key as described in <a href="#vocabulary-profiles">Vocabulary Profiles</a>.
+  </p>
+  <div id="coerce" class="section">
+    <h4><span class="secno">6.4.1 </span>Coerce</h4>
+    <p>
+      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
+      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
+      <code>@coerce</code> mapping, overwriting any duplicate values in 
+      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
+      The <code>@coerce</code> mapping has a either of a single CURIE or of an
+      array of CURIEs. When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+      map all CURIE values to array form and replace with the union of the value from
+      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an array
+      with a single CURIE, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
+    </p>
+  </div>
+</div>
+
+<div id="chaining" class="section">
+  <h3><span class="secno">6.5 </span>Chaining</h3>
+  <p>
+    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to use the definition
+    of JSON-LD objects as <a class="tref" title="property">property</a> values. This is a commonly used mechanism for
+    creating a parent-child relationship between objects.
+  </p>
+  <p>The example shows an two objects related by a property from the first object:</p>
+
+  <pre class="example">
+{
+...
+  "foaf:name": "Manu Sporny",
+  "<span class="diff">foaf:knows</span>": {
+    "<span class="diff">a</span>": "<span class="diff">foaf:Person</span>",
+    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}</pre>
+  
+  <p>
+    An object definition may be used anyplace a value is legal in JSON-LD.
+  </p>
+</div>
+
+<div id="iri-processing" class="section">
+  <h3><span class="secno">6.6 </span>IRI Processing</h3>
+  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
+    transforming a value representing an IRI into an actual IRI.</p>
+  <p>IRIs may be represented as an explicit string, or as a CURIE, as a value relative to <code>@base</code>
+    or <code>@vocab</code>.</p>
+  <p>
+    CURIEs are defined more formally in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">section 6 "CURIE Syntax Definition"</a></cite>.
+    Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em> separated by a ':'. In
+    JSON-LD, either the prefix may be the empty string, denoting the <dfn title="default_prefix" id="dfn-default_prefix">default prefix</dfn>.
+  </p>
+  <p>The procedure for generating an IRI is:
+    </p><ol class="algorithm">
+      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
+      <li>If the prefix is a '_', generate a named BNode using the suffix as the name.</li>
+      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
+        by prepending the mapped prefix to the (possibly empty) suffix. Note that an empty
+        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
+      <li>If the IRI being processed is for a property (i.e., a key value in an associative array, or a
+        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
+        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>].</li>
+      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
+        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>].</li>
+      <li>Otherwise, use the value directly as an IRI.</li>
+    </ol>
+  <p></p>
+  </div>
+</div>
+
+
+
+<div id="sequence" class="section">
+  
+<!-- OddPage -->
+<h2><span class="secno">7. </span>Sequence</h2>
+
+  <p>
+    The algorithm below is designed for in-memory implementations with random access to associative
+    array elements. For a description of a streaming implementation, see <a href="streaming-processors">Appendix B</a>.
+  </p>
+  <p>
+    A conforming JSON-LD processor <em class="rfc2119" title="must">must</em> implement a
+    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
+    algorithm generates:
+  </p>
+
+  <ol class="algorithm">
+    <li id="processing-step-default-context">
+      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
+      <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      initialized to NULL.
+    </li>
+
+    <li id="processing-step-associative">
+      If an associative array is detected, perform the following steps:
+      <ol class="algorithm">
+        <li>
+          If the associative array has a <code>@context</code> key, process the local context as
+          described in <a href="context">Context</a>.
+        </li>
+        <li>
+          If the associative array has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
+          performing <a href="#iri-processing">IRI Processing</a> on the associated value. Generate a
+          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+        <li>
+          If the associative array has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+          to a literal value as follows:
+          <ul>
+            <li>
+              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the associative array contains a <code>@datatype</code> key
+              after performing <a href="#iri-processing">IRI Processing</a> on the specified<code>@datatype</code>.
+            </li>
+            <li>
+              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the associative array contains
+              a <code>@language</code> key, use it's value to set the language of the plain literal.
+            </li>
+          </ul>
+          Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref" title="active__property">active
+          property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+        <li>If the associative array has a <code>@</code> key:
+          <ol class="algorithm">
+            <li>
+              If the value is a string, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
+              <a href="#iri-processing">IRI Processing</a>. Generate a
+              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
+            </li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
+              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          If the associative array does not have a <code>@</code> key, set the <a class="tref" title="active__object">active
+          object</a> to newly generated <a class="tref" title="blank_node_identifier">blank node identifier</a>. Generate a triple
+          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
+          object</a>.
+        </li>
+        <li>
+          For each key in the associative array that has not already been processed, perform
+          the following steps:
+          <ol class="algorithm">
+            <li>If the key is <code>a</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+            to <code>rdf:type</code>.
+            </li>
+            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
+            <a href="#iri-processing">IRI Processing</a> on the key.</li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
+              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+      </ol>
+    </li>
+
+    <li>
+      If a regular array is detected, process each value in the array by doing the following
+      returning the result of processing the last value in the array:
+
+      <ol class="algorithm">
+        <li>
+          If the value is a regular array, generate an RDF List by linking
+          each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
+          using the following sequence:
+          <ol>
+            <li>
+              If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+              and <code>rdf:nil</code>.
+            </li>
+            <li>
+              Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+              and a newly generated BNode identified as <em>first bnode</em>.
+            </li>
+            <li>
+              For each element other than the last element in the list:
+              <ol>
+                <li>Create a processor state using the active context, <em>first bnode</em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+                <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest bnode</em>, otherwise use <code>rdf:nil</code>.</li>
+                <li>Generate a new triple using <em>first bnode</em>, <code>rdf:rest</code> and <em>rest bnode</em>.</li>
+                <li>Set <em>first bnode</em> to <em>rest bnode</em>.</li>
+              </ol>
+            </li>
+          </ol>
+        </li>
+        <li>
+          Otherwise, create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+          <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+          starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
+          previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+        </li>
+      </ol>
+    </li>
+    
+    <li>
+      If a string is detected, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+      and a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from the string.
+    </li>
+    
+    <li>
+      If a number is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
+      the value with datatype set to either <code>xsd:integer</code> or
+      <code>xsd:double</code>, depending on if the value contains a
+      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
+      subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and the generated typed literal.
+    </li>
+    
+    <li>
+      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
+      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
+      value with datatype set to <code>xsd:boolean</code>.
+    </li>
+  </ol>
+</div>
+
+<div id="best-practices" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">8. </span>Best Practices</h2>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be 
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<div id="javascript" class="section">
+<h3><span class="secno">8.1 </span>JavaScript</h3>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in 
+JavaScript environments, however, features like the expanded form for
+object values mean that using JSON-LD directly in JavaScript may be 
+annoying without a middleware layer such as a simple library that 
+converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDF API, which enables a variety of RDF-based
+Web Applications, but some don't want to require that level of functionality 
+just to use JSON-LD. The group is still discussing the best way to proceed, 
+so input on how JSON-LD could more easily be utilized in JavaScript 
+environments would be very much appreciated.
+</p>
+</div>
+
+<div id="schema-less-databases" class="section">
+<h3><span class="secno">8.2 </span>Schema-less Databases</h3>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from 
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+
+<p class="issue">MongoDB does not allow the '.' character to be used in
+key names. This prevents developers from storing IRIs as keys, which also
+prevents storage of the data in normalized form. While this issue can
+be avoided by using CURIEs for key values, it is not known if this
+mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
+is useful to developers.
+</p>
+
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">9. </span>Advanced Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear 
+whether or not the JSON-LD specification is going to support the complexity 
+necessary to support each concept. The entire section on Advanced Concepts 
+should be considered as discussion points; it is merely a list of 
+possibilities where all of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="vocabulary-profiles" class="section">
+<h3><span class="secno">9.1 </span>Vocabulary Profiles</h3>
+
+<p>One of the more powerful features of RDFa 1.1 Core is the ability to specify 
+a collection of prefixes and terms that can be re-used by a processor to simplfy
+markup. JSON-LD provides a similar mechanism called Vocabulary Profiles, which is 
+the inclusion of a context external to the JSON-LD document.</p>
+
+<p>The example below demonstrates how one may specify an external Vocabulary
+Profile. Assume the following profile exists at this imaginary URL:
+<code>http://example.org/profiles/contacts</code>.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}</pre>
+
+<p>The profile listed above can be used in the following way:</p>
+
+<pre class="example">
+{
+  "@profile": "http://example.org/profiles/contacts",
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">9.2 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an array to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single JSON-LD associative
+array.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "@": 
+  [
+    {
+      "@": "http://example.org/people#john",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "http://example.org/people#jane",
+      "a": "foaf:Person"
+    }
+  ]
+}</pre>
+
+<p>A disjoint graph could also be expressed like so:</p>
+
+<pre class="example">
+[
+  {
+    "@": "http://example.org/people#john",
+    "a": "foaf:Person"
+  },
+  {
+    "@": "http://example.org/people#jane",
+    "a": "foaf:Person"
+  }
+]</pre>
+
+</div>
+
+<div id="the-json-ld-api" class="section">
+<h3><span class="secno">9.3 </span>The JSON-LD API</h3>
+
+<p>This API provides a clean mechanism that enables developers to convert 
+JSON-LD data into a format that is easier to work with in various programming
+languages.
+</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDProcessor</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+};</span>
+</pre><div id="methods" class="section"><h4><span class="secno">9.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback"><code>toGraph</code></dt><dd>Parses JSON-LD and transforms the data into an Graph, which is 
+  compatible with the RDF Interfaces API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">RDF-INTERFACES</a></cite>]. 
+  This method will 
+  return <code>null</code> if there are any errors, or if the RDF Interfaces 
+  API is not available for use.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>Graph</a></code></div></dd><dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback"><code>toProjection</code></dt><dd>Parses JSON-LD text into an RDF API Projection object as specified
+    by the RDF API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-API">RDF-API</a></cite>].
+    If there are any errors, <code>null</code> is returned.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the Projection.</td></tr><tr><td class="prmName">template</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The Projection template to use when building the Projection.</td></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject to use when building the Projection.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
+
+<p>The JSONLDParserCallback is called whenever a processing error occurs on
+input data.</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre><div id="methods-1" class="section"><h4><span class="secno">9.3.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+
+<p>The following example demonstrates how to convert JSON-LD to a projection
+that is directly usable in a programming environment:
+</p>
+
+<pre class="example">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+
+// Map the JSON-LD to a language-native object
+var person = jsonld.toProjection(jsonldString, myTemplate);
+
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+      "Their homepage is: " + person.homepage);</pre>
+
+<p>A JSON-LD Serializer is also available to map a language-native object
+to JSON-LD.
+
+</p><pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
+};</span>
+</pre><div id="methods-2" class="section"><h4><span class="secno">9.3.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
+  Normalization is important when performing things like equality comparison
+  and digital signature creation and verification.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An associative array of key-value pairs that should be converted
+     to a JSON-LD string. It is assumed that a map already exists for the
+     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
+
+<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
+
+<p class="issue">This algorithm is very rough, untested, and probably contains
+many bugs. Use at your own risk. It will change in the coming months.</p>
+
+<p>The JSON-LD normalization algorithm is as follows:</p>
+
+<ol class="algorithm">
+  <li>Remove the <code>@context</code> key and preserve it as the 
+  <dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
+  <li>For each key
+   <ol class="algorithm">
+    <li>If the key is a CURIE, expand the CURIE to an IRI using the
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+   </ol>
+  </li>
+  <li>For each value
+   <ol class="algorithm">
+    <li>If the value should be type coerced per the 
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
+        new value.</li>
+    <li>If the value is a CURIE, expand the CURIE to an IRI using the
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+    <li>If the value is a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> and the type is a CURIE,
+        expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+    <li>When generating the final value, use expanded object value form to
+      store all IRIs, typed literals and <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s with language
+      information.</li>
+   </ol>
+  </li>
+  <li>Output each sorted key-value pair without any extraneous whitespace. If 
+  the value is an associative array, perform this algorithm, starting
+  at step #1, recursively on the sub-tree. There should be no nesting in
+  the outputted JSON data. That is, the top-most element should be an
+  array. Each item in the array contains a single subject with a 
+  corresponding array of properties in UTF-8 sort order. Any related 
+  objects that are complex objects themselves should be given a top-level 
+  object in the top-level array.</li>
+  
+</ol>
+
+<p class="issue">Note that normalizing named blank nodes is impossible at
+present since one would have to specify a blank node naming algorithm. For
+the time being, you cannot normalize graphs that contain named blank
+nodes. However, normalizing graphs that contain non-named blank nodes 
+is supported.</p>
+
+<pre class="example">
+var myObj = { "@context" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "age",
+                   "xsd:anyURI": "homepage"
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : "42",
+              "homepage" : "http://example.org/people/joe" };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);</pre>
+
+<p>After the code in the example above has executed, the 
+<strong>jsonldText</strong> value will be (line-breaks added for 
+readability):</p>
+
+<pre class="example">
+[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
+"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
+"http://xmlns.com/foaf/0.1/name":"Joe Jackson"}]</pre>
+
+<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
+ensure that the normalized value is a string. In order to generate the
+string from a <strong>double</strong> value, output equivalent to the
+<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
+<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
+is the value to be converted.</p>
+
+<p>To convert the a double value in JavaScript, implementers can use the 
+following snippet of code:</p>
+
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
+
+<p class="note">When data needs to be normalized, JSON-LD authors should
+not use values that are going to undergo automatic conversion. This is due
+to the lossy nature of <strong>xsd:double</strong> values.</p>
+
+<p class="issue">Round-tripping data can be problematic if we mix and
+match @coerce rules with JSON-native datatypes, like integers. Consider the 
+following code example:</p>
+
+<pre class="example">
+var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+
+// Convert the normalized object back to a JavaScript object
+var myObj2 = jsonld.parse(jsonldText);</pre>
+
+<p class="issue">At this point, myObj2 and myObj will have different
+values for the "number" value. myObj will be the number 42, while
+myObj2 will be the string "42". This type of data round-tripping
+error can bite developers. We are currently wondering if having a
+"coerce validation" phase in the parsing/normalization phases would be a 
+good idea. It would prevent data round-tripping issues like the
+one mentioned above.</p>
+
+</div>
+
+</div>
+
+
+
+<div class="appendix section" id="the-default-context">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>The Default Context</h2>
+
+<p>The <dfn title="default_context" id="dfn-default_context-1">default context</dfn> is provided to ensure that there are a
+reasonable set of prefixes and terms available to all JSON-LD developers.
+Mappings specified by the <a class="tref internalDFN" title="default_context" href="#dfn-default_context-1">default context</a> <em class="rfc2119" title="should not">should not</em> be overwritten by
+JSON-LD authors. All JSON-LD processors <em class="rfc2119" title="must">must</em> load the following context 
+in as the intial context before processing JSON-LD text.</p>
+
+<pre>
+{
+  "@context":
+  {
+    "@vocab": "",
+    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dcterms": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "vcard": "http://www.w3.org/2006/vcard/ns# ",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "cc": "http://creativecommons.org/ns#",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "com": "http://purl.org/commerce#",
+    "ps": "http://purl.org/payswarm#",
+    "gr": "http://purl.org/goodrelations/v1#",
+    "sig": "http://purl.org/signature#",
+    "ccard": "http://purl.org/commerce/creditcard#"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+}
+</pre>
+</div>
+
+<div class="appendix section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">B. </span>Acknowledgements</h2>
+
+<p>The editor would like to thank Mark Birbeck, who provided a great deal of the
+rationale and reasoning behind the JSON-LD work via his work on RDFj, 
+Dave Longley who reviewed, provided feedback, and performed several
+implementation on the specification, and Ian Davis, who created RDF/JSON. 
+Thanks also to Nathan Rixham, Bradley P. Allen and Richard Cyganiak for their 
+input on the specification.</p>
+</div>
+
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">C. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">C.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-API">[RDF-API]</dt><dd>Manu Sporny, Benjamin Adrian, Nathan Rixham; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><cite>RDF API</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">http://www.w3.org/2010/02/rdfa/sources/rdf-api/</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RDF-INTERFACES">[RDF-INTERFACES]</dt><dd>Nathan Rixham, Manu Sporny, Benjamin Adrian; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><cite>RDF Interfaces</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/</a>
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">C.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110615/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110803/diff-20110615.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,14536 @@
+<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
+<html lang="en" dir="ltr">
+<head>
+<title>JSON-LD 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+<!-- 
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+  -->
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8"><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+<del class="diff-old">-
+Linked
+Data
+Expression
+in
+JSON
+</del>
+<ins class="diff-chg">1.0
+</ins>
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+<del class="diff-old">Linked
+</del>
+<ins class="diff-chg">Linking
+</ins>
+Data
+</h2>
+<h2 id="unofficial-draft-03-august-2011">
+Unofficial
+Draft
+<del class="diff-old">15
+June
+</del>
+<ins class="diff-chg">03
+August
+</ins>
+2011
+</h2>
+<dl>
+<dt>
+Editors:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+Kellogg
+Associates
+</dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar,
+Inc.
+</a>
+</dd>
+</dl>
+<del class="diff-old">This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+diff
+to
+previous
+version
+.
+</del>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr>
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+<del class="diff-old">Developers
+that
+embed
+structured
+data
+in
+their
+Web
+pages
+can
+choose
+among
+a
+number
+of
+languages
+such
+as
+RDFa
+[
+RDFA-CORE
+],
+Microformats
+</del>
+<ins class="diff-chg">JSON
+</ins>
+[
+<cite>
+<del class="diff-old">MICROFORMATS
+</del>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+<ins class="diff-chg">RFC4627
+</ins>
+</a>
+</cite>
+]
+<del class="diff-old">and
+Microdata
+[
+MICRODATA
+].
+Each
+of
+these
+structured
+data
+languages,
+while
+incompatible
+at
+the
+syntax
+level,
+can
+be
+easily
+mapped
+to
+RDF.
+JSON
+</del>
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+<ins class="diff-new">expressing
+directed
+graphs;
+mixing
+both
+</ins>
+Linked
+Data
+<del class="diff-old">that
+can
+be
+used
+to
+represent
+objects
+specified
+via
+RDFa,
+Microformats
+</del>
+and
+<del class="diff-old">Microdata.
+</del>
+<ins class="diff-chg">non-Linked
+Data
+in
+a
+single
+document.
+</ins>
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+<del class="diff-old">Goals
+and
+Rationale
+</del>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals-and-rationale" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Goals
+<ins class="diff-new">and
+Rationale
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#linked-data" class="tocxref">
+<span class="secno">
+2.2
+</span>
+<del class="diff-old">Map
+Terms
+to
+IRIs
+</del>
+<ins class="diff-chg">Linked
+Data
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#linking-data" class="tocxref">
+<span class="secno">
+2.3
+</span>
+<del class="diff-old">The
+JSON-LD
+Context
+</del>
+<ins class="diff-chg">Linking
+Data
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#the-context" class="tocxref">
+<span class="secno">
+2.4
+</span>
+<del class="diff-old">Unambiguous
+Identifiers
+for
+JSON
+2.5
+Mashing
+Up
+Vocabularies
+</del>
+<ins class="diff-chg">The
+Context
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#inside-a-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">2.6
+</del>
+<ins class="diff-chg">2.4.1
+</ins>
+</span>
+<del class="diff-old">An
+Example
+of
+</del>
+<ins class="diff-chg">Inside
+</ins>
+a
+Context
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<del class="diff-old">3.
+Markup
+Examples
+3.1
+RDFa
+3.2
+Microformats
+</del>
+<a href="#from-json-to-json-ld" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3
+</del>
+<ins class="diff-chg">2.5
+</ins>
+</span>
+<del class="diff-old">Microdata
+</del>
+<ins class="diff-chg">From
+JSON
+to
+JSON-LD
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#basic-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">3.
+</ins>
+</span>
+<del class="diff-old">Markup
+of
+RDF
+</del>
+<ins class="diff-chg">Basic
+</ins>
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">3.1
+</ins>
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">3.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">3.3
+</ins>
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#strings" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">3.4
+</ins>
+</span>
+<del class="diff-old">Plain
+Literals
+</del>
+<ins class="diff-chg">Strings
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#string-internationalization" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">3.5
+</ins>
+</span>
+<del class="diff-old">Language
+Specification
+in
+Plain
+Literals
+</del>
+<ins class="diff-chg">String
+Internationalization
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#datatypes" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">3.6
+</ins>
+</span>
+<del class="diff-old">Typed
+Literals
+</del>
+<ins class="diff-chg">Datatypes
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.7
+</del>
+<ins class="diff-chg">3.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">3.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#compaction" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">3.9
+</ins>
+</span>
+<del class="diff-old">Blank
+Nodes
+</del>
+<ins class="diff-chg">Compaction
+</ins></a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.10
+</ins></span><ins class="diff-chg">
+Expansion
+</ins></a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.11
+</ins></span><ins class="diff-chg">
+Framing
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+Advanced
+<del class="diff-old">Features
+</del>
+<ins class="diff-chg">Concepts
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">4.1
+</ins>
+</span>
+Automatic
+Typing
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">4.2
+</ins>
+</span>
+Type
+Coercion
+</a>
+</li>
+<li class="tocline">
+<a href="#chaining" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">4.3
+</ins>
+</span>
+<del class="diff-old">The
+JSON-LD
+Processing
+Algorithm
+</del>
+<ins class="diff-chg">Chaining
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-unlabeled-nodes" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">4.4
+</ins>
+</span>
+<del class="diff-old">Overview
+</del>
+<ins class="diff-chg">Identifying
+Unlabeled
+Nodes
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#overriding-keywords" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">4.5
+</ins>
+</span>
+<del class="diff-old">Processing
+Algorithm
+Terms
+</del>
+<ins class="diff-chg">Overriding
+Keywords
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.3
+</del>
+<ins class="diff-chg">4.6
+</ins>
+</span>
+<del class="diff-old">Processing
+Tokens
+and
+Keywords
+</del>
+<ins class="diff-chg">Normalization
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#algorithms" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.4
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+<del class="diff-old">Context
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#compaction-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.4.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+<del class="diff-old">Coerce
+</del>
+<ins class="diff-chg">Compaction
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#expansion-1" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">5.2
+</ins></span><ins class="diff-chg">
+Expansion
+</ins></a>
+</li>
+<li class="tocline">
+<a href="#framing-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.5
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<del class="diff-old">Chaining
+</del>
+<ins class="diff-chg">Framing
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.6
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+<del class="diff-old">IRI
+Processing
+</del>
+<ins class="diff-chg">Normalization
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">5.5
+</ins></span><ins class="diff-chg">
+RDF
+Conversion
+</ins></a><ul class="toc">
+<li class="tocline">
+<a href="#overview" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">5.5.1
+</ins>
+</span>
+<del class="diff-old">Sequence
+</del>
+<ins class="diff-chg">Overview
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#processing-algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.
+</del>
+<ins class="diff-chg">5.5.2
+</ins>
+</span>
+<del class="diff-old">Best
+Practices
+</del>
+<ins class="diff-chg">Processing
+Algorithm
+Terms
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#processing-tokens-and-keywords" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.1
+</del>
+<ins class="diff-chg">5.5.3
+</ins>
+</span>
+<del class="diff-old">JavaScript
+</del>
+<ins class="diff-chg">Processing
+Tokens
+and
+Keywords
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#context-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.2
+</del>
+<ins class="diff-chg">5.5.4
+</ins>
+</span>
+<del class="diff-old">Schema-less
+Databases
+</del>
+<ins class="diff-chg">Context
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-processing" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">5.5.5
+</ins></span><ins class="diff-chg">
+IRI
+Processing
+</ins></a>
+</li>
+<li class="tocline">
+<a href="#sequence" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.
+</del>
+<ins class="diff-chg">5.5.6
+</ins>
+</span>
+<del class="diff-old">Advanced
+Concepts
+</del>
+<ins class="diff-chg">Sequence
+</ins>
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#experimental-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.1
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+<del class="diff-old">Vocabulary
+Profiles
+</del>
+<ins class="diff-chg">Experimental
+Concepts
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.2
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Disjoint
+Graphs
+</a>
+</li>
+<li class="tocline">
+<a href="#the-json-ld-api" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+The
+JSON-LD
+API
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3.1
+</del>
+<ins class="diff-chg">6.2.1
+</ins>
+</span>
+Methods
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3.2
+</del>
+<ins class="diff-chg">6.2.2
+</ins>
+</span>
+Methods
+</a>
+</li>
+<li class="tocline">
+<a href="#methods-2" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3.3
+</del>
+<ins class="diff-chg">6.2.3
+</ins>
+</span>
+Methods
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+A.
+</span>
+<del class="diff-old">The
+Default
+Context
+</del>
+<ins class="diff-chg">Markup
+Examples
+</ins></a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno"><ins class="diff-chg">
+A.1
+</ins></span><ins class="diff-chg">
+RDFa
+</ins></a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno"><ins class="diff-chg">
+A.2
+</ins></span><ins class="diff-chg">
+Microformats
+</ins></a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno"><ins class="diff-chg">
+A.3
+</ins></span><ins class="diff-chg">
+Microdata
+</ins></a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno"><ins class="diff-chg">
+A.4
+</ins></span><ins class="diff-chg">
+Mashing
+Up
+Vocabularies
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">A.5
+</ins>
+</span>
+Acknowledgements
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+<ins class="diff-new">JSON,
+as
+specified
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
+RFC4627
+</ins></a></cite><ins class="diff-new">
+],
+is
+a
+simple
+language
+for
+representing
+data
+on
+the
+Web.
+Linked
+Data
+is
+a
+technique
+for
+describing
+content
+across
+different
+documents
+or
+Web
+sites.
+Web
+resources
+are
+described
+using
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a><ins class="diff-new">
+s,
+and
+typically
+are
+dereferencable
+entities
+that
+may
+be
+used
+to
+find
+more
+information,
+creating
+a
+"Web
+of
+Knowledge".
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+not
+only
+Linked
+Data
+in
+JSON,
+but
+for
+adding
+semantics
+to
+existing
+JSON.
+</ins></p><p>
+JSON-LD
+is
+designed
+as
+a
+light-weight
+syntax
+that
+can
+be
+used
+to
+express
+Linked
+Data.
+It
+is
+primarily
+intended
+to
+be
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+and
+other
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+interoperable
+Web
+Services
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+document
+storage
+engines.
+It
+is
+practical
+and
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+and
+existing
+code
+that
+is
+in
+use
+today.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+<ins class="diff-new">RDFa
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-new">
+RDFA-CORE
+</ins></a></cite><ins class="diff-new">
+]
+data,
+</ins>
+Microformats
+<ins class="diff-new">[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS"><ins class="diff-new">
+MICROFORMATS
+</ins></a></cite><ins class="diff-new">
+]
+</ins>
+data,
+and
+<del class="diff-old">Microdata.
+</del>
+<ins class="diff-chg">Microdata
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA"><ins class="diff-chg">
+MICRODATA
+</ins></a></cite><ins class="diff-chg">
+].
+</ins>
+That
+is,
+it
+supports
+every
+major
+Web-based
+structured
+data
+model
+in
+use
+today.
+<del class="diff-old">It
+</del>
+</p>
+<p>
+<ins class="diff-chg">The
+syntax
+</ins>
+does
+not
+require
+<del class="diff-old">anyone
+</del>
+<ins class="diff-chg">many
+applications
+</ins>
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+<ins class="diff-new">either
+in-band
+or
+</ins>
+out-of-band.
+The
+syntax
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+very
+small
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<del class="diff-old">JSON,
+as
+specified
+in
+[
+RFC4627
+],
+is
+a
+simple
+language
+for
+representing
+objects
+on
+the
+web.
+Linked
+Data
+is
+a
+way
+of
+describing
+content
+across
+different
+documents,
+or
+web
+resources.
+Web
+resources
+are
+described
+using
+IRI
+s,
+and
+typically
+are
+dereferencable
+entities
+that
+may
+be
+used
+to
+find
+more
+information,
+creating
+a
+"web
+of
+knowledge".
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+linked
+data
+in
+JSON.
+</del>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+<del class="diff-old">write
+</del>
+<ins class="diff-chg">implement
+</ins>
+processors
+<ins class="diff-new">and
+APIs
+</ins>
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+<ins class="diff-new">the
+basics
+in
+</ins>
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+<ins class="diff-new">].
+To
+understand
+the
+API
+and
+how
+it
+is
+intended
+to
+operate
+in
+a
+programming
+environment,
+it
+is
+useful
+to
+have
+working
+knowledge
+of
+the
+JavaScript
+programming
+language
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262"><ins class="diff-new">
+ECMA-262
+</ins></a></cite>
+]
+and
+<ins class="diff-new">WebIDL
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL"><ins class="diff-new">
+WEBIDL
+</ins></a></cite><ins class="diff-new">
+].
+To
+understand
+how
+JSON-LD
+maps
+to
+RDF,
+it
+is
+helpful
+to
+be
+familiar
+with
+the
+basic
+</ins>
+RDF
+<del class="diff-old">as
+described
+in
+</del>
+<ins class="diff-chg">concepts
+</ins>
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+<del class="diff-old">All
+comments
+and
+</del>
+<ins class="diff-chg">Technical
+</ins>
+discussion
+<del class="diff-old">takes
+place
+</del>
+<ins class="diff-chg">typically
+occurs
+</ins>
+on
+the
+public
+mailing
+list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
+public-linked-json@w3.org
+</a>
+</li>
+<li>
+<a href="http://json-ld.org/minutes/">
+<ins class="diff-new">Public
+teleconferences
+</ins></a><ins class="diff-new">
+are
+held
+on
+Tuesdays
+at
+1500UTC
+on
+the
+second
+and
+fourth
+week
+of
+each
+month.
+</ins></li><li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="https://github.com/json-ld/json-ld.org/issues">
+issue
+tracker
+</a>.
+</li>
+<li>
+<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=#json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+</div>
+</div>
+<div id="design" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+<del class="diff-old">Goals
+and
+Rationale
+</del>
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="goals-and-rationale" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+Goals
+<ins class="diff-new">and
+Rationale
+</ins>
+</h3>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+<del class="diff-old">don't
+</del>
+need
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">only
+</ins>
+know
+<del class="diff-old">RDF
+in
+order
+</del>
+<ins class="diff-chg">JSON
+and
+three
+keywords
+</ins>
+to
+use
+the
+basic
+functionality
+<del class="diff-old">provided
+by
+</del>
+<ins class="diff-chg">in
+</ins>
+JSON-LD.
+<ins class="diff-new">No
+extra
+processors
+or
+software
+libraries
+are
+necessary
+to
+use
+JSON-LD
+in
+its
+most
+basic
+form.
+The
+language
+attempts
+to
+ensure
+that
+developers
+have
+an
+easy
+learning
+curve.
+</ins>
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+<del class="diff-old">should
+</del>
+<ins class="diff-chg">must
+</ins>
+be
+100%
+compatible
+with
+JSON.
+<ins class="diff-new">This
+ensures
+that
+all
+of
+the
+standard
+JSON
+libraries
+work
+seamlessly
+with
+JSON-LD
+documents.
+</ins>
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+<del class="diff-old">All
+major
+RDF
+concepts
+</del>
+<ins class="diff-chg">The
+syntax
+</ins>
+must
+be
+<del class="diff-old">expressible
+via
+the
+JSON-LD
+syntax.
+</del>
+<ins class="diff-chg">able
+to
+express
+directed
+graphs,
+which
+have
+been
+proven
+to
+be
+able
+to
+simply
+express
+almost
+every
+real
+world
+data
+model.
+</ins>
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+<del class="diff-old">readable.
+</del>
+<ins class="diff-chg">readable,
+requiring
+as
+little
+as
+possible
+from
+the
+developer.
+</ins></dd><dt><ins class="diff-chg">
+Pragmatism
+</ins></dt><dd><ins class="diff-chg">
+Mixing
+the
+expression
+of
+pure
+Linked
+Data
+with
+data
+that
+is
+not
+linked
+was
+an
+approach
+that
+was
+driven
+by
+pragmatism.
+JSON-LD
+attempts
+to
+be
+more
+practical
+than
+theoretical
+in
+its
+approach
+to
+Linked
+Data.
+</ins>
+</dd>
+<dt>
+Zero
+Edits,
+most
+of
+the
+time
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+At
+times,
+mapping
+JSON
+to
+<del class="diff-old">RDF
+</del>
+<ins class="diff-chg">a
+graph
+representation
+</ins>
+can
+become
+<del class="diff-old">difficult
+-
+in
+</del>
+<ins class="diff-chg">difficult.
+In
+</ins>
+these
+instances,
+rather
+than
+having
+JSON-LD
+support
+esoteric
+markup,
+we
+chose
+not
+to
+support
+the
+use
+case
+and
+support
+a
+simplified
+syntax
+instead.
+So,
+while
+<del class="diff-old">we
+strive
+for
+</del>
+Zero
+<del class="diff-old">Edits,
+</del>
+<ins class="diff-chg">Edits
+was
+a
+goal,
+</ins>
+it
+was
+not
+always
+possible
+without
+adding
+great
+complexity
+to
+the
+language.
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<div id="linked-data" class="section">
+<h3>
+<span class="secno">
+2.2
+</span>
+<del class="diff-old">Map
+Terms
+</del>
+<ins class="diff-chg">Linked
+Data
+</ins></h3><p><ins class="diff-chg">
+The
+following
+definition
+for
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a><ins class="diff-chg">
+is
+the
+one
+that
+will
+be
+used
+for
+this
+specification.
+</ins></p><ol><li><dfn title="Linked_Data" id="dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></dfn><ins class="diff-chg">
+is
+a
+set
+of
+documents,
+each
+containing
+a
+representation
+of
+a
+linked
+data
+graph.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="linked_data_graph" id="dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></dfn><ins class="diff-chg">
+is
+a
+labeled
+directed
+graph,
+where
+nodes
+are
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a><ins class="diff-chg">
+s
+or
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><ins class="diff-chg">
+s,
+and
+edges
+are
+properties.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="subject" id="dfn-subject"><ins class="diff-chg">
+subject
+</ins></dfn><ins class="diff-chg">
+is
+any
+node
+in
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a><ins class="diff-chg">
+with
+at
+least
+one
+outgoing
+edge.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
+should
+</ins></em><ins class="diff-chg">
+be
+labeled
+with
+a
+IRI.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="property" id="dfn-property"><ins class="diff-chg">
+property
+</ins></dfn><ins class="diff-chg">
+is
+an
+edge
+of
+the
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a><ins class="diff-chg">
+.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+labeled
+with
+an
+IRI.
+</ins></li><li><ins class="diff-chg">
+An
+</ins><dfn title="object" id="dfn-object"><ins class="diff-chg">
+object
+</ins></dfn><ins class="diff-chg">
+is
+a
+node
+in
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a><ins class="diff-chg">
+with
+at
+least
+one
+incoming
+edge.
+</ins></li><li><ins class="diff-chg">
+An
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+be
+labeled
+with
+an
+IRI.
+</ins></li><li><ins class="diff-chg">
+An
+IRI
+that
+is
+a
+label
+in
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
+should
+</ins></em><ins class="diff-chg">
+be
+dereferencable
+</ins>
+to
+<del class="diff-old">IRIs
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a><ins class="diff-chg">
+document
+describing
+the
+labeled
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a>,<a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><ins class="diff-chg">
+.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="literal" id="dfn-literal"><ins class="diff-chg">
+literal
+</ins></dfn><ins class="diff-chg">
+is
+an
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><ins class="diff-chg">
+with
+a
+label
+that
+is
+not
+an
+IRI
+</ins></li></ol><p><ins class="diff-chg">
+Note
+that
+the
+definition
+for
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a><ins class="diff-chg">
+above
+is
+silent
+on
+the
+topic
+of
+unlabeled
+nodes.
+Unlabeled
+nodes
+are
+not
+considered
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a>.<ins class="diff-chg">
+However,
+this
+specification
+allows
+for
+the
+expression
+of
+unlabled
+nodes,
+as
+most
+graph-based
+data
+sets
+on
+the
+Web
+contain
+a
+number
+of
+associated
+nodes
+that
+are
+not
+named
+and
+thus
+are
+not
+directly
+de-referenceable.
+</ins></p></div><div id="linking-data" class="section"><h3><span class="secno"><ins class="diff-chg">
+2.3
+</ins></span><ins class="diff-chg">
+Linking
+Data
+</ins>
+</h3>
+<p>
+An
+Internationalized
+Resource
+Identifier
+(
+<dfn title="IRI" id="dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+<del class="diff-old">)
+</del>
+<ins class="diff-chg">),
+</ins>
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+],
+is
+a
+mechanism
+for
+representing
+unique
+identifiers
+on
+the
+web.
+In
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+<del class="diff-old">Data,
+IRIs
+(or
+URI
+references)
+are
+</del>
+<ins class="diff-chg">Data
+</ins></a>,<ins class="diff-chg">
+an
+IRI
+is
+</ins>
+commonly
+used
+for
+<del class="diff-old">describing
+entities
+and
+properties.
+</del>
+<ins class="diff-chg">expressing
+a
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><ins class="diff-chg">
+or
+an
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a>.
+</p>
+<p>
+<del class="diff-old">Establishing
+</del>
+<ins class="diff-chg">JSON-LD
+defines
+</ins>
+a
+mechanism
+to
+map
+JSON
+values
+to
+<del class="diff-old">IRIs
+will
+help
+in
+the
+mapping
+of
+JSON
+objects
+to
+RDF.
+</del>
+<ins class="diff-chg">IRIs.
+</ins>
+This
+does
+not
+mean
+that
+JSON-LD
+<del class="diff-old">must
+</del>
+<ins class="diff-chg">requires
+every
+key
+or
+value
+to
+</ins>
+be
+<del class="diff-old">restrictive
+in
+declaring
+a
+set
+of
+terms,
+rather,
+experimentation
+</del>
+<ins class="diff-chg">an
+IRI,
+but
+rather
+ensures
+that
+keys
+</ins>
+and
+<del class="diff-old">innovation
+should
+</del>
+<ins class="diff-chg">values
+can
+</ins>
+be
+<del class="diff-old">supported
+as
+part
+of
+</del>
+<ins class="diff-chg">mapped
+to
+IRIs
+if
+</ins>
+the
+<del class="diff-old">core
+design
+of
+JSON-LD.
+</del>
+<ins class="diff-chg">developer
+so
+desires
+to
+transform
+their
+data
+into
+Linked
+Data.
+</ins>
+There
+<del class="diff-old">are,
+however,
+</del>
+<ins class="diff-chg">are
+</ins>
+a
+<del class="diff-old">number
+of
+very
+small
+design
+criteria
+</del>
+<ins class="diff-chg">few
+techniques
+</ins>
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+<del class="diff-old">RDF
+data
+that
+will
+create
+value
+</del>
+<ins class="diff-chg">Linked
+Data
+</ins>
+for
+the
+<del class="diff-old">greater
+semantic
+web
+community
+and
+JSON/REST-based
+Web
+Services
+community.
+</del>
+<ins class="diff-chg">Web.
+JSON-LD
+formalizes
+those
+techniques.
+</ins>
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">markup
+</ins>
+as
+the
+example
+for
+<ins class="diff-new">the
+rest
+of
+</ins>
+this
+section:
+</p>
+<del class="diff-old">{
+  "a": "Person",
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+</del>
+<pre class="example">{
+<ins class="diff-chg">  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+</ins>
+}
+</pre>
+</div>
+<div id="the-context" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">2.3
+</del>
+<ins class="diff-chg">2.4
+</ins>
+</span>
+The
+<del class="diff-old">JSON-LD
+</del>
+Context
+</h3>
+<p>
+<del class="diff-old">A
+</del>
+<ins class="diff-chg">In
+JSON-LD,
+a
+</ins>
+context
+is
+used
+to
+allow
+developers
+to
+<del class="diff-old">use
+aliases
+for
+</del>
+<ins class="diff-chg">map
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s
+to
+</ins>
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s.
+<ins class="diff-new">A
+</ins><dfn title="term" id="dfn-term"><ins class="diff-new">
+term
+</ins></dfn><ins class="diff-new">
+is
+a
+short
+word
+that
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+be
+expanded
+to
+an
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a>.
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+<del class="diff-old">terms
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+s
+</ins>
+mean
+<del class="diff-old">something,
+which
+you
+will
+eventually
+want
+to
+query.
+A
+context
+allows
+the
+expression
+of
+a
+number
+</del>
+<ins class="diff-chg">something
+that
+may
+be
+</ins>
+of
+<del class="diff-old">terms
+which
+map
+directly
+</del>
+<ins class="diff-chg">use
+</ins>
+to
+<del class="diff-old">IRI
+s.
+</del>
+<ins class="diff-chg">other
+developers.
+</ins>
+For
+example,
+the
+term
+<code>
+name
+</code>
+may
+map
+directly
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+allows
+JSON-LD
+documents
+to
+be
+constructed
+using
+<ins class="diff-new">the
+</ins>
+common
+JSON
+<del class="diff-old">syntax
+</del>
+<ins class="diff-chg">practice
+</ins>
+of
+<del class="diff-old">using
+</del>
+simple
+name/value
+<del class="diff-old">pairs.
+</del>
+<ins class="diff-chg">pairs
+while
+ensuring
+that
+the
+data
+is
+useful
+outside
+of
+the
+database
+or
+page
+in
+which
+it
+resides.
+</ins>
+</p>
+<p>
+<del class="diff-old">To
+reduce
+</del>
+<ins class="diff-chg">These
+Linked
+Data
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s
+are
+typically
+collected
+in
+a
+context
+and
+then
+used
+by
+adding
+a
+single
+line
+to
+</ins>
+the
+<del class="diff-old">number
+of
+different
+</del>
+<ins class="diff-chg">JSON
+markup
+above:
+</ins></p><pre class="example">{
  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
<ins class="diff-chg">
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</ins></pre><p><ins class="diff-chg">
+The
+addition
+above
+transforms
+the
+previous
+JSON
+document
+into
+a
+JSON
+document
+with
+added
+semantics
+because
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+specifies
+how
+the
+</ins><strong><ins class="diff-chg">
+name
+</ins></strong>,<strong><ins class="diff-chg">
+homepage
+</ins></strong>,<ins class="diff-chg">
+and
+</ins><strong><ins class="diff-chg">
+avatar
+</ins></strong>
+terms
+<del class="diff-old">that
+must
+be
+defined,
+JSON-LD
+also
+</del>
+<ins class="diff-chg">map
+to
+IRIs.
+Mapping
+those
+keys
+to
+IRIs
+gives
+the
+data
+global
+context.
+If
+two
+developers
+use
+the
+same
+IRI
+to
+describe
+a
+property,
+they
+are
+more
+than
+likely
+expressing
+the
+same
+concept.
+This
+</ins>
+allows
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">both
+developers
+</ins>
+to
+<del class="diff-old">be
+used
+</del>
+<ins class="diff-chg">re-use
+each
+others
+data
+without
+having
+</ins>
+to
+<del class="diff-old">expand
+Compact
+URIs
+(
+CURIE
+).
+</del>
+<ins class="diff-chg">agree
+to
+how
+their
+data
+will
+inter-operate
+on
+a
+site-by-site
+basis.
+</ins></p><p>
+The
+semantic
+web
+<del class="diff-old">specifies
+this
+via
+</del>
+<ins class="diff-chg">uses
+a
+special
+type
+of
+document
+called
+a
+</ins>
+<em>
+<ins class="diff-new">Web
+</ins>
+Vocabulary
+<del class="diff-old">Documents
+,
+in
+which
+</del>
+</em>
+<ins class="diff-chg">to
+define
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s.
+A
+context
+is
+</ins>
+a
+<ins class="diff-new">type
+of
+Web
+vocabulary.
+Typically,
+these
+Web
+Vocabulary
+documents
+have
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+<del class="diff-old">is
+</del>
+</a>
+<ins class="diff-chg">es
+</ins>
+associated
+with
+<del class="diff-old">a
+document,
+</del>
+<ins class="diff-chg">them
+</ins>
+and
+<ins class="diff-new">contain
+</ins>
+a
+<del class="diff-old">suffix
+</del>
+<ins class="diff-chg">number
+of
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+declarations.
+A
+</ins><dfn title="prefix" id="dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></dfn>,<ins class="diff-chg">
+like
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a>,
+is
+<del class="diff-old">used
+</del>
+<ins class="diff-chg">a
+short
+word
+that
+expands
+</ins>
+to
+<del class="diff-old">create
+an
+IRI
+based
+on
+this
+</del>
+<ins class="diff-chg">a
+Web
+Vocabulary
+IRI.
+</ins><a class="tref internalDFN" title="Prefix" href="#dfn-prefix"><ins class="diff-chg">
+Prefix
+</ins></a><ins class="diff-chg">
+es
+are
+helpful
+when
+a
+developer
+wants
+to
+mix
+multiple
+vocabularies
+together
+in
+a
+context,
+but
+does
+not
+want
+to
+go
+to
+the
+trouble
+of
+defining
+every
+single
+term
+in
+every
+single
+</ins>
+vocabulary.
+<ins class="diff-new">Some
+Web
+Vocabularies
+may
+have
+10-20
+terms
+defined.
+If
+a
+developer
+wants
+to
+use
+3-4
+different
+vocabularies,
+the
+number
+of
+terms
+that
+would
+have
+to
+be
+declared
+in
+a
+single
+context
+would
+become
+quite
+large.
+To
+reduce
+the
+number
+of
+different
+terms
+that
+must
+be
+defined,
+JSON-LD
+also
+allows
+prefixes
+to
+be
+used
+to
+compact
+IRIs.
+</ins></p><p></p><p>
+For
+example,
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/
+</code>
+specifies
+a
+<ins class="diff-new">Web
+</ins>
+Vocabulary
+<del class="diff-old">Document,
+and
+</del>
+<ins class="diff-chg">which
+may
+be
+represented
+using
+the
+</ins><code><ins class="diff-chg">
+foaf
+</ins></code><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a>.<ins class="diff-chg">
+The
+</ins><code><ins class="diff-chg">
+foaf
+</ins></code><ins class="diff-chg">
+Web
+Vocabulary
+contains
+a
+term
+called
+</ins><strong><ins class="diff-chg">
+name
+</ins></strong>.<ins class="diff-chg">
+If
+you
+join
+the
+</ins><code><ins class="diff-chg">
+foaf
+</ins></code><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+with
+the
+</ins>
+<strong>
+name
+</strong>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">suffix,
+you
+can
+build
+</ins>
+a
+<del class="diff-old">term
+in
+</del>
+<ins class="diff-chg">compact
+IRI
+</ins>
+that
+<del class="diff-old">vocabulary.
+Join
+the
+two
+items
+together
+and
+you
+have
+</del>
+<ins class="diff-chg">will
+expand
+out
+into
+</ins>
+an
+<del class="diff-old">unambiguous
+identifier
+</del>
+<ins class="diff-chg">absolute
+IRI
+</ins>
+for
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">the
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/name
+</ins></code>
+vocabulary
+term.
+<del class="diff-old">The
+Compact
+URI
+Expression,
+</del>
+<ins class="diff-chg">That
+is,
+the
+compact
+IRI,
+</ins>
+or
+short-form,
+is
+<code>
+foaf:name
+</code>
+and
+the
+expanded-form
+is
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+vocabulary
+term
+<del class="diff-old">identifies
+the
+given
+name
+for
+something,
+for
+example
+-
+</del>
+<ins class="diff-chg">is
+used
+to
+specify
+</ins>
+a
+person's
+name.
+</p>
+<p>
+Developers,
+and
+machines,
+<del class="diff-old">would
+be
+</del>
+<ins class="diff-chg">are
+</ins>
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+<del class="diff-old">Machines
+</del>
+<ins class="diff-chg">Developers
+and
+machines
+</ins>
+need
+the
+same
+sort
+of
+dictionary
+of
+<del class="diff-old">terms,
+and
+URIs
+</del>
+<ins class="diff-chg">terms.
+IRIs
+</ins>
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+The
+context
+provides
+a
+collection
+of
+vocabulary
+<del class="diff-old">terms
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+s
+and
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+es
+</ins>
+that
+can
+be
+used
+<del class="diff-old">for
+a
+</del>
+<ins class="diff-chg">to
+expand
+</ins>
+JSON
+<del class="diff-old">object.
+</del>
+<ins class="diff-chg">keys
+and
+values
+into
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
+IRI
+</ins></a><ins class="diff-chg">
+s.
+</ins>
+</p>
+<div id="inside-a-context" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">2.4
+</del>
+<ins class="diff-chg">2.4.1
+</ins>
+</span>
+<del class="diff-old">Unambiguous
+Identifiers
+for
+JSON
+If
+a
+set
+of
+terms,
+like
+Person
+,
+name
+,
+and
+homepage
+,
+are
+defined
+in
+</del>
+<ins class="diff-chg">Inside
+</ins>
+a
+<del class="diff-old">context,
+and
+that
+context
+is
+used
+to
+resolve
+</del>
+<ins class="diff-chg">Context
+</ins></h4><p><ins class="diff-chg">
+In
+</ins>
+the
+<del class="diff-old">names
+in
+JSON
+objects,
+machines
+could
+automatically
+expand
+</del>
+<ins class="diff-chg">previous
+section,
+</ins>
+the
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">developer
+used
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+keyword
+</ins>
+to
+<ins class="diff-new">pull
+in
+an
+external
+context.
+That
+context
+document,
+if
+de-referenced,
+would
+look
+</ins>
+something
+<del class="diff-old">meaningful
+and
+unambiguous,
+</del>
+like
+this:
+</p>
+<del class="diff-old">{
+  "",
+  "": "Manu Sporny",
+  "": "http://manu.sporny.org"
+  "": "http://twitter.com/account/profile_image/manusporny"
+</del>
+<pre class="example">{
+<ins class="diff-chg">    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">Doing
+this
+would
+mean
+that
+JSON
+would
+start
+to
+become
+unambiguously
+machine-readable,
+play
+well
+with
+the
+semantic
+web,
+and
+basic
+markup
+wouldn't
+be
+that
+much
+more
+complex
+than
+basic
+JSON
+markup.
+</del>
+A
+<del class="diff-old">win,
+all
+around.
+2.5
+Mashing
+Up
+Vocabularies
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+RDF
+-
+for
+describing
+information
+about
+objects
+on
+the
+semantic
+web.
+RDFS
+-
+for
+expressing
+things
+like
+labels
+and
+comments.
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+FOAF
+-
+for
+describing
+social
+networks.
+Calendar
+-
+for
+specifying
+events.
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+GEO
+-
+for
+describing
+geographic
+location.
+VCard
+-
+for
+describing
+organizations
+and
+people.
+DOAP
+-
+for
+describing
+projects.
+Since
+these
+vocabularies
+are
+very
+popular,
+they
+are
+pre-defined
+in
+something
+called
+the
+default
+</del>
+<ins class="diff-chg">JSON-LD
+</ins>
+context
+<del class="diff-old">,
+which
+</del>
+<ins class="diff-chg">document
+</ins>
+is
+a
+<del class="diff-old">set
+of
+vocabulary
+prefixes
+that
+are
+pre-loaded
+in
+all
+JSON-LD
+processors.
+The
+contents
+of
+the
+default
+context
+</del>
+<ins class="diff-chg">simple
+mapping
+from
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins>
+</a>
+<del class="diff-old">are
+provided
+later
+in
+this
+document.
+Using
+the
+default
+context
+</del>
+<ins class="diff-chg">s
+and
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins>
+</a>
+<del class="diff-old">allows
+developers
+</del>
+<ins class="diff-chg">es
+</ins>
+to
+<del class="diff-old">express
+data
+unambiguously,
+like
+so:
+{
+  "",
+  "": "Manu Sporny",
+  "": "http://manu.sporny.org/",
+  "": "http://twitter.com/account/profile_image/manusporny"
+}
+Developers
+can
+</del>
+<ins class="diff-chg">IRIs.
+Contexts
+may
+</ins>
+also
+<del class="diff-old">specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+active
+context
+</del>
+<ins class="diff-chg">contain
+datatype
+information
+for
+certain
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins>
+</a>
+<del class="diff-old">in-line
+using
+the
+@context
+keyword,
+like
+so:
+{
+  ,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny",
+  "myvocab:personality": "friendly"
+}
+The
+@context
+keyword
+is
+used
+to
+change
+how
+the
+JSON-LD
+processor
+evaluates
+key-value
+pairs.
+In
+this
+case,
+it
+was
+used
+to
+map
+one
+string
+('myvocab')
+to
+another
+string,
+which
+is
+interpreted
+</del>
+<ins class="diff-chg">s
+</ins>
+as
+<del class="diff-old">a
+IRI
+.
+In
+the
+example
+above,
+the
+myvocab
+string
+is
+replaced
+with
+"
+http://example.org/myvocab#
+"
+when
+it
+is
+detected.
+In
+</del>
+<ins class="diff-chg">well
+as
+other
+processing
+instructions
+for
+</ins>
+the
+<del class="diff-old">example
+above,
+"
+myvocab:personality
+"
+would
+expand
+to
+"
+http://example.org/myvocab#personality
+".
+</del>
+<ins class="diff-chg">JSON-LD
+processor.
+</ins>
+</p>
+<p>
+<ins class="diff-new">Contexts
+may
+be
+specified
+in-line.
+</ins>
+This
+<del class="diff-old">mechanism
+is
+a
+short-hand
+for
+RDF,
+called
+</del>
+<ins class="diff-chg">ensures
+that
+JSON-LD
+documents
+can
+be
+processed
+when
+</ins>
+a
+<del class="diff-old">CURIE,
+and
+provides
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+</del>
+<ins class="diff-chg">JSON-LD
+processor
+does
+not
+have
+access
+</ins>
+to
+<del class="diff-old">RDF.
+</del>
+<ins class="diff-chg">the
+Web.
+</ins>
+</p>
+<del class="diff-old">2.6
+An
+Example
+of
+a
+Context
+</del>
+<p>
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+<ins class="diff-new">This
+means
+that
+developers
+can
+also
+specify
+a
+context
+for
+JSON
+data
+in
+an
+out-of-band
+fashion
+via
+the
+API.
+The
+API
+is
+described
+later
+in
+this
+document.
+</ins>
+A
+JSON-LD
+aware
+Web
+Service
+<em class="rfc2119" title="may">
+may
+</em>
+<ins class="diff-new">also
+</ins>
+define
+a
+<del class="diff-old">known
+context.
+For
+example,
+the
+following
+default
+</del>
+context
+<del class="diff-old">could
+apply
+to
+all
+incoming
+Web
+Service
+calls
+previously
+accepting
+only
+JSON
+data:
+{
+  "@context": 
+  {
+    "@vocab": "http://example.org/default-vocab#",
+    "@base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+}
+The
+@vocab
+string
+is
+a
+special
+keyword
+</del>
+that
+<del class="diff-old">states
+that
+any
+term
+that
+doesn't
+resolve
+to
+a
+term
+or
+a
+prefix
+should
+</del>
+<ins class="diff-chg">will
+</ins>
+be
+<del class="diff-old">appended
+</del>
+<ins class="diff-chg">pre-loaded
+for
+all
+calls
+</ins>
+to
+the
+<del class="diff-old">@vocab
+IRI.
+</del>
+<ins class="diff-chg">service.
+</ins>
+This
+<del class="diff-old">is
+done
+to
+ensure
+that
+terms
+can
+be
+transformed
+to
+an
+IRI
+at
+all
+times.
+The
+@base
+string
+is
+a
+special
+keyword
+that
+states
+</del>
+<ins class="diff-chg">allows
+services
+</ins>
+that
+<del class="diff-old">any
+relative
+IRI
+must
+be
+appended
+to
+the
+string
+specified
+by
+@base
+.
+The
+@coerce
+keyword
+is
+used
+to
+specify
+type
+coercion
+rules
+for
+the
+data.
+For
+each
+key
+in
+the
+map,
+the
+key
+is
+the
+type
+to
+be
+coerced
+to
+</del>
+<ins class="diff-chg">have
+previously
+been
+publishing
+</ins>
+and
+<del class="diff-old">the
+value
+is
+the
+vocabulary
+term
+</del>
+<ins class="diff-chg">receiving
+JSON
+data
+</ins>
+to
+<del class="diff-old">be
+coerced.
+Type
+coercion
+for
+the
+key
+xsd:anyURI
+asserts
+that
+all
+vocabulary
+terms
+listed
+should
+undergo
+coercion
+</del>
+<ins class="diff-chg">accept
+JSON-LD
+data
+without
+requiring
+client
+software
+</ins>
+to
+<del class="diff-old">an
+IRI,
+including
+@base
+processing
+for
+relative
+IRIs
+and
+CURIE
+processing
+for
+compact
+URI
+Expressions
+such
+as
+foaf:homepage
+.
+</del>
+<ins class="diff-chg">change.
+</ins>
+</p>
+</div>
+</div>
+<div id="from-json-to-json-ld" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.
+</del>
+<ins class="diff-chg">2.5
+</ins>
+</span>
+<del class="diff-old">Markup
+Examples
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+</del>
+<ins class="diff-chg">From
+JSON
+</ins>
+to
+<del class="diff-old">express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+</del>
+JSON-LD
+<del class="diff-old">is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+3.1
+RDFa
+</del>
+</h3>
+<p>
+<del class="diff-old">The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+</del>
+<ins class="diff-chg">If
+a
+set
+of
+terms
+such
+as,
+</ins><strong><ins class="diff-chg">
+name
+</ins></strong>,<strong><ins class="diff-chg">
+homepage
+</ins></strong>,
+and
+<del class="diff-old">homepages.
+&lt;div &gt;
+   &lt;ul&gt;
+      &lt;li &gt;
+        &lt;a &gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li &gt;
+        &lt;a &gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li &gt;
+        &lt;a &gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+</del>
+<strong>
+<ins class="diff-chg">avatar
+</ins></strong>,
+are
+<del class="diff-old">other
+ways
+to
+mark-up
+this
+information
+such
+</del>
+<ins class="diff-chg">defined
+in
+a
+context,
+and
+</ins>
+that
+<del class="diff-old">the
+</del>
+context
+is
+<del class="diff-old">not
+repeated.
+[
+ {
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/bob/",
+   "foaf:name": "Bob"
+ },
+ {
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/eve/",
+   "foaf:name": "Eve"
+ },
+ {
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/manu/",
+   "foaf:name": "Manu"
+ }
+]
+3.2
+Microformats
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+</del>
+<ins class="diff-chg">used
+</ins>
+to
+<del class="diff-old">express
+how
+</del>
+<ins class="diff-chg">resolve
+</ins>
+the
+<del class="diff-old">Microformat
+is
+represented
+</del>
+<ins class="diff-chg">names
+</ins>
+in
+<del class="diff-old">JSON-LD.
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+The
+representation
+of
+the
+hCard
+expresses
+</del>
+<ins class="diff-chg">JSON
+objects,
+machines
+are
+able
+to
+automatically
+expand
+</ins>
+the
+<del class="diff-old">Microformat
+</del>
+terms
+<del class="diff-old">in
+the
+context
+and
+uses
+them
+directly
+for
+the
+url
+and
+fn
+properties.
+Also
+note
+that
+the
+Microformat
+</del>
+to
+<del class="diff-old">JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+http://tantek.com
+.
+</del>
+<ins class="diff-chg">something
+meaningful
+and
+unambiguous,
+like
+this:
+</ins>
+</p>
+<del class="diff-old">{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+</del>
+<pre class="example">{
+<ins class="diff-chg">  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+</ins>
+}
+</pre>
+<del class="diff-old">3.3
+Microdata
+</del>
+<p>
+<del class="diff-old">The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+</del>
+<ins class="diff-chg">Doing
+this
+allows
+JSON
+</ins>
+to
+<del class="diff-old">avoid
+contexts
+and
+instead
+refer
+</del>
+<ins class="diff-chg">be
+unambiguously
+machine-readable
+without
+requiring
+developers
+that
+use
+JSON
+</ins>
+to
+<del class="diff-old">items
+by
+</del>
+<ins class="diff-chg">drastically
+change
+</ins>
+their
+<del class="diff-old">full
+IRI.
+</del>
+<ins class="diff-chg">workflow.
+</ins>
+</p>
+<del class="diff-old">[
+  {
+    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]
+</del>
+</div>
+</div>
+<div id="basic-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">3.
+</ins>
+</span>
+<del class="diff-old">Markup
+of
+RDF
+</del>
+<ins class="diff-chg">Basic
+</ins>
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+<del class="diff-old">most
+</del>
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+<del class="diff-old">Javascript
+objects
+</del>
+<ins class="diff-chg">regular
+JSON
+markup
+</ins>
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+<del class="diff-old">Since
+RDF
+is
+also
+an
+important
+sub-community
+of
+the
+Linked
+Data
+movement,
+it
+is
+important
+that
+all
+RDF
+concepts
+</del>
+<ins class="diff-chg">As
+more
+JSON-LD
+features
+</ins>
+are
+<del class="diff-old">well-represented
+in
+this
+specification.
+This
+section
+details
+how
+each
+RDF
+concept
+can
+be
+expressed
+in
+JSON-LD.
+</del>
+<ins class="diff-chg">used,
+more
+semantics
+are
+added
+to
+the
+JSON
+markup.
+</ins>
+</p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">3.1
+</ins>
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+<del class="diff-old">subjects
+</del>
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+<ins class="diff-chg">subject
+</ins></a><ins class="diff-chg">
+s
+</ins>
+and
+many
+<del class="diff-old">objects
+</del>
+<a class="tref internalDFN" title="object" href="#dfn-object">
+<ins class="diff-chg">object
+</ins></a>
+are
+<del class="diff-old">identified.
+</del>
+<ins class="diff-chg">named.
+</ins>
+IRIs
+can
+be
+expressed
+in
+a
+variety
+of
+different
+ways
+in
+JSON-LD.
+</p>
+<ol>
+<li>
+In
+general,
+<del class="diff-old">an
+IRI
+is
+generated
+if
+it
+is
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+s
+</ins>
+in
+the
+key
+position
+in
+an
+associative
+<del class="diff-old">array.
+</del>
+<ins class="diff-chg">array
+that
+have
+a
+mapping
+to
+an
+IRI
+in
+the
+context
+are
+expanded
+to
+an
+IRI
+by
+JSON-LD
+processors.
+</ins>
+There
+are
+special
+rules
+for
+processing
+keys
+in
+<code>
+@context
+</code>
+and
+when
+dealing
+with
+keys
+that
+start
+with
+the
+<code>
+@
+</code>
+character.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>,
+if
+it
+is
+a
+string.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+the
+<code>
+@iri
+</code>
+keyword.
+</li>
+<li>
+An
+IRI
+is
+generated
+when
+there
+are
+<code>
+@coerce
+</code>
+rules
+in
+effect
+for
+<del class="diff-old">xsd:anyURI
+for
+</del>
+a
+<del class="diff-old">particular
+vocabulary
+term.
+</del>
+<ins class="diff-chg">key
+named
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code>.
+</li>
+</ol>
+<p>
+<del class="diff-old">An
+example
+of
+IRI
+generation
+for
+a
+</del>
+<ins class="diff-chg">IRIs
+can
+be
+expressed
+directly
+in
+the
+</ins>
+key
+<del class="diff-old">outside
+of
+a
+@context
+:
+</del>
+<ins class="diff-chg">position
+like
+so:
+</ins>
+</p>
+<del class="diff-old">{
+...
+  "": "Manu Sporny",
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+</ins>
+}
+</pre>
+<p>
+In
+the
+example
+above,
+the
+key
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+is
+interpreted
+as
+an
+IRI,
+as
+opposed
+to
+being
+interpreted
+as
+a
+string..
+</p>
+<p>
+Term
+expansion
+occurs
+for
+IRIs
+if
+a
+term
+is
+defined
+within
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>:
+</p>
+<del class="diff-old">{
+  ""},
+...
+  "": "Manu Sporny",
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">CURIE
+expansion
+also
+occurs
+for
+keys
+</del>
+<a class="tref internalDFN" title="Prefix" href="#dfn-prefix">
+<ins class="diff-chg">Prefix
+</ins></a><ins class="diff-chg">
+es
+are
+expanded
+when
+used
+</ins>
+in
+<del class="diff-old">JSON-LD:
+</del>
+<ins class="diff-chg">keys:
+</ins>
+</p>
+<del class="diff-old">{
+...
+  "": "Manu Sporny",
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
+...
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+</ins>
+}
+</pre>
+<p>
+<code>
+foaf:name
+</code>
+above
+will
+automatically
+expand
+out
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+</p>
+<p>
+An
+IRI
+is
+generated
+when
+a
+value
+is
+associated
+with
+a
+key
+using
+the
+<code>
+@iri
+</code>
+keyword:
+</p>
+<del class="diff-old">{
+...
+  "foaf:homepage": { "": "http://manu.sporny.org" }
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+</ins>
+}
+</pre>
+<p>
+If
+type
+coercion
+rules
+are
+specified
+in
+the
+<code>
+@context
+</code>
+for
+a
+particular
+vocabulary
+term,
+an
+IRI
+is
+generated:
+</p>
+<del class="diff-old">{
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:anyURI": "foaf:homepage"
+    } 
+  }
+...
+  "foaf:homepage": "http://manu.sporny.org",
+...
+</del>
+<pre class="example">{<span class="diff">
+<ins class="diff-chg">  "@context": 
+  { 
+    "@coerce": 
+    {
+      "@iri": "foaf:homepage"
+    }
+  }</span>
+...
+  "foaf:homepage": "http://manu.sporny.org/",
+...
+</ins>
+}
+</pre>
+<p>
+<ins class="diff-new">Even
+though
+the
+value
+</ins><code><ins class="diff-new">
+http://manu.sporny.org/
+</ins></code><ins class="diff-new">
+is
+a
+string,
+the
+type
+coercion
+rules
+will
+transform
+the
+value
+into
+an
+IRI
+when
+processed
+by
+a
+JSON-LD
+Processor
+</ins></p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">3.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+A
+subject
+is
+declared
+using
+the
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+property,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<del class="diff-old">{
+...
+  "",
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+</ins>
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+the
+IRI
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">3.3
+</ins>
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-url).
+</p>
+<del class="diff-old">{
+...
+  "@": "http://example.org/people#joebob",
+  "",
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "@subject": "http://example.org/people#joebob",
+  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+</ins>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+<ins class="diff-new">if
+the
+JSON-LD
+document
+is
+mapped
+to
+RDF
+</ins>
+(in
+N-Triples
+notation):
+</p>
+<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+</del>
+<pre class="example">&lt;http://example.org/people#joebob&gt; 
+<ins class="diff-chg">   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+</ins>
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+</div>
+<div id="strings" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">3.4
+</ins>
+</span>
+<del class="diff-old">Plain
+Literals
+</del>
+<ins class="diff-chg">Strings
+</ins>
+</h3>
+<p>
+Regular
+text
+<del class="diff-old">strings
+are
+called
+a
+</del>
+<ins class="diff-chg">strings,
+also
+refered
+to
+as
+</ins>
+<dfn title="plain_literal" id="dfn-plain_literal">
+plain
+literal
+</dfn>
+<del class="diff-old">in
+RDF
+and
+</del>
+<ins class="diff-chg">s,
+</ins>
+are
+easily
+expressed
+using
+regular
+JSON
+strings.
+</p>
+<del class="diff-old">{
+...
+  "foaf:name": "",
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+</ins>
+}
+</pre>
+</div>
+<div id="string-internationalization" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">3.5
+</ins>
+</span>
+<del class="diff-old">Language
+Specification
+in
+Plain
+Literals
+</del>
+<ins class="diff-chg">String
+Internationalization
+</ins>
+</h3>
+<p>
+JSON-LD
+makes
+an
+assumption
+that
+<del class="diff-old">plain
+literal
+s
+</del>
+<ins class="diff-chg">strings
+</ins>
+with
+associated
+language
+encoding
+information
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">are
+</ins>
+not
+very
+common
+when
+used
+in
+JavaScript
+and
+Web
+Services.
+Thus,
+it
+takes
+a
+little
+more
+effort
+to
+express
+<del class="diff-old">plain
+literals
+in
+a
+specified
+language.
+</del>
+<ins class="diff-chg">strings
+with
+associated
+language
+information.
+</ins>
+</p>
+<del class="diff-old">{
+...
+  "foaf:name": 
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "foaf:name": <span class="diff">
+  {
+    "@literal": "&#33457;&#28548;",
+    "@language": "ja"
+  }</span>
+...
+</ins>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+for
+<em>
+<del class="diff-old">花澄
+</del>
+<ins class="diff-chg">&#33457;&#28548;
+</ins>
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+<del class="diff-old">tag
+</del>
+<ins class="diff-chg">code
+</ins>
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="datatypes" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">3.6
+</ins>
+</span>
+<del class="diff-old">Typed
+Literals
+</del>
+<ins class="diff-chg">Datatypes
+</ins>
+</h3>
+<p>
+A
+<ins class="diff-new">value
+with
+an
+associated
+datatype,
+also
+known
+as
+a
+</ins>
+<dfn title="typed_literal" id="dfn-typed_literal">
+typed
+literal
+</dfn>,
+is
+indicated
+by
+<del class="diff-old">attaching
+a
+IRI
+to
+the
+end
+of
+</del>
+<ins class="diff-chg">associating
+</ins>
+a
+<del class="diff-old">plain
+</del>
+literal
+<del class="diff-old">,
+and
+this
+</del>
+<ins class="diff-chg">with
+an
+</ins>
+IRI
+<ins class="diff-new">which
+</ins>
+indicates
+the
+<ins class="diff-new">typed
+</ins>
+literal's
+datatype.
+<del class="diff-old">Literals
+</del>
+<ins class="diff-chg">Typed
+literals
+</ins>
+may
+be
+<del class="diff-old">typed
+</del>
+<ins class="diff-chg">expressed
+</ins>
+in
+JSON-LD
+in
+three
+ways:
+</p>
+<ol>
+<li>
+By
+utilizing
+the
+<code>
+@coerce
+</code>
+keyword.
+</li>
+<li>
+By
+utilizing
+the
+expanded
+form
+for
+specifying
+objects.
+</li>
+<li>
+By
+using
+a
+native
+JSON
+datatype.
+</li>
+</ol>
+<p>
+The
+first
+example
+uses
+the
+<code>
+@coerce
+</code>
+keyword
+to
+express
+a
+typed
+literal:
+</p>
+<del class="diff-old">{
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }
+...
+  "dc:modified": "2010-05-29T14:17:39+02:00",
+...
+</del>
+<pre class="example">{<span class="diff">
+<ins class="diff-chg">  "@context": 
+  { 
+    "xsd": "http://www.w3.org/2001/XMLSchema#"
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }</span>
+...
+  "dc:modified": "2010-05-29T14:17:39+02:00",
+...
+</ins>
+}
+</pre>
+<p>
+The
+second
+example
+uses
+the
+expanded
+form
+for
+specifying
+objects:
+</p>
+<del class="diff-old">{
+...
+  "dc:modified": 
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "dc:modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }</span>
+...
+</ins>
+}
+</pre>
+<p>
+Both
+examples
+above
+would
+generate
+an
+object
+with
+the
+literal
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+<p>
+<ins class="diff-new">The
+third
+example
+uses
+a
+built-in
+native
+JSON
+type,
+a
+number,
+to
+express
+a
+datatype:
+</ins></p><pre class="example">{
<ins class="diff-new">
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:age": <span class="diff">31</span>
+...
+}
+</ins></pre><ins class="diff-new">
+d
+</ins><p><ins class="diff-new">
+The
+example
+above
+would
+generate
+the
+following
+triple:
+</ins></p><pre class="example">&lt;http://example.org/people#joebob&gt; 
<ins class="diff-new">
+   &lt;http://xmlns.com/foaf/0.1/age&gt; 
+"31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
+.
+</ins></pre>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.7
+</del>
+<ins class="diff-chg">3.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+arrays.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+array.
+</p>
+<del class="diff-old">{
+...
+  "@": "http://example.org/people#joebob",
+  "foaf:nick": ,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "@": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+</ins>
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+</del>
+<pre class="example">&lt;http://example.org/people#joebob&gt; 
+<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+</ins>
+"jaybee"
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">3.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s
+may
+also
+be
+expressed
+using
+the
+expanded
+form
+for
+objects:
+</p>
+<del class="diff-old">{
+...
+  "@": "http://example.org/articles/8",
+  "dcterms:modified": 
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  "@": "http://example.org/articles/8",
+  "dcterms:modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]</span>
+...
+</ins>
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<del class="diff-old">&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+</del>
+<pre class="example">&lt;http://example.org/articles/8&gt; 
+<ins class="diff-chg">   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+</ins>
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="compaction" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">3.9
+</ins>
+</span>
+<del class="diff-old">Blank
+Nodes
+</del>
+<ins class="diff-chg">Compaction
+</ins>
+</h3>
+<p>
+<del class="diff-old">At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+</del>
+<ins class="diff-chg">Compaction
+is
+</ins>
+the
+<del class="diff-old">subject.
+Typically,
+this
+</del>
+<ins class="diff-chg">process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+the
+most
+compact
+form
+of
+the
+document
+</ins>
+is
+<del class="diff-old">where
+blank
+nodes
+come
+into
+play.
+In
+JSON-LD,
+blank
+node
+identifiers
+</del>
+<ins class="diff-chg">generated.
+JSON
+is
+typically
+expressed
+in
+a
+very
+compact,
+key-value
+format.
+That
+is,
+full
+IRIs
+</ins>
+are
+<del class="diff-old">automatically
+created
+if
+</del>
+<ins class="diff-chg">rarely
+used
+as
+keys.
+At
+times,
+</ins>
+a
+<del class="diff-old">subject
+</del>
+<ins class="diff-chg">JSON-LD
+document
+may
+be
+received
+that
+</ins>
+is
+not
+<del class="diff-old">specified
+using
+</del>
+<ins class="diff-chg">in
+its
+most
+compact
+form.
+JSON-LD,
+via
+the
+API,
+provides
+a
+way
+to
+compact
+a
+JSON-LD
+document.
+</ins></p><p><ins class="diff-chg">
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</ins></p><pre class="example">{
<ins class="diff-chg">
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}
+</ins></pre><p><ins class="diff-chg">
+Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+context:
+</ins></p><pre class="example">{
<ins class="diff-chg">
+   "name": "http://xmlns.com/foaf/0.1/name",
+   "homepage": "http://xmlns.com/foaf/0.1/homepage",
+   "@coerce": 
+   {
+      "@iri": ["homepage"]
+   }
+}
+</ins></pre><p><ins class="diff-chg">
+Running
+the
+JSON-LD
+Compaction
+algorithm
+given
+the
+context
+supplied
+above
+against
+</ins>
+the
+<ins class="diff-new">JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</ins></p><pre class="example">{
<ins class="diff-new">
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}
+</ins></pre><p><ins class="diff-new">
+The
+compaction
+algorithm
+also
+enables
+the
+developer
+to
+map
+any
+expanded
+format
+into
+an
+application-specific
+compacted
+format.
+While
+the
+context
+provided
+above
+mapped
+</ins>
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">http://xmlns.com/foaf/0.1/name
+</ins>
+</code>
+<del class="diff-old">keyword.
+However,
+authors
+may
+</del>
+<ins class="diff-chg">to
+</ins><strong>
+name
+<del class="diff-old">blank
+nodes
+</del>
+</strong>,
+<ins class="diff-chg">it
+could
+have
+also
+mapped
+it
+to
+any
+arbitrary
+string
+provided
+</ins>
+by
+<del class="diff-old">using
+</del>
+the
+<del class="diff-old">special
+_
+CURIE
+prefix.
+</del>
+<ins class="diff-chg">developer.
+</ins>
+</p>
+<del class="diff-old">{
+...
+  "@": "",
+...
+</del>
+</div>
+<div id="expansion" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-chg">3.10
+</ins></span><ins class="diff-chg">
+Expansion
+</ins></h3><p><ins class="diff-chg">
+Expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+all
+IRI,
+datatypes,
+and
+literal
+values
+are
+expanded
+so
+that
+the
+context
+is
+no
+longer
+necessary.
+JSON-LD
+document
+expansion
+is
+typically
+used
+when
+re-mapping
+JSON-LD
+documents
+to
+application-specific
+JSON
+documents
+or
+as
+a
+part
+of
+the
+</ins><a href="#normalization"><ins class="diff-chg">
+Normalization
+</ins></a><ins class="diff-chg">
+process.
+</ins></p><p><ins class="diff-chg">
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</ins></p><pre class="example">{
<ins class="diff-chg">
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">The
+example
+</del>
+<ins class="diff-chg">Running
+the
+JSON-LD
+Expansion
+algorithm
+against
+the
+JSON-LD
+input
+document
+provided
+</ins>
+above
+would
+<del class="diff-old">set
+</del>
+<ins class="diff-chg">result
+in
+</ins>
+the
+<del class="diff-old">subject
+</del>
+<ins class="diff-chg">following
+output:
+</ins></p><pre class="example">{
<ins class="diff-chg">
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}
+</ins></pre></div><div id="framing" class="section"><h3><span class="secno"><ins class="diff-chg">
+3.11
+</ins></span><ins class="diff-chg">
+Framing
+</ins></h3><p><ins class="diff-chg">
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+work
+with
+trees,
+also
+called
+associative
+arrays,
+when
+dealing
+with
+JSON.
+While
+mapping
+a
+graph
+</ins>
+to
+<del class="diff-old">_:foo
+,
+which
+</del>
+<ins class="diff-chg">a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+A
+</ins><dfn title="Frame" id="dfn-frame"><ins class="diff-chg">
+Frame
+</ins></dfn>
+can
+<del class="diff-old">then
+</del>
+be
+used
+<del class="diff-old">later
+</del>
+<ins class="diff-chg">by
+a
+developer
+</ins>
+on
+<ins class="diff-new">a
+JSON-LD
+document
+to
+specify
+a
+deterministic
+layout
+for
+a
+graph.
+</ins></p><p><ins class="diff-new">
+Framing
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document,
+which
+expresses
+a
+graph
+of
+information,
+and
+applying
+a
+specific
+graph
+layout
+(called
+a
+</ins><a class="tref internalDFN" title="Frame" href="#dfn-frame"><ins class="diff-new">
+Frame
+</ins></a><ins class="diff-new">
+).
+</ins></p><p><ins class="diff-new">
+The
+JSON-LD
+document
+below
+expresses
+a
+library,
+a
+book
+and
+a
+chapter:
+</ins></p><pre class="example">{
<ins class="diff-new">
+   "@subject": 
+   [{
+      "@subject": "http://example.org/library",
+      "@type": "ex:Library",
+      "ex:contains": "http://example.org/library/the-republic"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": "http://example.org/library/the-republic#introduction"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": "ex:Chapter",
+      "dc:description": "An introductory chapter on The Republic.",
+      "dc:title": "The Introduction"
+   }],
+   "@context": 
+   {
+      "@coerce": 
+      {
+         "@iri": "ex:contains"
+      },
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   }
+}
+</ins></pre><p><ins class="diff-new">
+Developers
+typically
+like
+to
+operate
+on
+items
+in
+a
+hierarchical,
+tree-based
+fashion.
+Ideally,
+a
+developer
+would
+want
+the
+data
+above
+sorted
+into
+top-level
+libraries,
+then
+the
+books
+that
+are
+contained
+in
+each
+library,
+and
+then
+the
+chapters
+contained
+</ins>
+in
+<ins class="diff-new">each
+book.
+To
+achieve
+that
+layout,
+the
+developer
+can
+define
+the
+following
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-new">
+frame
+</ins></a>:</p><pre class="example">{
<ins class="diff-new">
+   "@context": {
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   },
+   "@type": "ex:Library",
+   "ex:contains": {
+      "@type": "ex:Book",
+      "ex:contains": {
+         "@type": "ex:Chapter"
+      }
+   }
+}
+</ins></pre><p><ins class="diff-new">
+When
+the
+framing
+algorithm
+is
+run
+against
+</ins>
+the
+<ins class="diff-new">previously
+defined
+</ins>
+JSON-LD
+<del class="diff-old">markup
+</del>
+<ins class="diff-chg">document,
+paired
+with
+the
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+above,
+the
+following
+JSON-LD
+document
+is
+the
+end
+result:
+</ins></p><pre class="example">{
<ins class="diff-chg">
+   "@context": 
+   {
+      "ex": "http://example.org/vocab#",
+      "dc": "http://purl.org/dc/elements/1.1/"
+   }
+   "@subject": "http://example.org/library",
+   "@type": "ex:Library",
+   "ex:contains": 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": 
+      {
+         "@subject": "http://example.org/library/the-republic#introduction",
+         "@type": "ex:Chapter",
+         "dc:description": "An introductory chapter on The Republic.",
+         "dc:title": "The Introduction"
+      },
+   },
+}
+</ins></pre><p><ins class="diff-chg">
+The
+JSON-LD
+framing
+algorithm
+allows
+developers
+</ins>
+to
+<del class="diff-old">refer
+back
+</del>
+<ins class="diff-chg">query
+by
+example
+and
+force
+a
+specific
+tree
+layout
+</ins>
+to
+<del class="diff-old">the
+named
+blank
+node.
+</del>
+<ins class="diff-chg">a
+JSON-LD
+document.
+</ins>
+</p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+Advanced
+<del class="diff-old">Features
+</del>
+<ins class="diff-chg">Concepts
+</ins>
+</h2>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+<del class="diff-old">provided
+by
+RDF.
+</del>
+<ins class="diff-chg">described
+above.
+</ins>
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</p>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">4.1
+</ins>
+</span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+doubles,
+integers,
+and
+boolean
+values.
+As
+demonstrated
+below,
+JSON-LD
+utilizes
+that
+information
+to
+create
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s:
+</p>
+<del class="diff-old">{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": ,
+  "measure:cups": ,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": ,
+  // The following value should never be converted to a language-native type
+  "measure:stones": ,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": ,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": ,
+...
+</del>
+<pre class="example">{
+<ins class="diff-chg">...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+</ins>
+}
+</pre>
+<p class="note">
+When
+dealing
+with
+a
+number
+of
+modern
+programming
+languages,
+including
+JavaScript
+ECMA-262,
+there
+is
+no
+distinction
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>
+values.
+That
+is,
+the
+number
+<code>
+5.3
+</code>
+and
+the
+number
+<code>
+5.3e0
+</code>
+are
+treated
+as
+if
+they
+were
+the
+same.
+When
+converting
+from
+JSON-LD
+to
+a
+language-native
+format
+and
+back,
+datatype
+information
+is
+lost
+in
+a
+number
+of
+these
+languages.
+Thus,
+one
+could
+say
+that
+<code>
+5.3
+</code>
+is
+a
+<strong>
+xsd:decimal
+</strong>
+and
+<code>
+5.3e0
+</code>
+is
+an
+<strong>
+xsd:double
+</strong>
+in
+JSON-LD,
+but
+when
+both
+values
+are
+converted
+to
+a
+language-native
+format
+the
+datatype
+difference
+between
+the
+two
+is
+lost
+because
+the
+machine-level
+representation
+will
+almost
+always
+be
+a
+<strong>
+double
+</strong>.
+Implementers
+should
+be
+aware
+of
+this
+potential
+round-tripping
+issue
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>.
+Specifically
+objects
+with
+a
+datatype
+of
+<strong>
+xsd:decimal
+</strong>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+converted
+to
+a
+language
+native
+type.
+</p>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">4.2
+</ins>
+</span>
+Type
+Coercion
+</h3>
+<p>
+JSON-LD
+supports
+the
+coercion
+of
+<del class="diff-old">types
+</del>
+<ins class="diff-chg">values
+</ins>
+to
+<del class="diff-old">ensure
+that
+the
+zero-edit
+goal
+of
+JSON-LD
+can
+be
+accomplished.
+</del>
+<ins class="diff-chg">particular
+data
+types.
+</ins>
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">the
+</ins>
+incoming
+or
+outgoing
+types
+to
+the
+proper
+<del class="diff-old">RDF
+</del>
+<ins class="diff-chg">data
+</ins>
+type
+based
+on
+a
+mapping
+of
+<ins class="diff-new">data
+</ins>
+type
+IRIs
+to
+<del class="diff-old">RDF
+</del>
+<ins class="diff-chg">property
+</ins>
+types.
+Using
+type
+<del class="diff-old">conversion,
+</del>
+<ins class="diff-chg">coercion,
+</ins>
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+s,
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s
+and
+IRIs.
+</p>
+<del class="diff-old">{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "@coerce":
+     {
+        "xsd:integer": "age",
+        "xsd:anyURI": "homepage",
+     }
+  },
+  "name": "John Smith",
+  "age": ,
+  "homepage": 
+</del>
+<pre class="example">{
+<ins class="diff-chg">  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+</ins><span class="diff">     "@coerce":
<ins class="diff-chg">
+     {
+        "xsd:integer": "age",
+        "@iri": "homepage",
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+</ins>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<del class="diff-old">_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+</del>
+<pre class="example">_:bnode1
+<ins class="diff-chg">   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+</ins>
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+<div id="chaining" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">4.3
+</ins></span><ins class="diff-new">
+Chaining
+</ins></h3><p><ins class="diff-new">
+Object
+</ins><dfn title="chaining" id="dfn-chaining"><ins class="diff-new">
+chaining
+</ins></dfn><ins class="diff-new">
+is
+a
+JSON-LD
+feature
+that
+allows
+an
+author
+to
+use
+the
+definition
+of
+JSON-LD
+objects
+as
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-new">
+property
+</ins></a><ins class="diff-new">
+values.
+This
+is
+a
+commonly
+used
+mechanism
+for
+creating
+a
+parent-child
+relationship
+between
+two
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-new">
+subject
+</ins></a><ins class="diff-new">
+s.
+</ins></p><p><ins class="diff-new">
+The
+example
+shows
+an
+two
+subjects
+related
+by
+a
+property
+from
+the
+first
+subject:
+</ins></p>  <pre class="example">{
<ins class="diff-new">
+...
+  "foaf:name": "Manu Sporny",
+  "<span class="diff">foaf:knows</span>": {
+    "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}
+</ins></pre><p><ins class="diff-new">
+An
+object
+definition,
+like
+the
+one
+used
+above,
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+be
+used
+as
+a
+JSON
+value
+at
+any
+point
+in
+JSON-LD.
+</ins></p>
+</div>
+<div id="identifying-unlabeled-nodes" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">4.4
+</ins>
+</span>
+<ins class="diff-new">Identifying
+Unlabeled
+Nodes
+</ins></h3><p><ins class="diff-new">
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+type
+of
+node
+is
+called
+an
+unlabeled
+node
+or
+a
+blank
+node.
+In
+JSON-LD,
+unlabeled
+node
+identifiers
+are
+automatically
+created
+if
+a
+subject
+is
+not
+specified
+using
+the
+</ins><code><ins class="diff-new">
+@subject
+</ins></code><ins class="diff-new">
+keyword.
+However,
+authors
+may
+provide
+identifiers
+for
+unlabeled
+nodes
+by
+using
+the
+special
+</ins><code><ins class="diff-new">
+_
+</ins></code><ins class="diff-new">
+(underscore)
+CURIE
+prefix.
+</ins></p><pre class="example">{
<ins class="diff-new">
+...
+  "@subject": "<span class="diff">_:foo</span>",
+...
+}
+</ins></pre><p>
+The
+<ins class="diff-new">example
+above
+would
+set
+the
+subject
+to
+</ins><code><ins class="diff-new">
+_:foo
+</ins></code>,<ins class="diff-new">
+which
+can
+then
+be
+used
+later
+on
+in
+the
+</ins>
+JSON-LD
+<del class="diff-old">Processing
+Algorithm
+</del>
+<ins class="diff-chg">markup
+to
+refer
+back
+to
+the
+unlabeled
+node.
+This
+practice,
+however,
+is
+usually
+frowned
+upon
+when
+generating
+Linked
+Data.
+If
+a
+developer
+finds
+that
+they
+refer
+to
+the
+unlabeled
+node
+more
+than
+once,
+they
+should
+consider
+naming
+the
+node
+using
+a
+resolve-able
+IRI.
+</ins></p></div><div id="overriding-keywords" class="section"><h3><span class="secno"><ins class="diff-chg">
+4.5
+</ins></span><ins class="diff-chg">
+Overriding
+Keywords
+</ins></h3><p><ins class="diff-chg">
+JSON-LD
+allows
+all
+of
+the
+syntax
+keywords,
+except
+for
+</ins><code><ins class="diff-chg">
+@context
+</ins></code>,<ins class="diff-chg">
+to
+be
+overridden.
+This
+feature
+allows
+more
+legacy
+JSON
+content
+to
+be
+supported
+by
+JSON-LD.
+It
+also
+allows
+developers
+to
+design
+domain-specific
+implementations
+using
+only
+the
+JSON-LD
+context.
+</ins></p><pre class="example">{
<ins class="diff-chg">
+  "@context": 
+  {  
+</ins>     <span class="diff">"url": "@subject"</span>,
     <span class="diff">"a": "@type"</span>,
<ins class="diff-chg">
+     "name": "http://schema.org/name"
+  },
+  "url": "http://example.com/about#gregg",
+  "a": "http://schema.org/Person",
+  "name": "Gregg Kellogg"
+}
+</ins></pre><p><ins class="diff-chg">
+In
+the
+example
+above,
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+keywords
+have
+been
+overridden
+by
+</ins><strong><ins class="diff-chg">
+url
+</ins></strong><ins class="diff-chg">
+and
+</ins><strong><ins class="diff-chg">
+a
+</ins></strong>,<ins class="diff-chg">
+respectively.
+</ins></p></div><div id="normalization" class="section"><h3><span class="secno"><ins class="diff-chg">
+4.6
+</ins></span><ins class="diff-chg">
+Normalization
+</ins></h3><p><ins class="diff-chg">
+Normalization
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+performing
+a
+deterministic
+transformation
+on
+that
+document
+that
+results
+in
+a
+final
+document
+that
+any
+conforming
+JSON-LD
+processor
+would
+have
+generated
+given
+the
+same
+input
+document.
+The
+problem
+is
+a
+fairly
+difficult
+technical
+problem
+to
+solve
+because
+it
+requires
+a
+directed
+graph
+to
+be
+ordered
+into
+a
+set
+of
+nodes
+and
+edges
+in
+a
+deterministic
+way.
+This
+is
+easy
+to
+do
+when
+all
+of
+the
+nodes
+have
+unique
+names,
+but
+very
+difficult
+to
+do
+when
+some
+of
+the
+nodes
+are
+unlabeled.
+</ins></p><p><ins class="diff-chg">
+Normalization
+is
+useful
+when
+comparing
+two
+graphs
+against
+one
+another,
+when
+generating
+a
+detailed
+list
+of
+differences
+between
+two
+graphs,
+and
+when
+generating
+a
+cryptographic
+digital
+signature
+for
+information
+contained
+in
+a
+graph
+or
+when
+generating
+a
+hash
+of
+the
+information
+contained
+in
+a
+graph.
+</ins></p><p><ins class="diff-chg">
+The
+example
+below
+is
+an
+un-normalized
+JSON-LD
+document:
+</ins></p><pre class="example">{
<ins class="diff-chg">
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
+      "@coerce": 
+      {
+         "@iri": ["homepage"]
+      }
+   }
+}
+</ins></pre><p><ins class="diff-chg">
+The
+example
+below
+is
+the
+normalized
+form
+of
+the
+JSON-LD
+document
+above:
+</ins></p><p class="note"><ins class="diff-chg">
+Whitespace
+is
+used
+below
+to
+aid
+readability.
+The
+normalization
+algorithm
+for
+JSON-LD
+remove
+all
+unnecessary
+whitespace
+in
+the
+fully
+normalized
+form.
+</ins></p><pre class="example">[{
<ins class="diff-chg">
+    "@subject": 
+    {
+        "@iri": "_:c14n0"
+    },
+    "http://xmlns.com/foaf/0.1/homepage": 
+    {
+        "@iri": "http://manu.sporny.org/"
+    },
+    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
+}]
+</ins></pre><p><ins class="diff-chg">
+Notice
+how
+all
+of
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s
+have
+been
+expanded
+and
+sorted
+in
+alphabetical
+order.
+Also,
+notice
+how
+the
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a><ins class="diff-chg">
+has
+been
+labeled
+with
+a
+blank
+node
+identifier.
+Normalization
+ensures
+that
+any
+arbitrary
+graph
+containing
+exactly
+the
+same
+information
+would
+be
+normalized
+to
+exactly
+the
+same
+form
+shown
+above.
+</ins></p></div></div><div id="algorithms" class="section"><h2><span class="secno"><ins class="diff-chg">
+5.
+</ins></span><ins class="diff-chg">
+Algorithms
+</ins>
+</h2>
+<div id="compaction-1" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">5.1
+</ins></span><ins class="diff-new">
+Compaction
+</ins></h3><p class="issue"><ins class="diff-new">
+TBD:
+Explain
+compaction
+algorithm.
+</ins></p></div><div id="expansion-1" class="section"><h3><span class="secno"><ins class="diff-new">
+5.2
+</ins></span><ins class="diff-new">
+Expansion
+</ins></h3><p class="issue"><ins class="diff-new">
+TBD:
+Explain
+expansion
+algorithm.
+</ins></p></div><div id="framing-1" class="section"><h3><span class="secno"><ins class="diff-new">
+5.3
+</ins></span><ins class="diff-new">
+Framing
+</ins></h3><p class="issue"><ins class="diff-new">
+TBD:
+Explain
+framing
+algorithm.
+</ins></p></div><div id="normalization-1" class="section"><h3><span class="secno"><ins class="diff-new">
+5.4
+</ins></span><ins class="diff-new">
+Normalization
+</ins></h3><p class="issue"><ins class="diff-new">
+TBD:
+Explain
+normalization
+algorithm.
+</ins></p></div><div id="rdf-conversion" class="section"><h3><span class="secno"><ins class="diff-new">
+5.5
+</ins></span><ins class="diff-new">
+RDF
+Conversion
+</ins></h3><p><ins class="diff-new">
+A
+JSON-LD
+document
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+be
+converted
+to
+any
+other
+RDF-compatible
+document
+format
+using
+the
+algorithm
+specified
+in
+this
+section.
+</ins></p>
+<p>
+The
+JSON-LD
+Processing
+Model
+describes
+processing
+rules
+for
+extracting
+RDF
+from
+a
+JSON-LD
+document.
+Note
+that
+many
+uses
+of
+JSON-LD
+may
+not
+require
+generation
+of
+RDF.
+</p>
+<p>
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+<ins class="diff-new">to
+RDF
+</ins>
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<p class="issue">
+The
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">RDF
+Conversion
+</ins>
+Algorithm
+is
+a
+work
+in
+progress.
+</p>
+<div class="informative section" id="overview">
+<h4>
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">5.5.1
+</ins>
+</span>
+Overview
+</h4>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+JSON-LD
+is
+intended
+to
+have
+an
+easy
+to
+parse
+grammar
+that
+closely
+models
+existing
+practice
+in
+using
+JSON
+for
+describing
+object
+representations.
+This
+allows
+the
+use
+of
+existing
+libraries
+for
+parsing
+JSON
+in
+a
+document-oriented
+fashion,
+or
+can
+allow
+for
+stream-based
+parsing
+similar
+to
+SAX.
+</p>
+<p>
+As
+with
+other
+grammars
+used
+for
+describing
+<del class="diff-old">linked
+data,
+</del>
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+<ins class="diff-chg">Linked
+Data
+</ins></a>,
+a
+key
+concept
+is
+that
+of
+a
+<em>
+resource
+</em>.
+Resources
+may
+be
+of
+three
+basic
+types:
+<em>
+IRI
+</em>
+s,
+for
+describing
+externally
+named
+entities,
+<em>
+BNodes
+</em>,
+resources
+for
+which
+an
+external
+name
+does
+not
+exist,
+or
+is
+not
+known,
+and
+Literals,
+which
+describe
+terminal
+entities
+such
+as
+strings,
+dates
+and
+other
+representations
+having
+a
+lexical
+representation
+possibly
+including
+an
+explicit
+language
+or
+datatype.
+</p>
+<p>
+Data
+described
+with
+JSON-LD
+may
+be
+considered
+to
+be
+the
+representation
+of
+a
+graph
+made
+up
+of
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+and
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+resources
+related
+via
+a
+<del class="diff-old">predicate
+</del>
+<a class="tref internalDFN" title="property" href="#dfn-property">
+<ins class="diff-chg">property
+</ins></a>
+resource.
+However,
+specific
+implementations
+may
+choose
+to
+operate
+on
+the
+document
+as
+a
+normal
+JSON
+description
+of
+objects
+having
+attributes.
+</p>
+</div>
+<div id="processing-algorithm-terms" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">5.5.2
+</ins>
+</span>
+Processing
+Algorithm
+Terms
+</h4>
+<dl>
+<dt>
+<del class="diff-old">default
+</del>
+<dfn title="initial_context" id="dfn-initial_context">
+<ins class="diff-chg">initial
+</ins>
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+specified
+to
+the
+JSON-LD
+processing
+algorithm
+before
+processing
+begins.
+</dd>
+<dt>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+</dt>
+<dd>
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</dd>
+<dt>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</dd>
+<dt>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</dd>
+<dt>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+generating
+triples.
+</dd>
+<dt>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+context
+contained
+within
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</dd>
+<dt>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+<code>
+@context
+</code>
+keyword.
+</dd>
+<dt>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+</dt>
+<dd>
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>,
+which
+includes
+the
+<a class="tref" title="active__context">
+active
+context
+</a>,
+<a class="tref" title="current_subject">
+current
+subject
+</a>,
+and
+<a class="tref" title="current_property">
+current
+property
+</a>.
+The
+<a class="tref" title="processor__state">
+processor
+state
+</a>
+is
+managed
+as
+a
+stack
+with
+elements
+from
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copied
+into
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+when
+entering
+a
+new
+associative
+array.
+</dd>
+</dl>
+</div>
+<div id="processing-tokens-and-keywords" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">6.3
+</del>
+<ins class="diff-chg">5.5.3
+</ins>
+</span>
+Processing
+Tokens
+and
+Keywords
+</h4>
+<dl>
+<dt>
+<code>
+@context
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</dd>
+<dt>
+<code>
+@base
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<code>
+<del class="diff-old">@profile
+A
+reference
+to
+a
+remote
+context
+description
+used
+to
+set
+the
+local
+context
+.
+</del>
+@vocab
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<code>
+@coerce
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+type
+coercion
+rules.
+</dd>
+<dt>
+<code>
+@literal
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+a
+literal
+value.
+</dd>
+<dt>
+<code>
+@iri
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+an
+IRI
+value.
+</dd>
+<dt>
+<code>
+@language
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+language
+for
+a
+literal.
+</dd>
+<dt>
+<code>
+@datatype
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+datatype
+for
+a
+literal.
+</dd>
+<dt>
+<code>:
+</code>
+</dt>
+<dd>
+The
+separator
+for
+CURIEs
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+</dd>
+<dt>
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>
+</dt>
+<dd>
+Sets
+the
+active
+subjects.
+</dd>
+<dt>
+<code>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+rdf:type
+of
+the
+active
+subjects.
+This
+token
+may
+be
+conferred
+as
+syntactic
+sugar
+for
+rdf:type.
+</dd>
+</dl>
+<del class="diff-old">Use
+@source
+instead
+of
+@
+?
+Use
+@type
+instead
+of
+a
+?
+Note
+that
+both
+are
+just
+semantic
+sugar
+for
+rdf:type
+.
+</del>
+</div>
+<div id="context-1" class="section">
+<h4 id="context">
+<span class="secno">
+<del class="diff-old">6.4
+</del>
+<ins class="diff-chg">5.5.4
+</ins>
+</span>
+Context
+</h4>
+<p>
+Processing
+of
+JSON-LD
+is
+managed
+recursively
+using
+a
+process
+described
+in
+<a href="sequence">
+Sequence
+</a>.
+During
+processing,
+each
+rule
+is
+applied
+using
+information
+provided
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+Processing
+begins
+by
+pushing
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+onto
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+stack
+and
+initializing
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+with
+the
+<del class="diff-old">default
+</del>
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+<ins class="diff-chg">initial
+</ins>
+context
+</a>.
+If
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+encountered,
+information
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+merged
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</p>
+<p class="issue">
+Should
+the
+document
+URL
+be
+used
+as
+the
+default
+for
+<code>
+@base
+</code>
+in
+the
+<del class="diff-old">default
+</del>
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+<ins class="diff-chg">initial
+</ins>
+context
+</a>
+?
+</p>
+<p>
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+used
+for
+expanding
+keys
+and
+values
+of
+an
+associative
+array
+(or
+elements
+of
+a
+list
+(see
+<span a="#list-processing">
+List
+Processing
+</span>
+)).
+</p>
+<p>
+A
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+identified
+within
+an
+associative
+array
+having
+a
+key
+of
+<code>
+@context
+</code>
+with
+an
+associative
+array
+value.
+When
+processing
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>,
+special
+rules
+apply:
+</p>
+<ul>
+<li>
+The
+key
+<code>
+@base
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+IRI
+and
+is
+saved
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+to
+perform
+term
+mapping
+as
+described
+in
+<a href="#iri-processing">
+IRI
+Processing
+</a>.
+</li>
+<li>
+The
+key
+<code>
+@vocab
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+IRI
+and
+is
+saved
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+to
+perform
+term
+mapping
+as
+described
+in
+<a href="#iri-processing">
+IRI
+Processing
+</a>.
+</li>
+<li>
+The
+key
+<code>
+@coerce
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+an
+associative
+array.
+Processing
+of
+the
+associative
+array
+is
+described
+<a href="#coerce">
+below
+</a>
+</li>
+<li>
+Otherwise,
+the
+key
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+lexical
+form
+of
+<cite>
+<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">
+NCName
+</a>
+</cite>
+and
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+IRI.
+Merge
+each
+key-value
+pair
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+overwriting
+any
+duplicate
+values.
+</li>
+</ul>
+<del class="diff-old">A
+local
+context
+may
+also
+be
+loaded
+from
+an
+external
+document
+using
+the
+@profile
+key
+as
+described
+in
+Vocabulary
+Profiles
+.
+6.4.1
+</del>
+<div class="section">
+<h5 id="coerce">
+Coerce
+</h5>
+<p>
+Map
+each
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping,
+overwriting
+any
+duplicate
+values
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping.
+The
+<code>
+@coerce
+</code>
+mapping
+has
+<del class="diff-old">a
+</del>
+either
+<del class="diff-old">of
+</del>
+a
+single
+CURIE
+or
+<del class="diff-old">of
+</del>
+an
+array
+of
+CURIEs.
+When
+merging
+with
+an
+existing
+mapping
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+map
+all
+CURIE
+values
+to
+array
+form
+and
+replace
+with
+the
+union
+of
+the
+value
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+and
+the
+value
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+If
+the
+result
+is
+an
+array
+with
+a
+single
+CURIE,
+the
+processor
+<em class="rfc2119" title="may">
+may
+</em>
+represent
+this
+as
+a
+string
+value.
+</p>
+</div>
+</div>
+<del class="diff-old">6.5
+Chaining
+Object
+chaining
+is
+a
+JSON-LD
+feature
+that
+allows
+an
+author
+to
+use
+the
+definition
+of
+JSON-LD
+objects
+as
+property
+values.
+This
+is
+a
+commonly
+used
+mechanism
+for
+creating
+a
+parent-child
+relationship
+between
+objects.
+The
+example
+shows
+an
+two
+objects
+related
+by
+a
+property
+from
+the
+first
+object:
+  
+{
+...
+  "foaf:name": "Manu Sporny",
+  "": {
+    "",
+    "",
+  }
+...
+}
+An
+object
+definition
+may
+be
+used
+anyplace
+a
+value
+is
+legal
+in
+JSON-LD.
+</del>
+<div id="iri-processing" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">6.6
+</del>
+<ins class="diff-chg">5.5.5
+</ins>
+</span>
+IRI
+Processing
+</h4>
+<p>
+Keys
+and
+some
+values
+are
+evaluated
+to
+produce
+an
+IRI.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+a
+value
+representing
+an
+IRI
+into
+an
+actual
+IRI.
+</p>
+<p>
+IRIs
+may
+be
+represented
+as
+an
+explicit
+string,
+or
+as
+a
+CURIE,
+as
+a
+value
+relative
+to
+<code>
+@base
+</code>
+or
+<code>
+@vocab
+</code>.
+</p>
+<p>
+CURIEs
+are
+defined
+more
+formally
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+]
+<cite>
+<a href="http://www.w3.org/TR/rdfa-core/#s_curies">
+section
+6
+"CURIE
+Syntax
+Definition"
+</a>
+</cite>.
+Generally,
+a
+CURIE
+is
+composed
+of
+a
+<em>
+prefix
+</em>
+and
+a
+<em>
+suffix
+</em>
+separated
+by
+a
+':'.
+In
+JSON-LD,
+either
+the
+prefix
+may
+be
+the
+empty
+string,
+denoting
+the
+<dfn title="default_prefix" id="dfn-default_prefix">
+default
+prefix
+</dfn>.
+</p>
+<p>
+The
+procedure
+for
+generating
+an
+IRI
+is:
+</p>
+<ol class="algorithm">
+<li>
+Split
+the
+value
+into
+a
+<em>
+prefix
+</em>
+and
+<em>
+suffix
+</em>
+from
+the
+first
+occurrence
+of
+':'.
+</li>
+<li>
+If
+the
+prefix
+is
+a
+'_',
+generate
+a
+named
+BNode
+using
+the
+suffix
+as
+the
+name.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+contains
+a
+mapping
+for
+<em>
+prefix
+</em>,
+generate
+an
+IRI
+by
+prepending
+the
+mapped
+prefix
+to
+the
+(possibly
+empty)
+suffix.
+Note
+that
+an
+empty
+suffix
+and
+no
+suffix
+(meaning
+the
+value
+contains
+no
+':'
+string
+at
+all)
+are
+treated
+equivalently.
+</li>
+<li>
+If
+the
+IRI
+being
+processed
+is
+for
+a
+property
+(i.e.,
+a
+key
+value
+in
+an
+associative
+array,
+or
+a
+value
+in
+a
+<code>
+@coerce
+</code>
+mapping)
+and
+the
+active
+context
+has
+a
+<code>
+@vocab
+</code>
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+the
+method
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+].
+</li>
+<li>
+If
+the
+IRI
+being
+processed
+is
+for
+a
+subject
+or
+object
+(i.e.,
+not
+a
+property)
+and
+the
+active
+context
+has
+a
+<code>
+@base
+</code>
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+the
+method
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+].
+</li>
+<li>
+Otherwise,
+use
+the
+value
+directly
+as
+an
+IRI.
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="sequence" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">5.5.6
+</ins>
+</span>
+Sequence
+</h4>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+in-memory
+implementations
+with
+random
+access
+to
+associative
+array
+elements.
+<del class="diff-old">For
+a
+description
+of
+a
+streaming
+implementation,
+see
+Appendix
+B
+.
+</del>
+</p>
+<p>
+A
+conforming
+JSON-LD
+processor
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<ol class="algorithm">
+<li id="processing-step-default-context">
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+with
+with
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+set
+to
+the
+<del class="diff-old">default
+</del>
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+<ins class="diff-chg">initial
+</ins>
+context
+</a>
+and
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+initialized
+to
+NULL.
+</li>
+<li id="processing-step-associative">
+If
+an
+associative
+array
+is
+detected,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+associative
+array
+has
+a
+<code>
+@context
+</code>
+key,
+process
+the
+local
+context
+as
+described
+in
+<a href="#context">
+Context
+</a>.
+</li>
+<li>
+If
+the
+associative
+array
+has
+an
+<code>
+@iri
+</code>
+key,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#iri-processing">
+IRI
+Processing
+</a>
+on
+the
+associated
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+<li>
+If
+the
+associative
+array
+has
+a
+<code>
+@literal
+</code>
+key,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+literal
+value
+as
+follows:
+<ul>
+<li>
+as
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+if
+the
+associative
+array
+contains
+a
+<code>
+@datatype
+</code>
+key
+after
+performing
+<a href="#iri-processing">
+IRI
+Processing
+</a>
+on
+the
+specified
+<code>
+@datatype
+</code>.
+</li>
+<li>
+otherwise,
+as
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>.
+If
+the
+associative
+array
+contains
+a
+<code>
+@language
+</code>
+key,
+use
+it's
+value
+to
+set
+the
+language
+of
+the
+plain
+literal.
+</li>
+</ul>
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref" title="active__property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+<li>
+If
+the
+associative
+array
+has
+a
+<code>
+@
+</code>
+key:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+a
+string,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+result
+of
+performing
+<a href="#iri-processing">
+IRI
+Processing
+</a>.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+using
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>,
+set
+the
+<a class="tref" title="active__subject">
+active
+subject
+</a>
+to
+the
+result
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+the
+associative
+array
+does
+not
+have
+a
+<code>
+@
+</code>
+key,
+set
+the
+<a class="tref" title="active__object">
+active
+object
+</a>
+to
+newly
+generated
+<a class="tref" title="blank_node_identifier">
+blank
+node
+identifier
+</a>.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+<a class="tref" title="active__object">
+active
+object
+</a>.
+</li>
+<li>
+For
+each
+key
+in
+the
+associative
+array
+that
+has
+not
+already
+been
+processed,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+<code>
+a
+</code>,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+rdf:type
+</code>.
+</li>
+<li>
+Otherwise,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+the
+result
+of
+performing
+<a href="#iri-processing">
+IRI
+Processing
+</a>
+on
+the
+key.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+</ol>
+</li>
+<li>
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following
+returning
+the
+result
+of
+processing
+the
+last
+value
+in
+the
+array:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+a
+regular
+array,
+generate
+an
+RDF
+List
+by
+linking
+each
+element
+of
+the
+list
+using
+<code>
+rdf:first
+</code>
+and
+<code>
+rdf:next
+</code>,
+terminating
+the
+list
+with
+<code>
+rdf:nil
+</code>
+using
+the
+following
+sequence:
+<ol>
+<li>
+If
+the
+list
+has
+no
+element,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Otherwise,
+generate
+a
+triple
+using
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+a
+newly
+generated
+BNode
+identified
+as
+<em>
+first
+bnode
+</em>.
+</li>
+<li>
+For
+each
+element
+other
+than
+the
+last
+element
+in
+the
+list:
+<ol>
+<li>
+Create
+a
+processor
+state
+using
+the
+active
+context,
+<em>
+first
+bnode
+</em>
+as
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+and
+<code>
+rdf:first
+</code>
+as
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+</li>
+<li>
+Unless
+this
+is
+the
+last
+element
+in
+the
+list,
+generate
+a
+new
+BNode
+identified
+as
+<em>
+rest
+bnode
+</em>,
+otherwise
+use
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Generate
+a
+new
+triple
+using
+<em>
+first
+bnode
+</em>,
+<code>
+rdf:rest
+</code>
+and
+<em>
+rest
+bnode
+</em>.
+</li>
+<li>
+Set
+<em>
+first
+bnode
+</em>
+to
+<em>
+rest
+bnode
+</em>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+a
+string
+is
+detected,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+value
+created
+from
+the
+string.
+</li>
+<li>
+If
+a
+number
+is
+detected,
+generate
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+using
+a
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+either
+<code>
+xsd:integer
+</code>
+or
+<code>
+xsd:double
+</code>,
+depending
+on
+if
+the
+value
+contains
+a
+fractional
+and/or
+an
+exponential
+component.
+Generate
+a
+triple
+using
+the
+<a class="tref" title="active__subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+the
+generated
+typed
+literal.
+</li>
+<li>
+Otherwise,
+if
+<strong>
+true
+</strong>
+or
+<strong>
+false
+</strong>
+is
+detected,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+and
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+value
+created
+from
+the
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+<code>
+xsd:boolean
+</code>.
+</li>
+</ol>
+</div>
+<del class="diff-old">8.
+Best
+Practices
+The
+nature
+of
+Web
+programming
+allows
+one
+to
+use
+basic
+technologies,
+such
+as
+JSON-LD,
+across
+a
+variety
+of
+systems
+and
+environments.
+This
+section
+attempts
+to
+describe
+some
+of
+those
+environments
+and
+the
+way
+in
+which
+JSON-LD
+can
+be
+integrated
+in
+order
+to
+help
+alleviate
+certain
+development
+headaches.
+8.1
+JavaScript
+It
+is
+expected
+that
+JSON-LD
+will
+be
+used
+quite
+a
+bit
+in
+JavaScript
+environments,
+however,
+features
+like
+the
+expanded
+form
+for
+object
+values
+mean
+that
+using
+JSON-LD
+directly
+in
+JavaScript
+may
+be
+annoying
+without
+a
+middleware
+layer
+such
+as
+a
+simple
+library
+that
+converts
+JSON-LD
+markup
+before
+JavaScript
+uses
+it.
+One
+could
+say
+that
+JSON-LD
+is
+a
+good
+fit
+for
+the
+RDF
+API,
+which
+enables
+a
+variety
+of
+RDF-based
+Web
+Applications,
+but
+some
+don't
+want
+to
+require
+that
+level
+of
+functionality
+just
+to
+use
+JSON-LD.
+The
+group
+is
+still
+discussing
+the
+best
+way
+to
+proceed,
+so
+input
+on
+how
+JSON-LD
+could
+more
+easily
+be
+utilized
+in
+JavaScript
+environments
+would
+be
+very
+much
+appreciated.
+8.2
+Schema-less
+Databases
+Databases
+such
+as
+CouchDB
+and
+MongoDB
+allow
+the
+creation
+of
+schema-less
+data
+stores.
+RDF
+is
+a
+type
+of
+schema-less
+data
+model
+and
+thus
+lends
+itself
+to
+databases
+such
+as
+CouchDB
+and
+MongoDB.
+Both
+of
+these
+databases
+can
+use
+JSON-LD
+as
+their
+storage
+format.
+The
+group
+needs
+feedback
+from
+CouchDB
+and
+MongoDB
+experts
+regarding
+the
+usefulness
+of
+JSON-LD
+in
+those
+environments.
+MongoDB
+does
+not
+allow
+the
+'.'
+character
+to
+be
+used
+in
+key
+names.
+This
+prevents
+developers
+from
+storing
+IRIs
+as
+keys,
+which
+also
+prevents
+storage
+of
+the
+data
+in
+normalized
+form.
+While
+this
+issue
+can
+be
+avoided
+by
+using
+CURIEs
+for
+key
+values,
+it
+is
+not
+known
+if
+this
+mechanism
+is
+enough
+to
+allow
+JSON-LD
+to
+be
+used
+in
+MongoDB
+in
+a
+way
+that
+is
+useful
+to
+developers.
+</del>
+</div>
+</div>
+<div id="experimental-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">9.
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+<del class="diff-old">Advanced
+</del>
+<ins class="diff-chg">Experimental
+</ins>
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+considered
+as
+discussion
+points;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<del class="diff-old">9.1
+Vocabulary
+Profiles
+One
+of
+the
+more
+powerful
+features
+of
+RDFa
+1.1
+Core
+is
+the
+ability
+to
+specify
+a
+collection
+of
+prefixes
+and
+terms
+that
+can
+be
+re-used
+by
+a
+processor
+to
+simplfy
+markup.
+JSON-LD
+provides
+a
+similar
+mechanism
+called
+Vocabulary
+Profiles,
+which
+is
+the
+inclusion
+of
+a
+context
+external
+to
+the
+JSON-LD
+document.
+The
+example
+below
+demonstrates
+how
+one
+may
+specify
+an
+external
+Vocabulary
+Profile.
+Assume
+the
+following
+profile
+exists
+at
+this
+imaginary
+URL:
+http://example.org/profiles/contacts
+.
+{
+  "@context": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}
+The
+profile
+listed
+above
+can
+be
+used
+in
+the
+following
+way:
+{
+  "@profile": "http://example.org/profiles/contacts",
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}
+The
+example
+above
+would
+generate
+the
+following
+triples:
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</del>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.2
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+array
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<del class="diff-old">&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+</del>
+<pre class="example">&lt;http://example.org/people#john&gt; 
+<ins class="diff-chg">   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+</ins>
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+JSON-LD
+associative
+array.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<del class="diff-old">{
+  "@": 
+  [
+    {
+      "@": "http://example.org/people#john",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "http://example.org/people#jane",
+      "a": "foaf:Person"
+    }
+  ]
+</del>
+<pre class="example">{
+<ins class="diff-chg">  "@": 
+  [
+    {
+      "@": "http://example.org/people#john",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "http://example.org/people#jane",
+      "a": "foaf:Person"
+    }
+  ]
+</ins>
+}
+</pre>
+<p>
+A
+disjoint
+graph
+could
+also
+be
+expressed
+like
+so:
+</p>
+<del class="diff-old">[
+  {
+    "@": "http://example.org/people#john",
+    "a": "foaf:Person"
+  },
+  {
+    "@": "http://example.org/people#jane",
+    "a": "foaf:Person"
+  }
+</del>
+<pre class="example">[
+<ins class="diff-chg">  {
+    "@": "http://example.org/people#john",
+    "a": "foaf:Person"
+  },
+  {
+    "@": "http://example.org/people#jane",
+    "a": "foaf:Person"
+  }
+</ins>
+]
+</pre>
+</div>
+<div id="the-json-ld-api" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.3
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+The
+JSON-LD
+API
+</h3>
+<p>
+This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+format
+that
+is
+easier
+to
+work
+with
+in
+various
+programming
+languages.
+</p>
+<del class="diff-old">]
+interface  {
+};
+</del>
+<pre class="idl"><span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDProcessor</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
<ins class="diff-chg">
+};</span>
+</ins>
+</pre>
+<div id="methods" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">9.3.1
+</del>
+<ins class="diff-chg">6.2.1
+</ins>
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">
+<code>
+toGraph
+</code>
+</dt>
+<dd>
+Parses
+JSON-LD
+and
+transforms
+the
+data
+into
+an
+Graph,
+which
+is
+compatible
+with
+the
+RDF
+Interfaces
+API
+specification
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">
+RDF-INTERFACES
+</a>
+</cite>
+].
+This
+method
+will
+return
+<code>
+null
+</code>
+if
+there
+are
+any
+errors,
+or
+if
+the
+RDF
+Interfaces
+API
+is
+not
+available
+for
+use.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+jsonld
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+RDFGraph.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+callback
+</td>
+<td class="prmType">
+<code>
+<a>
+JSONLDParserCallback
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">&#10004;
+</ins>
+</td>
+<td class="prmOptTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">&#10004;
+</ins>
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+Graph
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">
+<code>
+toProjection
+</code>
+</dt>
+<dd>
+Parses
+JSON-LD
+text
+into
+an
+RDF
+API
+Projection
+object
+as
+specified
+by
+the
+RDF
+API
+specification
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-API">
+RDF-API
+</a>
+</cite>
+].
+If
+there
+are
+any
+errors,
+<code>
+null
+</code>
+is
+returned.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+jsonld
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+string
+to
+parse
+into
+the
+Projection.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+template
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">&#10004;
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmDesc">
+The
+Projection
+template
+to
+use
+when
+building
+the
+Projection.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+subject
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">&#10004;
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmDesc">
+The
+subject
+to
+use
+when
+building
+the
+Projection.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+callback
+</td>
+<td class="prmType">
+<code>
+<a>
+JSONLDParserCallback
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">&#10004;
+</ins>
+</td>
+<td class="prmOptTrue">
+<del class="diff-old">✔
+</del>
+<ins class="diff-chg">&#10004;
+</ins>
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+object
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<p>
+The
+JSONLDParserCallback
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+input
+data.
+</p>
+<del class="diff-old">]
+interface  {
+};
+</del>
+<pre class="idl"><span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
<ins class="diff-chg">
+};</span>
+</ins>
+</pre>
+<div id="methods-1" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">9.3.2
+</del>
+<ins class="diff-chg">6.2.2
+</ins>
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error">
+<code>
+error
+</code>
+</dt>
+<dd>
+This
+callback
+is
+invoked
+whenever
+an
+error
+occurs
+during
+processing.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+error
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmDesc">
+A
+descriptive
+error
+string
+returned
+by
+the
+processor.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+void
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<p>
+The
+following
+example
+demonstrates
+how
+to
+convert
+JSON-LD
+to
+a
+projection
+that
+is
+directly
+usable
+in
+a
+programming
+environment:
+</p>
+<del class="diff-old">// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+// Map the JSON-LD to a language-native object
+var person = jsonld.toProjection(jsonldString, myTemplate);
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+</del>
+<pre class="example">// retrieve JSON-LD from a Web Service
+<ins class="diff-chg">var jsonldString = fetchPerson();
+
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+
+// Map the JSON-LD to a language-native object
+var person = jsonld.toProjection(jsonldString, myTemplate);
+
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+</ins>
+"Their
+homepage
+is:
+"
++
+person.homepage);
+</pre>
+<p>
+A
+JSON-LD
+Serializer
+is
+also
+available
+to
+map
+a
+language-native
+object
+to
+JSON-LD.
+<del class="diff-old">]
+interface  {
+};
+</del>
+</p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+<ins class="diff-chg">interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
<ins class="diff-chg">
+};</span>
+</ins>
+</pre>
+<div id="methods-2" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">9.3.3
+</del>
+<ins class="diff-chg">6.2.3
+</ins>
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj">
+<code>
+normalize
+</code>
+</dt>
+<dd>
+Serializes
+a
+language-native
+object
+into
+a
+normalized
+JSON-LD
+string.
+Normalization
+is
+important
+when
+performing
+things
+like
+equality
+comparison
+and
+digital
+signature
+creation
+and
+verification.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+obj
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmOptFalse">
+<del class="diff-old">✘
+</del>
+<ins class="diff-chg">&#10008;
+</ins>
+</td>
+<td class="prmDesc">
+An
+associative
+array
+of
+key-value
+pairs
+that
+should
+be
+converted
+to
+a
+JSON-LD
+string.
+It
+is
+assumed
+that
+a
+map
+already
+exists
+for
+the
+data.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+DOMString
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+<h3 id="the-normalization-algorithm">
+The
+Normalization
+Algorithm
+</h3>
+<p class="issue">
+This
+algorithm
+is
+very
+rough,
+untested,
+and
+probably
+contains
+many
+bugs.
+Use
+at
+your
+own
+risk.
+It
+will
+change
+in
+the
+coming
+months.
+</p>
+<p>
+The
+JSON-LD
+normalization
+algorithm
+is
+as
+follows:
+</p>
+<ol class="algorithm">
+<li>
+Remove
+the
+<code>
+@context
+</code>
+key
+and
+preserve
+it
+as
+the
+<dfn title="transformation_map" id="dfn-transformation_map">
+transformation
+map
+</dfn>
+while
+running
+this
+algorithm.
+</li>
+<li>
+For
+each
+key
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+</ol>
+</li>
+<li>
+For
+each
+value
+<ol class="algorithm">
+<li>
+If
+the
+value
+should
+be
+type
+coerced
+per
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>,
+ensure
+that
+it
+is
+transformed
+to
+the
+new
+value.
+</li>
+<li>
+If
+the
+value
+is
+a
+CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+and
+the
+type
+is
+a
+CURIE,
+expand
+it
+to
+an
+IRI
+using
+the
+<a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">
+transformation
+map
+</a>.
+</li>
+<li>
+When
+generating
+the
+final
+value,
+use
+expanded
+object
+value
+form
+to
+store
+all
+IRIs,
+typed
+literals
+and
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+s
+with
+language
+information.
+</li>
+</ol>
+</li>
+<li>
+Output
+each
+sorted
+key-value
+pair
+without
+any
+extraneous
+whitespace.
+If
+the
+value
+is
+an
+associative
+array,
+perform
+this
+algorithm,
+starting
+at
+step
+#1,
+recursively
+on
+the
+sub-tree.
+There
+should
+be
+no
+nesting
+in
+the
+outputted
+JSON
+data.
+That
+is,
+the
+top-most
+element
+should
+be
+an
+array.
+Each
+item
+in
+the
+array
+contains
+a
+single
+subject
+with
+a
+corresponding
+array
+of
+properties
+in
+UTF-8
+sort
+order.
+Any
+related
+objects
+that
+are
+complex
+objects
+themselves
+should
+be
+given
+a
+top-level
+object
+in
+the
+top-level
+array.
+</li>
+</ol>
+<p class="issue">
+Note
+that
+normalizing
+named
+blank
+nodes
+is
+impossible
+at
+present
+since
+one
+would
+have
+to
+specify
+a
+blank
+node
+naming
+algorithm.
+For
+the
+time
+being,
+you
+cannot
+normalize
+graphs
+that
+contain
+named
+blank
+nodes.
+However,
+normalizing
+graphs
+that
+contain
+non-named
+blank
+nodes
+is
+supported.
+</p>
+<del class="diff-old">var myObj = { "@context" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "age",
+                   "xsd:anyURI": "homepage"
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : "42",
+              "homepage" : "http://example.org/people/joe" };
+// Map the language-native object to JSON-LD
+</del>
+<pre class="example">var myObj = { "@context" : { 
+<ins class="diff-chg">                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "age",
+                   "xsd:anyURI": "homepage"
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : "42",
+              "homepage" : "http://example.org/people/joe" };
+
+// Map the language-native object to JSON-LD
+</ins>
+var
+jsonldText
+=
+jsonld.normalize(myObj);
+</pre>
+<p>
+After
+the
+code
+in
+the
+example
+above
+has
+executed,
+the
+<strong>
+jsonldText
+</strong>
+value
+will
+be
+(line-breaks
+added
+for
+readability):
+</p>
+<del class="diff-old">[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
+"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
+</del>
+<pre class="example">[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
+<ins class="diff-chg">"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
+</ins>
+"http://xmlns.com/foaf/0.1/name":"Joe
+Jackson"}]
+</pre>
+<p>
+When
+normalizing
+<strong>
+xsd:double
+</strong>
+values,
+implementers
+<em class="rfc2119" title="must">
+must
+</em>
+ensure
+that
+the
+normalized
+value
+is
+a
+string.
+In
+order
+to
+generate
+the
+string
+from
+a
+<strong>
+double
+</strong>
+value,
+output
+equivalent
+to
+the
+<code>
+printf("%1.6e",
+value)
+</code>
+function
+in
+C
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+<strong>
+"%1.6e"
+</strong>
+is
+the
+string
+formatter
+and
+<strong>
+value
+</strong>
+is
+the
+value
+to
+be
+converted.
+</p>
+<p>
+To
+convert
+the
+a
+double
+value
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</p>
+<del class="diff-old">// the variable 'value' below is the JavaScript native double value that is to be converted
+</del>
+<pre class="example">// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</pre>
+<p class="note">
+When
+data
+needs
+to
+be
+normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+that
+are
+going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+the
+lossy
+nature
+of
+<strong>
+xsd:double
+</strong>
+values.
+</p>
+<p class="issue">
+Round-tripping
+data
+can
+be
+problematic
+if
+we
+mix
+and
+match
+@coerce
+rules
+with
+JSON-native
+datatypes,
+like
+integers.
+Consider
+the
+following
+code
+example:
+</p>
+<del class="diff-old">var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+// Convert the normalized object back to a JavaScript object
+</del>
+<pre class="example">var myObj = { "@context" : { 
+<ins class="diff-chg">                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+
+// Convert the normalized object back to a JavaScript object
+</ins>
+var
+myObj2
+=
+jsonld.parse(jsonldText);
+</pre>
+<p class="issue">
+At
+this
+point,
+myObj2
+and
+myObj
+will
+have
+different
+values
+for
+the
+"number"
+value.
+myObj
+will
+be
+the
+number
+42,
+while
+myObj2
+will
+be
+the
+string
+"42".
+This
+type
+of
+data
+round-tripping
+error
+can
+bite
+developers.
+We
+are
+currently
+wondering
+if
+having
+a
+"coerce
+validation"
+phase
+in
+the
+parsing/normalization
+phases
+would
+be
+a
+good
+idea.
+It
+would
+prevent
+data
+round-tripping
+issues
+like
+the
+one
+mentioned
+above.
+</p>
+</div>
+</div>
+<div class="appendix section" id="markup-examples">
+<h2>
+<span class="secno">
+A.
+</span>
+<del class="diff-old">The
+Default
+Context
+</del>
+<ins class="diff-chg">Markup
+Examples
+</ins>
+</h2>
+<p>
+The
+<del class="diff-old">default
+context
+is
+provided
+</del>
+<ins class="diff-chg">JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+</ins>
+to
+<del class="diff-old">ensure
+</del>
+<ins class="diff-chg">express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+</ins>
+that
+<ins class="diff-new">JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</ins></p><div id="rdfa" class="section"><h3><span class="secno"><ins class="diff-new">
+A.1
+</ins></span><ins class="diff-new">
+RDFa
+</ins></h3><p><ins class="diff-new">
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</ins></p><pre class="example">&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
<ins class="diff-new">
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</ins></pre><p><ins class="diff-new">
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+</ins>
+there
+are
+<ins class="diff-new">other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</ins></p><pre class="example">[
<ins class="diff-new">
+ {
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/bob/",
+   "foaf:name": "Bob"
+ },
+ {
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/eve/",
+   "foaf:name": "Eve"
+ },
+ {
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/manu/",
+   "foaf:name": "Manu"
+ }
+]
+</ins></pre></div><div id="microformats" class="section"><h3><span class="secno"><ins class="diff-new">
+A.2
+</ins></span><ins class="diff-new">
+Microformats
+</ins></h3><p><ins class="diff-new">
+The
+following
+example
+uses
+</ins>
+a
+<del class="diff-old">reasonable
+set
+</del>
+<ins class="diff-chg">simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</ins></p><pre class="example">&lt;div class="vcard"&gt;
<ins class="diff-chg">
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+</ins></pre><p><ins class="diff-chg">
+The
+representation
+</ins>
+of
+<del class="diff-old">prefixes
+and
+</del>
+<ins class="diff-chg">the
+hCard
+expresses
+the
+Microformat
+</ins>
+terms
+<del class="diff-old">available
+to
+all
+JSON-LD
+developers.
+Mappings
+specified
+by
+</del>
+<ins class="diff-chg">in
+</ins>
+the
+<del class="diff-old">default
+</del>
+context
+<del class="diff-old">should
+not
+be
+overwritten
+by
+</del>
+<ins class="diff-chg">and
+uses
+them
+directly
+for
+the
+</ins><code><ins class="diff-chg">
+url
+</ins></code><ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+fn
+</ins></code><ins class="diff-chg">
+properties.
+Also
+note
+that
+the
+Microformat
+to
+</ins>
+JSON-LD
+<del class="diff-old">authors.
+All
+</del>
+<ins class="diff-chg">processor
+has
+generated
+the
+proper
+URL
+type
+for
+</ins><code><ins class="diff-chg">
+http://tantek.com
+</ins></code>.</p><pre class="example">{
<ins class="diff-chg">
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}
+</ins></pre></div><div id="microdata" class="section"><h3><span class="secno"><ins class="diff-chg">
+A.3
+</ins></span><ins class="diff-chg">
+Microdata
+</ins></h3><p><ins class="diff-chg">
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</ins></p><pre class="example">&lt;dl itemscope
<ins class="diff-chg">
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</ins></pre><p><ins class="diff-chg">
+Note
+that
+the
+</ins>
+JSON-LD
+<del class="diff-old">processors
+must
+load
+</del>
+<ins class="diff-chg">representation
+of
+</ins>
+the
+<del class="diff-old">following
+context
+</del>
+<ins class="diff-chg">Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</ins></p><pre class="example">[
<ins class="diff-chg">
+  {
+    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]
+</ins></pre></div><div class="appendix section" id="mashing-up-vocabularies"><h3><span class="secno"><ins class="diff-chg">
+A.4
+</ins></span><ins class="diff-chg">
+Mashing
+Up
+Vocabularies
+</ins></h3><p><ins class="diff-chg">
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</ins></p><ul><li><ins class="diff-chg">
+RDF
+-
+for
+describing
+information
+about
+objects
+on
+the
+semantic
+web.
+</ins></li><li><ins class="diff-chg">
+RDFS
+-
+for
+expressing
+things
+like
+labels
+and
+comments.
+</ins></li><li><ins class="diff-chg">
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</ins></li><li><ins class="diff-chg">
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</ins></li><li><ins class="diff-chg">
+FOAF
+-
+for
+describing
+social
+networks.
+</ins></li><li><ins class="diff-chg">
+Calendar
+-
+for
+specifying
+events.
+</ins></li><li><ins class="diff-chg">
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</ins></li><li><ins class="diff-chg">
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</ins></li><li><ins class="diff-chg">
+GEO
+-
+for
+describing
+geographic
+location.
+</ins></li><li><ins class="diff-chg">
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</ins></li><li><ins class="diff-chg">
+DOAP
+-
+for
+describing
+projects.
+</ins></li></ul><p><ins class="diff-chg">
+You
+can
+use
+these
+vocabularies
+</ins>
+in
+<del class="diff-old">as
+</del>
+<ins class="diff-chg">combination,
+like
+so:
+</ins></p><pre class="example">{
<ins class="diff-chg">
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</ins></pre><p><ins class="diff-chg">
+Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+</ins>
+the
+<del class="diff-old">intial
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+</ins>
+context
+<del class="diff-old">before
+processing
+JSON-LD
+text.
+</del>
+</a>
+<ins class="diff-chg">in-line
+using
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+keyword,
+like
+so:
+</ins>
+</p>
+<del class="diff-old">{
+  "@context":
+  {
+    "@vocab": "",
+    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dcterms": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "vcard": "http://www.w3.org/2006/vcard/ns# ",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "cc": "http://creativecommons.org/ns#",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "com": "http://purl.org/commerce#",
+    "ps": "http://purl.org/payswarm#",
+    "gr": "http://purl.org/goodrelations/v1#",
+    "sig": "http://purl.org/signature#",
+    "ccard": "http://purl.org/commerce/creditcard#"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+</del>
+<pre class="example">{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+<ins class="diff-chg">  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+</ins>
+}
+</pre>
+<p>
+<ins class="diff-new">The
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+keyword
+is
+used
+to
+change
+how
+the
+JSON-LD
+processor
+evaluates
+key-value
+pairs.
+In
+this
+case,
+it
+was
+used
+to
+map
+one
+string
+('myvocab')
+to
+another
+string,
+which
+is
+interpreted
+as
+a
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a>.<ins class="diff-new">
+In
+the
+example
+above,
+the
+</ins><code><ins class="diff-new">
+myvocab
+</ins></code><ins class="diff-new">
+string
+is
+replaced
+with
+"
+</ins><code><ins class="diff-new">
+http://example.org/myvocab#
+</ins></code><ins class="diff-new">
+"
+when
+it
+is
+detected.
+In
+the
+example
+above,
+"
+</ins><code><ins class="diff-new">
+myvocab:personality
+</ins></code><ins class="diff-new">
+"
+would
+expand
+to
+"
+</ins><code><ins class="diff-new">
+http://example.org/myvocab#personality
+</ins></code><ins class="diff-new">
+".
+</ins></p><p><ins class="diff-new">
+This
+mechanism
+is
+a
+short-hand
+for
+RDF,
+called
+a
+CURIE,
+and
+provides
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</ins></p><p></p>
+</div>
+<div class="appendix section" id="acknowledgements">
+<h3>
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">A.5
+</ins>
+</span>
+Acknowledgements
+</h3>
+<p>
+The
+<del class="diff-old">editor
+</del>
+<ins class="diff-chg">editors
+</ins>
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+<del class="diff-old">rationale
+and
+reasoning
+</del>
+<ins class="diff-chg">initial
+push
+</ins>
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+<del class="diff-old">Longley
+</del>
+<ins class="diff-chg">Longley,
+Dave
+Lehn
+and
+Mike
+Johnson
+</ins>
+who
+reviewed,
+provided
+feedback,
+and
+performed
+several
+<del class="diff-old">implementation
+on
+</del>
+<ins class="diff-chg">implementations
+of
+</ins>
+the
+specification,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+<del class="diff-old">Allen
+</del>
+<ins class="diff-chg">Allen,
+Kingsley
+Idehen,
+Glenn
+McDonald,
+Alexandre
+Passant,
+Danny
+Ayers,
+Ted
+Thibodeau
+Jr.,
+Olivier
+Grisel,
+Niklas
+Lindström,
+Markus
+Lanthaler,
+</ins>
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+</p>
+</div>
+</div>
+<div id="respec-err" style="position: fixed; width: 350px; top: 10px; right: 10px; border: 3px double #f00; background: #fff" class="removeOnSave">
+<ul>
+<li style="color: #c00">
+<ins class="diff-new">There
+appears
+to
+have
+been
+a
+problem
+fetching
+the
+style
+sheet;
+status=0
+</ins></li></ul></div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+<del class="diff-old">C.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">C.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<dt id="bib-RDF-API">
+[RDF-API]
+</dt>
+<dd>
+Manu
+Sporny,
+Benjamin
+Adrian,
+Nathan
+Rixham;
+et
+al.
+<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">
+<cite>
+RDF
+API
+</cite>
+</a>
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">
+http://www.w3.org/2010/02/rdfa/sources/rdf-api/
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</a>
+</dd>
+<dt id="bib-RDF-INTERFACES">
+[RDF-INTERFACES]
+</dt>
+<dd>
+Nathan
+Rixham,
+Manu
+Sporny,
+Benjamin
+Adrian;
+et
+al.
+<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">
+<cite>
+RDF
+Interfaces
+</cite>
+</a>
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+<a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">
+http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/
+</a>
+</dd>
+<dt id="bib-RFC3987">
+[RFC3987]
+</dt>
+<dd>
+M.
+<del class="diff-old">Dürst;
+</del>
+<ins class="diff-chg">Dürst;
+</ins>
+M.
+Suignard.
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+<cite>
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+http://www.ietf.org/rfc/rfc3987.txt
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford.
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+<cite>
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</cite>
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+<dt id="bib-WEBIDL">
+<ins class="diff-new">[WEBIDL]
+</ins></dt><dd><ins class="diff-new">
+Cameron
+McCormack.
+</ins><a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite><ins class="diff-new">
+Web
+IDL.
+</ins></cite></a><ins class="diff-new">
+19
+December
+2008.
+W3C
+Working
+Draft.
+(Work
+in
+progress.)
+URL:
+</ins><a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><ins class="diff-new">
+http://www.w3.org/TR/2008/WD-WebIDL-20081219
+</ins></a></dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">C.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-ECMA-262">
+<ins class="diff-new">[ECMA-262]
+</ins></dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite><ins class="diff-new">
+ECMAScript
+Language
+Specification,
+Third
+Edition.
+</ins></cite></a><ins class="diff-new">
+December
+1999.
+URL:
+</ins><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><ins class="diff-new">
+http://www.ecma-international.org/publications/standards/Ecma-262.htm
+</ins></a></dd>
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+31
+March
+2011.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+http://www.w3.org/TR/2011/WD-rdfa-core-20110331
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110803/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,2594 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-03-august-2011">Unofficial Draft 03 August 2011</h2><dl><dt>Editors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
+<dt>Authors:</dt><dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+<dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar, Inc.</a></dd>
+</dl><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and 
+messaging format. In an attempt to harmonize the representation of Linked Data 
+in JSON, this specification outlines a common JSON representation format for 
+expressing directed graphs; mixing both Linked Data and non-Linked Data in 
+a single document. 
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design" class="tocxref"><span class="secno">2. </span>Design</a><ul class="toc"><li class="tocline"><a href="#goals-and-rationale" class="tocxref"><span class="secno">2.1 </span>Goals and Rationale</a></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">2.2 </span>Linked Data</a></li><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">2.3 </span>Linking Data</a></li><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">2.4 </span>The Context</a><ul class="toc"><li class="tocline"><a href="#inside-a-context" class="tocxref"><span class="secno">2.4.1 </span>Inside a Context</a></li></ul></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">2.5 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno">3.4 </span>Strings</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">3.6 </span>Datatypes</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">3.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.9 </span>Compaction</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.10 </span>Expansion</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">4.1 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.2 </span>Type Coercion</a></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">4.3 </span>Chaining</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.4 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#overriding-keywords" class="tocxref"><span class="secno">4.5 </span>Overriding Keywords</a></li><li class="tocline"><a href="#normalization" class="tocxref"><span class="secno">4.6 </span>Normalization</a></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">5. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#compaction-1" class="tocxref"><span class="secno">5.1 </span>Compaction</a></li><li class="tocline"><a href="#expansion-1" class="tocxref"><span class="secno">5.2 </span>Expansion</a></li><li class="tocline"><a href="#framing-1" class="tocxref"><span class="secno">5.3 </span>Framing</a></li><li class="tocline"><a href="#normalization-1" class="tocxref"><span class="secno">5.4 </span>Normalization</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">5.5 </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">5.5.1 </span>Overview</a></li><li class="tocline"><a href="#processing-algorithm-terms" class="tocxref"><span class="secno">5.5.2 </span>Processing Algorithm Terms</a></li><li class="tocline"><a href="#processing-tokens-and-keywords" class="tocxref"><span class="secno">5.5.3 </span>Processing Tokens and Keywords</a></li><li class="tocline"><a href="#context-1" class="tocxref"><span class="secno">5.5.4 </span>Context</a></li><li class="tocline"><a href="#iri-processing" class="tocxref"><span class="secno">5.5.5 </span>IRI Processing</a></li><li class="tocline"><a href="#sequence" class="tocxref"><span class="secno">5.5.6 </span>Sequence</a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno">6. </span>Experimental Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">6.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#the-json-ld-api" class="tocxref"><span class="secno">6.2 </span>The JSON-LD API</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">6.2.1 </span>Methods</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">6.2.2 </span>Methods</a></li><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">6.2.3 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">A. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">A.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">A.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">A.3 </span>Microdata</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">A.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A.5 </span>Acknowledgements</a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p>
+JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing 
+data on the Web. Linked Data is a technique for describing content across 
+different 
+documents or Web sites. Web resources are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s, 
+and typically are dereferencable entities that may be used to find more 
+information, creating a "Web of Knowledge". JSON-LD is intended to be a simple 
+publishing method for expressing not only Linked Data in JSON, but for adding
+semantics to existing JSON.
+</p>
+
+<p>
+JSON-LD is designed as a light-weight syntax that can be used to express 
+Linked Data. It is primarily intended to be a way to express Linked Data 
+in Javascript and other Web-based programming environments. It is also 
+useful when building interoperable Web Services and when storing Linked 
+Data in JSON-based document storage engines. It is practical and designed 
+to be as simple as possible, utilizing the large number of JSON parsers 
+and existing code that is in use today. It is designed to be able to 
+express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats 
+[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports 
+every major Web-based structured data model in use today. 
+</p>
+
+<p>
+The syntax does not require many applications to change their JSON, but 
+easily add meaning by adding context in a way that is either in-band or 
+out-of-band. The syntax is designed to not disturb already deployed systems 
+running on JSON, but provide a smooth migration path from JSON to JSON with 
+added semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a very small memory footprint in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and 
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to implement processors and APIs for 
+  JSON-LD.</li>
+</ul>
+
+<p>
+To understand the basics in this specification you must first be familiar with 
+JSON, which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. To understand the API and how it is
+intended to operate  in a programming environment, it is useful to have working 
+knowledge of the JavaScript programming language [<cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and 
+WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be 
+familiar with the basic RDF concepts [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>Technical discussion typically occurs on the public mailing list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
+</li>
+
+<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held 
+on Tuesdays at 1500UTC on the second and fourth week of each month.
+</li>
+
+<li>Specification bugs and issues should be reported in the 
+<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
+
+<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the 
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design</h2>
+
+<p>The following section outlines the design goals and rationale behind the 
+JSON-LD markup language.
+</p>
+
+<div id="goals-and-rationale" class="section">
+<h3><span class="secno">2.1 </span>Goals and Rationale</h3>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers need only know JSON and three keywords to use the basic 
+ functionality in JSON-LD. No extra processors or software libraries are
+ necessary to use JSON-LD in its most basic form. The language attempts to
+ ensure that developers have an easy learning curve.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
+ all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
+ <dt>Expressiveness</dt>
+ <dd>The syntax must be able to express directed graphs, which have been proven
+ to be able to simply express almost every real world data model.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable, requiring as
+ little as possible from the developer.</dd>
+ <dt>Pragmatism</dt>
+ <dd>Mixing the expression of pure Linked Data with data that is not
+ linked was an approach that was driven by pragmatism. JSON-LD attempts to be
+ more practical than theoretical in its approach to Linked Data.</dd>
+ <dt>Zero Edits, most of the time</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers. At times, mapping JSON to 
+ a graph representation can become difficult. In these instances, rather than 
+ having JSON-LD support esoteric markup, we chose not to support the use case 
+ and support a simplified syntax instead. So, while Zero Edits was a goal,
+ it was not always possible without adding great complexity to the language.
+ </dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="linked-data" class="section">
+<h3><span class="secno">2.2 </span>Linked Data</h3>
+<p>
+The following definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> is the one that will 
+be used for this specification.
+</p>
+<ol>
+ <li><dfn title="Linked_Data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a 
+   representation of a linked data graph.</li>
+ <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is a labeled directed graph, where nodes 
+   are <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are 
+   properties.</li>
+ <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> 
+   with at least one outgoing edge.</li>
+ <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> <em class="rfc2119" title="should">should</em> be labeled with a IRI.</li>
+ <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>
+   .</li>
+ <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <em class="rfc2119" title="must">must</em> be labeled with an IRI.</li>
+ <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with 
+   at least one incoming edge.</li>
+ <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an IRI.</li>
+ <li>An IRI that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be 
+   dereferencable to a <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> document describing the 
+   labeled <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>
+   .</li>
+ <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not 
+ an IRI</li>
+</ol>
+
+<p>
+Note that the definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> above is silent on the 
+topic of unlabeled nodes. Unlabeled nodes are not considered 
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
+of unlabled nodes, as most graph-based data sets on the Web contain a number 
+of associated nodes that are not named and thus are not directly 
+de-referenceable.
+</p>
+</div>
+
+<div id="linking-data" class="section">
+<h3><span class="secno">2.3 </span>Linking Data</h3>
+
+<p>
+An Internationalized Resource Identifier 
+(<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
+as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique 
+identifiers on the web. In <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, an IRI is commonly 
+used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an 
+<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
+</p>
+
+<p>JSON-LD defines a mechanism to map JSON values to IRIs. This does not mean 
+that JSON-LD requires every key or value to be an IRI, but rather ensures that
+keys and values can be mapped to IRIs if the developer so desires to transform
+their data into Linked Data. There are a few techniques that can ensure 
+that developers will generate good Linked Data for the Web. JSON-LD 
+formalizes those techniques.
+</p>
+
+<p>We will be using the following JSON markup as the example for the
+rest of this section:
+</p>
+
+<pre class="example">
+{
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+</div>
+
+<div id="the-context" class="section">
+<h3><span class="secno">2.4 </span>The Context</h3>
+
+<p>In JSON-LD, a context is used to allow developers to map <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s 
+to <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that <em class="rfc2119" title="may">may</em> be expanded
+to an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The semantic web, just like the document-based 
+web, uses IRIs for unambiguous identification. The idea is that these 
+<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s mean something that may be of use to other developers.
+For example, the term <code>name</code> may map directly to the IRI 
+<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to 
+be constructed using the common JSON practice of simple name/value pairs while
+ensuring that the data is useful outside of the database or page in which it
+resides.
+</p>
+
+<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a context and
+then used by adding a single line to the JSON markup above:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/"
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>The addition above transforms the previous JSON document into a JSON document
+with added semantics because the <code>@context</code> specifies how the
+<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong> 
+terms map to IRIs. 
+Mapping those keys to IRIs gives the data global context. If two 
+developers use the same IRI to describe a property, they are more than likely
+expressing the same concept. This allows both developers to re-use each others
+data without having to agree to how their data will inter-operate on a 
+site-by-site basis.</p>
+
+<p>
+The semantic web uses a special type of document called a 
+<em>Web Vocabulary</em> to define <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s. A context is a type of
+Web vocabulary.
+Typically, these Web Vocabulary documents have <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es associated
+with them and contain a number of <a class="tref internalDFN" title="term" href="#dfn-term">term</a> declarations. A
+<dfn title="prefix" id="dfn-prefix">prefix</dfn>, like a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, is a short word that expands
+to a Web Vocabulary IRI. <a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are helpful when a developer
+wants to mix multiple vocabularies together in a context, but does not want
+to go to the trouble of defining every single term in every single vocabulary.
+Some Web Vocabularies may have 10-20 terms defined. If a developer wants to use 
+3-4 different vocabularies, the number of terms that 
+would have to be declared in a single context would become quite large. To 
+reduce the number of different terms that must be defined, JSON-LD also allows 
+prefixes to be used to compact IRIs.
+</p><p>
+
+</p><p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code> 
+specifies a Web Vocabulary which may be represented using the
+<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>. The <code>foaf</code> Web Vocabulary
+contains a term called <strong>name</strong>. If you join the 
+<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> with the <strong>name</strong> suffix, 
+you can build a compact IRI that will expand out into an absolute IRI for the
+<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
+That is, the compact IRI, or short-form, is <code>foaf:name</code> and the 
+expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary 
+term is used to specify a person's name.
+</p>
+
+<p>Developers, and machines, are able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much like we can use WordNet today to 
+see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Developers and machines need the same sort of 
+dictionary of terms. IRIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>The context provides a collection of vocabulary <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and 
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es that can be used to expand JSON keys and values into
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s.</p>
+
+<div id="inside-a-context" class="section">
+<h4><span class="secno">2.4.1 </span>Inside a Context</h4>
+
+<p>In the previous section, the developer used the <code>@context</code>
+keyword to pull in an external context. That context document, if 
+de-referenced, would look something like this:</p>
+
+<pre class="example">
+{
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+}</pre>
+
+<p>A JSON-LD context document is a simple mapping from <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es to IRIs. Contexts may also contain datatype information
+for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
+the JSON-LD processor.
+</p>
+
+<p>Contexts may be specified in-line. This ensures that JSON-LD documents
+can be processed when a JSON-LD processor does not have access to the Web.</p>
+
+<p>
+JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. This means
+that developers can also specify a context for JSON data in an out-of-band
+fashion via the API. The API is described later in this document. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> also define a context that will be pre-loaded for all
+calls to the service. This allows services that have previously been publishing
+and receiving JSON data to accept JSON-LD data without requiring client 
+software to change.
+</p>
+
+</div>
+
+</div>
+
+<div id="from-json-to-json-ld" class="section">
+<h3><span class="secno">2.5 </span>From JSON to JSON-LD</h3>
+
+<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>, 
+and <strong>avatar</strong>,
+are defined in a context, and that context is used to resolve the
+names in JSON objects, machines are able to automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Doing this allows JSON to be unambiguously machine-readable without
+requiring developers that use JSON to drastically change their workflow.</p>
+</div>
+
+</div>
+
+
+
+<div id="basic-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Basic Concepts</h2>
+
+<p>JSON-LD is designed to ensure that Linked Data concepts can be marked 
+up in a way that is simple to understand and author by Web developers. In many
+cases, regular JSON markup can become Linked Data with the simple addition
+of a context. As more JSON-LD features are used, more semantics are added
+to the JSON markup.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">3.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most 
+<a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a> are named. IRIs can be 
+expressed in a variety of different ways in JSON-LD.</p>
+
+<ol>
+  <li>In general, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in the key position in 
+    an associative array that have a mapping to an IRI in the context are
+    expanded to an IRI by JSON-LD processors. There are special rules for 
+    processing keys in <code>@context</code> and when dealing with keys that 
+    start with the <code>@</code> character.</li>
+  <li>An IRI is generated for the value specified using <code>@subject</code>, 
+    if it is a string.</li>
+  <li>An IRI is generated for the value specified using <code>@type</code>.</li>
+  <li>An IRI is generated for the value specified using the <code>@iri</code> 
+    keyword.</li>
+  <li>An IRI is generated when there are <code>@coerce</code> rules in 
+    effect for a key named <code>@iri</code>.</li>
+</ol>
+
+<p>IRIs can be expressed directly in the key position like so:
+</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p>In the example above, the key 
+<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
+opposed to being interpreted as a string..</p>
+
+<p>Term expansion occurs for IRIs if a term is defined within the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are expanded when used in keys:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
+...
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><code>foaf:name</code> above will automatically expand out to the IRI
+<code>http://xmlns.com/foaf/0.1/name</code>.</p>
+
+<p>An IRI is generated when a value is associated with a key using 
+the <code>@iri</code> keyword:</p>
+
+<pre class="example">
+{
+...
+  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}</pre>
+
+<p>If type coercion rules are specified in the <code>@context</code> for
+a particular vocabulary term, an IRI is generated:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  { 
+    "@coerce": 
+    {
+      "@iri": "foaf:homepage"
+    }
+  }</span>
+...
+  "foaf:homepage": "http://manu.sporny.org/",
+...
+}</pre>
+
+<p>Even though the value <code>http://manu.sporny.org/</code> is a string,
+the type coercion rules will transform the value into an IRI when processed
+by a JSON-LD Processor</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">3.2 </span>Identifying the Subject</h3>
+
+<p>A subject is declared using the <code>@subject</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, property, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to the IRI 
+<code>http://example.org/people#joebob</code>.
+</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">3.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the 
+<code>@type</code> key. Specifying the type in this way will generate a 
+triple of the form (subject, type, type-url).</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple if the JSON-LD 
+document is mapped to RDF (in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+</div>
+
+<div id="strings" class="section">
+<h3><span class="secno">3.4 </span>Strings</h3>
+
+<p>Regular text strings, also refered to as <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn>s, are 
+easily expressed using regular JSON strings.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="string-internationalization" class="section">
+<h3><span class="secno">3.5 </span>String Internationalization</h3>
+
+<p>JSON-LD makes an assumption that strings with associated language encoding 
+information are not very common when used in JavaScript and Web Services. 
+Thus, it takes a little more effort to express strings with associated 
+language information.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}</pre>
+
+<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for 
+<em>花澄</em> and associate the <code>ja</code> language code with the triple 
+that is generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="datatypes" class="section">
+<h3><span class="secno">3.6 </span>Datatypes</h3>
+
+<p>
+  A value with an associated datatype, also known as a 
+  <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn>, is indicated by associating a literal with
+  an IRI which indicates the typed literal's datatype. Typed literals may be 
+  expressed in JSON-LD in three ways:
+</p>
+
+<ol>
+  <li>By utilizing the <code>@coerce</code> keyword.</li>
+  <li>By utilizing the expanded form for specifying objects.</li>
+  <li>By using a native JSON datatype.</li>
+</ol>
+
+<p>The first example uses the <code>@coerce</code> keyword to express a
+typed literal:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  { 
+    "xsd": "http://www.w3.org/2001/XMLSchema#"
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }</span>
+...
+  "dc:modified": "2010-05-29T14:17:39+02:00",
+...
+}</pre>
+
+<p>The second example uses the expanded form for specifying objects:</p>
+
+<pre class="example">
+{
+...
+  "dc:modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }</span>
+...
+}</pre>
+
+<p>Both examples above would generate an object with the literal value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+<p>The third example uses a built-in native JSON type, a number, to 
+express a datatype:</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:age": <span class="diff">31</span>
+...
+}</pre>
+d
+<p>The example above would generate the following triple:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/age&gt; 
+      "31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .</pre>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">3.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+arrays. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an array.</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "jaybee" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
+form for objects:</p>
+
+<pre class="example">
+{
+...
+  "@": "http://example.org/articles/8",
+  "dcterms:modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]</span>
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="compaction" class="section">
+<h3><span class="secno">3.9 </span>Compaction</h3>
+
+<p>Compaction is the process of taking a JSON-LD document and applying a 
+context such that the most compact form of the document is generated. JSON
+is typically expressed in a very compact, key-value format. That is, full
+IRIs are rarely used as keys. At times, a JSON-LD document may be received
+that is not in its most compact form. JSON-LD, via the API, provides a way
+to compact a JSON-LD document.
+</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}</pre>
+
+<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
+
+<pre class="example">
+{
+   "name": "http://xmlns.com/foaf/0.1/name",
+   "homepage": "http://xmlns.com/foaf/0.1/homepage",
+   "@coerce": 
+   {
+      "@iri": ["homepage"]
+   }
+}</pre>
+
+<p>Running the JSON-LD Compaction algorithm given the context supplied above 
+against the JSON-LD input document provided above would result in the following
+output:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}</pre>
+
+<p>The compaction algorithm also enables the developer to map any expanded
+format into an application-specific compacted format. While the context 
+provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
+<strong>name</strong>, it could have also mapped it to any arbitrary string
+provided by the developer.
+</p>
+
+</div>
+
+<div id="expansion" class="section">
+<h3><span class="secno">3.10 </span>Expansion</h3>
+
+<p>Expansion is the process of taking a JSON-LD document and applying a 
+context such that all IRI, datatypes, and literal values are expanded so
+that the context is no longer necessary. JSON-LD document expansion 
+is typically used when re-mapping JSON-LD documents to application-specific
+JSON documents or as a part of the <a href="#normalization">Normalization</a>
+process.</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}</pre>
+
+<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document 
+provided above would result in the following output:</p>
+
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}</pre>
+
+</div>
+
+<div id="framing" class="section">
+<h3><span class="secno">3.11 </span>Framing</h3>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+directed graph can have many different serializations, each expressing
+exactly the same information. Developers typically work with trees, also
+called associative arrays, when dealing with JSON. While mapping a graph to 
+a tree can be done, the layout of the end result must be specified in advance. 
+A <dfn title="Frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to 
+specify a deterministic layout for a graph.
+</p>
+
+<p>Framing is the process of taking a JSON-LD document, which expresses a
+graph of information, and applying a specific graph layout 
+(called a <a class="tref internalDFN" title="Frame" href="#dfn-frame">Frame</a>).
+</p>
+
+<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
+
+<pre class="example">
+{
+   "@subject": 
+   [{
+      "@subject": "http://example.org/library",
+      "@type": "ex:Library",
+      "ex:contains": "http://example.org/library/the-republic"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": "http://example.org/library/the-republic#introduction"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": "ex:Chapter",
+      "dc:description": "An introductory chapter on The Republic.",
+      "dc:title": "The Introduction"
+   }],
+   "@context": 
+   {
+      "@coerce": 
+      {
+         "@iri": "ex:contains"
+      },
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   }
+}</pre>
+
+<p>Developers typically like to operate on items in a hierarchical, tree-based
+fashion. Ideally, a developer would want the data above sorted into top-level
+libraries, then the books that are contained in each library, and then the
+chapters contained in each book. To achieve that layout, the developer can
+define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
+
+<pre class="example">
+{
+   "@context": {
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   },
+   "@type": "ex:Library",
+   "ex:contains": {
+      "@type": "ex:Book",
+      "ex:contains": {
+         "@type": "ex:Chapter"
+      }
+   }
+}</pre>
+
+<p>When the framing algorithm is run against the previously defined 
+JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
+JSON-LD document is the end result:</p>
+
+<pre class="example">
+{
+   "@context": 
+   {
+      "ex": "http://example.org/vocab#",
+      "dc": "http://purl.org/dc/elements/1.1/"
+   }
+   "@subject": "http://example.org/library",
+   "@type": "ex:Library",
+   "ex:contains": 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": 
+      {
+         "@subject": "http://example.org/library/the-republic#introduction",
+         "@type": "ex:Chapter",
+         "dc:description": "An introductory chapter on The Republic.",
+         "dc:title": "The Introduction"
+      },
+   },
+}</pre>
+
+<p>The JSON-LD framing algorithm allows developers to query by example and
+force a specific tree layout to a JSON-LD document.
+</p>
+
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Advanced Concepts</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality described above. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">4.1 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as doubles, 
+integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
+information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
+
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+<p class="note">When dealing with a number of modern programming languages,
+including JavaScript ECMA-262, there is no distinction between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
+the number <code>5.3</code> and the number 
+<code>5.3e0</code> are treated as if they were the same. When converting from 
+JSON-LD to a language-native format and back, datatype information is lost in a 
+number of these languages. Thus, one could say that <code>5.3</code> is a 
+<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
+<strong>xsd:double</strong> in JSON-LD, but when both values are 
+converted to a language-native format the datatype difference between the two 
+is lost because the machine-level representation will almost always be a 
+<strong>double</strong>. 
+Implementers should be aware of this potential round-tripping issue between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
+objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
+to a language native type.
+</p>
+
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">4.2 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of values to particular data types. 
+Type coercion allows someone deploying JSON-LD to coerce the incoming or 
+outgoing types to the proper data type based on a mapping of data type IRIs to 
+property types. Using type coercion, one may convert simple JSON data to 
+properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to 
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+        "@iri": "homepage",
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="chaining" class="section">
+  <h3><span class="secno">4.3 </span>Chaining</h3>
+  <p>
+    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to 
+    use the definition of JSON-LD objects as <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This 
+    is a commonly used mechanism for creating a parent-child relationship 
+    between two <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s.
+  </p>
+  <p>The example shows an two subjects related by a property from the first 
+  subject:</p>
+
+  <pre class="example">
+{
+...
+  "foaf:name": "Manu Sporny",
+  "<span class="diff">foaf:knows</span>": {
+    "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}</pre>
+  
+  <p>
+    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a 
+    JSON value at any point in JSON-LD.
+  </p>
+</div>
+
+<div id="identifying-unlabeled-nodes" class="section">
+<h3><span class="secno">4.4 </span>Identifying Unlabeled Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this type of node is called
+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) CURIE 
+prefix.</p>
+
+<pre class="example">
+{
+...
+  "@subject": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+unlabeled node. This practice, however, is usually frowned upon when
+generating Linked Data. If a developer finds that they refer to the unlabeled
+node more than once, they should consider naming the node using a resolve-able
+IRI.
+</p>
+
+</div>
+
+<div id="overriding-keywords" class="section">
+<h3><span class="secno">4.5 </span>Overriding Keywords</h3>
+
+<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
+to be overridden. This feature allows more legacy JSON content to be supported 
+by JSON-LD. It also allows developers to design domain-specific implementations 
+using only the JSON-LD context.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {  
+     <span class="diff">"url": "@subject"</span>,
+     <span class="diff">"a": "@type"</span>,
+     "name": "http://schema.org/name"
+  },
+  "url": "http://example.com/about#gregg",
+  "a": "http://schema.org/Person",
+  "name": "Gregg Kellogg"
+}</pre>
+
+<p>In the example above, the <code>@subject</code> and <code>@type</code> 
+keywords have been overridden by <strong>url</strong> and 
+<strong>a</strong>, respectively.
+</p>
+
+</div>
+
+<div id="normalization" class="section">
+<h3><span class="secno">4.6 </span>Normalization</h3>
+
+<p>Normalization is the process of taking a JSON-LD document and performing a 
+deterministic transformation on that document that results in a final document
+that any conforming JSON-LD processor would have generated given the same
+input document. The problem is a fairly difficult technical problem to solve
+because it requires a directed graph to be ordered into a set of nodes and
+edges in a deterministic way. This is easy to do when all of the nodes have
+unique names, but very difficult to do when some of the nodes are unlabeled.
+</p>
+
+<p>Normalization is useful when comparing two graphs against one another,
+when generating a detailed list of differences between two graphs, and
+when generating a cryptographic digital signature for information contained 
+in a graph or when generating a hash of the information contained in a graph.
+</p>
+
+<p>The example below is an un-normalized JSON-LD document:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
+      "@coerce": 
+      {
+         "@iri": ["homepage"]
+      }
+   }
+}</pre>
+
+<p>The example below is the normalized form of the JSON-LD document above:</p>
+
+<p class="note">Whitespace is used below to aid readability. The normalization
+algorithm for JSON-LD remove all unnecessary whitespace in the fully 
+normalized form.</p>
+
+<pre class="example">
+[{
+    "@subject": 
+    {
+        "@iri": "_:c14n0"
+    },
+    "http://xmlns.com/foaf/0.1/homepage": 
+    {
+        "@iri": "http://manu.sporny.org/"
+    },
+    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
+}]</pre>
+
+<p>Notice how all of the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s have been expanded and sorted in
+alphabetical order. Also, notice how the <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> has been 
+labeled with a blank node identifier. Normalization ensures that any arbitrary
+graph containing exactly the same information would be normalized to exactly
+the same form shown above.</p>
+
+</div>
+
+</div>
+
+<div id="algorithms" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Algorithms</h2>
+
+<div id="compaction-1" class="section">
+<h3><span class="secno">5.1 </span>Compaction</h3>
+<p class="issue">TBD: Explain compaction algorithm.</p>
+</div>
+
+<div id="expansion-1" class="section">
+<h3><span class="secno">5.2 </span>Expansion</h3>
+<p class="issue">TBD: Explain expansion algorithm.</p>
+</div>
+
+<div id="framing-1" class="section">
+<h3><span class="secno">5.3 </span>Framing</h3>
+<p class="issue">TBD: Explain framing algorithm.</p>
+</div>
+
+<div id="normalization-1" class="section">
+<h3><span class="secno">5.4 </span>Normalization</h3>
+<p class="issue">TBD: Explain normalization algorithm.</p>
+</div>
+
+<div id="rdf-conversion" class="section">
+<h3><span class="secno">5.5 </span>RDF Conversion</h3>
+
+<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted to any other RDF-compatible document
+format using the algorithm specified in this section.</p>
+
+<p>
+  The JSON-LD Processing Model describes processing rules for extracting RDF
+  from a JSON-LD document. Note that many uses of JSON-LD may not require 
+  generation of RDF.
+</p>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD to RDF processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The RDF Conversion Algorithm is a work in progress.</p>
+
+<div class="informative section" id="overview">
+  <h4><span class="secno">5.5.1 </span>Overview</h4><p><em>This section is non-normative.</em></p>
+  <p>
+    JSON-LD is intended to have an easy to parse grammar that closely models existing
+    practice in using JSON for describing object representations. This allows the use
+    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
+    for stream-based parsing similar to SAX.
+  </p>
+  <p>
+    As with other grammars used for describing <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
+    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
+    externally named entities, <em>BNodes</em>, resources for which an external name does not
+    exist, or is not known, and Literals, which describe terminal entities such as strings,
+    dates and other representations having a lexical representation possibly including
+    an explicit language or datatype.
+  </p>
+  <p>
+    Data described with JSON-LD may be considered to be the representation of a graph made
+    up of <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> resources related via a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> resource.
+    However, specific implementations may choose to operate on the document as a normal
+    JSON description of objects having attributes.
+  </p>
+</div>
+
+<div id="processing-algorithm-terms" class="section">
+  <h4><span class="secno">5.5.2 </span>Processing Algorithm Terms</h4>
+  <dl>
+    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
+    <dd>
+      a context that is specified to the JSON-LD processing algorithm
+      before processing begins.
+    </dd>
+    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
+    <dd>
+      the destination graph for all triples generated by JSON-LD markup.
+    </dd>
+    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
+    <dd>
+      the currently active subject that the processor should use when
+      generating triples.
+    </dd>
+    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
+    <dd>
+      the currently active property that the processor should use when
+      generating triples.
+    </dd>
+    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
+    <dd>
+      the currently active object that the processor should use when
+      generating triples.
+    </dd>
+    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
+    <dd>
+      a context that is used to resolve CURIEs while the processing
+      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context contained within the
+      <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+    </dd>
+    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
+    <dd>
+      a context that is specified at the JSON associative-array level,
+      specified via the <code>@context</code> keyword.
+    </dd>
+    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
+    <dd>
+      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
+      context</a>, <a class="tref" title="current_subject">current subject</a>, and <a class="tref" title="current_property">current property</a>. The <a class="tref" title="processor__state">processor
+      state</a> is managed as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
+      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new associative array.
+    </dd>
+  </dl>
+</div>
+
+<div id="processing-tokens-and-keywords" class="section">
+  <h4><span class="secno">5.5.3 </span>Processing Tokens and Keywords</h4>
+  <dl>
+  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
+  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
+  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
+  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
+  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
+  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+  <dt><code>:</code></dt><dd>The separator for CURIEs when used in JSON keys or JSON values.</dd>
+  <dt><code>@subject</code></dt><dd>Sets the active subjects.</dd>
+  <dt><code>@type</code></dt><dd>Used to set the rdf:type of the active subjects. This token may be conferred as syntactic sugar for rdf:type.</dd>
+  </dl>
+</div>
+
+<div id="context-1" class="section">
+  <h4 id="context"><span class="secno">5.5.4 </span>Context</h4>
+  <p>
+    Processing of JSON-LD is managed recursively using a process described in <a href="sequence">Sequence</a>.
+    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
+    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
+    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+  </p>
+  <p class="issue">Should the document URL be used as the default for <code>@base</code> in the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>?</p>
+  <p>
+    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of an associative array (or elements
+    of a list (see <span a="#list-processing">List Processing</span>)).
+  </p>
+  <p>
+    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within an associative array having a key of <code>@context</code> with an associative
+    array value. When processing a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, special rules apply:
+  </p>
+  <ul>
+    <li>The key <code>@base</code> <em class="rfc2119" title="must">must</em> have a value of a simple string with the lexical
+    form of IRI and is saved in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to perform term mapping as described in <a href="#iri-processing">IRI Processing</a>.</li>
+    <li>The key <code>@vocab</code> <em class="rfc2119" title="must">must</em> have a value of a simple string with the lexical
+    form of IRI and is saved in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to perform term mapping as described in <a href="#iri-processing">IRI Processing</a>.</li>
+    <li>The key <code>@coerce</code> <em class="rfc2119" title="must">must</em> have a value of an associative array. Processing
+      of the associative array is described <a href="#coerce">below</a></li>
+    <li>Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of
+      <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite>
+      and <em class="rfc2119" title="must">must</em> have the value of a simple string with the lexical form of IRI.
+      Merge each key-value pair into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>, overwriting
+      any duplicate values.
+    </li>
+  </ul>
+  <div class="section">
+    <h5 id="coerce">Coerce</h5>
+    <p>
+      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
+      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
+      <code>@coerce</code> mapping, overwriting any duplicate values in 
+      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
+      The <code>@coerce</code> mapping has either a single CURIE or an
+      array of CURIEs. When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+      map all CURIE values to array form and replace with the union of the value from
+      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an array
+      with a single CURIE, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
+    </p>
+  </div>
+</div>
+
+<div id="iri-processing" class="section">
+  <h4><span class="secno">5.5.5 </span>IRI Processing</h4>
+  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
+    transforming a value representing an IRI into an actual IRI.</p>
+  <p>IRIs may be represented as an explicit string, or as a CURIE, as a value relative to <code>@base</code>
+    or <code>@vocab</code>.</p>
+  <p>
+    CURIEs are defined more formally in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">section 6 "CURIE Syntax Definition"</a></cite>.
+    Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em> separated by a ':'. In
+    JSON-LD, either the prefix may be the empty string, denoting the <dfn title="default_prefix" id="dfn-default_prefix">default prefix</dfn>.
+  </p>
+  <p>The procedure for generating an IRI is:
+    </p><ol class="algorithm">
+      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
+      <li>If the prefix is a '_', generate a named BNode using the suffix as the name.</li>
+      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
+        by prepending the mapped prefix to the (possibly empty) suffix. Note that an empty
+        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
+      <li>If the IRI being processed is for a property (i.e., a key value in an associative array, or a
+        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
+        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>].</li>
+      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
+        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>].</li>
+      <li>Otherwise, use the value directly as an IRI.</li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="sequence" class="section">
+  <h4><span class="secno">5.5.6 </span>Sequence</h4>
+
+  <p>
+    The algorithm below is designed for in-memory implementations with random access to associative
+    array elements.
+  </p>
+  <p>
+    A conforming JSON-LD processor <em class="rfc2119" title="must">must</em> implement a
+    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
+    algorithm generates:
+  </p>
+
+  <ol class="algorithm">
+    <li id="processing-step-default-context">
+      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
+      <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      initialized to NULL.
+    </li>
+
+    <li id="processing-step-associative">
+      If an associative array is detected, perform the following steps:
+      <ol class="algorithm">
+        <li>
+          If the associative array has a <code>@context</code> key, process the local context as
+          described in <a href="#context">Context</a>.
+        </li>
+        <li>
+          If the associative array has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
+          performing <a href="#iri-processing">IRI Processing</a> on the associated value. Generate a
+          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+        <li>
+          If the associative array has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+          to a literal value as follows:
+          <ul>
+            <li>
+              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the associative array contains a <code>@datatype</code> key
+              after performing <a href="#iri-processing">IRI Processing</a> on the specified<code>@datatype</code>.
+            </li>
+            <li>
+              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the associative array contains
+              a <code>@language</code> key, use it's value to set the language of the plain literal.
+            </li>
+          </ul>
+          Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref" title="active__property">active
+          property</a> and the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+        <li>If the associative array has a <code>@</code> key:
+          <ol class="algorithm">
+            <li>
+              If the value is a string, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
+              <a href="#iri-processing">IRI Processing</a>. Generate a
+              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
+            </li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
+              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          If the associative array does not have a <code>@</code> key, set the <a class="tref" title="active__object">active
+          object</a> to newly generated <a class="tref" title="blank_node_identifier">blank node identifier</a>. Generate a triple
+          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
+          object</a>.
+        </li>
+        <li>
+          For each key in the associative array that has not already been processed, perform
+          the following steps:
+          <ol class="algorithm">
+            <li>If the key is <code>a</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+            to <code>rdf:type</code>.
+            </li>
+            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
+            <a href="#iri-processing">IRI Processing</a> on the key.</li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
+              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+      </ol>
+    </li>
+
+    <li>
+      If a regular array is detected, process each value in the array by doing the following
+      returning the result of processing the last value in the array:
+
+      <ol class="algorithm">
+        <li>
+          If the value is a regular array, generate an RDF List by linking
+          each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
+          using the following sequence:
+          <ol>
+            <li>
+              If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+              and <code>rdf:nil</code>.
+            </li>
+            <li>
+              Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+              and a newly generated BNode identified as <em>first bnode</em>.
+            </li>
+            <li>
+              For each element other than the last element in the list:
+              <ol>
+                <li>Create a processor state using the active context, <em>first bnode</em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+                <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest bnode</em>, otherwise use <code>rdf:nil</code>.</li>
+                <li>Generate a new triple using <em>first bnode</em>, <code>rdf:rest</code> and <em>rest bnode</em>.</li>
+                <li>Set <em>first bnode</em> to <em>rest bnode</em>.</li>
+              </ol>
+            </li>
+          </ol>
+        </li>
+        <li>
+          Otherwise, create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+          <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+          starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
+          previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+        </li>
+      </ol>
+    </li>
+    
+    <li>
+      If a string is detected, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+      and a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from the string.
+    </li>
+    
+    <li>
+      If a number is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
+      the value with datatype set to either <code>xsd:integer</code> or
+      <code>xsd:double</code>, depending on if the value contains a
+      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
+      subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> and the generated typed literal.
+    </li>
+    
+    <li>
+      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
+      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
+      value with datatype set to <code>xsd:boolean</code>.
+    </li>
+  </ol>
+</div>
+
+
+<!--  THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT 
+
+<section>
+<h1>Best Practices</h1>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be 
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<section>
+<h2>JavaScript</h2>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in 
+JavaScript environments, however, features like the expanded form for
+object values mean that using JSON-LD directly in JavaScript may be 
+annoying without a middleware layer such as a simple library that 
+converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDF API, which enables a variety of RDF-based
+Web Applications, but some don't want to require that level of functionality 
+just to use JSON-LD. The group is still discussing the best way to proceed, 
+so input on how JSON-LD could more easily be utilized in JavaScript 
+environments would be very much appreciated.
+</p>
+</section>
+
+<section>
+<h2>Schema-less Databases</h2>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from 
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+
+<p class="issue">MongoDB does not allow the '.' character to be used in
+key names. This prevents developers from storing IRIs as keys, which also
+prevents storage of the data in normalized form. While this issue can
+be avoided by using CURIEs for key values, it is not known if this
+mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
+is useful to developers.
+</p>
+
+ -->
+
+</div>
+
+</div>
+
+<div id="experimental-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>Experimental Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear 
+whether or not the JSON-LD specification is going to support the complexity 
+necessary to support each concept. The entire section on Advanced Concepts 
+should be considered as discussion points; it is merely a list of 
+possibilities where all of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">6.1 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an array to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single JSON-LD associative
+array.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "@": 
+  [
+    {
+      "@": "http://example.org/people#john",
+      "a": "foaf:Person"
+    },
+    {
+      "@": "http://example.org/people#jane",
+      "a": "foaf:Person"
+    }
+  ]
+}</pre>
+
+<p>A disjoint graph could also be expressed like so:</p>
+
+<pre class="example">
+[
+  {
+    "@": "http://example.org/people#john",
+    "a": "foaf:Person"
+  },
+  {
+    "@": "http://example.org/people#jane",
+    "a": "foaf:Person"
+  }
+]</pre>
+
+</div>
+
+<div id="the-json-ld-api" class="section">
+<h3><span class="secno">6.2 </span>The JSON-LD API</h3>
+
+<p>This API provides a clean mechanism that enables developers to convert 
+JSON-LD data into a format that is easier to work with in various programming
+languages.
+</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDProcessor</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback">toProjection</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">template</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>Graph</a></span>  <span class="idlMethName"><a href="#widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback">toGraph</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">jsonld</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a>JSONLDParserCallback</a>?</span> <span class="idlParamName">callback</span></span>);</span>
+};</span>
+</pre><div id="methods" class="section"><h4><span class="secno">6.2.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessor-toGraph-Graph-DOMString-jsonld-JSONLDParserCallback-callback"><code>toGraph</code></dt><dd>Parses JSON-LD and transforms the data into an Graph, which is 
+  compatible with the RDF Interfaces API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-INTERFACES">RDF-INTERFACES</a></cite>]. 
+  This method will 
+  return <code>null</code> if there are any errors, or if the RDF Interfaces 
+  API is not available for use.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the RDFGraph.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>Graph</a></code></div></dd><dt id="widl-JSONLDProcessor-toProjection-object-DOMString-jsonld-object-template-DOMString-subject-JSONLDParserCallback-callback"><code>toProjection</code></dt><dd>Parses JSON-LD text into an RDF API Projection object as specified
+    by the RDF API specification [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-API">RDF-API</a></cite>].
+    If there are any errors, <code>null</code> is returned.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">jsonld</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD string to parse into the Projection.</td></tr><tr><td class="prmName">template</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The Projection template to use when building the Projection.</td></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject to use when building the Projection.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a>JSONLDParserCallback</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
+
+<p>The JSONLDParserCallback is called whenever a processing error occurs on
+input data.</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre><div id="methods-1" class="section"><h4><span class="secno">6.2.2 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+
+<p>The following example demonstrates how to convert JSON-LD to a projection
+that is directly usable in a programming environment:
+</p>
+
+<pre class="example">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+
+// Map the JSON-LD to a language-native object
+var person = jsonld.toProjection(jsonldString, myTemplate);
+
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+      "Their homepage is: " + person.homepage);</pre>
+
+<p>A JSON-LD Serializer is also available to map a language-native object
+to JSON-LD.
+
+</p><pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDSerializer">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDSerializer</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>DOMString</a></span> <span class="idlMethName"><a href="#widl-JSONLDSerializer-normalize-DOMString-object-obj">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">obj</span></span>);</span>
+};</span>
+</pre><div id="methods-2" class="section"><h4><span class="secno">6.2.3 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDSerializer-normalize-DOMString-object-obj"><code>normalize</code></dt><dd>Serializes a language-native object into a normalized JSON-LD string.
+  Normalization is important when performing things like equality comparison
+  and digital signature creation and verification.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">obj</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">An associative array of key-value pairs that should be converted
+     to a JSON-LD string. It is assumed that a map already exists for the
+     data.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>DOMString</a></code></div></dd></dl></div>
+
+<h3 id="the-normalization-algorithm">The Normalization Algorithm</h3>
+
+<p class="issue">This algorithm is very rough, untested, and probably contains
+many bugs. Use at your own risk. It will change in the coming months.</p>
+
+<p>The JSON-LD normalization algorithm is as follows:</p>
+
+<ol class="algorithm">
+  <li>Remove the <code>@context</code> key and preserve it as the 
+  <dfn title="transformation_map" id="dfn-transformation_map">transformation map</dfn> while running this algorithm.</li>
+  <li>For each key
+   <ol class="algorithm">
+    <li>If the key is a CURIE, expand the CURIE to an IRI using the
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+   </ol>
+  </li>
+  <li>For each value
+   <ol class="algorithm">
+    <li>If the value should be type coerced per the 
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>, ensure that it is transformed to the
+        new value.</li>
+    <li>If the value is a CURIE, expand the CURIE to an IRI using the
+        <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+    <li>If the value is a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> and the type is a CURIE,
+        expand it to an IRI using the <a class="tref internalDFN" title="transformation_map" href="#dfn-transformation_map">transformation map</a>.</li>
+    <li>When generating the final value, use expanded object value form to
+      store all IRIs, typed literals and <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s with language
+      information.</li>
+   </ol>
+  </li>
+  <li>Output each sorted key-value pair without any extraneous whitespace. If 
+  the value is an associative array, perform this algorithm, starting
+  at step #1, recursively on the sub-tree. There should be no nesting in
+  the outputted JSON data. That is, the top-most element should be an
+  array. Each item in the array contains a single subject with a 
+  corresponding array of properties in UTF-8 sort order. Any related 
+  objects that are complex objects themselves should be given a top-level 
+  object in the top-level array.</li>
+  
+</ol>
+
+<p class="issue">Note that normalizing named blank nodes is impossible at
+present since one would have to specify a blank node naming algorithm. For
+the time being, you cannot normalize graphs that contain named blank
+nodes. However, normalizing graphs that contain non-named blank nodes 
+is supported.</p>
+
+<pre class="example">
+var myObj = { "@context" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "age",
+                   "xsd:anyURI": "homepage"
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : "42",
+              "homepage" : "http://example.org/people/joe" };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);</pre>
+
+<p>After the code in the example above has executed, the 
+<strong>jsonldText</strong> value will be (line-breaks added for 
+readability):</p>
+
+<pre class="example">
+[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
+"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
+"http://xmlns.com/foaf/0.1/name":"Joe Jackson"}]</pre>
+
+<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
+ensure that the normalized value is a string. In order to generate the
+string from a <strong>double</strong> value, output equivalent to the
+<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
+<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
+is the value to be converted.</p>
+
+<p>To convert the a double value in JavaScript, implementers can use the 
+following snippet of code:</p>
+
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
+
+<p class="note">When data needs to be normalized, JSON-LD authors should
+not use values that are going to undergo automatic conversion. This is due
+to the lossy nature of <strong>xsd:double</strong> values.</p>
+
+<p class="issue">Round-tripping data can be problematic if we mix and
+match @coerce rules with JSON-native datatypes, like integers. Consider the 
+following code example:</p>
+
+<pre class="example">
+var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+
+// Convert the normalized object back to a JavaScript object
+var myObj2 = jsonld.parse(jsonldText);</pre>
+
+<p class="issue">At this point, myObj2 and myObj will have different
+values for the "number" value. myObj will be the number 42, while
+myObj2 will be the string "42". This type of data round-tripping
+error can bite developers. We are currently wondering if having a
+"coerce validation" phase in the parsing/normalization phases would be a 
+good idea. It would prevent data round-tripping issues like the
+one mentioned above.</p>
+
+</div>
+
+</div>
+
+
+
+<div class="appendix section" id="markup-examples">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">A.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+[
+ {
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/bob/",
+   "foaf:name": "Bob"
+ },
+ {
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/eve/",
+   "foaf:name": "Eve"
+ },
+ {
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/manu/",
+   "foaf:name": "Manu"
+ }
+]</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">A.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">A.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]</pre>
+</div>
+
+<div class="appendix section" id="mashing-up-vocabularies">
+<h3><span class="secno">A.4 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>RDF - for describing information about objects on the semantic web.</li>
+   <li>RDFS - for expressing things like labels and comments.</li>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>You can use these vocabularies in combination, like so:</p>
+
+<pre class="example">
+{
+  "<span class="diff">rdf:type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword, 
+like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}</pre>
+
+<p>The <code>@context</code> keyword is used to change how the JSON-LD
+processor evaluates key-value pairs. In this case, it was used to
+map one string ('myvocab') to another string, which is interpreted as
+a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced 
+with "<code>http://example.org/myvocab#</code>" when it
+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 for RDF, called a CURIE, and provides
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div class="appendix section" id="acknowledgements">
+<h3><span class="secno">A.5 </span>Acknowledgements</h3>
+
+<p>The editors would like to thank Mark Birbeck, who provided a great deal of 
+the initial push behind the JSON-LD work via his work on RDFj, 
+Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and 
+performed several implementations of the specification, and Ian Davis, who 
+created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
+Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
+Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard 
+Cyganiak for their input on the specification.</p>
+</div>
+
+
+
+
+</div><div id="respec-err" style="position: fixed; width: 350px; top: 10px; right: 10px; border: 3px double #f00; background: #fff" class="removeOnSave"><ul><li style="color: #c00">There appears to have been a problem fetching the style sheet; status=0</li></ul></div><div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-API">[RDF-API]</dt><dd>Manu Sporny, Benjamin Adrian, Nathan Rixham; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/"><cite>RDF API</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-api/">http://www.w3.org/2010/02/rdfa/sources/rdf-api/</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RDF-INTERFACES">[RDF-INTERFACES]</dt><dd>Nathan Rixham, Manu Sporny, Benjamin Adrian; et al. <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/"><cite>RDF Interfaces</cite></a> Latest. W3C Editor's Draft. URL: <a href="http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/">http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/</a>
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a> 
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification, Third Edition.</cite></a> December 1999. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 
+</dd><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
+</dd></dl></div></div></body></html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110803/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110808/diff-20110615.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,20618 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left; 
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+<del class="diff-old">-
+Linked
+Data
+Expression
+in
+JSON
+</del>
+<ins class="diff-chg">1.0
+</ins>
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+<del class="diff-old">Linked
+</del>
+<ins class="diff-chg">Linking
+</ins>
+Data
+</h2>
+<h2 id="unofficial-draft-08-august-2011">
+Unofficial
+Draft
+<del class="diff-old">15
+June
+</del>
+<ins class="diff-chg">08
+August
+</ins>
+2011
+</h2>
+<dl>
+<dt>
+Editors:
+</dt>
+<dd>
+<a href="http://manu.sporny.org/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+<del class="diff-old">Bazaar,
+Inc.
+</del>
+<ins class="diff-chg">Bazaar
+</ins>
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+Kellogg
+Associates
+</dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<del class="diff-old">Mark
+Birbeck
+</del>
+<a href="http://digitalbazaar.com/">
+<ins class="diff-chg">Manu
+Sporny
+</ins>
+</a>,
+<del class="diff-old">Backplane
+Ltd.
+</del>
+<a href="http://digitalbazaar.com/">
+<ins class="diff-chg">Digital
+Bazaar
+</ins>
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+<ins class="diff-new">Gregg
+Kellogg
+</ins></a>,<ins class="diff-new">
+Kellogg
+Associates
+</ins></dd><dd>
+<a href="http://digitalbazaar.com/">
+<del class="diff-old">Manu
+Sporny
+</del>
+<ins class="diff-chg">Dave
+Longley
+</ins>
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+<del class="diff-old">Bazaar,
+Inc.
+</del>
+<ins class="diff-chg">Bazaar
+</ins></a></dd><dd><a href="http://webbackplane.com/"><ins class="diff-chg">
+Mark
+Birbeck
+</ins></a>,<a href="http://webbackplane.com/"><ins class="diff-chg">
+Backplane
+Ltd.
+</ins>
+</a>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20110615.html">
+diff
+to
+previous
+version
+</a>.
+</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+<del class="diff-old">Developers
+that
+embed
+structured
+data
+in
+their
+Web
+pages
+can
+choose
+among
+a
+number
+of
+languages
+such
+as
+RDFa
+[
+RDFA-CORE
+],
+Microformats
+</del>
+<ins class="diff-chg">JSON
+</ins>
+[
+<cite>
+<del class="diff-old">MICROFORMATS
+</del>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+<ins class="diff-chg">RFC4627
+</ins>
+</a>
+</cite>
+]
+<del class="diff-old">and
+Microdata
+[
+MICRODATA
+].
+Each
+of
+these
+structured
+data
+languages,
+while
+incompatible
+at
+the
+syntax
+level,
+can
+be
+easily
+mapped
+to
+RDF.
+JSON
+</del>
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+<ins class="diff-new">expressing
+directed
+graphs;
+mixing
+both
+</ins>
+Linked
+Data
+<del class="diff-old">that
+can
+be
+used
+to
+represent
+objects
+specified
+via
+RDFa,
+Microformats
+</del>
+and
+<del class="diff-old">Microdata.
+</del>
+<ins class="diff-chg">non-Linked
+Data
+in
+a
+single
+document.
+</ins>
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+<del class="diff-old">Goals
+and
+Rationale
+</del>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals-and-rationale" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Goals
+<ins class="diff-new">and
+Rationale
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#linked-data" class="tocxref">
+<span class="secno">
+2.2
+</span>
+<del class="diff-old">Map
+Terms
+to
+IRIs
+</del>
+<ins class="diff-chg">Linked
+Data
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#linking-data" class="tocxref">
+<span class="secno">
+2.3
+</span>
+<del class="diff-old">The
+JSON-LD
+Context
+</del>
+<ins class="diff-chg">Linking
+Data
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#the-context" class="tocxref">
+<span class="secno">
+2.4
+</span>
+<del class="diff-old">Unambiguous
+Identifiers
+for
+JSON
+</del>
+<ins class="diff-chg">The
+Context
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#inside-a-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">2.5
+</del>
+<ins class="diff-chg">2.4.1
+</ins>
+</span>
+<del class="diff-old">Mashing
+Up
+Vocabularies
+</del>
+<ins class="diff-chg">Inside
+a
+Context
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#from-json-to-json-ld" class="tocxref">
+<span class="secno">
+<del class="diff-old">2.6
+</del>
+<ins class="diff-chg">2.5
+</ins>
+</span>
+<del class="diff-old">An
+Example
+of
+a
+Context
+</del>
+<ins class="diff-chg">From
+JSON
+to
+JSON-LD
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#basic-concepts" class="tocxref">
+<span class="secno">
+3.
+</span>
+<del class="diff-old">Markup
+Examples
+</del>
+<ins class="diff-chg">Basic
+Concepts
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+3.1
+</span>
+<del class="diff-old">RDFa
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+3.2
+</span>
+<del class="diff-old">Microformats
+</del>
+<ins class="diff-chg">Identifying
+the
+Subject
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+3.3
+</span>
+<del class="diff-old">Microdata
+</del>
+<ins class="diff-chg">Specifying
+the
+Type
+</ins></a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.4
+</ins></span><ins class="diff-chg">
+Strings
+</ins></a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.5
+</ins></span><ins class="diff-chg">
+String
+Internationalization
+</ins></a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.6
+</ins></span><ins class="diff-chg">
+Datatypes
+</ins></a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.7
+</ins></span><ins class="diff-chg">
+Multiple
+Objects
+for
+a
+Single
+Property
+</ins></a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.8
+</ins></span><ins class="diff-chg">
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</ins></a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.9
+</ins></span><ins class="diff-chg">
+Expansion
+</ins></a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.10
+</ins></span><ins class="diff-chg">
+Compaction
+</ins></a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno"><ins class="diff-chg">
+3.11
+</ins></span><ins class="diff-chg">
+Framing
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+4.
+</span>
+<del class="diff-old">Markup
+of
+RDF
+</del>
+<ins class="diff-chg">Advanced
+</ins>
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+4.1
+</span>
+<del class="diff-old">IRIs
+</del>
+<ins class="diff-chg">Automatic
+Typing
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+4.2
+</span>
+<del class="diff-old">Identifying
+the
+Subject
+</del>
+<ins class="diff-chg">Type
+Coercion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#chaining" class="tocxref">
+<span class="secno">
+4.3
+</span>
+<del class="diff-old">Specifying
+the
+Type
+</del>
+<ins class="diff-chg">Chaining
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-unlabeled-nodes" class="tocxref">
+<span class="secno">
+4.4
+</span>
+<del class="diff-old">Plain
+Literals
+</del>
+<ins class="diff-chg">Identifying
+Unlabeled
+Nodes
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#overriding-keywords" class="tocxref">
+<span class="secno">
+4.5
+</span>
+<del class="diff-old">Language
+Specification
+in
+Plain
+Literals
+</del>
+<ins class="diff-chg">Overriding
+Keywords
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization" class="tocxref">
+<span class="secno">
+4.6
+</span>
+<del class="diff-old">Typed
+Literals
+</del>
+<ins class="diff-chg">Normalization
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#algorithms" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.7
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+<del class="diff-old">Multiple
+Objects
+for
+a
+Single
+Property
+</del>
+<ins class="diff-chg">Algorithms
+</ins></a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno"><ins class="diff-chg">
+5.1
+</ins></span><ins class="diff-chg">
+Syntax
+Tokens
+and
+Keywords
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+<del class="diff-old">Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</del>
+<ins class="diff-chg">Algorithm
+Terms
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#context-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<del class="diff-old">Blank
+Nodes
+</del>
+<ins class="diff-chg">Context
+</ins></a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno"><ins class="diff-chg">
+5.3.1
+</ins></span><ins class="diff-chg">
+Coerce
+</ins></a></li><li class="tocline"><a href="#initial-context" class="tocxref"><span class="secno"><ins class="diff-chg">
+5.3.2
+</ins></span><ins class="diff-chg">
+Initial
+Context
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#iri-expansion" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+<del class="diff-old">Advanced
+Features
+</del>
+<ins class="diff-chg">IRI
+Expansion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-compaction" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+<del class="diff-old">Automatic
+Typing
+</del>
+<ins class="diff-chg">IRI
+Compaction
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#value-expansion" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+<del class="diff-old">Type
+Coercion
+</del>
+<ins class="diff-chg">Value
+Expansion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#value-compaction" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">5.7
+</ins></span><ins class="diff-chg">
+Value
+Compaction
+</ins></a>
+</li>
+<li class="tocline">
+<a href="#expansion-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">5.8
+</ins>
+</span>
+<del class="diff-old">The
+JSON-LD
+Processing
+</del>
+<ins class="diff-chg">Expansion
+</ins></a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno"><ins class="diff-chg">
+5.8.1
+</ins></span><ins class="diff-chg">
+Expansion
+</ins>
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#compaction-1" class="tocxref">
+<span class="secno">
+<ins class="diff-new">5.9
+</ins></span><ins class="diff-new">
+Compaction
+</ins></a>
+<ul class="toc">
+<li class="tocline">
+<a href="#compaction-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">5.9.1
+</ins>
+</span>
+<del class="diff-old">Overview
+</del>
+<ins class="diff-chg">Compaction
+Algorithm
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#framing-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">5.10
+</ins>
+</span>
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">Framing
+</ins></a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno"><ins class="diff-chg">
+5.10.1
+</ins></span><ins class="diff-chg">
+Framing
+</ins>
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#framing-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.3
+</del>
+<ins class="diff-chg">5.10.2
+</ins>
+</span>
+<del class="diff-old">Processing
+Tokens
+and
+Keywords
+</del>
+<ins class="diff-chg">Framing
+Algorithm
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#normalization-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.4
+</del>
+<ins class="diff-chg">5.11
+</ins>
+</span>
+<del class="diff-old">Context
+</del>
+<ins class="diff-chg">Normalization
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normalization-algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.4.1
+</del>
+<ins class="diff-chg">5.11.1
+</ins>
+</span>
+<del class="diff-old">Coerce
+</del>
+<ins class="diff-chg">Normalization
+Algorithm
+Terms
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">5.11.2
+</ins></span><ins class="diff-chg">
+Normalization
+Algorithm
+</ins></a>
+</li>
+<li class="tocline">
+<a href="#node-labeling-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.5
+</del>
+<ins class="diff-chg">5.11.3
+</ins>
+</span>
+<del class="diff-old">Chaining
+</del>
+<ins class="diff-chg">Node
+Labeling
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#shallow-comparison-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.6
+</del>
+<ins class="diff-chg">5.11.4
+</ins>
+</span>
+<del class="diff-old">IRI
+Processing
+</del>
+<ins class="diff-chg">Shallow
+Comparison
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#object-comparison-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">5.11.5
+</ins></span><ins class="diff-chg">
+Object
+Comparison
+Algorithm
+</ins></a>
+</li>
+<li class="tocline">
+<a href="#deep-comparison-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">5.11.6
+</ins>
+</span>
+<del class="diff-old">Sequence
+</del>
+<ins class="diff-chg">Deep
+Comparison
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#node-serialization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.
+</del>
+<ins class="diff-chg">5.11.7
+</ins>
+</span>
+<del class="diff-old">Best
+Practices
+</del>
+<ins class="diff-chg">Node
+Serialization
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#combinatorial-serialization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.1
+</del>
+<ins class="diff-chg">5.11.8
+</ins>
+</span>
+<del class="diff-old">JavaScript
+</del>
+<ins class="diff-chg">Combinatorial
+Serialization
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#mapping-serialization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">8.2
+</del>
+<ins class="diff-chg">5.11.9
+</ins>
+</span>
+<del class="diff-old">Schema-less
+Databases
+</del>
+<ins class="diff-chg">Mapping
+Serialization
+Algorithm
+</ins></a></li><li class="tocline"><a href="#label-generation-algorithm" class="tocxref"><span class="secno"><ins class="diff-chg">
+5.11.10
+</ins></span><ins class="diff-chg">
+Label
+Generation
+Algorithm
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#data-round-tripping" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.
+</del>
+<ins class="diff-chg">5.12
+</ins>
+</span>
+<del class="diff-old">Advanced
+Concepts
+</del>
+<ins class="diff-chg">Data
+Round
+Tripping
+</ins></a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno"><ins class="diff-chg">
+5.13
+</ins></span><ins class="diff-chg">
+RDF
+Conversion
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#overview" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.1
+</del>
+<ins class="diff-chg">5.13.1
+</ins>
+</span>
+<del class="diff-old">Vocabulary
+Profiles
+</del>
+<ins class="diff-chg">Overview
+</ins></a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno"><ins class="diff-chg">
+5.13.2
+</ins></span><ins class="diff-chg">
+RDF
+Conversion
+Algorithm
+Terms
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-new">5.13.3
+</ins></span><ins class="diff-new">
+RDF
+Conversion
+Algorithm
+</ins></a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno"><ins class="diff-new">
+6.
+</ins></span><ins class="diff-new">
+Experimental
+Concepts
+</ins></a><ul class="toc"><li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.2
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Disjoint
+Graphs
+</a>
+</li>
+<li class="tocline">
+<a href="#lists" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+<del class="diff-old">The
+JSON-LD
+API
+</del>
+<ins class="diff-chg">Lists
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#expansion-2" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3.1
+</del>
+<ins class="diff-chg">6.2.1
+</ins>
+</span>
+<del class="diff-old">Methods
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization-2" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3.2
+</del>
+<ins class="diff-chg">6.2.2
+</ins>
+</span>
+<del class="diff-old">Methods
+</del>
+<ins class="diff-chg">Normalization
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">9.3.3
+</del>
+<ins class="diff-chg">6.2.3
+</ins>
+</span>
+<del class="diff-old">Methods
+</del>
+<ins class="diff-chg">RDF
+Conversion
+</ins>
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+A.
+</span>
+<del class="diff-old">The
+Default
+Context
+</del>
+<ins class="diff-chg">Markup
+Examples
+</ins></a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno"><ins class="diff-chg">
+A.1
+</ins></span><ins class="diff-chg">
+RDFa
+</ins></a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno"><ins class="diff-chg">
+A.2
+</ins></span><ins class="diff-chg">
+Microformats
+</ins></a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno"><ins class="diff-chg">
+A.3
+</ins></span><ins class="diff-chg">
+Microdata
+</ins></a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno"><ins class="diff-chg">
+A.4
+</ins></span><ins class="diff-chg">
+Mashing
+Up
+Vocabularies
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">A.5
+</ins>
+</span>
+Acknowledgements
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">C.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+<ins class="diff-new">JSON,
+as
+specified
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
+RFC4627
+</ins></a></cite><ins class="diff-new">
+],
+is
+a
+simple
+language
+for
+representing
+data
+on
+the
+Web.
+Linked
+Data
+is
+a
+technique
+for
+describing
+content
+across
+different
+documents
+or
+Web
+sites.
+Web
+resources
+are
+described
+using
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a><ins class="diff-new">
+s,
+and
+typically
+are
+dereferencable
+entities
+that
+may
+be
+used
+to
+find
+more
+information,
+creating
+a
+"Web
+of
+Knowledge".
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+not
+only
+Linked
+Data
+in
+JSON,
+but
+for
+adding
+semantics
+to
+existing
+JSON.
+</ins></p><p>
+JSON-LD
+is
+designed
+as
+a
+light-weight
+syntax
+that
+can
+be
+used
+to
+express
+Linked
+Data.
+It
+is
+primarily
+intended
+to
+be
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+and
+other
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+interoperable
+Web
+Services
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+document
+storage
+engines.
+It
+is
+practical
+and
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+and
+existing
+code
+that
+is
+in
+use
+today.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+<ins class="diff-new">RDFa
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-new">
+RDFA-CORE
+</ins></a></cite><ins class="diff-new">
+]
+data,
+</ins>
+Microformats
+<ins class="diff-new">[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS"><ins class="diff-new">
+MICROFORMATS
+</ins></a></cite><ins class="diff-new">
+]
+</ins>
+data,
+and
+<del class="diff-old">Microdata.
+</del>
+<ins class="diff-chg">Microdata
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA"><ins class="diff-chg">
+MICRODATA
+</ins></a></cite><ins class="diff-chg">
+].
+</ins>
+That
+is,
+it
+supports
+every
+major
+Web-based
+structured
+data
+model
+in
+use
+today.
+<del class="diff-old">It
+</del>
+</p>
+<p>
+<ins class="diff-chg">The
+syntax
+</ins>
+does
+not
+require
+<del class="diff-old">anyone
+</del>
+<ins class="diff-chg">many
+applications
+</ins>
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+<ins class="diff-new">either
+in-band
+or
+</ins>
+out-of-band.
+The
+syntax
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+very
+small
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<del class="diff-old">JSON,
+as
+specified
+in
+[
+RFC4627
+],
+is
+a
+simple
+language
+for
+representing
+objects
+on
+the
+web.
+Linked
+Data
+is
+a
+way
+of
+describing
+content
+across
+different
+documents,
+or
+web
+resources.
+Web
+resources
+are
+described
+using
+IRI
+s,
+and
+typically
+are
+dereferencable
+entities
+that
+may
+be
+used
+to
+find
+more
+information,
+creating
+a
+"web
+of
+knowledge".
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+linked
+data
+in
+JSON.
+</del>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+<del class="diff-old">write
+</del>
+<ins class="diff-chg">implement
+</ins>
+processors
+<ins class="diff-new">and
+APIs
+</ins>
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+<ins class="diff-new">the
+basics
+in
+</ins>
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+<ins class="diff-new">].
+To
+understand
+the
+API
+and
+how
+it
+is
+intended
+to
+operate
+in
+a
+programming
+environment,
+it
+is
+useful
+to
+have
+working
+knowledge
+of
+the
+JavaScript
+programming
+language
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262"><ins class="diff-new">
+ECMA-262
+</ins></a></cite>
+]
+and
+<ins class="diff-new">WebIDL
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL"><ins class="diff-new">
+WEBIDL
+</ins></a></cite><ins class="diff-new">
+].
+To
+understand
+how
+JSON-LD
+maps
+to
+RDF,
+it
+is
+helpful
+to
+be
+familiar
+with
+the
+basic
+</ins>
+RDF
+<del class="diff-old">as
+described
+in
+</del>
+<ins class="diff-chg">concepts
+</ins>
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+<p>
+<ins class="diff-new">Examples
+may
+contain
+references
+to
+existing
+vocabularies
+and
+use
+abbreviations
+in
+CURIEs
+and
+source
+code.
+The
+following
+is
+a
+list
+of
+all
+vocabularies
+and
+their
+abbreviations,
+as
+used
+in
+this
+document:
+</ins></p><ul><li><ins class="diff-new">
+The
+</ins><a href="http://purl.org/dc/terms/"><ins class="diff-new">
+Dublin
+Core
+</ins></a><ins class="diff-new">
+vocabulary
+(abbreviation:
+</ins><code><ins class="diff-new">
+dc
+</ins></code>,<ins class="diff-new">
+e.g.,
+</ins><code><ins class="diff-new">
+dc:title
+</ins></code><ins class="diff-new">
+)
+</ins></li><li><ins class="diff-new">
+The
+</ins><a href="http://xmlns.com/foaf/0.1/"><ins class="diff-new">
+Friend
+of
+a
+Friend
+</ins></a><ins class="diff-new">
+vocabulary
+(abbreviation:
+</ins><code><ins class="diff-new">
+foaf
+</ins></code>,<ins class="diff-new">
+e.g.,
+</ins><code><ins class="diff-new">
+foaf:knows
+</ins></code><ins class="diff-new">
+)
+</ins></li><li><ins class="diff-new">
+The
+</ins><a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><ins class="diff-new">
+RDF
+</ins></a><ins class="diff-new">
+vocabulary
+(abbreviation:
+</ins><code><ins class="diff-new">
+rdf
+</ins></code>,<ins class="diff-new">
+e.g.,
+</ins><code><ins class="diff-new">
+rdf:type
+</ins></code><ins class="diff-new">
+)
+</ins></li><li><ins class="diff-new">
+The
+</ins><a href="http://www.w3.org/2001/XMLSchema#"><ins class="diff-new">
+XSD
+</ins></a><ins class="diff-new">
+vocabulary
+(abbreviation:
+</ins><code><ins class="diff-new">
+xsd
+</ins></code>,<ins class="diff-new">
+e.g.,
+</ins><code><ins class="diff-new">
+xsd:integer
+</ins></code><ins class="diff-new">
+)
+</ins></li></ul>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+<del class="diff-old">All
+comments
+and
+</del>
+<ins class="diff-chg">Technical
+</ins>
+discussion
+<del class="diff-old">takes
+place
+</del>
+<ins class="diff-chg">typically
+occurs
+</ins>
+on
+the
+public
+mailing
+list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
+public-linked-json@w3.org
+</a>
+</li>
+<li>
+<a href="http://json-ld.org/minutes/">
+<ins class="diff-new">Public
+teleconferences
+</ins></a><ins class="diff-new">
+are
+held
+on
+Tuesdays
+at
+1500UTC
+on
+the
+second
+and
+fourth
+week
+of
+each
+month.
+</ins></li><li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="https://github.com/json-ld/json-ld.org/issues">
+issue
+tracker
+</a>.
+</li>
+<li>
+<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=#json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+</div>
+</div>
+<div id="design" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+<del class="diff-old">Goals
+and
+Rationale
+</del>
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="goals-and-rationale" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+Goals
+<ins class="diff-new">and
+Rationale
+</ins>
+</h3>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+<del class="diff-old">don't
+</del>
+need
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">only
+</ins>
+know
+<del class="diff-old">RDF
+in
+order
+</del>
+<ins class="diff-chg">JSON
+and
+three
+keywords
+</ins>
+to
+use
+the
+basic
+functionality
+<del class="diff-old">provided
+by
+</del>
+<ins class="diff-chg">in
+</ins>
+JSON-LD.
+<ins class="diff-new">No
+extra
+processors
+or
+software
+libraries
+are
+necessary
+to
+use
+JSON-LD
+in
+its
+most
+basic
+form.
+The
+language
+attempts
+to
+ensure
+that
+developers
+have
+an
+easy
+learning
+curve.
+</ins>
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+<del class="diff-old">should
+</del>
+<ins class="diff-chg">must
+</ins>
+be
+100%
+compatible
+with
+JSON.
+<ins class="diff-new">This
+ensures
+that
+all
+of
+the
+standard
+JSON
+libraries
+work
+seamlessly
+with
+JSON-LD
+documents.
+</ins>
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+<del class="diff-old">All
+major
+RDF
+concepts
+</del>
+<ins class="diff-chg">The
+syntax
+</ins>
+must
+be
+<del class="diff-old">expressible
+via
+the
+JSON-LD
+syntax.
+</del>
+<ins class="diff-chg">able
+to
+express
+directed
+graphs,
+which
+have
+been
+proven
+to
+be
+able
+to
+simply
+express
+almost
+every
+real
+world
+data
+model.
+</ins>
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+<del class="diff-old">readable.
+</del>
+<ins class="diff-chg">readable,
+requiring
+as
+little
+as
+possible
+from
+the
+developer.
+</ins></dd><dt><ins class="diff-chg">
+Pragmatism
+</ins></dt><dd><ins class="diff-chg">
+Mixing
+the
+expression
+of
+pure
+Linked
+Data
+with
+data
+that
+is
+not
+linked
+was
+an
+approach
+that
+was
+driven
+by
+pragmatism.
+JSON-LD
+attempts
+to
+be
+more
+practical
+than
+theoretical
+in
+its
+approach
+to
+Linked
+Data.
+</ins>
+</dd>
+<dt>
+Zero
+Edits,
+most
+of
+the
+time
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+At
+times,
+mapping
+JSON
+to
+<del class="diff-old">RDF
+</del>
+<ins class="diff-chg">a
+graph
+representation
+</ins>
+can
+become
+<del class="diff-old">difficult
+-
+in
+</del>
+<ins class="diff-chg">difficult.
+In
+</ins>
+these
+instances,
+rather
+than
+having
+JSON-LD
+support
+esoteric
+markup,
+we
+chose
+not
+to
+support
+the
+use
+case
+and
+support
+a
+simplified
+syntax
+instead.
+So,
+while
+<del class="diff-old">we
+strive
+for
+</del>
+Zero
+<del class="diff-old">Edits,
+</del>
+<ins class="diff-chg">Edits
+was
+a
+goal,
+</ins>
+it
+was
+not
+always
+possible
+without
+adding
+great
+complexity
+to
+the
+language.
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<div id="linked-data" class="section">
+<h3>
+<span class="secno">
+2.2
+</span>
+<del class="diff-old">Map
+Terms
+</del>
+<ins class="diff-chg">Linked
+Data
+</ins></h3><p><ins class="diff-chg">
+The
+following
+definition
+for
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a><ins class="diff-chg">
+is
+the
+one
+that
+will
+be
+used
+for
+this
+specification.
+</ins></p><ol><li><dfn title="Linked_Data" id="dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></dfn><ins class="diff-chg">
+is
+a
+set
+of
+documents,
+each
+containing
+a
+representation
+of
+a
+linked
+data
+graph.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="linked_data_graph" id="dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></dfn><ins class="diff-chg">
+is
+a
+labeled
+directed
+graph,
+where
+nodes
+are
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a><ins class="diff-chg">
+s
+or
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><ins class="diff-chg">
+s,
+and
+edges
+are
+properties.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="subject" id="dfn-subject"><ins class="diff-chg">
+subject
+</ins></dfn><ins class="diff-chg">
+is
+any
+node
+in
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a><ins class="diff-chg">
+with
+at
+least
+one
+outgoing
+edge.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
+should
+</ins></em><ins class="diff-chg">
+be
+labeled
+with
+a
+IRI.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="property" id="dfn-property"><ins class="diff-chg">
+property
+</ins></dfn><ins class="diff-chg">
+is
+an
+edge
+of
+the
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a><ins class="diff-chg">
+.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+labeled
+with
+an
+IRI.
+</ins></li><li><ins class="diff-chg">
+An
+</ins><dfn title="object" id="dfn-object"><ins class="diff-chg">
+object
+</ins></dfn><ins class="diff-chg">
+is
+a
+node
+in
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a><ins class="diff-chg">
+with
+at
+least
+one
+incoming
+edge.
+</ins></li><li><ins class="diff-chg">
+An
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+be
+labeled
+with
+an
+IRI.
+</ins></li><li><ins class="diff-chg">
+An
+IRI
+that
+is
+a
+label
+in
+a
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
+should
+</ins></em><ins class="diff-chg">
+be
+dereferencable
+</ins>
+to
+<del class="diff-old">IRIs
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a><ins class="diff-chg">
+document
+describing
+the
+labeled
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a>,<a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><ins class="diff-chg">
+.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="literal" id="dfn-literal"><ins class="diff-chg">
+literal
+</ins></dfn><ins class="diff-chg">
+is
+an
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><ins class="diff-chg">
+with
+a
+label
+that
+is
+not
+an
+IRI
+</ins></li></ol><p><ins class="diff-chg">
+Note
+that
+the
+definition
+for
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a><ins class="diff-chg">
+above
+is
+silent
+on
+the
+topic
+of
+unlabeled
+nodes.
+Unlabeled
+nodes
+are
+not
+considered
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a>.<ins class="diff-chg">
+However,
+this
+specification
+allows
+for
+the
+expression
+of
+unlabled
+nodes,
+as
+most
+graph-based
+data
+sets
+on
+the
+Web
+contain
+a
+number
+of
+associated
+nodes
+that
+are
+not
+named
+and
+thus
+are
+not
+directly
+de-referenceable.
+</ins></p></div><div id="linking-data" class="section"><h3><span class="secno"><ins class="diff-chg">
+2.3
+</ins></span><ins class="diff-chg">
+Linking
+Data
+</ins>
+</h3>
+<p>
+An
+Internationalized
+Resource
+Identifier
+(
+<dfn title="IRI" id="dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+<del class="diff-old">)
+</del>
+<ins class="diff-chg">),
+</ins>
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+],
+is
+a
+mechanism
+for
+representing
+unique
+identifiers
+on
+the
+web.
+In
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+<del class="diff-old">Data,
+IRIs
+(or
+URI
+references)
+are
+</del>
+<ins class="diff-chg">Data
+</ins></a>,<ins class="diff-chg">
+an
+IRI
+is
+</ins>
+commonly
+used
+for
+<del class="diff-old">describing
+entities
+and
+properties.
+</del>
+<ins class="diff-chg">expressing
+a
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><ins class="diff-chg">
+or
+an
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a>.
+</p>
+<p>
+<del class="diff-old">Establishing
+</del>
+<ins class="diff-chg">JSON-LD
+defines
+</ins>
+a
+mechanism
+to
+map
+JSON
+values
+to
+<del class="diff-old">IRIs
+will
+help
+in
+the
+mapping
+of
+JSON
+objects
+to
+RDF.
+</del>
+<ins class="diff-chg">IRIs.
+</ins>
+This
+does
+not
+mean
+that
+JSON-LD
+<del class="diff-old">must
+</del>
+<ins class="diff-chg">requires
+every
+key
+or
+value
+to
+</ins>
+be
+<del class="diff-old">restrictive
+in
+declaring
+a
+set
+of
+terms,
+rather,
+experimentation
+</del>
+<ins class="diff-chg">an
+IRI,
+but
+rather
+ensures
+that
+keys
+</ins>
+and
+<del class="diff-old">innovation
+should
+</del>
+<ins class="diff-chg">values
+can
+</ins>
+be
+<del class="diff-old">supported
+as
+part
+of
+</del>
+<ins class="diff-chg">mapped
+to
+IRIs
+if
+</ins>
+the
+<del class="diff-old">core
+design
+of
+JSON-LD.
+</del>
+<ins class="diff-chg">developer
+so
+desires
+to
+transform
+their
+data
+into
+Linked
+Data.
+</ins>
+There
+<del class="diff-old">are,
+however,
+</del>
+<ins class="diff-chg">are
+</ins>
+a
+<del class="diff-old">number
+of
+very
+small
+design
+criteria
+</del>
+<ins class="diff-chg">few
+techniques
+</ins>
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+<del class="diff-old">RDF
+data
+that
+will
+create
+value
+</del>
+<ins class="diff-chg">Linked
+Data
+</ins>
+for
+the
+<del class="diff-old">greater
+semantic
+web
+community
+and
+JSON/REST-based
+Web
+Services
+community.
+</del>
+<ins class="diff-chg">Web.
+JSON-LD
+formalizes
+those
+techniques.
+</ins>
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">markup
+</ins>
+as
+the
+example
+for
+<ins class="diff-new">the
+rest
+of
+</ins>
+this
+section:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "a": "Person",
+</del>
+  "name": "Manu Sporny",
+<del class="diff-old">  "homepage": "http://manu.sporny.org/"
+</del>
+<ins class="diff-chg">  "homepage": "http://manu.sporny.org/",
+</ins>
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<div id="the-context" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">2.3
+</del>
+<ins class="diff-chg">2.4
+</ins>
+</span>
+The
+<del class="diff-old">JSON-LD
+</del>
+Context
+</h3>
+<p>
+<del class="diff-old">A
+</del>
+<ins class="diff-chg">In
+JSON-LD,
+a
+</ins>
+context
+is
+used
+to
+allow
+developers
+to
+<del class="diff-old">use
+aliases
+for
+</del>
+<ins class="diff-chg">map
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s
+to
+</ins>
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s.
+<ins class="diff-new">A
+</ins><dfn title="term" id="dfn-term"><ins class="diff-new">
+term
+</ins></dfn><ins class="diff-new">
+is
+a
+short
+word
+that
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+be
+expanded
+to
+an
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a>.
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+<del class="diff-old">terms
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+s
+</ins>
+mean
+<del class="diff-old">something,
+which
+you
+will
+eventually
+want
+to
+query.
+A
+context
+allows
+the
+expression
+of
+a
+number
+</del>
+<ins class="diff-chg">something
+that
+may
+be
+</ins>
+of
+<del class="diff-old">terms
+which
+map
+directly
+</del>
+<ins class="diff-chg">use
+</ins>
+to
+<del class="diff-old">IRI
+s.
+</del>
+<ins class="diff-chg">other
+developers.
+</ins>
+For
+example,
+the
+term
+<code>
+name
+</code>
+may
+map
+directly
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+allows
+JSON-LD
+documents
+to
+be
+constructed
+using
+<ins class="diff-new">the
+</ins>
+common
+JSON
+<del class="diff-old">syntax
+</del>
+<ins class="diff-chg">practice
+</ins>
+of
+<del class="diff-old">using
+</del>
+simple
+name/value
+<del class="diff-old">pairs.
+</del>
+<ins class="diff-chg">pairs
+while
+ensuring
+that
+the
+data
+is
+useful
+outside
+of
+the
+database
+or
+page
+in
+which
+it
+resides.
+</ins>
+</p>
+<p>
+<del class="diff-old">To
+reduce
+</del>
+<ins class="diff-chg">These
+Linked
+Data
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s
+are
+typically
+collected
+in
+a
+context
+and
+then
+used
+by
+adding
+a
+single
+line
+to
+</ins>
+the
+<del class="diff-old">number
+of
+different
+</del>
+<ins class="diff-chg">JSON
+markup
+above:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+</ins>  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span><ins class="diff-chg">
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</ins></pre><p><ins class="diff-chg">
+The
+addition
+above
+transforms
+the
+previous
+JSON
+document
+into
+a
+JSON
+document
+with
+added
+semantics
+because
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+specifies
+how
+the
+</ins><strong><ins class="diff-chg">
+name
+</ins></strong>,<strong><ins class="diff-chg">
+homepage
+</ins></strong>,<ins class="diff-chg">
+and
+</ins><strong><ins class="diff-chg">
+avatar
+</ins></strong>
+terms
+<del class="diff-old">that
+must
+be
+defined,
+JSON-LD
+also
+</del>
+<ins class="diff-chg">map
+to
+IRIs.
+Mapping
+those
+keys
+to
+IRIs
+gives
+the
+data
+global
+context.
+If
+two
+developers
+use
+the
+same
+IRI
+to
+describe
+a
+property,
+they
+are
+more
+than
+likely
+expressing
+the
+same
+concept.
+This
+</ins>
+allows
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">both
+developers
+</ins>
+to
+<del class="diff-old">be
+used
+</del>
+<ins class="diff-chg">re-use
+each
+others
+data
+without
+having
+</ins>
+to
+<del class="diff-old">expand
+Compact
+URIs
+(
+CURIE
+).
+</del>
+<ins class="diff-chg">agree
+to
+how
+their
+data
+will
+inter-operate
+on
+a
+site-by-site
+basis.
+</ins></p><p>
+The
+semantic
+web
+<del class="diff-old">specifies
+this
+via
+</del>
+<ins class="diff-chg">uses
+a
+special
+type
+of
+document
+called
+a
+</ins>
+<em>
+<ins class="diff-new">Web
+</ins>
+Vocabulary
+<del class="diff-old">Documents
+,
+in
+which
+</del>
+</em>
+<ins class="diff-chg">to
+define
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s.
+A
+context
+is
+</ins>
+a
+<ins class="diff-new">type
+of
+Web
+vocabulary.
+Typically,
+these
+Web
+Vocabulary
+documents
+have
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+<del class="diff-old">is
+</del>
+</a>
+<ins class="diff-chg">es
+</ins>
+associated
+with
+<del class="diff-old">a
+document,
+</del>
+<ins class="diff-chg">them
+</ins>
+and
+<ins class="diff-new">contain
+</ins>
+a
+<del class="diff-old">suffix
+</del>
+<ins class="diff-chg">number
+of
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+declarations.
+A
+</ins><dfn title="prefix" id="dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></dfn>,<ins class="diff-chg">
+like
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a>,
+is
+<del class="diff-old">used
+</del>
+<ins class="diff-chg">a
+short
+word
+that
+expands
+</ins>
+to
+<del class="diff-old">create
+an
+IRI
+based
+on
+this
+</del>
+<ins class="diff-chg">a
+Web
+Vocabulary
+IRI.
+</ins><a class="tref internalDFN" title="Prefix" href="#dfn-prefix"><ins class="diff-chg">
+Prefix
+</ins></a><ins class="diff-chg">
+es
+are
+helpful
+when
+a
+developer
+wants
+to
+mix
+multiple
+vocabularies
+together
+in
+a
+context,
+but
+does
+not
+want
+to
+go
+to
+the
+trouble
+of
+defining
+every
+single
+term
+in
+every
+single
+</ins>
+vocabulary.
+<ins class="diff-new">Some
+Web
+Vocabularies
+may
+have
+10-20
+terms
+defined.
+If
+a
+developer
+wants
+to
+use
+3-4
+different
+vocabularies,
+the
+number
+of
+terms
+that
+would
+have
+to
+be
+declared
+in
+a
+single
+context
+would
+become
+quite
+large.
+To
+reduce
+the
+number
+of
+different
+terms
+that
+must
+be
+defined,
+JSON-LD
+also
+allows
+prefixes
+to
+be
+used
+to
+compact
+IRIs.
+</ins></p><p></p><p>
+For
+example,
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/
+</code>
+specifies
+a
+<ins class="diff-new">Web
+</ins>
+Vocabulary
+<del class="diff-old">Document,
+and
+</del>
+<ins class="diff-chg">which
+may
+be
+represented
+using
+the
+</ins><code><ins class="diff-chg">
+foaf
+</ins></code><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a>.<ins class="diff-chg">
+The
+</ins><code><ins class="diff-chg">
+foaf
+</ins></code><ins class="diff-chg">
+Web
+Vocabulary
+contains
+a
+term
+called
+</ins><strong><ins class="diff-chg">
+name
+</ins></strong>.<ins class="diff-chg">
+If
+you
+join
+the
+</ins><code><ins class="diff-chg">
+foaf
+</ins></code><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+with
+the
+</ins>
+<strong>
+name
+</strong>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">suffix,
+you
+can
+build
+</ins>
+a
+<del class="diff-old">term
+in
+</del>
+<ins class="diff-chg">compact
+IRI
+</ins>
+that
+<del class="diff-old">vocabulary.
+Join
+the
+two
+items
+together
+and
+you
+have
+</del>
+<ins class="diff-chg">will
+expand
+out
+into
+</ins>
+an
+<del class="diff-old">unambiguous
+identifier
+</del>
+<ins class="diff-chg">absolute
+IRI
+</ins>
+for
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">the
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/name
+</ins></code>
+vocabulary
+term.
+<del class="diff-old">The
+Compact
+URI
+Expression,
+</del>
+<ins class="diff-chg">That
+is,
+the
+compact
+IRI,
+</ins>
+or
+short-form,
+is
+<code>
+foaf:name
+</code>
+and
+the
+expanded-form
+is
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+vocabulary
+term
+<del class="diff-old">identifies
+the
+given
+name
+for
+something,
+for
+example
+-
+</del>
+<ins class="diff-chg">is
+used
+to
+specify
+</ins>
+a
+person's
+name.
+</p>
+<p>
+Developers,
+and
+machines,
+<del class="diff-old">would
+be
+</del>
+<ins class="diff-chg">are
+</ins>
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+<del class="diff-old">Machines
+</del>
+<ins class="diff-chg">Developers
+and
+machines
+</ins>
+need
+the
+same
+sort
+of
+dictionary
+of
+<del class="diff-old">terms,
+and
+URIs
+</del>
+<ins class="diff-chg">terms.
+IRIs
+</ins>
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+The
+context
+provides
+a
+collection
+of
+vocabulary
+<del class="diff-old">terms
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+s
+and
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+es
+</ins>
+that
+can
+be
+used
+<del class="diff-old">for
+a
+</del>
+<ins class="diff-chg">to
+expand
+</ins>
+JSON
+<del class="diff-old">object.
+</del>
+<ins class="diff-chg">keys
+and
+values
+into
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
+IRI
+</ins></a><ins class="diff-chg">
+s.
+</ins>
+</p>
+<div id="inside-a-context" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">2.4
+</del>
+<ins class="diff-chg">2.4.1
+</ins>
+</span>
+<del class="diff-old">Unambiguous
+Identifiers
+for
+JSON
+If
+a
+set
+of
+terms,
+like
+Person
+,
+name
+,
+and
+homepage
+,
+are
+defined
+in
+</del>
+<ins class="diff-chg">Inside
+</ins>
+a
+<del class="diff-old">context,
+and
+that
+context
+is
+used
+to
+resolve
+</del>
+<ins class="diff-chg">Context
+</ins></h4><p><ins class="diff-chg">
+In
+</ins>
+the
+<del class="diff-old">names
+in
+JSON
+objects,
+machines
+could
+automatically
+expand
+</del>
+<ins class="diff-chg">previous
+section,
+</ins>
+the
+<del class="diff-old">terms
+</del>
+<ins class="diff-chg">developer
+used
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code><ins class="diff-chg">
+keyword
+</ins>
+to
+<ins class="diff-new">pull
+in
+an
+external
+context.
+That
+context
+document,
+if
+de-referenced,
+would
+look
+</ins>
+something
+<del class="diff-old">meaningful
+and
+unambiguous,
+</del>
+like
+this:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "",
+  "": "Manu Sporny",
+  "": "http://manu.sporny.org"
+  "": "http://twitter.com/account/profile_image/manusporny"
+</del>
+<ins class="diff-chg">    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">Doing
+this
+would
+mean
+that
+JSON
+would
+start
+to
+become
+unambiguously
+machine-readable,
+play
+well
+with
+the
+semantic
+web,
+and
+basic
+markup
+wouldn't
+be
+that
+much
+more
+complex
+than
+basic
+JSON
+markup.
+</del>
+A
+<del class="diff-old">win,
+all
+around.
+2.5
+Mashing
+Up
+Vocabularies
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+RDF
+-
+for
+describing
+information
+about
+objects
+on
+the
+semantic
+web.
+RDFS
+-
+for
+expressing
+things
+like
+labels
+and
+comments.
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+FOAF
+-
+for
+describing
+social
+networks.
+Calendar
+-
+for
+specifying
+events.
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+GEO
+-
+for
+describing
+geographic
+location.
+VCard
+-
+for
+describing
+organizations
+and
+people.
+DOAP
+-
+for
+describing
+projects.
+Since
+these
+vocabularies
+are
+very
+popular,
+they
+are
+pre-defined
+in
+something
+called
+the
+default
+</del>
+<ins class="diff-chg">JSON-LD
+</ins>
+context
+<del class="diff-old">,
+which
+</del>
+<ins class="diff-chg">document
+</ins>
+is
+a
+<del class="diff-old">set
+of
+vocabulary
+prefixes
+that
+are
+pre-loaded
+in
+all
+JSON-LD
+processors.
+The
+contents
+of
+the
+default
+context
+</del>
+<ins class="diff-chg">simple
+mapping
+from
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins>
+</a>
+<del class="diff-old">are
+provided
+later
+in
+this
+document.
+Using
+the
+default
+context
+</del>
+<ins class="diff-chg">s
+and
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins>
+</a>
+<del class="diff-old">allows
+developers
+</del>
+<ins class="diff-chg">es
+</ins>
+to
+<del class="diff-old">express
+data
+unambiguously,
+like
+so:
+{
+  "",
+  "": "Manu Sporny",
+  "": "http://manu.sporny.org/",
+  "": "http://twitter.com/account/profile_image/manusporny"
+}
+Developers
+can
+</del>
+<ins class="diff-chg">expanded
+values
+such
+as
+IRIs
+or
+keywords.
+Contexts
+may
+</ins>
+also
+<del class="diff-old">specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+active
+context
+</del>
+<ins class="diff-chg">contain
+datatype
+information
+for
+certain
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins>
+</a>
+<del class="diff-old">in-line
+using
+the
+@context
+keyword,
+like
+so:
+{
+  ,
+  "a": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny",
+  "myvocab:personality": "friendly"
+}
+The
+@context
+keyword
+is
+used
+to
+change
+how
+the
+JSON-LD
+processor
+evaluates
+key-value
+pairs.
+In
+this
+case,
+it
+was
+used
+to
+map
+one
+string
+('myvocab')
+to
+another
+string,
+which
+is
+interpreted
+</del>
+<ins class="diff-chg">s
+</ins>
+as
+<del class="diff-old">a
+IRI
+.
+In
+the
+example
+above,
+the
+myvocab
+string
+is
+replaced
+with
+"
+http://example.org/myvocab#
+"
+when
+it
+is
+detected.
+In
+</del>
+<ins class="diff-chg">well
+as
+other
+processing
+instructions
+for
+</ins>
+the
+<del class="diff-old">example
+above,
+"
+myvocab:personality
+"
+would
+expand
+to
+"
+http://example.org/myvocab#personality
+".
+</del>
+<ins class="diff-chg">JSON-LD
+processor.
+</ins>
+</p>
+<p>
+<ins class="diff-new">Contexts
+may
+be
+specified
+in-line.
+</ins>
+This
+<del class="diff-old">mechanism
+is
+a
+short-hand
+for
+RDF,
+called
+</del>
+<ins class="diff-chg">ensures
+that
+JSON-LD
+documents
+can
+be
+processed
+when
+</ins>
+a
+<del class="diff-old">CURIE,
+and
+provides
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+</del>
+<ins class="diff-chg">JSON-LD
+processor
+does
+not
+have
+access
+</ins>
+to
+<del class="diff-old">RDF.
+</del>
+<ins class="diff-chg">the
+Web.
+</ins>
+</p>
+<del class="diff-old">2.6
+An
+Example
+of
+a
+Context
+</del>
+<p>
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+<ins class="diff-new">This
+means
+that
+developers
+can
+also
+specify
+a
+context
+for
+JSON
+data
+in
+an
+out-of-band
+fashion
+via
+the
+API.
+The
+API
+is
+described
+later
+in
+this
+document.
+</ins>
+A
+JSON-LD
+aware
+Web
+Service
+<em class="rfc2119" title="may">
+may
+</em>
+<ins class="diff-new">also
+</ins>
+define
+a
+<del class="diff-old">known
+context.
+For
+example,
+the
+following
+default
+</del>
+context
+<del class="diff-old">could
+apply
+to
+all
+incoming
+Web
+Service
+calls
+previously
+accepting
+only
+JSON
+data:
+{
+  "@context": 
+  {
+    "@vocab": "http://example.org/default-vocab#",
+    "@base": "http://example.org/baseurl/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dc": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "cc": "http://creativecommons.org/ns#",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "vcard": "http://www.w3.org/2006/vcard/ns#",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "Person": "http://xmlns.com/foaf/0.1/Person",
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+}
+The
+@vocab
+string
+is
+a
+special
+keyword
+that
+states
+</del>
+that
+<del class="diff-old">any
+term
+that
+doesn't
+resolve
+to
+a
+term
+or
+a
+prefix
+should
+</del>
+<ins class="diff-chg">will
+</ins>
+be
+<del class="diff-old">appended
+</del>
+<ins class="diff-chg">pre-loaded
+for
+all
+calls
+</ins>
+to
+the
+<del class="diff-old">@vocab
+IRI.
+</del>
+<ins class="diff-chg">service.
+</ins>
+This
+<del class="diff-old">is
+done
+to
+ensure
+that
+terms
+can
+be
+transformed
+to
+an
+IRI
+at
+all
+times.
+The
+@base
+string
+is
+a
+special
+keyword
+that
+states
+</del>
+<ins class="diff-chg">allows
+services
+</ins>
+that
+<del class="diff-old">any
+relative
+IRI
+must
+be
+appended
+to
+the
+string
+specified
+by
+@base
+.
+The
+@coerce
+keyword
+is
+used
+to
+specify
+type
+coercion
+rules
+for
+the
+data.
+For
+each
+key
+in
+the
+map,
+the
+key
+is
+the
+type
+to
+be
+coerced
+to
+</del>
+<ins class="diff-chg">have
+previously
+been
+publishing
+</ins>
+and
+<del class="diff-old">the
+value
+is
+the
+vocabulary
+term
+</del>
+<ins class="diff-chg">receiving
+JSON
+data
+</ins>
+to
+<del class="diff-old">be
+coerced.
+Type
+coercion
+for
+the
+key
+xsd:anyURI
+asserts
+that
+all
+vocabulary
+terms
+listed
+should
+undergo
+coercion
+</del>
+<ins class="diff-chg">accept
+JSON-LD
+data
+without
+requiring
+client
+software
+</ins>
+to
+<del class="diff-old">an
+IRI,
+including
+@base
+processing
+for
+relative
+IRIs
+and
+CURIE
+processing
+for
+compact
+URI
+Expressions
+such
+as
+foaf:homepage
+.
+</del>
+<ins class="diff-chg">change.
+</ins>
+</p>
+</div>
+</div>
+<div id="from-json-to-json-ld" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">3.
+</del>
+<ins class="diff-chg">2.5
+</ins>
+</span>
+<del class="diff-old">Markup
+Examples
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+</del>
+<ins class="diff-chg">From
+JSON
+</ins>
+to
+<del class="diff-old">express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+</del>
+JSON-LD
+<del class="diff-old">is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+3.1
+RDFa
+</del>
+</h3>
+<p>
+<del class="diff-old">The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+</del>
+<ins class="diff-chg">If
+a
+set
+of
+terms
+such
+as,
+</ins><strong><ins class="diff-chg">
+name
+</ins></strong>,<strong><ins class="diff-chg">
+homepage
+</ins></strong>,
+and
+<del class="diff-old">homepages.
+&lt;div &gt;
+   &lt;ul&gt;
+      &lt;li &gt;
+        &lt;a &gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li &gt;
+        &lt;a &gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li &gt;
+        &lt;a &gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+</del>
+<strong>
+<ins class="diff-chg">avatar
+</ins></strong>,
+are
+<del class="diff-old">other
+ways
+to
+mark-up
+this
+information
+such
+</del>
+<ins class="diff-chg">defined
+in
+a
+context,
+and
+</ins>
+that
+<del class="diff-old">the
+</del>
+context
+is
+<del class="diff-old">not
+repeated.
+[
+ {
+   "@": "_:bnode1",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/bob/",
+   "foaf:name": "Bob"
+ },
+ {
+   "@": "_:bnode2",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/eve/",
+   "foaf:name": "Eve"
+ },
+ {
+   "@": "_:bnode3",
+   "a": "foaf:Person",
+   "foaf:homepage": "http://example.com/manu/",
+   "foaf:name": "Manu"
+ }
+]
+3.2
+Microformats
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+</del>
+<ins class="diff-chg">used
+</ins>
+to
+<del class="diff-old">express
+how
+</del>
+<ins class="diff-chg">resolve
+</ins>
+the
+<del class="diff-old">Microformat
+is
+represented
+</del>
+<ins class="diff-chg">names
+</ins>
+in
+<del class="diff-old">JSON-LD.
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+The
+representation
+of
+the
+hCard
+expresses
+</del>
+<ins class="diff-chg">JSON
+objects,
+machines
+are
+able
+to
+automatically
+expand
+</ins>
+the
+<del class="diff-old">Microformat
+</del>
+terms
+<del class="diff-old">in
+the
+context
+and
+uses
+them
+directly
+for
+the
+url
+and
+fn
+properties.
+Also
+note
+that
+the
+Microformat
+</del>
+to
+<del class="diff-old">JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+http://tantek.com
+.
+</del>
+<ins class="diff-chg">something
+meaningful
+and
+unambiguous,
+like
+this:
+</ins>
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@": "_:bnode1",
+  "a": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+</del>
+<ins class="diff-chg">  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+</ins>
+}
+</pre>
+<del class="diff-old">3.3
+Microdata
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</del>
+<p>
+<del class="diff-old">Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+</del>
+<ins class="diff-chg">Doing
+this
+allows
+JSON
+</ins>
+to
+<del class="diff-old">avoid
+contexts
+and
+instead
+refer
+</del>
+<ins class="diff-chg">be
+unambiguously
+machine-readable
+without
+requiring
+developers
+that
+use
+JSON
+</ins>
+to
+<del class="diff-old">items
+by
+</del>
+<ins class="diff-chg">drastically
+change
+</ins>
+their
+<del class="diff-old">full
+IRI.
+</del>
+<ins class="diff-chg">workflow.
+</ins>
+</p>
+<del class="diff-old">[
+  {
+    "@": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "a": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "a": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]
+</del>
+</div>
+</div>
+<div id="basic-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">3.
+</ins>
+</span>
+<del class="diff-old">Markup
+of
+RDF
+</del>
+<ins class="diff-chg">Basic
+</ins>
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+<del class="diff-old">most
+</del>
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+<del class="diff-old">Javascript
+objects
+</del>
+<ins class="diff-chg">regular
+JSON
+markup
+</ins>
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+<del class="diff-old">Since
+RDF
+is
+also
+an
+important
+sub-community
+of
+the
+Linked
+Data
+movement,
+it
+is
+important
+that
+all
+RDF
+concepts
+</del>
+<ins class="diff-chg">As
+more
+JSON-LD
+features
+</ins>
+are
+<del class="diff-old">well-represented
+in
+this
+specification.
+This
+section
+details
+how
+each
+RDF
+concept
+can
+be
+expressed
+in
+JSON-LD.
+</del>
+<ins class="diff-chg">used,
+more
+semantics
+are
+added
+to
+the
+JSON
+markup.
+</ins>
+</p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">3.1
+</ins>
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+<del class="diff-old">subjects
+</del>
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+<ins class="diff-chg">subject
+</ins></a><ins class="diff-chg">
+s
+</ins>
+and
+many
+<del class="diff-old">objects
+</del>
+<a class="tref internalDFN" title="object" href="#dfn-object">
+<ins class="diff-chg">object
+</ins></a>
+are
+<del class="diff-old">identified.
+</del>
+<ins class="diff-chg">named.
+</ins>
+IRIs
+can
+be
+expressed
+in
+a
+variety
+of
+different
+ways
+in
+JSON-LD.
+</p>
+<ol>
+<li>
+In
+general,
+<del class="diff-old">an
+IRI
+is
+generated
+if
+it
+is
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+s
+</ins>
+in
+the
+key
+position
+in
+an
+associative
+<del class="diff-old">array.
+</del>
+<ins class="diff-chg">array
+that
+have
+a
+mapping
+to
+an
+IRI
+or
+another
+key
+in
+the
+context
+are
+expanded
+to
+an
+IRI
+by
+JSON-LD
+processors.
+</ins>
+There
+are
+special
+rules
+for
+processing
+keys
+in
+<code>
+@context
+</code>
+and
+when
+dealing
+with
+keys
+that
+start
+with
+the
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>
+character.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>,
+if
+it
+is
+a
+string.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+the
+<code>
+@iri
+</code>
+keyword.
+</li>
+<li>
+An
+IRI
+is
+generated
+when
+there
+are
+<code>
+@coerce
+</code>
+rules
+in
+effect
+for
+<del class="diff-old">xsd:anyURI
+for
+</del>
+a
+<del class="diff-old">particular
+vocabulary
+term.
+</del>
+<ins class="diff-chg">key
+named
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code>.
+</li>
+</ol>
+<p>
+<del class="diff-old">An
+example
+of
+IRI
+generation
+for
+a
+</del>
+<ins class="diff-chg">IRIs
+can
+be
+expressed
+directly
+in
+the
+</ins>
+key
+<del class="diff-old">outside
+of
+a
+@context
+:
+</del>
+<ins class="diff-chg">position
+like
+so:
+</ins>
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+In
+the
+example
+above,
+the
+key
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+is
+interpreted
+as
+an
+IRI,
+as
+opposed
+to
+being
+interpreted
+as
+a
+string..
+</p>
+<p>
+Term
+expansion
+occurs
+for
+IRIs
+if
+a
+term
+is
+defined
+within
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>:
+</p>
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+<del class="diff-old">CURIE
+expansion
+also
+occurs
+for
+keys
+</del>
+<a class="tref internalDFN" title="Prefix" href="#dfn-prefix">
+<ins class="diff-chg">Prefix
+</ins></a><ins class="diff-chg">
+es
+are
+expanded
+when
+used
+</ins>
+in
+<del class="diff-old">JSON-LD:
+</del>
+<ins class="diff-chg">keys:
+</ins>
+</p>
+<pre class="example">
+{
+<ins class="diff-new">  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
+</ins>
+...
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+<code>
+foaf:name
+</code>
+above
+will
+automatically
+expand
+out
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+</p>
+<p>
+An
+IRI
+is
+generated
+when
+a
+value
+is
+associated
+with
+a
+key
+using
+the
+<code>
+@iri
+</code>
+keyword:
+</p>
+<pre class="example">
+{
+...
+  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}
+</pre>
+<p>
+If
+type
+coercion
+rules
+are
+specified
+in
+the
+<code>
+@context
+</code>
+for
+a
+particular
+vocabulary
+term,
+an
+IRI
+is
+generated:
+</p>
+<pre class="example">
+{<span class="diff">
+  "@context": 
+<del class="diff-old">  { 
+</del>
+<ins class="diff-chg">  {
+    ...
+</ins>
+    "@coerce": 
+    {
+<del class="diff-old">      "xsd:anyURI": "foaf:homepage"
+    } 
+</del>
+<ins class="diff-chg">      "@iri": "foaf:homepage"
+    }
+</ins>
+  }</span>
+...
+<del class="diff-old">  "foaf:homepage": "http://manu.sporny.org",
+</del>
+<ins class="diff-chg">  "foaf:homepage": "http://manu.sporny.org/",
+</ins>
+...
+}
+</pre>
+<p>
+<ins class="diff-new">Even
+though
+the
+value
+</ins><code><ins class="diff-new">
+http://manu.sporny.org/
+</ins></code><ins class="diff-new">
+is
+a
+string,
+the
+type
+coercion
+rules
+will
+transform
+the
+value
+into
+an
+IRI
+when
+processed
+by
+a
+JSON-LD
+Processor
+</ins></p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">3.2
+</ins>
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+A
+subject
+is
+declared
+using
+the
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+property,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "",
+</del>
+<ins class="diff-chg">  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
+</ins>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+the
+IRI
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">3.3
+</ins>
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+type-url).
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "@": "http://example.org/people#joebob",
+  "",
+</del>
+<ins class="diff-chg">  "@subject": "http://example.org/people#joebob",
+  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+</ins>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+<ins class="diff-new">if
+the
+JSON-LD
+document
+is
+mapped
+to
+RDF
+</ins>
+(in
+N-Triples
+notation):
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+</div>
+<div id="strings" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">3.4
+</ins>
+</span>
+<del class="diff-old">Plain
+Literals
+</del>
+<ins class="diff-chg">Strings
+</ins>
+</h3>
+<p>
+Regular
+text
+<del class="diff-old">strings
+are
+called
+a
+</del>
+<ins class="diff-chg">strings,
+also
+refered
+to
+as
+</ins>
+<dfn title="plain_literal" id="dfn-plain_literal">
+plain
+literal
+</dfn>
+<del class="diff-old">in
+RDF
+and
+</del>
+<ins class="diff-chg">s,
+</ins>
+are
+easily
+expressed
+using
+regular
+JSON
+strings.
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}
+</pre>
+</div>
+<div id="string-internationalization" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">3.5
+</ins>
+</span>
+<del class="diff-old">Language
+Specification
+in
+Plain
+Literals
+</del>
+<ins class="diff-chg">String
+Internationalization
+</ins>
+</h3>
+<p>
+JSON-LD
+makes
+an
+assumption
+that
+<del class="diff-old">plain
+literal
+s
+</del>
+<ins class="diff-chg">strings
+</ins>
+with
+associated
+language
+encoding
+information
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">are
+</ins>
+not
+very
+common
+when
+used
+in
+JavaScript
+and
+Web
+Services.
+Thus,
+it
+takes
+a
+little
+more
+effort
+to
+express
+<del class="diff-old">plain
+literals
+in
+a
+specified
+language.
+</del>
+<ins class="diff-chg">strings
+with
+associated
+language
+information.
+</ins>
+</p>
+<pre class="example">
+{
+...
+  "foaf:name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+for
+<em>
+花澄
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+<del class="diff-old">tag
+</del>
+<ins class="diff-chg">code
+</ins>
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="datatypes" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">3.6
+</ins>
+</span>
+<del class="diff-old">Typed
+Literals
+</del>
+<ins class="diff-chg">Datatypes
+</ins>
+</h3>
+<p>
+A
+<ins class="diff-new">value
+with
+an
+associated
+datatype,
+also
+known
+as
+a
+</ins>
+<dfn title="typed_literal" id="dfn-typed_literal">
+typed
+literal
+</dfn>,
+is
+indicated
+by
+<del class="diff-old">attaching
+a
+IRI
+to
+the
+end
+of
+</del>
+<ins class="diff-chg">associating
+</ins>
+a
+<del class="diff-old">plain
+</del>
+literal
+<del class="diff-old">,
+and
+this
+</del>
+<ins class="diff-chg">with
+an
+</ins>
+IRI
+<ins class="diff-new">which
+</ins>
+indicates
+the
+<ins class="diff-new">typed
+</ins>
+literal's
+datatype.
+<del class="diff-old">Literals
+</del>
+<ins class="diff-chg">Typed
+literals
+</ins>
+may
+be
+<del class="diff-old">typed
+</del>
+<ins class="diff-chg">expressed
+</ins>
+in
+JSON-LD
+in
+three
+ways:
+</p>
+<ol>
+<li>
+By
+utilizing
+the
+<code>
+@coerce
+</code>
+keyword.
+</li>
+<li>
+By
+utilizing
+the
+expanded
+form
+for
+specifying
+objects.
+</li>
+<li>
+By
+using
+a
+native
+JSON
+datatype.
+</li>
+</ol>
+<p>
+The
+first
+example
+uses
+the
+<code>
+@coerce
+</code>
+keyword
+to
+express
+a
+typed
+literal:
+</p>
+<pre class="example">
+{<span class="diff">
+  "@context": 
+<del class="diff-old">  { 
+</del>
+<ins class="diff-chg">  {
+    "dc":  "http://purl.org/dc/terms/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#"
+</ins>
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }</span>
+...
+  "dc:modified": "2010-05-29T14:17:39+02:00",
+...
+}
+</pre>
+<p>
+The
+second
+example
+uses
+the
+expanded
+form
+for
+specifying
+objects:
+</p>
+<pre class="example">
+{
+...
+  "dc:modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }</span>
+...
+}
+</pre>
+<p>
+Both
+examples
+above
+would
+generate
+an
+object
+with
+the
+literal
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+<p>
+<ins class="diff-new">The
+third
+example
+uses
+a
+built-in
+native
+JSON
+type,
+a
+number,
+to
+express
+a
+datatype:
+</ins></p><pre class="example"><ins class="diff-new">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:age": <span class="diff">31</span>
+...
+}
+</ins></pre><p><ins class="diff-new">
+The
+example
+above
+would
+generate
+the
+following
+triple:
+</ins></p><pre class="example"><ins class="diff-new">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/age&gt; 
+"31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
+.
+</ins></pre>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.7
+</del>
+<ins class="diff-chg">3.7
+</ins>
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+arrays.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+array.
+</p>
+<p class="note">
+<ins class="diff-new">In
+JSON-LD,
+Multiple
+objects
+on
+a
+property
+are
+not
+ordered.
+This
+is
+because
+typically
+graphs
+are
+not
+inherently
+ordered
+data
+structures.
+To
+see
+more
+on
+creating
+ordered
+collections
+in
+JSON-LD,
+see
+</ins><a href="#lists"><ins class="diff-new">
+Lists
+</ins></a>.</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "@": "http://example.org/people#joebob",
+</del>
+<ins class="diff-chg">  "@subject": "http://example.org/people#joebob",
+</ins>
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+"jaybee"
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">3.8
+</ins>
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s
+may
+also
+be
+expressed
+using
+the
+expanded
+form
+for
+objects:
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "@": "http://example.org/articles/8",
+</del>
+<ins class="diff-chg">  "@subject": "http://example.org/articles/8",
+</ins>
+  "dcterms:modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]</span>
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="expansion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">3.9
+</ins>
+</span>
+<del class="diff-old">Blank
+Nodes
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</h3>
+<p>
+<del class="diff-old">At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+</del>
+<ins class="diff-chg">Expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+all
+IRI,
+datatypes,
+and
+literal
+values
+are
+expanded
+so
+that
+the
+context
+is
+no
+longer
+necessary.
+JSON-LD
+document
+expansion
+is
+typically
+used
+when
+re-mapping
+JSON-LD
+documents
+</ins>
+to
+<del class="diff-old">specify
+</del>
+<ins class="diff-chg">application-specific
+JSON
+documents
+or
+as
+a
+part
+of
+</ins>
+the
+<del class="diff-old">subject.
+Typically,
+this
+</del>
+<a href="#normalization">
+<ins class="diff-chg">Normalization
+</ins></a><ins class="diff-chg">
+process.
+</ins></p><p><ins class="diff-chg">
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}
+</ins></pre><p><ins class="diff-chg">
+Running
+the
+JSON-LD
+Expansion
+algorithm
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}
+</ins></pre></div><div id="compaction" class="section"><h3><span class="secno"><ins class="diff-chg">
+3.10
+</ins></span><ins class="diff-chg">
+Compaction
+</ins></h3><p><ins class="diff-chg">
+Compaction
+</ins>
+is
+<del class="diff-old">where
+blank
+nodes
+come
+into
+play.
+In
+JSON-LD,
+blank
+node
+identifiers
+</del>
+<ins class="diff-chg">the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+the
+most
+compact
+form
+of
+the
+document
+is
+generated.
+JSON
+is
+typically
+expressed
+in
+a
+very
+compact,
+key-value
+format.
+That
+is,
+full
+IRIs
+</ins>
+are
+<del class="diff-old">automatically
+created
+if
+</del>
+<ins class="diff-chg">rarely
+used
+as
+keys.
+At
+times,
+</ins>
+a
+<del class="diff-old">subject
+</del>
+<ins class="diff-chg">JSON-LD
+document
+may
+be
+received
+that
+</ins>
+is
+not
+<del class="diff-old">specified
+using
+</del>
+<ins class="diff-chg">in
+its
+most
+compact
+form.
+JSON-LD,
+via
+</ins>
+the
+<del class="diff-old">@
+keyword.
+However,
+authors
+may
+name
+blank
+nodes
+by
+using
+</del>
+<ins class="diff-chg">API,
+provides
+a
+way
+to
+compact
+a
+JSON-LD
+document.
+</ins></p><p><ins class="diff-chg">
+For
+example,
+assume
+</ins>
+the
+<del class="diff-old">special
+_
+CURIE
+prefix.
+</del>
+<ins class="diff-chg">following
+JSON-LD
+input
+document:
+</ins>
+</p>
+<pre class="example">
+{
+<del class="diff-old">...
+  "@": "",
+...
+</del>
+<ins class="diff-chg">   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+</ins>
+}
+</pre>
+<p>
+<del class="diff-old">The
+example
+</del>
+<ins class="diff-chg">Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+context:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+   "name": "http://xmlns.com/foaf/0.1/name",
+   "homepage": "http://xmlns.com/foaf/0.1/homepage",
+   "@coerce": 
+   {
+      "@iri": ["homepage"]
+   }
+}
+</ins></pre><p><ins class="diff-chg">
+Running
+the
+JSON-LD
+Compaction
+algorithm
+given
+the
+context
+supplied
+above
+against
+the
+JSON-LD
+input
+document
+provided
+</ins>
+above
+would
+<del class="diff-old">set
+</del>
+<ins class="diff-chg">result
+in
+</ins>
+the
+<del class="diff-old">subject
+</del>
+<ins class="diff-chg">following
+output:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}
+</ins></pre><p><ins class="diff-chg">
+The
+compaction
+algorithm
+also
+enables
+the
+developer
+</ins>
+to
+<ins class="diff-new">map
+any
+expanded
+format
+into
+an
+application-specific
+compacted
+format.
+While
+the
+context
+provided
+above
+mapped
+</ins>
+<code>
+<del class="diff-old">_:foo
+,
+which
+</del>
+<ins class="diff-chg">http://xmlns.com/foaf/0.1/name
+</ins></code><ins class="diff-chg">
+to
+</ins><strong><ins class="diff-chg">
+name
+</ins></strong>,<ins class="diff-chg">
+it
+could
+have
+also
+mapped
+it
+to
+any
+arbitrary
+string
+provided
+by
+the
+developer.
+</ins></p></div><div id="framing" class="section"><h3><span class="secno"><ins class="diff-chg">
+3.11
+</ins></span><ins class="diff-chg">
+Framing
+</ins></h3><p><ins class="diff-chg">
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+work
+with
+trees,
+also
+called
+associative
+arrays,
+when
+dealing
+with
+JSON.
+While
+mapping
+a
+graph
+to
+a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+A
+</ins><dfn title="Frame" id="dfn-frame"><ins class="diff-chg">
+Frame
+</ins></dfn>
+can
+<del class="diff-old">then
+</del>
+be
+used
+<del class="diff-old">later
+</del>
+<ins class="diff-chg">by
+a
+developer
+</ins>
+on
+<ins class="diff-new">a
+JSON-LD
+document
+to
+specify
+a
+deterministic
+layout
+for
+a
+graph.
+</ins></p><p><ins class="diff-new">
+Framing
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document,
+which
+expresses
+a
+graph
+of
+information,
+and
+applying
+a
+specific
+graph
+layout
+(called
+a
+</ins><a class="tref internalDFN" title="Frame" href="#dfn-frame"><ins class="diff-new">
+Frame
+</ins></a><ins class="diff-new">
+).
+</ins></p><p><ins class="diff-new">
+The
+JSON-LD
+document
+below
+expresses
+a
+library,
+a
+book
+and
+a
+chapter:
+</ins></p><pre class="example"><ins class="diff-new">
+{
+   "@coerce": {
+    "dc":  "http://purl.org/dc/terms/",
+    "ex":  "http://example.org/"
+   },
+   "@subject": 
+   [{
+      "@subject": "http://example.org/library",
+      "@type": "ex:Library",
+      "ex:contains": "http://example.org/library/the-republic"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": "http://example.org/library/the-republic#introduction"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": "ex:Chapter",
+      "dc:description": "An introductory chapter on The Republic.",
+      "dc:title": "The Introduction"
+   }],
+   "@context": 
+   {
+      "@coerce": 
+      {
+         "@iri": "ex:contains"
+      },
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   }
+}
+</ins></pre><p><ins class="diff-new">
+Developers
+typically
+like
+to
+operate
+on
+items
+in
+a
+hierarchical,
+tree-based
+fashion.
+Ideally,
+a
+developer
+would
+want
+the
+data
+above
+sorted
+into
+top-level
+libraries,
+then
+the
+books
+that
+are
+contained
+in
+each
+library,
+and
+then
+the
+chapters
+contained
+</ins>
+in
+<ins class="diff-new">each
+book.
+To
+achieve
+that
+layout,
+the
+developer
+can
+define
+the
+following
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-new">
+frame
+</ins></a>:</p><pre class="example"><ins class="diff-new">
+{
+   "@context": {
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   },
+   "@type": "ex:Library",
+   "ex:contains": {
+      "@type": "ex:Book",
+      "ex:contains": {
+         "@type": "ex:Chapter"
+      }
+   }
+}
+</ins></pre><p><ins class="diff-new">
+When
+the
+framing
+algorithm
+is
+run
+against
+</ins>
+the
+<ins class="diff-new">previously
+defined
+</ins>
+JSON-LD
+<del class="diff-old">markup
+</del>
+<ins class="diff-chg">document,
+paired
+with
+the
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+above,
+the
+following
+JSON-LD
+document
+is
+the
+end
+result:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+   "@context": 
+   {
+      "ex": "http://example.org/vocab#",
+      "dc":  "http://purl.org/dc/terms/",
+   }
+   "@subject": "http://example.org/library",
+   "@type": "ex:Library",
+   "ex:contains": 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": 
+      {
+         "@subject": "http://example.org/library/the-republic#introduction",
+         "@type": "ex:Chapter",
+         "dc:description": "An introductory chapter on The Republic.",
+         "dc:title": "The Introduction"
+      },
+   },
+}
+</ins></pre><p><ins class="diff-chg">
+The
+JSON-LD
+framing
+algorithm
+allows
+developers
+</ins>
+to
+<del class="diff-old">refer
+back
+</del>
+<ins class="diff-chg">query
+by
+example
+and
+force
+a
+specific
+tree
+layout
+</ins>
+to
+<del class="diff-old">the
+named
+blank
+node.
+</del>
+<ins class="diff-chg">a
+JSON-LD
+document.
+</ins>
+</p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">5.
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+Advanced
+<del class="diff-old">Features
+</del>
+<ins class="diff-chg">Concepts
+</ins>
+</h2>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+<del class="diff-old">provided
+by
+RDF.
+</del>
+<ins class="diff-chg">described
+above.
+</ins>
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</p>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">4.1
+</ins>
+</span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+doubles,
+integers,
+and
+boolean
+values.
+As
+demonstrated
+below,
+JSON-LD
+utilizes
+that
+information
+to
+create
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s:
+</p>
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}
+</pre>
+<p class="note">
+When
+dealing
+with
+a
+number
+of
+modern
+programming
+languages,
+including
+JavaScript
+ECMA-262,
+there
+is
+no
+distinction
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>
+values.
+That
+is,
+the
+number
+<code>
+5.3
+</code>
+and
+the
+number
+<code>
+5.3e0
+</code>
+are
+treated
+as
+if
+they
+were
+the
+same.
+When
+converting
+from
+JSON-LD
+to
+a
+language-native
+format
+and
+back,
+datatype
+information
+is
+lost
+in
+a
+number
+of
+these
+languages.
+Thus,
+one
+could
+say
+that
+<code>
+5.3
+</code>
+is
+a
+<strong>
+xsd:decimal
+</strong>
+and
+<code>
+5.3e0
+</code>
+is
+an
+<strong>
+xsd:double
+</strong>
+in
+JSON-LD,
+but
+when
+both
+values
+are
+converted
+to
+a
+language-native
+format
+the
+datatype
+difference
+between
+the
+two
+is
+lost
+because
+the
+machine-level
+representation
+will
+almost
+always
+be
+a
+<strong>
+double
+</strong>.
+Implementers
+should
+be
+aware
+of
+this
+potential
+round-tripping
+issue
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>.
+Specifically
+objects
+with
+a
+datatype
+of
+<strong>
+xsd:decimal
+</strong>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+converted
+to
+a
+language
+native
+type.
+</p>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">4.2
+</ins>
+</span>
+Type
+Coercion
+</h3>
+<p>
+JSON-LD
+supports
+the
+coercion
+of
+<del class="diff-old">types
+</del>
+<ins class="diff-chg">values
+</ins>
+to
+<del class="diff-old">ensure
+that
+the
+zero-edit
+goal
+of
+JSON-LD
+can
+be
+accomplished.
+</del>
+<ins class="diff-chg">particular
+data
+types.
+</ins>
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">the
+</ins>
+incoming
+or
+outgoing
+types
+to
+the
+proper
+<del class="diff-old">RDF
+</del>
+<ins class="diff-chg">data
+</ins>
+type
+based
+on
+a
+mapping
+of
+<ins class="diff-new">data
+</ins>
+type
+IRIs
+to
+<del class="diff-old">RDF
+</del>
+<ins class="diff-chg">property
+</ins>
+types.
+Using
+type
+<del class="diff-old">conversion,
+</del>
+<ins class="diff-chg">coercion,
+</ins>
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+s,
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s
+and
+IRIs.
+</p>
+<pre class="example">
+{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+<del class="diff-old">        "xsd:anyURI": "homepage",
+</del>
+<ins class="diff-chg">        "@iri": "homepage"
+</ins>
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+<div id="chaining" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">4.3
+</ins>
+</span>
+<del class="diff-old">The
+JSON-LD
+Processing
+Algorithm
+</del>
+<ins class="diff-chg">Chaining
+</ins></h3>
+<p>
+<del class="diff-old">The
+JSON-LD
+Processing
+Model
+describes
+processing
+rules
+for
+extracting
+RDF
+from
+</del>
+<ins class="diff-chg">Object
+</ins><dfn title="chaining" id="dfn-chaining"><ins class="diff-chg">
+chaining
+</ins></dfn><ins class="diff-chg">
+is
+</ins>
+a
+JSON-LD
+<del class="diff-old">document.
+Note
+</del>
+<ins class="diff-chg">feature
+</ins>
+that
+<del class="diff-old">many
+uses
+</del>
+<ins class="diff-chg">allows
+an
+author
+to
+use
+the
+definition
+</ins>
+of
+JSON-LD
+<del class="diff-old">may
+not
+require
+generation
+of
+RDF.
+</del>
+<ins class="diff-chg">objects
+as
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><ins class="diff-chg">
+values.
+This
+is
+a
+commonly
+used
+mechanism
+for
+creating
+a
+parent-child
+relationship
+between
+two
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a><ins class="diff-chg">
+s.
+</ins>
+</p>
+<p>
+The
+<del class="diff-old">processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+</del>
+<ins class="diff-chg">example
+shows
+an
+two
+subjects
+related
+by
+</ins>
+a
+<del class="diff-old">JSON-LD
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+</del>
+<ins class="diff-chg">property
+from
+</ins>
+the
+<del class="diff-old">output
+process
+and
+are
+not
+required
+to
+implement
+</del>
+<ins class="diff-chg">first
+subject:
+</ins></p>  <pre class="example"><ins class="diff-chg">
+{
+...
+  "foaf:name": "Manu Sporny",
+  "<span class="diff">foaf:knows</span>": {
+    "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}
+</ins></pre><p><ins class="diff-chg">
+An
+object
+definition,
+like
+</ins>
+the
+<del class="diff-old">algorithm
+exactly
+</del>
+<ins class="diff-chg">one
+used
+above,
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+be
+used
+</ins>
+as
+<del class="diff-old">described.
+The
+Processing
+Algorithm
+is
+</del>
+a
+<del class="diff-old">work
+</del>
+<ins class="diff-chg">JSON
+value
+at
+any
+point
+</ins>
+in
+<del class="diff-old">progress.
+</del>
+<ins class="diff-chg">JSON-LD.
+</ins>
+</p>
+</div>
+<div id="identifying-unlabeled-nodes" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">4.4
+</ins>
+</span>
+<del class="diff-old">Overview
+</del>
+<ins class="diff-chg">Identifying
+Unlabeled
+Nodes
+</ins>
+</h3>
+<p>
+<del class="diff-old">This
+section
+is
+non-normative.
+JSON-LD
+is
+intended
+</del>
+<ins class="diff-chg">At
+times,
+it
+becomes
+necessary
+</ins>
+to
+<del class="diff-old">have
+an
+easy
+</del>
+<ins class="diff-chg">be
+able
+</ins>
+to
+<del class="diff-old">parse
+grammar
+that
+closely
+models
+existing
+practice
+in
+using
+JSON
+for
+describing
+object
+representations.
+This
+allows
+</del>
+<ins class="diff-chg">express
+information
+without
+being
+able
+to
+specify
+</ins>
+the
+<del class="diff-old">use
+</del>
+<ins class="diff-chg">subject.
+Typically,
+this
+type
+</ins>
+of
+<del class="diff-old">existing
+libraries
+for
+parsing
+JSON
+in
+a
+document-oriented
+fashion,
+</del>
+<ins class="diff-chg">node
+is
+called
+an
+unlabeled
+node
+</ins>
+or
+<del class="diff-old">can
+allow
+for
+stream-based
+parsing
+similar
+to
+SAX.
+As
+with
+other
+grammars
+used
+for
+describing
+linked
+data,
+</del>
+a
+<del class="diff-old">key
+concept
+is
+that
+of
+</del>
+<ins class="diff-chg">blank
+node.
+In
+JSON-LD,
+unlabeled
+node
+identifiers
+are
+automatically
+created
+if
+</ins>
+a
+<del class="diff-old">resource
+.
+Resources
+</del>
+<ins class="diff-chg">subject
+is
+not
+specified
+using
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+keyword.
+However,
+authors
+</ins>
+may
+<del class="diff-old">be
+of
+three
+basic
+types:
+IRI
+s,
+for
+describing
+externally
+named
+entities,
+BNodes
+,
+resources
+</del>
+<ins class="diff-chg">provide
+identifiers
+</ins>
+for
+<ins class="diff-new">unlabeled
+nodes
+by
+using
+the
+special
+</ins><code><ins class="diff-new">
+_
+</ins></code><ins class="diff-new">
+(underscore)
+CURIE
+prefix.
+</ins></p><pre class="example"><ins class="diff-new">
+{
+...
+  "@subject": "<span class="diff">_:foo</span>",
+...
+}
+</ins></pre><p><ins class="diff-new">
+The
+example
+above
+would
+set
+the
+subject
+to
+</ins><code><ins class="diff-new">
+_:foo
+</ins></code>,
+which
+<del class="diff-old">an
+external
+name
+does
+not
+exist,
+or
+</del>
+<ins class="diff-chg">can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+unlabeled
+node.
+This
+practice,
+however,
+</ins>
+is
+<del class="diff-old">not
+known,
+and
+Literals,
+which
+describe
+terminal
+entities
+such
+as
+strings,
+dates
+and
+other
+representations
+having
+</del>
+<ins class="diff-chg">usually
+frowned
+upon
+when
+generating
+Linked
+Data.
+If
+</ins>
+a
+<del class="diff-old">lexical
+representation
+possibly
+including
+an
+explicit
+language
+or
+datatype.
+</del>
+<ins class="diff-chg">developer
+finds
+that
+they
+refer
+to
+the
+unlabeled
+node
+more
+than
+once,
+they
+should
+consider
+naming
+the
+node
+using
+a
+resolve-able
+IRI.
+</ins>
+</p>
+</div>
+<div id="overriding-keywords" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">4.5
+</ins></span><ins class="diff-new">
+Overriding
+Keywords
+</ins></h3>
+<p>
+<del class="diff-old">Data
+described
+with
+</del>
+JSON-LD
+<del class="diff-old">may
+</del>
+<ins class="diff-chg">allows
+all
+of
+the
+syntax
+keywords,
+except
+for
+</ins><code><ins class="diff-chg">
+@context
+</ins></code>,<ins class="diff-chg">
+to
+</ins>
+be
+<del class="diff-old">considered
+</del>
+<ins class="diff-chg">overridden.
+This
+feature
+allows
+more
+legacy
+JSON
+content
+</ins>
+to
+be
+<del class="diff-old">the
+representation
+of
+a
+graph
+made
+up
+of
+subject
+and
+object
+resources
+related
+via
+a
+predicate
+resource.
+However,
+specific
+implementations
+may
+choose
+</del>
+<ins class="diff-chg">supported
+by
+JSON-LD.
+It
+also
+allows
+developers
+</ins>
+to
+<del class="diff-old">operate
+on
+</del>
+<ins class="diff-chg">design
+domain-specific
+implementations
+using
+only
+</ins>
+the
+<del class="diff-old">document
+as
+</del>
+<ins class="diff-chg">JSON-LD
+context.
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+  "@context": 
+  {  
+</ins>     <span class="diff">"url": "@subject"</span>,     <span class="diff">"a": "@type"</span>,<ins class="diff-chg">
+     "name": "http://schema.org/name"
+  },
+  "url": "http://example.com/about#gregg",
+  "a": "http://schema.org/Person",
+  "name": "Gregg Kellogg"
+}
+</ins></pre><p><ins class="diff-chg">
+In
+the
+example
+above,
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+@type
+</ins></code><ins class="diff-chg">
+keywords
+have
+been
+overridden
+by
+</ins><strong><ins class="diff-chg">
+url
+</ins></strong><ins class="diff-chg">
+and
+</ins><strong>
+a
+<del class="diff-old">normal
+JSON
+description
+of
+objects
+having
+attributes.
+</del>
+</strong>,
+<ins class="diff-chg">respectively.
+</ins>
+</p>
+</div>
+<div id="normalization" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">4.6
+</ins>
+</span>
+<del class="diff-old">Processing
+Algorithm
+Terms
+</del>
+<ins class="diff-chg">Normalization
+</ins>
+</h3>
+<del class="diff-old">default
+context
+a
+context
+that
+</del>
+<p>
+<ins class="diff-chg">Normalization
+</ins>
+is
+<del class="diff-old">specified
+to
+</del>
+the
+<ins class="diff-new">process
+of
+taking
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+<del class="diff-old">processing
+algorithm
+before
+processing
+begins.
+default
+graph
+</del>
+<ins class="diff-chg">input
+</ins></a><ins class="diff-chg">
+and
+performing
+a
+deterministic
+transformation
+on
+that
+input
+that
+results
+in
+a
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a><ins class="diff-chg">
+that
+any
+conforming
+JSON-LD
+processor
+would
+have
+generated
+given
+</ins>
+the
+<del class="diff-old">destination
+</del>
+<ins class="diff-chg">same
+input.
+The
+problem
+is
+a
+fairly
+difficult
+technical
+problem
+to
+solve
+because
+it
+requires
+a
+directed
+</ins>
+graph
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">to
+be
+ordered
+into
+a
+set
+of
+nodes
+and
+edges
+in
+a
+deterministic
+way.
+This
+is
+easy
+to
+do
+when
+</ins>
+all
+<del class="diff-old">triples
+generated
+by
+JSON-LD
+markup.
+active
+subject
+</del>
+<ins class="diff-chg">of
+</ins>
+the
+<del class="diff-old">currently
+active
+subject
+that
+</del>
+<ins class="diff-chg">nodes
+have
+unique
+names,
+but
+very
+difficult
+to
+do
+when
+some
+of
+</ins>
+the
+<del class="diff-old">processor
+should
+use
+</del>
+<ins class="diff-chg">nodes
+are
+not
+labeled.
+</ins></p><p><ins class="diff-chg">
+Normalization
+is
+useful
+when
+comparing
+two
+graphs
+against
+one
+another,
+</ins>
+when
+generating
+<del class="diff-old">triples.
+active
+property
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+</del>
+<ins class="diff-chg">a
+detailed
+list
+of
+differences
+between
+two
+graphs,
+and
+</ins>
+when
+generating
+<del class="diff-old">triples.
+active
+object
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+</del>
+<ins class="diff-chg">a
+cryptographic
+digital
+signature
+for
+information
+contained
+in
+a
+graph
+or
+</ins>
+when
+generating
+<del class="diff-old">triples.
+active
+context
+</del>
+a
+<del class="diff-old">context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+</del>
+<ins class="diff-chg">hash
+of
+</ins>
+the
+<del class="diff-old">processing
+algorithm
+</del>
+<ins class="diff-chg">information
+contained
+in
+a
+graph.
+</ins></p><p><ins class="diff-chg">
+The
+example
+below
+</ins>
+is
+<del class="diff-old">running.
+</del>
+<ins class="diff-chg">an
+un-normalized
+JSON-LD
+document:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
+      "@coerce": 
+      {
+         "@iri": ["homepage"]
+      }
+   }
+}
+</ins></pre><p>
+The
+<del class="diff-old">active
+context
+</del>
+<ins class="diff-chg">example
+below
+</ins>
+is
+the
+<del class="diff-old">context
+contained
+within
+</del>
+<ins class="diff-chg">normalized
+form
+of
+</ins>
+the
+<del class="diff-old">processor
+state
+.
+local
+context
+a
+context
+that
+</del>
+<ins class="diff-chg">JSON-LD
+document
+above:
+</ins></p><p class="note"><ins class="diff-chg">
+Whitespace
+</ins>
+is
+<del class="diff-old">specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+</del>
+<ins class="diff-chg">used
+below
+to
+aid
+readability.
+The
+normalization
+algorithm
+for
+JSON-LD
+remove
+all
+unnecessary
+whitespace
+in
+</ins>
+the
+<del class="diff-old">@context
+keyword.
+processor
+state
+</del>
+<ins class="diff-chg">fully
+normalized
+form.
+</ins></p><pre class="example"><ins class="diff-chg">
+[{
+    "@subject": 
+    {
+        "@iri": "_:c14n0"
+    },
+    "http://xmlns.com/foaf/0.1/homepage": 
+    {
+        "@iri": "http://manu.sporny.org/"
+    },
+    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
+}]
+</ins></pre><p><ins class="diff-chg">
+Notice
+how
+all
+of
+</ins>
+the
+<del class="diff-old">processor
+state
+,
+which
+includes
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+s
+have
+been
+expanded
+and
+sorted
+in
+alphabetical
+order.
+Also,
+notice
+how
+</ins>
+the
+<del class="diff-old">active
+context
+,
+current
+</del>
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+<del class="diff-old">,
+and
+current
+property
+.
+The
+processor
+state
+</del>
+</a>
+<del class="diff-old">is
+managed
+as
+a
+stack
+</del>
+<ins class="diff-chg">has
+been
+labeled
+</ins>
+with
+<del class="diff-old">elements
+from
+the
+previous
+processor
+state
+copied
+into
+</del>
+a
+<del class="diff-old">new
+processor
+state
+when
+entering
+a
+new
+associative
+array.
+</del>
+<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">
+<ins class="diff-chg">blank
+node
+identifier
+</ins></a>.<ins class="diff-chg">
+Normalization
+ensures
+that
+any
+arbitrary
+graph
+containing
+exactly
+the
+same
+information
+would
+be
+normalized
+to
+exactly
+the
+same
+form
+shown
+above.
+</ins></p>
+</div>
+</div>
+<div id="algorithms" class="section">
+<h2>
+<span class="secno">
+<ins class="diff-chg">5.
+</ins></span><ins class="diff-chg">
+Algorithms
+</ins></h2><p><ins class="diff-chg">
+All
+algorithms
+described
+in
+this
+section
+are
+intended
+to
+operate
+on
+language-native
+data
+structures.
+That
+is,
+the
+serialization
+to
+a
+text-based
+JSON
+document
+isn't
+required
+as
+input
+or
+output
+to
+any
+of
+these
+algorithms
+and
+language-native
+data
+structures
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+used
+where
+applicable.
+</ins></p><div id="syntax-tokens-and-keywords" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.3
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">Syntax
+</ins>
+Tokens
+and
+Keywords
+</h3>
+<p>
+<ins class="diff-new">JSON-LD
+specifies
+a
+number
+of
+syntax
+tokens
+and
+keywords
+that
+are
+using
+in
+all
+algorithms
+described
+in
+this
+section:
+</ins></p>
+<dl>
+<dt>
+<code>
+@context
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</dd>
+<dt>
+<code>
+@base
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<code>
+<del class="diff-old">@profile
+A
+reference
+to
+a
+remote
+context
+description
+used
+to
+set
+the
+local
+context
+.
+</del>
+@vocab
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<code>
+@coerce
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+type
+coercion
+rules.
+</dd>
+<dt>
+<code>
+@literal
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+a
+literal
+value.
+</dd>
+<dt>
+<code>
+@iri
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+an
+IRI
+value.
+</dd>
+<dt>
+<code>
+@language
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+language
+for
+a
+literal.
+</dd>
+<dt>
+<code>
+@datatype
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+datatype
+for
+a
+literal.
+</dd>
+<dt>
+<code>:
+</code>
+</dt>
+<dd>
+The
+separator
+for
+CURIEs
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+</dd>
+<dt>
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>
+</dt>
+<dd>
+Sets
+the
+active
+subjects.
+</dd>
+<dt>
+<code>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+<del class="diff-old">rdf:type
+</del>
+<ins class="diff-chg">type
+</ins>
+of
+the
+active
+subjects.
+<del class="diff-old">This
+token
+may
+be
+conferred
+as
+syntactic
+sugar
+for
+rdf:type.
+</del>
+</dd>
+</dl>
+<del class="diff-old">Use
+@source
+instead
+of
+@
+?
+Use
+</del>
+</div>
+<div id="algorithm-terms" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-chg">5.2
+</ins></span><ins class="diff-chg">
+Algorithm
+Terms
+</ins></h3><dl><dt><dfn title="initial_context" id="dfn-initial_context"><ins class="diff-chg">
+initial
+context
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+context
+that
+is
+specified
+to
+the
+algorithm
+before
+processing
+begins.
+</ins></dd><dt><dfn title="active_subject" id="dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+processing.
+</ins></dd><dt><dfn title="active_property" id="dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+processing.
+</ins></dd><dt><dfn title="active_object" id="dfn-active_object"><ins class="diff-chg">
+active
+object
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+processing.
+</ins></dd><dt><dfn title="active_context" id="dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+context
+that
+is
+used
+to
+resolve
+CURIEs
+while
+the
+processing
+algorithm
+is
+running.
+The
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+is
+the
+context
+contained
+within
+the
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a>.</dd><dt><dfn title="local_context" id="dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+context
+that
+is
+specified
+at
+the
+JSON
+associative-array
+level,
+specified
+via
+the
+</ins>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">instead
+of
+</del>
+<ins class="diff-chg">keyword.
+</ins></dd><dt><dfn title="processor_state" id="dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a>,<ins class="diff-chg">
+which
+includes
+the
+</ins><a class="tref" title="active__context"><ins class="diff-chg">
+active
+context
+</ins></a>,<a class="tref" title="current_subject"><ins class="diff-chg">
+current
+subject
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a class="tref" title="current_property"><ins class="diff-chg">
+current
+property
+</ins></a>.<ins class="diff-chg">
+The
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+is
+managed
+as
+</ins>
+a
+<del class="diff-old">?
+Note
+</del>
+<ins class="diff-chg">stack
+with
+elements
+from
+the
+previous
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+copied
+into
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+when
+entering
+a
+new
+associative
+array.
+</ins></dd><dt><dfn title="JSON-LD_input" id="dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></dfn></dt><dd><ins class="diff-chg">
+The
+JSON-LD
+data
+structure
+</ins>
+that
+<del class="diff-old">both
+are
+just
+semantic
+sugar
+for
+rdf:type
+.
+</del>
+<ins class="diff-chg">is
+provided
+as
+input
+to
+the
+algorithm.
+</ins></dd><dt><dfn title="JSON-LD_output" id="dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></dfn></dt><dd><ins class="diff-chg">
+The
+JSON-LD
+data
+structure
+that
+is
+produced
+as
+output
+by
+the
+algorithm.
+</ins></dd></dl>
+</div>
+<div id="context-1" class="section">
+<h3 id="context">
+<span class="secno">
+<del class="diff-old">6.4
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+Context
+</h3>
+<p>
+Processing
+of
+JSON-LD
+<ins class="diff-new">data
+structure
+</ins>
+is
+managed
+<del class="diff-old">recursively
+using
+a
+process
+described
+in
+Sequence
+.
+</del>
+<ins class="diff-chg">recursively.
+</ins>
+During
+processing,
+each
+rule
+is
+applied
+using
+information
+provided
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+Processing
+begins
+by
+pushing
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+onto
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+stack
+and
+initializing
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+with
+the
+<del class="diff-old">default
+</del>
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+<ins class="diff-chg">initial
+</ins>
+context
+</a>.
+If
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+encountered,
+information
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+merged
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</p>
+<del class="diff-old">Should
+the
+document
+URL
+be
+used
+as
+the
+default
+for
+@base
+in
+the
+default
+context
+?
+</del>
+<p>
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+used
+for
+expanding
+keys
+and
+values
+of
+an
+associative
+array
+(or
+elements
+of
+a
+list
+(see
+<span a="#list-processing">
+List
+Processing
+</span>
+)).
+</p>
+<p>
+A
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+identified
+within
+an
+associative
+array
+having
+a
+key
+of
+<code>
+@context
+</code>
+with
+<ins class="diff-new">string
+or
+</ins>
+an
+associative
+array
+value.
+When
+processing
+a
+<a class="tref" title="local__context">
+local
+context
+</a>,
+special
+<ins class="diff-new">processing
+</ins>
+rules
+apply:
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">The
+key
+</del>
+<ins class="diff-chg">Create
+a
+new,
+empty
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>.</li><li><ins class="diff-chg">
+If
+the
+value
+is
+a
+simple
+string,
+it
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+have
+a
+lexical
+form
+of
+IRI
+and
+used
+to
+initialize
+a
+new
+JSON
+document
+which
+replaces
+the
+value
+for
+subsequent
+processing.
+</ins></li><li><ins class="diff-chg">
+If
+the
+value
+is
+an
+associative
+array,
+perform
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+associative
+array
+has
+a
+</ins>
+<code>
+@base
+</code>
+<ins class="diff-new">key,
+it
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+<del class="diff-old">IRI
+and
+is
+saved
+in
+</del>
+<ins class="diff-chg">an
+absolute
+IRI.
+Add
+</ins>
+the
+<del class="diff-old">active
+</del>
+<ins class="diff-chg">base
+mapping
+to
+the
+</ins><a class="tref" title="local__context"><ins class="diff-chg">
+local
+</ins>
+context
+</a>.
+<p class="issue">
+<ins class="diff-chg">Turtle
+allows
+@base
+</ins>
+to
+<del class="diff-old">perform
+term
+mapping
+as
+described
+in
+</del>
+<ins class="diff-chg">be
+relative.
+If
+we
+did
+this,
+we
+would
+have
+to
+add
+</ins><a href="#iri-expansion">
+IRI
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</a>.
+</p>
+</li>
+<li>
+<del class="diff-old">The
+key
+</del>
+<ins class="diff-chg">If
+the
+associative
+array
+has
+a
+</ins>
+<code>
+@vocab
+</code>
+<ins class="diff-new">key,
+it
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+<del class="diff-old">IRI
+and
+is
+saved
+in
+</del>
+<ins class="diff-chg">an
+absolute
+IRI.
+Add
+</ins>
+the
+<del class="diff-old">active
+</del>
+<ins class="diff-chg">vocabulary
+mapping
+to
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+</ins>
+context
+</a>
+<del class="diff-old">to
+perform
+term
+mapping
+as
+described
+in
+</del>
+<ins class="diff-chg">after
+performing
+</ins><a href="#iri-expansion">
+IRI
+<del class="diff-old">Processing
+.
+</del>
+<ins class="diff-chg">Expansion
+</ins></a><ins class="diff-chg">
+on
+the
+associated
+value.
+</ins>
+</li>
+<li>
+<del class="diff-old">The
+key
+</del>
+<ins class="diff-chg">If
+the
+associative
+array
+has
+a
+</ins>
+<code>
+@coerce
+</code>
+<ins class="diff-new">key,
+it
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+an
+associative
+array.
+<del class="diff-old">Processing
+of
+</del>
+<ins class="diff-chg">Add
+</ins>
+the
+<del class="diff-old">associative
+array
+is
+described
+below
+</del>
+<code>
+<ins class="diff-chg">@coerce
+</ins></code><ins class="diff-chg">
+mapping
+to
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins>
+</a>
+<ins class="diff-chg">performing
+</ins><a href="#iri-expansion"><ins class="diff-chg">
+IRI
+Expansion
+</ins></a><ins class="diff-chg">
+on
+the
+associated
+value(s).
+</ins>
+</li>
+<li>
+Otherwise,
+the
+key
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+lexical
+form
+of
+<cite>
+<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">
+NCName
+</a>
+</cite>
+and
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+IRI.
+Merge
+<del class="diff-old">each
+</del>
+<ins class="diff-chg">the
+</ins>
+key-value
+pair
+into
+the
+<del class="diff-old">active
+</del>
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+<ins class="diff-chg">local
+</ins>
+context
+<del class="diff-old">,
+overwriting
+any
+duplicate
+values.
+</del>
+</a>.
+</li>
+<del class="diff-old">A
+</del>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">Merge
+the
+of
+</ins>
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+<del class="diff-old">may
+also
+be
+loaded
+from
+an
+external
+document
+using
+</del>
+<ins class="diff-chg">'s
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+mapping
+into
+</ins>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-new">active
+context
+</ins></a><ins class="diff-new">
+'s
+</ins>
+<code>
+<del class="diff-old">@profile
+</del>
+<ins class="diff-chg">@coerce
+</ins>
+</code>
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">mapping
+</ins>
+as
+described
+<del class="diff-old">in
+Vocabulary
+Profiles
+</del>
+<a href="#coerce">
+<ins class="diff-chg">below
+</ins>
+</a>.
+</li>
+<li>
+<ins class="diff-chg">Merge
+all
+entries
+other
+than
+the
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+mapping
+from
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+overwriting
+any
+duplicate
+values.
+</ins></li></ol>
+<div id="coerce" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">6.4.1
+</del>
+<ins class="diff-chg">5.3.1
+</ins>
+</span>
+Coerce
+</h4>
+<p>
+Map
+each
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping,
+overwriting
+any
+duplicate
+values
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping.
+The
+<code>
+@coerce
+</code>
+mapping
+has
+<del class="diff-old">a
+</del>
+either
+<del class="diff-old">of
+</del>
+a
+single
+CURIE
+or
+<del class="diff-old">of
+</del>
+an
+array
+of
+CURIEs.
+When
+merging
+with
+an
+existing
+mapping
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+map
+all
+CURIE
+values
+to
+array
+form
+and
+replace
+with
+the
+union
+of
+the
+value
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+and
+the
+value
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+If
+the
+result
+is
+an
+array
+with
+a
+single
+CURIE,
+the
+processor
+<em class="rfc2119" title="may">
+may
+</em>
+represent
+this
+as
+a
+string
+value.
+</p>
+</div>
+<div id="initial-context" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">6.5
+</del>
+<ins class="diff-chg">5.3.2
+</ins>
+</span>
+<del class="diff-old">Chaining
+</del>
+<ins class="diff-chg">Initial
+Context
+</ins></h4>
+<p>
+<del class="diff-old">Object
+chaining
+</del>
+<ins class="diff-chg">The
+</ins><a class="tref internalDFN" title="initial_context" href="#dfn-initial_context"><ins class="diff-chg">
+initial
+context
+</ins></a>
+is
+<del class="diff-old">a
+JSON-LD
+feature
+that
+allows
+an
+author
+to
+use
+the
+definition
+of
+JSON-LD
+objects
+</del>
+<ins class="diff-chg">initialized
+</ins>
+as
+<del class="diff-old">property
+values.
+This
+</del>
+<ins class="diff-chg">follows:
+</ins></p><ul><li><code><ins class="diff-chg">
+@base
+</ins></code>
+is
+<ins class="diff-new">set
+using
+</ins><cite><href="http: www.ietf.org="" rfc="" rfc2396.txt"=""><ins class="diff-new">
+section
+5.1
+Establishing
+</ins>
+a
+<del class="diff-old">commonly
+used
+mechanism
+for
+creating
+</del>
+<ins class="diff-chg">Base
+URI
+</ins></href="http:></cite><ins class="diff-chg">
+of
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986"><ins class="diff-chg">
+RFC3986
+</ins></a></cite><ins class="diff-chg">
+].
+Processors
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+provide
+</ins>
+a
+<del class="diff-old">parent-child
+relationship
+between
+objects.
+The
+example
+shows
+an
+two
+objects
+related
+by
+</del>
+<ins class="diff-chg">means
+of
+setting
+the
+base
+IRI
+programatically.
+</ins></li><li><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+is
+set
+with
+</ins>
+a
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">single
+mapping
+</ins>
+from
+<del class="diff-old">the
+first
+object:
+  
+</del>
+<code>
+<ins class="diff-chg">@iri
+</ins></code><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+@type
+</ins></code>.</li></ul>    <pre class="example">
+{
+<del class="diff-old">...
+  "foaf:name": "Manu Sporny",
+  "": {
+    "",
+    "",
+  }
+...
+</del>
+<ins class="diff-chg">    "@base": <span class="diff">document-location</span>,
+    "@context": {
+      "@iri": "@type"
+    }
+</ins>
+}
+</pre>
+<del class="diff-old">An
+object
+definition
+may
+be
+used
+anyplace
+a
+value
+is
+legal
+in
+JSON-LD.
+</del>
+</div>
+</div>
+<div id="iri-expansion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.6
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+IRI
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</h3>
+<p>
+Keys
+and
+some
+values
+are
+evaluated
+to
+produce
+an
+IRI.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+a
+value
+representing
+an
+IRI
+into
+an
+actual
+IRI.
+</p>
+<p>
+IRIs
+may
+be
+represented
+as
+an
+explicit
+string,
+or
+as
+a
+CURIE,
+as
+a
+value
+relative
+to
+<code>
+@base
+</code>
+or
+<code>
+@vocab
+</code>.
+</p>
+<p>
+CURIEs
+are
+defined
+more
+formally
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+]
+<cite>
+<a href="http://www.w3.org/TR/rdfa-core/#s_curies">
+section
+6
+"CURIE
+Syntax
+Definition"
+</a>
+</cite>.
+Generally,
+a
+CURIE
+is
+composed
+of
+a
+<em>
+prefix
+</em>
+and
+a
+<em>
+suffix
+</em>
+separated
+by
+a
+':'.
+In
+JSON-LD,
+either
+the
+prefix
+may
+be
+the
+empty
+string,
+denoting
+the
+<dfn title="default_prefix" id="dfn-default_prefix">
+default
+prefix
+</dfn>.
+</p>
+<p>
+The
+<del class="diff-old">procedure
+</del>
+<ins class="diff-chg">algorithm
+</ins>
+for
+generating
+an
+IRI
+is:
+</p>
+<ol class="algorithm">
+<li>
+Split
+the
+value
+into
+a
+<em>
+prefix
+</em>
+and
+<em>
+suffix
+</em>
+from
+the
+first
+occurrence
+of
+':'.
+</li>
+<li>
+If
+the
+prefix
+is
+a
+<del class="diff-old">'_',
+generate
+a
+named
+BNode
+using
+the
+suffix
+as
+</del>
+<ins class="diff-chg">'_'
+(underscore),
+</ins>
+the
+<del class="diff-old">name.
+</del>
+<ins class="diff-chg">IRI
+is
+unchanged.
+</ins>
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+contains
+a
+mapping
+for
+<em>
+prefix
+</em>,
+generate
+an
+IRI
+by
+prepending
+the
+mapped
+prefix
+to
+the
+(possibly
+empty)
+<del class="diff-old">suffix.
+</del>
+<ins class="diff-chg">suffix
+using
+textual
+concatenation.
+</ins>
+Note
+that
+an
+empty
+suffix
+and
+no
+suffix
+(meaning
+the
+value
+contains
+no
+':'
+string
+at
+all)
+are
+treated
+equivalently.
+</li>
+<li>
+If
+the
+IRI
+being
+processed
+is
+for
+a
+property
+(i.e.,
+a
+key
+value
+in
+an
+associative
+array,
+or
+a
+value
+in
+a
+<code>
+@coerce
+</code>
+mapping)
+and
+the
+active
+context
+has
+a
+<code>
+@vocab
+</code>
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+<del class="diff-old">the
+method
+described
+in
+[
+RFC3987
+].
+</del>
+<ins class="diff-chg">textual
+concatenation.
+</ins>
+</li>
+<li>
+If
+the
+IRI
+being
+processed
+is
+for
+a
+subject
+or
+object
+(i.e.,
+not
+a
+property)
+and
+the
+active
+context
+has
+a
+<code>
+@base
+</code>
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+the
+method
+described
+in
+[
+<cite>
+<del class="diff-old">RFC3987
+</del>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
+<ins class="diff-chg">RFC3986
+</ins>
+</a>
+</cite>
+].
+</li>
+<li>
+Otherwise,
+use
+the
+value
+directly
+as
+an
+IRI.
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="iri-compaction" class="section">
+<h3>
+<span class="secno">
+<ins class="diff-new">5.5
+</ins></span><ins class="diff-new">
+IRI
+Compaction
+</ins></h3><p><ins class="diff-new">
+Some
+keys
+and
+values
+are
+expressed
+using
+IRIs.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+an
+IRI
+to
+a
+compact
+IRI
+using
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+s
+and
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-new">
+prefix
+</ins></a><ins class="diff-new">
+es
+specified
+in
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-new">
+local
+context
+</ins></a>.</p><p><ins class="diff-new">
+The
+algorithm
+for
+generating
+a
+compacted
+IRI
+is:
+</ins></p><ol class="algorithm"><li><ins class="diff-new">
+Search
+every
+key-value
+pair
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+for
+a
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+that
+is
+a
+complete
+match
+against
+the
+IRI.
+If
+a
+complete
+match
+is
+found,
+the
+resulting
+compacted
+IRI
+is
+the
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+associated
+with
+the
+IRI
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a>.</li><li><ins class="diff-new">
+If
+a
+complete
+match
+is
+not
+found,
+search
+for
+a
+partial
+match
+from
+the
+beginning
+of
+the
+IRI.
+For
+all
+matches
+that
+are
+found,
+the
+resulting
+compacted
+IRI
+is
+the
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-new">
+prefix
+</ins></a><ins class="diff-new">
+associated
+with
+the
+partially
+matched
+IRI
+in
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+concatenated
+with
+a
+colon
+(:)
+character
+and
+the
+unmatched
+part
+of
+the
+string.
+If
+there
+is
+more
+than
+one
+compacted
+IRI
+produced,
+the
+final
+value
+is
+the
+lexicographically
+least
+value
+of
+the
+entire
+set
+of
+compacted
+IRIs.
+</ins></li></ol><p></p>
+</div>
+<div id="value-expansion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+<del class="diff-old">Sequence
+</del>
+<ins class="diff-chg">Value
+Expansion
+</ins></h3><p><ins class="diff-chg">
+Some
+values
+in
+JSON-LD
+can
+be
+expressed
+in
+a
+compact
+form.
+These
+values
+are
+required
+to
+be
+expanded
+at
+times
+when
+processing
+JSON-LD
+documents.
+</ins></p><p><ins class="diff-chg">
+The
+algorithm
+for
+expanding
+a
+value
+is:
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+key
+that
+is
+associated
+with
+the
+value
+has
+an
+associated
+coercion
+entry
+in
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a>,<ins class="diff-chg">
+the
+resulting
+expansion
+is
+an
+object
+populated
+according
+to
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+coercion
+target
+is
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code>,<ins class="diff-chg">
+expand
+the
+value
+by
+adding
+a
+new
+key-value
+pair
+where
+the
+key
+is
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code><ins class="diff-chg">
+and
+the
+value
+is
+the
+expanded
+IRI
+according
+to
+the
+</ins><a href="#iri-expansion"><ins class="diff-chg">
+IRI
+Expansion
+</ins></a><ins class="diff-chg">
+rules.
+</ins></li><li><ins class="diff-chg">
+If
+the
+coercion
+target
+is
+a
+typed
+literal,
+expand
+the
+value
+by
+adding
+two
+new
+key-value
+pairs.
+The
+first
+key-value
+pair
+will
+be
+</ins><code><ins class="diff-chg">
+@literal
+</ins></code><ins class="diff-chg">
+and
+the
+unexpanded
+value.
+The
+second
+key-value
+pair
+will
+be
+</ins><code><ins class="diff-chg">
+@datatype
+</ins></code><ins class="diff-chg">
+and
+the
+associated
+coercion
+datatype
+expanded
+according
+to
+the
+</ins><a href="#iri-expansion"><ins class="diff-chg">
+IRI
+Expansion
+</ins></a><ins class="diff-chg">
+rules.
+</ins></li></ol></li></ol><p></p></div><div id="value-compaction" class="section"><h3><span class="secno"><ins class="diff-chg">
+5.7
+</ins></span><ins class="diff-chg">
+Value
+Compaction
+</ins></h3><p><ins class="diff-chg">
+Some
+values,
+such
+as
+IRIs
+and
+typed
+literals,
+may
+be
+expressed
+in
+an
+expanded
+form
+in
+JSON-LD.
+These
+values
+are
+required
+to
+be
+compacted
+at
+times
+when
+processing
+JSON-LD
+documents.
+</ins></p><p><ins class="diff-chg">
+The
+algorithm
+for
+compacting
+a
+value
+is:
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+contains
+a
+coercion
+target
+for
+the
+key
+that
+is
+associated
+with
+the
+value,
+compact
+the
+value
+using
+the
+following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+coercion
+target
+is
+an
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code>,<ins class="diff-chg">
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code><ins class="diff-chg">
+key,
+processed
+according
+to
+the
+</ins><a href="#iri-compaction"><ins class="diff-chg">
+IRI
+Compaction
+</ins></a><ins class="diff-chg">
+steps.
+</ins></li><li><ins class="diff-chg">
+If
+the
+coercion
+target
+is
+a
+typed
+literal,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+</ins><code><ins class="diff-chg">
+@literal
+</ins></code><ins class="diff-chg">
+key.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+the
+value
+is
+not
+modified.
+</ins></li></ol></li></ol><p></p></div><div id="expansion-1" class="section"><h3><span class="secno"><ins class="diff-chg">
+5.8
+</ins></span><ins class="diff-chg">
+Expansion
+</ins></h3><p class="issue"><ins class="diff-chg">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</ins></p><p><ins class="diff-chg">
+As
+stated
+previously,
+expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+input
+and
+expanding
+all
+IRIs
+and
+typed
+literals
+to
+their
+fully-expanded
+form.
+The
+output
+will
+not
+contain
+a
+single
+context
+declaration
+and
+will
+have
+all
+IRIs
+and
+typed
+literals
+fully
+expanded.
+</ins></p><div id="expansion-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.8.1
+</ins></span><ins class="diff-chg">
+Expansion
+Algorithm
+</ins></h4><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+top-level
+item
+in
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+is
+an
+array,
+process
+each
+item
+in
+the
+array
+recursively
+using
+this
+algorithm.
+</ins></li><li><ins class="diff-chg">
+If
+the
+top-level
+item
+in
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+is
+an
+object,
+update
+the
+</ins><a class="tref internalDFN" title="local_context" href="#dfn-local_context"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+according
+to
+the
+steps
+outlined
+in
+the
+</ins><a href="#context"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+section.
+Process
+each
+key,
+expanding
+the
+key
+according
+to
+the
+</ins><a href="#iri-expansion"><ins class="diff-chg">
+IRI
+Expansion
+</ins></a><ins class="diff-chg">
+rules.
+</ins></li><ol class="algorithm"><li><ins class="diff-chg">
+Process
+each
+value
+associated
+with
+each
+key
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+value
+is
+an
+array,
+process
+each
+item
+in
+the
+array
+recursively
+using
+this
+algorithm.
+</ins></li><li><ins class="diff-chg">
+If
+the
+value
+is
+an
+object,
+process
+the
+object
+recursively
+using
+this
+algorithm.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+check
+to
+see
+the
+associated
+key
+has
+an
+associated
+coercion
+rule.
+If
+the
+value
+should
+be
+coerced,
+expand
+the
+value
+according
+to
+the
+</ins><a href="#value-expansion"><ins class="diff-chg">
+Value
+Expansion
+</ins></a><ins class="diff-chg">
+rules.
+If
+the
+value
+does
+not
+need
+to
+be
+coerced,
+leave
+the
+value
+as-is.
+</ins></li></ol></li><li><ins class="diff-chg">
+Remove
+the
+context
+from
+the
+object
+</ins></li></ol></ol></div></div><div id="compaction-1" class="section"><h3><span class="secno"><ins class="diff-chg">
+5.9
+</ins></span><ins class="diff-chg">
+Compaction
+</ins></h3><p class="issue"><ins class="diff-chg">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</ins></p><p><ins class="diff-chg">
+As
+stated
+previously,
+compaction
+is
+the
+process
+of
+taking
+a
+JSON-LD
+input
+and
+compacting
+all
+IRIs
+using
+a
+given
+context.
+The
+output
+will
+contain
+a
+single
+top-level
+context
+declaration
+and
+will
+only
+use
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s
+and
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+es
+and
+will
+ensure
+that
+all
+typed
+literals
+are
+fully
+compacted.
+</ins></p><div id="compaction-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.9.1
+</ins></span><ins class="diff-chg">
+Compaction
+Algorithm
+</ins></h4><ol class="algorithm"><li><ins class="diff-chg">
+Perform
+the
+</ins><a href="#expansion-algorithm"><ins class="diff-chg">
+Expansion
+Algorithm
+</ins></a><ins class="diff-chg">
+on
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a>.</li><li><ins class="diff-chg">
+If
+the
+top-level
+item
+is
+an
+array,
+process
+each
+item
+in
+the
+array
+recursively,
+starting
+at
+this
+step.
+</ins></li><li><ins class="diff-chg">
+If
+the
+top-level
+item
+is
+an
+object,
+compress
+each
+key
+using
+the
+steps
+defined
+in
+</ins><a href="#iri-compaction"><ins class="diff-chg">
+IRI
+Compaction
+</ins></a><ins class="diff-chg">
+and
+compress
+each
+value
+using
+the
+steps
+defined
+in
+</ins><a href="#value-compaction"><ins class="diff-chg">
+Value
+Compaction
+</ins></a></li></ol></div></div><div id="framing-1" class="section"><h3><span class="secno"><ins class="diff-chg">
+5.10
+</ins></span><ins class="diff-chg">
+Framing
+</ins></h3><p class="issue"><ins class="diff-chg">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</ins></p><p><ins class="diff-chg">
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+don't
+work
+directly
+with
+graphs,
+but
+rather,
+prefer
+trees
+when
+dealing
+with
+JSON.
+While
+mapping
+a
+graph
+to
+a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+This
+section
+defines
+an
+algorithm
+for
+mapping
+a
+graph
+to
+a
+tree
+given
+a
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a>.</p><div id="framing-algorithm-terms" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.10.1
+</ins></span><ins class="diff-chg">
+Framing
+Algorithm
+Terms
+</ins></h4><dl><dt><dfn title="input_frame" id="dfn-input_frame"><ins class="diff-chg">
+input
+frame
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+initial
+</ins><a class="tref internalDFN" title="frame" href="#dfn-frame"><ins class="diff-chg">
+frame
+</ins></a><ins class="diff-chg">
+provided
+to
+the
+framing
+algorithm.
+</ins></dd><dt><dfn title="framing_context" id="dfn-framing_context"><ins class="diff-chg">
+framing
+context
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+context
+containing
+the
+</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
+object
+embed
+flag
+</ins></a>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
+explicit
+inclusion
+flag
+</ins></a><ins class="diff-chg">
+and
+the
+</ins><a class="tref" title="omit_default_flag"><ins class="diff-chg">
+omit
+default
+flag
+</ins></a>.</dd><dt><dfn title="object_embed_flag" id="dfn-object_embed_flag"><ins class="diff-chg">
+object
+embed
+flag
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+flag
+specifying
+that
+objects
+should
+be
+directly
+embedded
+in
+the
+output,
+instead
+of
+being
+referred
+to
+by
+their
+IRI.
+</ins></dd><dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag"><ins class="diff-chg">
+explicit
+inclusion
+flag
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+flag
+specifying
+that
+for
+properties
+to
+be
+included
+in
+the
+output,
+they
+must
+be
+explicitly
+declared
+in
+the
+</ins><a class="tref internalDFN" title="framing_context" href="#dfn-framing_context"><ins class="diff-chg">
+framing
+context
+</ins></a>.</dd><dt><dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag"><ins class="diff-chg">
+omit
+missing
+properties
+flag
+</ins></dfn></dt><dd><ins class="diff-chg">
+a
+flag
+specifying
+that
+properties
+that
+are
+missing
+from
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+should
+be
+omitted
+from
+the
+output.
+</ins></dd><dt><dfn title="match_limit" id="dfn-match_limit"><ins class="diff-chg">
+match
+limit
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+value
+specifying
+the
+maximum
+number
+of
+matches
+to
+accept
+when
+building
+arrays
+of
+values
+during
+the
+framing
+algorithm.
+A
+value
+of
+-1
+specifies
+that
+there
+is
+no
+match
+limit.
+</ins></dd><dt><dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects"><ins class="diff-chg">
+map
+of
+embedded
+subjects
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+map
+that
+tracks
+if
+a
+subject
+has
+been
+embedded
+in
+the
+output
+of
+the
+</ins><a href="#framing-algorithm"><ins class="diff-chg">
+Framing
+Algorithm
+</ins></a>.</dd></dl></div><div id="framing-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.10.2
+</ins></span><ins class="diff-chg">
+Framing
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+The
+framing
+algorithm
+takes
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+that
+has
+been
+normalized
+according
+to
+the
+</ins><a href="#normalization-algorithm"><ins class="diff-chg">
+Normalization
+Algorithm
+</ins></a><ins class="diff-chg">
+(
+</ins><strong><ins class="diff-chg">
+normalized
+input
+</ins></strong><ins class="diff-chg">
+),
+an
+</ins><a class="tref internalDFN" title="input_frame" href="#dfn-input_frame"><ins class="diff-chg">
+input
+frame
+</ins></a><ins class="diff-chg">
+that
+has
+been
+expanded
+according
+to
+the
+</ins><a href="#expansion-algorithm"><ins class="diff-chg">
+Expansion
+Algorithm
+</ins></a><ins class="diff-chg">
+(
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+),
+and
+a
+number
+of
+options
+and
+produces
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a>.<ins class="diff-chg">
+The
+following
+series
+of
+steps
+is
+the
+recursive
+portion
+of
+the
+framing
+algorithm:
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Initialize
+the
+</ins><a class="tref internalDFN" title="framing_context" href="#dfn-framing_context"><ins class="diff-chg">
+framing
+context
+</ins></a><ins class="diff-chg">
+by
+setting
+the
+</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
+object
+embed
+flag
+</ins></a>,<ins class="diff-chg">
+clearing
+the
+</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
+explicit
+inclusion
+flag
+</ins></a>,<ins class="diff-chg">
+and
+clearing
+the
+</ins><a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag"><ins class="diff-chg">
+omit
+missing
+properties
+flag
+</ins></a>.<ins class="diff-chg">
+Override
+these
+values
+based
+on
+input
+options
+provided
+to
+the
+algorithm
+by
+the
+application.
+</ins></li><li><ins class="diff-chg">
+Generate
+a
+</ins><dfn title="list_of_frames" id="dfn-list_of_frames"><ins class="diff-chg">
+list
+of
+frames
+</ins></dfn><ins class="diff-chg">
+by
+processing
+the
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+is
+not
+an
+array,
+set
+</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
+match
+limit
+</ins></a><ins class="diff-chg">
+to
+1,
+place
+the
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+into
+the
+</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
+list
+of
+frames
+</ins></a>,<ins class="diff-chg">
+and
+set
+the
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+null
+</ins></code>.</li><li><ins class="diff-chg">
+If
+the
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+is
+an
+empty
+array,
+place
+an
+empty
+object
+into
+the
+</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
+list
+of
+frames
+</ins></a>,<ins class="diff-chg">
+set
+the
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a><ins class="diff-chg">
+to
+an
+array,
+and
+set
+</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
+match
+limit
+</ins></a><ins class="diff-chg">
+to
+-1.
+</ins></li><li><ins class="diff-chg">
+If
+the
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+is
+a
+non-empty
+array,
+add
+each
+item
+in
+the
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+into
+the
+</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
+list
+of
+frames
+</ins></a>,<ins class="diff-chg">
+set
+the
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a><ins class="diff-chg">
+to
+an
+array,
+and
+set
+</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
+match
+limit
+</ins></a><ins class="diff-chg">
+to
+-1.
+</ins></li></ol></li><li><ins class="diff-chg">
+Create
+a
+</ins><dfn title="match_array" id="dfn-match_array"><ins class="diff-chg">
+match
+array
+</ins></dfn><ins class="diff-chg">
+for
+each
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+in
+the
+</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
+list
+of
+frames
+</ins></a><ins class="diff-chg">
+halting
+when
+either
+the
+</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
+match
+limit
+</ins></a><ins class="diff-chg">
+is
+zero
+or
+the
+end
+of
+the
+</ins><a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames"><ins class="diff-chg">
+list
+of
+frames
+</ins></a><ins class="diff-chg">
+is
+reached.
+If
+an
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+is
+not
+an
+object,
+the
+processor
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+throw
+a
+</ins><code><ins class="diff-chg">
+Invalid
+Frame
+Format
+</ins></code><ins class="diff-chg">
+exception.
+Add
+each
+matching
+item
+from
+the
+</ins><strong><ins class="diff-chg">
+normalized
+input
+</ins></strong><ins class="diff-chg">
+to
+the
+</ins><a class="tref" title="matches_array"><ins class="diff-chg">
+matches
+array
+</ins></a><ins class="diff-chg">
+and
+decrement
+the
+</ins><a class="tref internalDFN" title="match_limit" href="#dfn-match_limit"><ins class="diff-chg">
+match
+limit
+</ins></a><ins class="diff-chg">
+by
+1
+if:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+The
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
+rdf:type
+</ins></code><ins class="diff-chg">
+that
+exists
+in
+the
+item's
+list
+of
+</ins><code><ins class="diff-chg">
+rdf:type
+</ins></code><ins class="diff-chg">
+s.
+Note:
+the
+</ins><code><ins class="diff-chg">
+rdf:type
+</ins></code><ins class="diff-chg">
+can
+be
+an
+array,
+but
+only
+one
+value
+needs
+to
+be
+in
+common
+between
+the
+item
+and
+the
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+for
+a
+match.
+</ins></li><li><ins class="diff-chg">
+The
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+does
+not
+have
+an
+</ins><code><ins class="diff-chg">
+rdf:type
+</ins></code><ins class="diff-chg">
+property,
+but
+every
+property
+in
+the
+</ins><strong><ins class="diff-chg">
+expanded
+frame
+</ins></strong><ins class="diff-chg">
+exists
+in
+the
+item.
+</ins></li></ol></li><li><ins class="diff-chg">
+Process
+each
+item
+in
+the
+</ins><a class="tref internalDFN" title="match_array" href="#dfn-match_array"><ins class="diff-chg">
+match
+array
+</ins></a><ins class="diff-chg">
+with
+its
+associated
+</ins><dfn title="match_frame" id="dfn-match_frame"><ins class="diff-chg">
+match
+frame
+</ins></dfn>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
+match
+frame
+</ins></a><ins class="diff-chg">
+contains
+an
+</ins><code><ins class="diff-chg">
+@embed
+</ins></code><ins class="diff-chg">
+keyword,
+set
+the
+</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
+object
+embed
+flag
+</ins></a><ins class="diff-chg">
+to
+its
+value.
+If
+the
+</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
+match
+frame
+</ins></a><ins class="diff-chg">
+contains
+an
+</ins><code><ins class="diff-chg">
+@explicit
+</ins></code><ins class="diff-chg">
+keyword,
+set
+the
+</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
+explicit
+inclusion
+flag
+</ins></a><ins class="diff-chg">
+to
+its
+value.
+Note:
+if
+the
+keyword
+exists,
+but
+the
+value
+is
+neither
+</ins><code><ins class="diff-chg">
+true
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+false
+</ins></code>,<ins class="diff-chg">
+set
+the
+associated
+flag
+to
+</ins><code><ins class="diff-chg">
+true
+</ins></code>.</li><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
+object
+embed
+flag
+</ins></a><ins class="diff-chg">
+is
+cleared
+and
+the
+item
+has
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+property,
+replace
+the
+item
+with
+the
+value
+of
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+property.
+</ins></li><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
+object
+embed
+flag
+</ins></a><ins class="diff-chg">
+is
+set
+and
+the
+item
+has
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+property,
+and
+its
+IRI
+is
+in
+the
+</ins><a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects"><ins class="diff-chg">
+map
+of
+embedded
+subjects
+</ins></a>,<ins class="diff-chg">
+throw
+a
+</ins><code><ins class="diff-chg">
+Duplicate
+Embed
+</ins></code><ins class="diff-chg">
+exception.
+</ins></li><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag"><ins class="diff-chg">
+object
+embed
+flag
+</ins></a><ins class="diff-chg">
+is
+set
+and
+the
+item
+has
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+property
+and
+its
+IRI
+is
+not
+in
+the
+</ins><a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects"><ins class="diff-chg">
+map
+of
+embedded
+subjects
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag"><ins class="diff-chg">
+explicit
+inclusion
+flag
+</ins></a><ins class="diff-chg">
+is
+set,
+then
+delete
+any
+key
+from
+the
+item
+that
+does
+not
+exist
+in
+the
+</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
+match
+frame
+</ins></a>,<ins class="diff-chg">
+except
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code>.</li><li><ins class="diff-chg">
+For
+each
+key
+in
+the
+</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
+match
+frame
+</ins></a>,<ins class="diff-chg">
+except
+for
+keywords
+and
+</ins><code><ins class="diff-chg">
+rdf:type
+</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+key
+is
+in
+the
+item,
+then
+build
+a
+new
+</ins><dfn title="recursion_input_list" id="dfn-recursion_input_list"><ins class="diff-chg">
+recursion
+input
+list
+</ins></dfn><ins class="diff-chg">
+using
+the
+object
+or
+objects
+associated
+with
+the
+key.
+If
+any
+object
+contains
+an
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code><ins class="diff-chg">
+value
+that
+exists
+in
+the
+</ins><a class="tref" title="normalized_input"><ins class="diff-chg">
+normalized
+input
+</ins></a>,<ins class="diff-chg">
+replace
+the
+object
+in
+the
+</ins><a class="tref" title="recusion_input_list"><ins class="diff-chg">
+recusion
+input
+list
+</ins></a><ins class="diff-chg">
+with
+a
+new
+object
+containing
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+key
+where
+the
+value
+is
+the
+value
+of
+the
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code>,<ins class="diff-chg">
+and
+all
+of
+the
+other
+key-value
+pairs
+for
+that
+subject.
+Set
+the
+</ins><dfn title="recursion_match_frame" id="dfn-recursion_match_frame"><ins class="diff-chg">
+recursion
+match
+frame
+</ins></dfn><ins class="diff-chg">
+to
+the
+value
+associated
+with
+the
+</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
+match
+frame
+</ins></a><ins class="diff-chg">
+'s
+key.
+Replace
+the
+value
+associated
+with
+the
+key
+by
+recursively
+calling
+this
+algorithm
+using
+</ins><a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list"><ins class="diff-chg">
+recursion
+input
+list
+</ins></a>,<a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame"><ins class="diff-chg">
+recursion
+match
+frame
+</ins></a><ins class="diff-chg">
+as
+input.
+</ins></li><li><ins class="diff-chg">
+If
+the
+key
+is
+not
+in
+the
+item,
+add
+the
+key
+to
+the
+item
+and
+set
+the
+associated
+value
+to
+an
+empty
+array
+if
+the
+</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
+match
+frame
+</ins></a><ins class="diff-chg">
+key's
+value
+is
+an
+array
+or
+</ins><code><ins class="diff-chg">
+null
+</ins></code><ins class="diff-chg">
+otherwise.
+</ins></li><li><ins class="diff-chg">
+If
+value
+associated
+with
+the
+item's
+key
+is
+</ins><code><ins class="diff-chg">
+null
+</ins></code>,<ins class="diff-chg">
+process
+the
+</ins><a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag"><ins class="diff-chg">
+omit
+missing
+properties
+flag
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+value
+associated
+with
+the
+key
+in
+the
+</ins><a class="tref internalDFN" title="match_frame" href="#dfn-match_frame"><ins class="diff-chg">
+match
+frame
+</ins></a><ins class="diff-chg">
+is
+an
+array,
+use
+the
+first
+frame
+from
+the
+array
+as
+the
+</ins><dfn title="property_frame" id="dfn-property_frame"><ins class="diff-chg">
+property
+frame
+</ins></dfn>,<ins class="diff-chg">
+otherwise
+set
+the
+</ins><a class="tref internalDFN" title="property_frame" href="#dfn-property_frame"><ins class="diff-chg">
+property
+frame
+</ins></a><ins class="diff-chg">
+to
+an
+empty
+object.
+</ins></li><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="property_frame" href="#dfn-property_frame"><ins class="diff-chg">
+property
+frame
+</ins></a><ins class="diff-chg">
+contains
+an
+</ins><code><ins class="diff-chg">
+@omitDefault
+</ins></code><ins class="diff-chg">
+keyword,
+set
+the
+</ins><a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag"><ins class="diff-chg">
+omit
+missing
+properties
+flag
+</ins></a><ins class="diff-chg">
+to
+its
+value.
+Note:
+if
+the
+keyword
+exists,
+but
+the
+value
+is
+neither
+</ins><code><ins class="diff-chg">
+true
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+false
+</ins></code>,<ins class="diff-chg">
+set
+the
+associated
+flag
+to
+</ins><code><ins class="diff-chg">
+true
+</ins></code>.</li><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag"><ins class="diff-chg">
+omit
+missing
+properties
+flag
+</ins></a><ins class="diff-chg">
+is
+set,
+delete
+the
+key
+in
+the
+item.
+Otherwise,
+if
+the
+</ins><code><ins class="diff-chg">
+@default
+</ins></code><ins class="diff-chg">
+keyword
+is
+set
+in
+the
+</ins><a class="tref internalDFN" title="property_frame" href="#dfn-property_frame"><ins class="diff-chg">
+property
+frame
+</ins></a><ins class="diff-chg">
+set
+the
+item's
+value
+to
+the
+value
+of
+</ins><code><ins class="diff-chg">
+@default
+</ins></code>.</li></ol></li></ol></li></ol></li><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a><ins class="diff-chg">
+is
+</ins><code><ins class="diff-chg">
+null
+</ins></code><ins class="diff-chg">
+set
+it
+to
+the
+item,
+otherwise,
+append
+the
+item
+to
+the
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a>.</li></ol></li><li><ins class="diff-chg">
+Return
+the
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a>.</li></ol><ins class="diff-chg">
+The
+final,
+non-recursive
+step
+of
+the
+framing
+algorithm
+requires
+the
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a><ins class="diff-chg">
+to
+be
+compacted
+according
+to
+the
+</ins><a href="#compaction-algorithm"><ins class="diff-chg">
+Compaction
+Algorithm
+</ins></a><ins class="diff-chg">
+by
+using
+the
+context
+provided
+in
+the
+</ins><a class="tref internalDFN" title="input_frame" href="#dfn-input_frame"><ins class="diff-chg">
+input
+frame
+</ins></a>.<ins class="diff-chg">
+The
+resulting
+value
+is
+the
+final
+output
+of
+the
+compaction
+algorithm
+and
+is
+what
+should
+be
+returned
+to
+the
+application.
+</ins></div></div><div id="normalization-1" class="section"><h3><span class="secno"><ins class="diff-chg">
+5.11
+</ins></span><ins class="diff-chg">
+Normalization
+</ins></h3><p class="issue"><ins class="diff-chg">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</ins></p><p><ins class="diff-chg">
+Normalization
+is
+the
+process
+of
+taking
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+and
+performing
+a
+deterministic
+transformation
+on
+that
+input
+that
+results
+in
+all
+aspects
+of
+the
+graph
+being
+fully
+expanded
+and
+named
+in
+the
+</ins><a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output"><ins class="diff-chg">
+JSON-LD
+output
+</ins></a>.<ins class="diff-chg">
+The
+normalized
+output
+is
+generated
+in
+such
+a
+way
+that
+any
+conforming
+JSON-LD
+processor
+will
+generate
+identical
+output
+given
+the
+same
+input.
+The
+problem
+is
+a
+fairly
+difficult
+technical
+problem
+to
+solve
+because
+it
+requires
+a
+directed
+graph
+to
+be
+ordered
+into
+a
+set
+of
+nodes
+and
+edges
+in
+a
+deterministic
+way.
+This
+is
+easy
+to
+do
+when
+all
+of
+the
+nodes
+have
+unique
+names,
+but
+very
+difficult
+to
+do
+when
+some
+of
+the
+nodes
+are
+not
+labeled.
+</ins></p><p><ins class="diff-chg">
+In
+time,
+there
+may
+be
+more
+than
+one
+normalization
+algorithm
+that
+will
+need
+to
+be
+identified.
+For
+identification
+purposes,
+this
+algorithm
+is
+named
+</ins><abbr title="Universal Graph Normalization Algorithm 2011"><ins class="diff-chg">
+UGNA2011
+</ins></abbr>.</p><div id="normalization-algorithm-terms" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.1
+</ins></span><ins class="diff-chg">
+Normalization
+Algorithm
+Terms
+</ins></h4><dl><dt><dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes"><ins class="diff-chg">
+list
+of
+expanded
+nodes
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+list
+of
+all
+nodes
+in
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+graph
+containing
+no
+embedded
+objects
+and
+having
+all
+keys
+and
+values
+expanded
+according
+to
+the
+steps
+in
+the
+</ins><a href="#expansion-algorithm"><ins class="diff-chg">
+Expansion
+Algorithm
+</ins></a>.</dd><dt><dfn title="naming_base_string" id="dfn-naming_base_string"><ins class="diff-chg">
+naming
+base
+string
+</ins></dfn></dt><dd><ins class="diff-chg">
+An
+unlabeled
+node
+naming
+prefix
+that
+is
+not
+used
+by
+any
+other
+node
+in
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+and
+does
+not
+start
+with
+the
+characters
+</ins><code><ins class="diff-chg">
+c14n
+</ins></code>.<ins class="diff-chg">
+The
+prefix
+is
+used
+to
+temporarily
+name
+nodes
+during
+the
+normalization
+algorithm
+in
+a
+way
+that
+doesn't
+collide
+with
+the
+names
+that
+already
+exist
+as
+well
+as
+the
+names
+that
+will
+be
+generated
+by
+the
+normalization
+algorithm.
+</ins></dd><dt><dfn title="alpha" id="dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></dfn><ins class="diff-chg">
+and
+</ins><dfn title="beta" id="dfn-beta"><ins class="diff-chg">
+beta
+</ins></dfn><ins class="diff-chg">
+values
+</ins></dt><dd><ins class="diff-chg">
+The
+words
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+refer
+to
+the
+first
+and
+second
+nodes
+or
+values
+being
+examined
+in
+an
+algorithm.
+The
+names
+are
+merely
+used
+to
+refer
+to
+each
+input
+value
+to
+a
+comparison
+algorithm.
+</ins></dd><dt><dfn title="naming_base_string" id="dfn-naming_base_string-1"><ins class="diff-chg">
+naming
+base
+string
+</ins></dfn></dt><dd><ins class="diff-chg">
+An
+unlabeled
+node
+naming
+prefix
+that
+is
+not
+used
+by
+any
+other
+node
+in
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+and
+does
+not
+start
+with
+the
+characters
+</ins><code><ins class="diff-chg">
+c14n
+</ins></code>.<ins class="diff-chg">
+The
+prefix
+is
+used
+to
+temporarily
+name
+nodes
+during
+the
+normalization
+algorithm
+in
+a
+way
+that
+doesn't
+collide
+with
+the
+names
+that
+already
+exist
+as
+well
+as
+the
+names
+that
+will
+be
+generated
+by
+the
+normalization
+algorithm.
+</ins></dd></dl></div><div id="normalization-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.2
+</ins></span><ins class="diff-chg">
+Normalization
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+The
+normalization
+algorithm
+expands
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a>,<ins class="diff-chg">
+flattens
+the
+data
+structure,
+and
+creates
+an
+initial
+set
+of
+names
+for
+all
+nodes
+in
+the
+graph.
+The
+flattened
+data
+structure
+is
+then
+processed
+by
+the
+node
+labeling
+algorithm
+in
+order
+to
+get
+a
+fully
+expanded
+and
+named
+list
+of
+nodes.
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Expand
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-chg">
+JSON-LD
+input
+</ins></a><ins class="diff-chg">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#expansion-algorithm"><ins class="diff-chg">
+Expansion
+Algorithm
+</ins></a><ins class="diff-chg">
+and
+store
+the
+result
+as
+the
+</ins><strong><ins class="diff-chg">
+expanded
+input
+</ins></strong>.</li><li><ins class="diff-chg">
+Process
+every
+object
+in
+the
+</ins><strong><ins class="diff-chg">
+expanded
+input
+</ins></strong><ins class="diff-chg">
+searching
+for
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+values
+that
+start
+with
+the
+text
+string
+</ins><code><ins class="diff-chg">
+_:c14n
+</ins></code>.<ins class="diff-chg">
+If
+a
+match
+is
+found,
+rename
+the
+subject
+and
+all
+references
+to
+the
+subject
+by
+concatenating
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+with
+the
+</ins><a class="tref internalDFN" title="naming_base_string" href="#dfn-naming_base_string-1"><ins class="diff-chg">
+naming
+base
+string
+</ins></a><ins class="diff-chg">
+and
+a
+unique
+identifier,
+such
+as
+an
+incremented
+counter
+value.
+</ins></li><li><ins class="diff-chg">
+Create
+an
+empty
+</ins><a class="tref internalDFN" title="list_of_expanded_nodes" href="#dfn-list_of_expanded_nodes"><ins class="diff-chg">
+list
+of
+expanded
+nodes
+</ins></a><ins class="diff-chg">
+and
+recursively
+process
+every
+object
+in
+the
+</ins><strong><ins class="diff-chg">
+expanded
+input
+</ins></strong><ins class="diff-chg">
+that
+is
+not
+an
+expanded
+IRI,
+typed
+literal
+or
+language
+literal,
+in
+depth-first
+order:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+an
+object
+does
+not
+contain
+a
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code>,<ins class="diff-chg">
+name
+it
+by
+concatenating
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+with
+the
+</ins><a class="tref internalDFN" title="naming_base_string" href="#dfn-naming_base_string-1"><ins class="diff-chg">
+naming
+base
+string
+</ins></a><ins class="diff-chg">
+and
+a
+unique
+identifier,
+such
+as
+an
+incremented
+counter
+value.
+</ins></li><li><ins class="diff-chg">
+Add
+the
+object
+to
+the
+</ins><a class="tref" title="list_of_expanded_nodes."><ins class="diff-chg">
+list
+of
+expanded
+nodes
+</ins><tref>.</tref></a></li><li><ins class="diff-chg">
+Replace
+the
+reference
+to
+the
+object
+with
+the
+value
+of
+the
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+in
+the
+object.
+</ins></li><li><ins class="diff-chg">
+???duplicate
+objects
+for
+predicates???
+</ins></li></ol></li><li><ins class="diff-chg">
+Label
+all
+of
+the
+nodes
+that
+contain
+a
+</ins><code><ins class="diff-chg">
+@subject
+</ins></code><ins class="diff-chg">
+key
+associated
+with
+a
+value
+starting
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#node-labeling-algorithm"><ins class="diff-chg">
+Node
+Labeling
+Algorithm
+</ins></a>.</li></ol></div><div id="node-labeling-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.3
+</ins></span><ins class="diff-chg">
+Node
+Labeling
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+The
+node
+labeling
+algorithm
+takes
+the
+</ins><a class="tref internalDFN" title="list_of_expanded_nodes" href="#dfn-list_of_expanded_nodes"><ins class="diff-chg">
+list
+of
+expanded
+nodes
+</ins></a><ins class="diff-chg">
+and
+sorts
+the
+list,
+deterministically
+naming
+all
+of
+the
+unlabeled
+nodes
+in
+the
+graph.
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Create
+a
+</ins><dfn title="forward_mapping" id="dfn-forward_mapping"><ins class="diff-chg">
+forward
+mapping
+</ins></dfn><ins class="diff-chg">
+that
+relates
+graph
+nodes
+to
+the
+IRIs
+of
+the
+targets
+nodes
+that
+they
+reference.
+For
+example,
+if
+a
+node
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+refers
+to
+a
+node
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+via
+a
+property,
+the
+key
+in
+the
+</ins><a class="tref internalDFN" title="forward_mapping" href="#dfn-forward_mapping"><ins class="diff-chg">
+forward
+mapping
+</ins></a><ins class="diff-chg">
+is
+the
+subject
+IRI
+of
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+and
+the
+value
+is
+an
+array
+containing
+at
+least
+the
+subject
+IRI
+of
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a>.<ol class="algorithm"><li><ins class="diff-chg">
+Add
+all
+forward
+mappings
+for
+every
+node
+in
+the
+graph.
+</ins></li></ol></li><li><ins class="diff-chg">
+Create
+a
+</ins><dfn title="reverse_mapping" id="dfn-reverse_mapping"><ins class="diff-chg">
+reverse
+mapping
+</ins></dfn><ins class="diff-chg">
+that
+relates
+graph
+nodes
+to
+every
+other
+node
+that
+refers
+to
+them
+in
+the
+graph.
+For
+example,
+if
+a
+node
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+refers
+to
+a
+node
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+via
+a
+property,
+the
+key
+in
+the
+</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
+reverse
+mapping
+</ins></a><ins class="diff-chg">
+is
+the
+subject
+IRI
+for
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+and
+the
+value
+is
+an
+array
+containing
+at
+least
+the
+IRI
+for
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a>.<ol class="algorithm"><li><ins class="diff-chg">
+Add
+all
+reverse
+mappings
+for
+every
+node
+in
+the
+graph.
+</ins></li></ol></li><li><ins class="diff-chg">
+Label
+every
+unlabeled
+node
+according
+to
+the
+</ins><a href="#label-generation-algorithm"><ins class="diff-chg">
+Label
+Generation
+Algorithm
+</ins></a><ins class="diff-chg">
+in
+descending
+order
+using
+the
+</ins><a href="#deep-comparison-algorithm"><ins class="diff-chg">
+Deep
+Comparison
+Algorithm
+</ins></a><ins class="diff-chg">
+to
+determine
+the
+sort
+order.
+</ins></li></ol></div><div id="shallow-comparison-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.4
+</ins></span><ins class="diff-chg">
+Shallow
+Comparison
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+The
+shallow
+comparison
+algorithm
+takes
+two
+unlabeled
+nodes,
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a>,<ins class="diff-chg">
+as
+input
+and
+determines
+which
+one
+should
+come
+first
+in
+a
+sorted
+list.
+The
+following
+algorithm
+determines
+the
+steps
+that
+are
+executed
+in
+order
+to
+determine
+the
+node
+that
+should
+come
+first
+in
+a
+list:
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Compare
+the
+total
+number
+of
+node
+properties.
+The
+node
+with
+fewer
+properties
+is
+first.
+</ins></li><li><ins class="diff-chg">
+Lexicographically
+sort
+the
+property
+IRIs
+for
+each
+node
+and
+compare
+the
+sorted
+lists.
+If
+an
+IRI
+is
+found
+to
+be
+lexicographically
+smaller,
+the
+node
+containing
+that
+IRI
+is
+first.
+</ins></li><li><ins class="diff-chg">
+Compare
+the
+property
+values
+against
+one
+another:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Create
+an
+</ins><dfn title="alpha_list" id="dfn-alpha_list"><ins class="diff-chg">
+alpha
+list
+</ins></dfn><ins class="diff-chg">
+by
+adding
+all
+values
+associated
+with
+the
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+property
+that
+is
+not
+an
+unlabeled
+node.
+Track
+the
+number
+of
+unlabeled
+nodes
+not
+added
+to
+the
+list
+using
+an
+</ins><dfn title="alpha_unlabeled_counter" id="dfn-alpha_unlabeled_counter"><ins class="diff-chg">
+alpha
+unlabeled
+counter
+</ins></dfn>.</li><li><ins class="diff-chg">
+Create
+a
+</ins><dfn title="beta_list" id="dfn-beta_list"><ins class="diff-chg">
+beta
+list
+</ins></dfn><ins class="diff-chg">
+by
+adding
+all
+values
+associated
+with
+the
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+property
+that
+is
+not
+an
+unlabeled
+node.
+Track
+the
+number
+of
+unlabeled
+nodes
+not
+added
+to
+the
+list
+using
+an
+</ins><dfn title="beta_unlabeled_counter" id="dfn-beta_unlabeled_counter"><ins class="diff-chg">
+beta
+unlabeled
+counter
+</ins></dfn>.</li><li><ins class="diff-chg">
+Compare
+the
+length
+of
+</ins><a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list"><ins class="diff-chg">
+alpha
+list
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta_list" href="#dfn-beta_list"><ins class="diff-chg">
+beta
+list
+</ins></a>.<ins class="diff-chg">
+The
+node
+associated
+with
+the
+list
+containing
+the
+lesser
+number
+of
+items
+is
+first.
+</ins></li><li><ins class="diff-chg">
+Compare
+the
+</ins><a class="tref internalDFN" title="alpha_unlabeled_counter" href="#dfn-alpha_unlabeled_counter"><ins class="diff-chg">
+alpha
+unlabeled
+counter
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="beta_unlabeled_counter" href="#dfn-beta_unlabeled_counter"><ins class="diff-chg">
+beta
+unlabeled
+counter
+</ins></a>,<ins class="diff-chg">
+the
+node
+associated
+with
+the
+lesser
+value
+is
+first.
+</ins></li><li><ins class="diff-chg">
+Sort
+</ins><a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list"><ins class="diff-chg">
+alpha
+list
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta_list" href="#dfn-beta_list"><ins class="diff-chg">
+beta
+list
+</ins></a><ins class="diff-chg">
+using
+the
+</ins><a href="#object-comparison-algorithm"><ins class="diff-chg">
+Object
+Comparison
+Algorithm
+</ins></a><ins class="diff-chg">
+as
+the
+sorting
+comparator.
+For
+each
+offset
+into
+the
+</ins><a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list"><ins class="diff-chg">
+alpha
+list
+</ins></a>,<ins class="diff-chg">
+compare
+the
+item
+at
+the
+offset
+against
+the
+item
+at
+the
+same
+offset
+in
+the
+</ins><a class="tref internalDFN" title="beta_list" href="#dfn-beta_list"><ins class="diff-chg">
+beta
+list
+</ins></a><ins class="diff-chg">
+using
+the
+</ins><a href="#object-comparison-algorithm"><ins class="diff-chg">
+Object
+Comparison
+Algorithm
+</ins></a>.<ins class="diff-chg">
+The
+node
+associated
+with
+the
+lesser
+item
+is
+first.
+</ins></li></ol></li><li><ins class="diff-chg">
+Process
+the
+</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
+reverse
+mapping
+</ins></a><ins class="diff-chg">
+to
+determine
+order:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+The
+node
+with
+fewer
+entries
+in
+the
+</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
+reverse
+mapping
+</ins></a><ins class="diff-chg">
+is
+first.
+</ins></li><li><ins class="diff-chg">
+Sort
+the
+</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
+reverse
+mapping
+</ins></a><ins class="diff-chg">
+entry
+for
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+into
+a
+</ins><dfn title="list_of_sorted_alpha_mappings" id="dfn-list_of_sorted_alpha_mappings"><ins class="diff-chg">
+list
+of
+sorted
+alpha
+mappings
+</ins></dfn>.<ins class="diff-chg">
+Sort
+the
+</ins><a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping"><ins class="diff-chg">
+reverse
+mapping
+</ins></a><ins class="diff-chg">
+entry
+for
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+into
+a
+</ins><dfn title="list_of_sorted_beta_mappings" id="dfn-list_of_sorted_beta_mappings"><ins class="diff-chg">
+list
+of
+sorted
+beta
+mappings
+</ins></dfn>.</li><li><ins class="diff-chg">
+The
+node
+associated
+with
+the
+list
+of
+sorted
+mappings
+with
+the
+least
+number
+of
+unlabeled
+nodes
+is
+first.
+</ins></li><li><ins class="diff-chg">
+For
+each
+offset
+into
+the
+</ins><a class="tref internalDFN" title="list_of_sorted_alpha_mappings" href="#dfn-list_of_sorted_alpha_mappings"><ins class="diff-chg">
+list
+of
+sorted
+alpha
+mappings
+</ins></a>,<ins class="diff-chg">
+compare
+the
+IRI
+at
+the
+offset
+against
+the
+IRI
+at
+the
+same
+offset
+in
+the
+</ins><a class="tref internalDFN" title="list_of_sorted_beta_mappings" href="#dfn-list_of_sorted_beta_mappings"><ins class="diff-chg">
+list
+of
+sorted
+beta
+mappings
+</ins></a>.<ins class="diff-chg">
+The
+node
+associated
+with
+the
+lexicographically
+lesser
+IRI
+is
+first.
+</ins></li></ol></li><li><ins class="diff-chg">
+Otherwise,
+the
+nodes
+are
+equal.
+</ins></li></ol></div><div id="object-comparison-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.5
+</ins></span><ins class="diff-chg">
+Object
+Comparison
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+The
+object
+comparison
+algorithm
+is
+designed
+to
+compare
+two
+graph
+node
+property
+values,
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a>,<ins class="diff-chg">
+against
+the
+other.
+The
+algorithm
+is
+useful
+when
+sorting
+two
+lists
+of
+graph
+node
+properties.
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+If
+one
+of
+the
+values
+is
+a
+string
+and
+the
+other
+is
+not,
+the
+value
+that
+is
+a
+string
+is
+first.
+</ins></li><li><ins class="diff-chg">
+If
+both
+values
+are
+strings,
+the
+lexicographically
+lesser
+string
+is
+first.
+</ins></li><li><ins class="diff-chg">
+If
+one
+of
+the
+values
+is
+a
+literal
+and
+the
+other
+is
+not,
+the
+value
+that
+is
+a
+literal
+is
+first.
+</ins></li><li><ins class="diff-chg">
+If
+both
+values
+are
+literals
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+The
+lexicographically
+lesser
+string
+associated
+with
+</ins><code><ins class="diff-chg">
+@literal
+</ins></code><ins class="diff-chg">
+is
+first.
+</ins></li><li><ins class="diff-chg">
+The
+lexicographically
+lesser
+string
+associated
+with
+</ins><code><ins class="diff-chg">
+@datatype
+</ins></code><ins class="diff-chg">
+is
+first.
+</ins></li><li><ins class="diff-chg">
+The
+lexicographically
+lesser
+string
+associated
+with
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+is
+first.
+</ins></li></ol></li><li><ins class="diff-chg">
+If
+both
+values
+are
+expanded
+IRIs,
+the
+lexicographically
+lesser
+string
+associated
+with
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code><ins class="diff-chg">
+is
+first.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+the
+two
+values
+are
+equivalent.
+</ins></li></ol></div><div id="deep-comparison-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.6
+</ins></span><ins class="diff-chg">
+Deep
+Comparison
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+DeepCompare(bnodeA,
+bnodeB):
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Return
+the
+value
+of
+ShallowCompare
+if
+it
+is
+non-zero.
+</ins></li><li><ins class="diff-chg">
+Compare
+property
+serializations
+and
+then
+reference
+serializations,
+recycling
+the
+mapping
+from
+property
+serializations
+for
+reference
+serializations.
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+serialization
+for
+bnodeA
+is
+null,
+do
+SerializeNode(bnodeA,
+new
+Mapping).
+</ins></li><li><ins class="diff-chg">
+If
+the
+serialization
+for
+bnodeB
+is
+null,
+do
+SerializeNode(bnodeA,
+new
+Mapping).
+</ins></li><li><ins class="diff-chg">
+Return
+the
+result
+of
+a
+lexicographical
+comparison
+of
+the
+two
+serializations.
+</ins></li></ol></li></ol></div><div id="node-serialization-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.7
+</ins></span><ins class="diff-chg">
+Node
+Serialization
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+SerializeNode(bnode,
+mapping,
+dir):
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+bnode's
+label
+is
+already
+marked
+as
+mapped,
+return.
+</ins></li><li><ins class="diff-chg">
+Mark
+the
+bnode's
+label
+as
+mapped.
+</ins></li><li><ins class="diff-chg">
+Assign
+the
+next
+serialization
+name
+to
+the
+bnode's
+label
+and
+store
+it
+in
+"top".
+</ins></li><li><ins class="diff-chg">
+Split
+the
+bnode's
+adjacent
+bnodes
+into
+a
+map
+and
+a
+list.
+The
+map
+contains
+a
+reverse
+mapping
+of
+serialization
+names
+to
+bnode
+labels
+for
+all
+labels
+in
+the
+mapping,
+the
+list
+(notMapped)
+contains
+all
+labels
+not
+in
+the
+mapping
+yet.
+</ins></li><li><ins class="diff-chg">
+Save
+a
+copy
+of
+the
+mapping.
+</ins></li><li><ins class="diff-chg">
+Do
+SerializeCombos
+for
+max(1,
+notMapped.length)
+using
+the
+original
+mapping
+for
+the
+first
+call
+and
+a
+copy
+of
+the
+mapping
+for
+each
+subsequent
+call.
+</ins></li></ol></div><div id="combinatorial-serialization-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.8
+</ins></span><ins class="diff-chg">
+Combinatorial
+Serialization
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+SerializeCombos(top,
+mapping,
+mapped,
+notMapped,
+dir):
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+If
+notMapped
+is
+non-empty,
+copy
+mapped
+and
+assign
+the
+next
+serialization
+name
+to
+its
+first
+bnode,
+remove
+it
+from
+the
+list,
+and
+update
+mapped.
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+For
+max(1,
+notMapped.length)
+recurse
+into
+SerializeCombos
+with
+the
+original
+mapping
+for
+the
+first
+call
+and
+a
+copy
+of
+the
+mapping
+for
+each
+subsequent
+call.
+Rotate
+notMapped
+on
+each
+iteration.
+</ins></li></ol></li><li><ins class="diff-chg">
+If
+notMapped
+is
+empty,
+save
+an
+entry
+mapping
+from
+the
+bnode's
+serialization
+name
+to
+the
+reverse
+mapping
+(mapped)
+and
+its
+sorted
+keys
+then
+do
+SerializeMapping.
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+serialization
+is
+lexicographically
+less
+than
+the
+current
+serialization
+or
+the
+current
+serialization
+is
+null,
+then
+iterate
+over
+the
+sorted
+keys,
+get
+the
+reverse-mapped
+adjacent
+bnode
+and
+recursively
+call
+SerializeNode
+on
+each
+iteration.
+</ins></li><li><ins class="diff-chg">
+Do
+SerializeMapping
+then
+if
+the
+serialization
+is
+lexicographically
+less
+than
+the
+current
+serialization
+or
+the
+current
+serialization
+is
+null,
+then
+set
+it
+as
+the
+least
+serialization
+for
+the
+bnode
+in
+the
+given
+edge
+direction
+('property'
+or
+'reference').
+</ins></li></ol></li></ol></div><div id="mapping-serialization-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.9
+</ins></span><ins class="diff-chg">
+Mapping
+Serialization
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+SerializeMapping(mapping):
+(This
+function
+incrementally
+updates
+the
+relation
+serialization
+for
+a
+mapping)
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+If
+there
+is
+an
+entry
+on
+the
+mapping's
+key
+stack,
+pop
+it
+and
+iterate
+over
+every
+key.
+</ins></li><li><ins class="diff-chg">
+For
+each
+key,
+if
+an
+entry
+for
+the
+key
+hasn't
+been
+added
+to
+the
+mapping
+yet,
+break
+out
+of
+the
+loop.
+</ins></li><li><ins class="diff-chg">
+Update
+the
+key
+stack
+entry's
+index.
+</ins></li><li><ins class="diff-chg">
+If
+the
+key
+has
+already
+been
+serialized,
+output
+"'_'
++
+key"
+and
+continue.
+</ins></li><li><ins class="diff-chg">
+For
+each
+key,
+serialize
+the
+key
+then
+its
+associated
+bnode
+properties,
+then
+its
+bnode
+references.
+The
+entire
+property
+list
+is
+surrounded
+by
+'['
+and
+']'
+and
+so
+is
+the
+reference
+list.
+Individual
+properties/references
+are
+seperated
+by
+'|'.
+If
+a
+property
+is
+an
+array,
+all
+of
+the
+serializations
+are
+concatenated
+together
+with
+no
+joining
+delimiter.
+The
+'@subject'
+property
+is
+skipped.
+The
+property
+IRI
+is
+turtle-serialized.
+If
+a
+property
+or
+reference
+object
+is
+a
+bnode,
+it
+is
+serialized
+to
+'_:',
+otherwise
+the
+turtle
+serialization
+is
+used.
+</ins></li><li><ins class="diff-chg">
+Join
+all
+of
+the
+adjacent
+keys
+and
+add
+them
+to
+the
+serialization.
+</ins></li><li><ins class="diff-chg">
+Push
+the
+adjacent
+keys
+onto
+the
+key
+stack.
+</ins></li><li><ins class="diff-chg">
+Do
+SerializeMapping.
+</ins></li></ol></div><div id="label-generation-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.11.10
+</ins></span><ins class="diff-chg">
+Label
+Generation
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+NameNode(bnode):
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Remove
+the
+first
+blank
+node
+from
+the
+list
+of
+sorted
+blank
+nodes.
+</ins></li><li><ins class="diff-chg">
+Give
+it
+the
+next
+canonical
+name.
+</ins></li><li><ins class="diff-chg">
+Give
+canonical
+names
+to
+each
+blank
+node
+key
+in
+its
+property
+serialization
+mapping
+in
+lexicographical
+order.
+</ins></li><li><ins class="diff-chg">
+Give
+canonical
+names
+to
+each
+blank
+node
+key
+in
+its
+reference
+serialization
+mapping
+in
+lexicographical
+order.
+</ins></li><li><ins class="diff-chg">
+Set
+all
+serializations
+containing
+newly-named
+blank
+nodes
+to
+null.
+</ins></li></ol></div></div><div id="data-round-tripping" class="section"><h3><span class="secno"><ins class="diff-chg">
+5.12
+</ins></span><ins class="diff-chg">
+Data
+Round
+Tripping
+</ins></h3><p><ins class="diff-chg">
+When
+normalizing
+</ins><strong><ins class="diff-chg">
+xsd:double
+</ins></strong><ins class="diff-chg">
+values,
+implementers
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+ensure
+that
+the
+normalized
+value
+is
+a
+string.
+In
+order
+to
+generate
+the
+string
+from
+a
+</ins><strong><ins class="diff-chg">
+double
+</ins></strong><ins class="diff-chg">
+value,
+output
+equivalent
+to
+the
+</ins><code><ins class="diff-chg">
+printf("%1.6e",
+value)
+</ins></code><ins class="diff-chg">
+function
+in
+C
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+be
+used
+where
+</ins><strong><ins class="diff-chg">
+"%1.6e"
+</ins></strong><ins class="diff-chg">
+is
+the
+string
+formatter
+and
+</ins><strong><ins class="diff-chg">
+value
+</ins></strong><ins class="diff-chg">
+is
+the
+value
+to
+be
+converted.
+</ins></p><p><ins class="diff-chg">
+To
+convert
+the
+a
+double
+value
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</ins></p><pre class="example"><ins class="diff-chg">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</ins></pre><p class="note"><ins class="diff-chg">
+When
+data
+needs
+to
+be
+normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+that
+are
+going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+the
+lossy
+nature
+of
+</ins><strong><ins class="diff-chg">
+xsd:double
+</ins></strong><ins class="diff-chg">
+values.
+</ins></p><p class="issue"><ins class="diff-chg">
+Round-tripping
+data
+can
+be
+problematic
+if
+we
+mix
+and
+match
+@coerce
+rules
+with
+JSON-native
+datatypes,
+like
+integers.
+Consider
+the
+following
+code
+example:
+</ins></p><pre class="example"><ins class="diff-chg">
+var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+// Convert the normalized object back to a JavaScript object
+var
+myObj2
+=
+jsonld.parse(jsonldText);
+</ins></pre><p class="issue"><ins class="diff-chg">
+At
+this
+point,
+myObj2
+and
+myObj
+will
+have
+different
+values
+for
+the
+"number"
+value.
+myObj
+will
+be
+the
+number
+42,
+while
+myObj2
+will
+be
+the
+string
+"42".
+This
+type
+of
+data
+round-tripping
+error
+can
+bite
+developers.
+We
+are
+currently
+wondering
+if
+having
+a
+"coerce
+validation"
+phase
+in
+the
+parsing/normalization
+phases
+would
+be
+a
+good
+idea.
+It
+would
+prevent
+data
+round-tripping
+issues
+like
+the
+one
+mentioned
+above.
+</ins></p></div><div id="rdf-conversion" class="section"><h3><span class="secno"><ins class="diff-chg">
+5.13
+</ins></span><ins class="diff-chg">
+RDF
+Conversion
+</ins></h3><p><ins class="diff-chg">
+A
+JSON-LD
+document
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+be
+converted
+to
+any
+other
+RDF-compatible
+document
+format
+using
+the
+algorithm
+specified
+in
+this
+section.
+</ins></p><p><ins class="diff-chg">
+The
+JSON-LD
+Processing
+Model
+describes
+processing
+rules
+for
+extracting
+RDF
+from
+a
+JSON-LD
+document.
+Note
+that
+many
+uses
+of
+JSON-LD
+may
+not
+require
+generation
+of
+RDF.
+</ins></p><p><ins class="diff-chg">
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+to
+RDF
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</ins></p><p class="issue"><ins class="diff-chg">
+The
+RDF
+Conversion
+Algorithm
+is
+a
+work
+in
+progress.
+</ins></p><div class="informative section" id="overview"><h4><span class="secno"><ins class="diff-chg">
+5.13.1
+</ins></span><ins class="diff-chg">
+Overview
+</ins></h4><p><em><ins class="diff-chg">
+This
+section
+is
+non-normative.
+</ins></em></p><p><ins class="diff-chg">
+JSON-LD
+is
+intended
+to
+have
+an
+easy
+to
+parse
+grammar
+that
+closely
+models
+existing
+practice
+in
+using
+JSON
+for
+describing
+object
+representations.
+This
+allows
+the
+use
+of
+existing
+libraries
+for
+parsing
+JSON
+in
+a
+document-oriented
+fashion,
+or
+can
+allow
+for
+stream-based
+parsing
+similar
+to
+SAX.
+</ins></p><p><ins class="diff-chg">
+As
+with
+other
+grammars
+used
+for
+describing
+</ins><a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data"><ins class="diff-chg">
+Linked
+Data
+</ins></a>,<ins class="diff-chg">
+a
+key
+concept
+is
+that
+of
+a
+</ins><em><ins class="diff-chg">
+resource
+</ins></em>.<ins class="diff-chg">
+Resources
+may
+be
+of
+three
+basic
+types:
+</ins><em><ins class="diff-chg">
+IRI
+</ins></em><ins class="diff-chg">
+s,
+for
+describing
+externally
+named
+entities,
+</ins><em><ins class="diff-chg">
+BNodes
+</ins></em>,<ins class="diff-chg">
+resources
+for
+which
+an
+external
+name
+does
+not
+exist,
+or
+is
+not
+known,
+and
+Literals,
+which
+describe
+terminal
+entities
+such
+as
+strings,
+dates
+and
+other
+representations
+having
+a
+lexical
+representation
+possibly
+including
+an
+explicit
+language
+or
+datatype.
+</ins></p><p><ins class="diff-chg">
+Data
+described
+with
+JSON-LD
+may
+be
+considered
+to
+be
+the
+representation
+of
+a
+graph
+made
+up
+of
+</ins><a class="tref internalDFN" title="subject" href="#dfn-subject"><ins class="diff-chg">
+subject
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><ins class="diff-chg">
+resources
+related
+via
+a
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><ins class="diff-chg">
+resource.
+However,
+specific
+implementations
+may
+choose
+to
+operate
+on
+the
+document
+as
+a
+normal
+JSON
+description
+of
+objects
+having
+attributes.
+</ins></p></div><div id="rdf-conversion-algorithm-terms" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.13.2
+</ins></span><ins class="diff-chg">
+RDF
+Conversion
+Algorithm
+Terms
+</ins></h4><dl><dt><dfn title="default_graph" id="dfn-default_graph"><ins class="diff-chg">
+default
+graph
+</ins></dfn></dt><dd><ins class="diff-chg">
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</ins></dd></dl></div><div id="rdf-conversion-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+5.13.3
+</ins></span><ins class="diff-chg">
+RDF
+Conversion
+Algorithm
+</ins></h4>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+in-memory
+implementations
+with
+random
+access
+to
+associative
+array
+elements.
+<del class="diff-old">For
+a
+description
+of
+a
+streaming
+implementation,
+see
+Appendix
+B
+.
+</del>
+</p>
+<p>
+A
+conforming
+JSON-LD
+processor
+<ins class="diff-new">implementing
+RDF
+conversion
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<ol class="algorithm">
+<li id="processing-step-default-context">
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+with
+with
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+set
+to
+the
+<del class="diff-old">default
+</del>
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+<ins class="diff-chg">initial
+</ins>
+context
+</a>
+and
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+initialized
+to
+NULL.
+</li>
+<li id="processing-step-associative">
+If
+an
+associative
+array
+is
+detected,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+associative
+array
+has
+a
+<code>
+@context
+</code>
+key,
+process
+the
+local
+context
+as
+described
+in
+<a href="#context">
+Context
+</a>.
+</li>
+<li>
+<ins class="diff-new">Create
+a
+new
+associative
+array
+by
+mapping
+the
+keys
+from
+the
+current
+associative
+array
+using
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+to
+new
+keys
+using
+the
+associated
+value
+from
+the
+current
+associative
+array.
+Repeat
+the
+mapping
+until
+no
+entry
+is
+found
+within
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+for
+the
+key.
+Use
+the
+new
+associative
+array
+in
+subsequent
+steps.
+</ins></li><li>
+If
+the
+associative
+array
+has
+an
+<code>
+@iri
+</code>
+key,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#iri-expansion">
+IRI
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</a>
+on
+the
+associated
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+<p class="issue">
+<code>
+<ins class="diff-new">@iri
+</ins></code><ins class="diff-new">
+really
+just
+behaves
+the
+same
+as
+</ins><code><ins class="diff-new">
+@subject
+</ins></code>,<ins class="diff-new">
+consider
+consolidating
+them.
+</ins></p>
+</li>
+<li>
+If
+the
+associative
+array
+has
+a
+<code>
+@literal
+</code>
+key,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+literal
+value
+as
+follows:
+<ol class="algorithm">
+<li>
+as
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+if
+the
+associative
+array
+contains
+a
+<code>
+@datatype
+</code>
+key
+after
+performing
+<a href="#iri-expansion">
+IRI
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</a>
+on
+the
+specified
+<code>
+@datatype
+</code>.
+</li>
+<li>
+otherwise,
+as
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>.
+If
+the
+associative
+array
+contains
+a
+<code>
+@language
+</code>
+key,
+use
+it's
+value
+to
+set
+the
+language
+of
+the
+plain
+literal.
+</li>
+<li>
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+</ol>
+</li>
+<li id="processing-step-subject">
+If
+the
+associative
+array
+has
+a
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>
+key:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+a
+string,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+result
+of
+performing
+<a href="#iri-expansion">
+IRI
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</a>.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+using
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>,
+set
+the
+<a class="tref" title="active__subject">
+active
+subject
+</a>
+to
+the
+result
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+the
+associative
+array
+does
+not
+have
+a
+<code>
+<del class="diff-old">@
+</del>
+<ins class="diff-chg">@subject
+</ins>
+</code>
+key,
+set
+the
+<a class="tref" title="active__object">
+active
+object
+</a>
+to
+newly
+generated
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier">
+blank
+node
+identifier
+<del class="diff-old">.
+</del>
+</dfn>.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+<a class="tref" title="active__object">
+active
+object
+</a>.
+</li>
+<li>
+For
+each
+key
+in
+the
+associative
+array
+that
+has
+not
+already
+been
+processed,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+<code>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+rdf:type
+</code>.
+</li>
+<li>
+Otherwise,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+the
+result
+of
+performing
+<a href="#iri-expansion">
+IRI
+<del class="diff-old">Processing
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</a>
+on
+the
+key.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+</ol>
+</li>
+<li>
+If
+a
+regular
+array
+is
+detected,
+process
+each
+value
+in
+the
+array
+by
+doing
+the
+following
+returning
+the
+result
+of
+processing
+the
+last
+value
+in
+the
+array:
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+the
+value
+is
+a
+regular
+array,
+generate
+an
+RDF
+List
+by
+linking
+each
+element
+of
+the
+list
+using
+rdf:first
+and
+rdf:next
+,
+terminating
+the
+list
+with
+rdf:nil
+using
+the
+following
+sequence:
+If
+the
+list
+has
+no
+element,
+generate
+a
+triple
+using
+the
+active
+subject
+,
+active
+property
+and
+rdf:nil
+.
+Otherwise,
+generate
+a
+triple
+using
+using
+the
+active
+subject
+,
+active
+property
+and
+a
+newly
+generated
+BNode
+identified
+as
+first
+bnode
+.
+For
+each
+element
+other
+than
+the
+last
+element
+in
+the
+list:
+</del>
+Create
+a
+<del class="diff-old">processor
+state
+using
+the
+active
+context,
+first
+bnode
+as
+the
+active
+subject
+,
+and
+rdf:first
+as
+the
+active
+property
+.
+Unless
+this
+is
+the
+last
+element
+in
+the
+list,
+generate
+a
+new
+BNode
+identified
+as
+rest
+bnode
+,
+otherwise
+use
+rdf:nil
+.
+Generate
+a
+new
+triple
+using
+first
+bnode
+,
+rdf:rest
+and
+rest
+bnode
+.
+Set
+first
+bnode
+to
+rest
+bnode
+.
+Otherwise,
+create
+a
+</del>
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+<ins class="diff-new">using
+</ins>
+copies
+of
+the
+<a class="tref" title="active__context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">then
+</ins>
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+a
+string
+is
+<del class="diff-old">detected,
+generate
+</del>
+<ins class="diff-chg">detected:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+is
+the
+target
+of
+</ins>
+a
+<del class="diff-old">triple
+using
+</del>
+<code>
+<ins class="diff-chg">@iri
+</ins></code><ins class="diff-chg">
+coercion,
+set
+</ins>
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+<del class="diff-old">subject
+,
+</del>
+<ins class="diff-chg">object
+</ins></a><ins class="diff-chg">
+by
+performing
+</ins><a href="#iri-expansion"><ins class="diff-chg">
+IRI
+Expansion
+</ins></a><ins class="diff-chg">
+on
+the
+string.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+if
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+is
+the
+target
+of
+coercion,
+set
+the
+</ins>
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+<ins class="diff-new">by
+creating
+a
+</ins><a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal"><ins class="diff-new">
+typed
+literal
+</ins></a><ins class="diff-new">
+using
+the
+string
+</ins>
+and
+<ins class="diff-new">the
+coercion
+key
+as
+the
+datatype
+IRI.
+</ins></li><li><ins class="diff-new">
+Otherwise,
+set
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a><ins class="diff-new">
+to
+</ins>
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+value
+created
+from
+the
+string.
+</li>
+</ol>
+<ins class="diff-new">Generate
+a
+triple
+representing
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-new">
+active
+subject
+</ins></a>,<ins class="diff-new">
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins></a><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="active_object" href="#dfn-active_object"><ins class="diff-new">
+active
+object
+</ins></a>.</li>
+<li>
+If
+a
+number
+is
+detected,
+generate
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+using
+a
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+either
+<code>
+xsd:integer
+</code>
+or
+<code>
+xsd:double
+</code>,
+depending
+on
+if
+the
+value
+contains
+a
+fractional
+and/or
+an
+exponential
+component.
+Generate
+a
+triple
+using
+the
+<a class="tref" title="active__subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">property
+</ins>
+</a>
+and
+the
+generated
+typed
+literal.
+</li>
+<li>
+Otherwise,
+if
+<strong>
+true
+</strong>
+or
+<strong>
+false
+</strong>
+is
+detected,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">property
+</ins>
+</a>
+and
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+value
+created
+from
+the
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+<code>
+xsd:boolean
+</code>.
+</li>
+</ol>
+</div>
+<del class="diff-old">8.
+Best
+Practices
+The
+nature
+of
+Web
+programming
+allows
+one
+to
+use
+basic
+technologies,
+such
+as
+JSON-LD,
+across
+a
+variety
+of
+systems
+and
+environments.
+This
+section
+attempts
+to
+describe
+some
+of
+those
+environments
+and
+the
+way
+in
+which
+JSON-LD
+can
+be
+integrated
+in
+order
+to
+help
+alleviate
+certain
+development
+headaches.
+8.1
+JavaScript
+It
+is
+expected
+that
+JSON-LD
+will
+be
+used
+quite
+a
+bit
+in
+JavaScript
+environments,
+however,
+features
+like
+the
+expanded
+form
+for
+object
+values
+mean
+that
+using
+JSON-LD
+directly
+in
+JavaScript
+may
+be
+annoying
+without
+a
+middleware
+layer
+such
+as
+a
+simple
+library
+that
+converts
+JSON-LD
+markup
+before
+JavaScript
+uses
+it.
+One
+could
+say
+that
+JSON-LD
+is
+a
+good
+fit
+for
+the
+RDF
+API,
+which
+enables
+a
+variety
+of
+RDF-based
+Web
+Applications,
+but
+some
+don't
+want
+to
+require
+that
+level
+of
+functionality
+just
+to
+use
+JSON-LD.
+The
+group
+is
+still
+discussing
+the
+best
+way
+to
+proceed,
+so
+input
+on
+how
+JSON-LD
+could
+more
+easily
+be
+utilized
+in
+JavaScript
+environments
+would
+be
+very
+much
+appreciated.
+8.2
+Schema-less
+Databases
+Databases
+such
+as
+CouchDB
+and
+MongoDB
+allow
+the
+creation
+of
+schema-less
+data
+stores.
+RDF
+is
+a
+type
+of
+schema-less
+data
+model
+and
+thus
+lends
+itself
+to
+databases
+such
+as
+CouchDB
+and
+MongoDB.
+Both
+of
+these
+databases
+can
+use
+JSON-LD
+as
+their
+storage
+format.
+The
+group
+needs
+feedback
+from
+CouchDB
+and
+MongoDB
+experts
+regarding
+the
+usefulness
+of
+JSON-LD
+in
+those
+environments.
+MongoDB
+does
+not
+allow
+the
+'.'
+character
+to
+be
+used
+in
+key
+names.
+This
+prevents
+developers
+from
+storing
+IRIs
+as
+keys,
+which
+also
+prevents
+storage
+of
+the
+data
+in
+normalized
+form.
+While
+this
+issue
+can
+be
+avoided
+by
+using
+CURIEs
+for
+key
+values,
+it
+is
+not
+known
+if
+this
+mechanism
+is
+enough
+to
+allow
+JSON-LD
+to
+be
+used
+in
+MongoDB
+in
+a
+way
+that
+is
+useful
+to
+developers.
+</del>
+</div>
+</div>
+<div id="experimental-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">9.
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+<del class="diff-old">Advanced
+</del>
+<ins class="diff-chg">Experimental
+</ins>
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+considered
+as
+discussion
+points;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<del class="diff-old">9.1
+Vocabulary
+Profiles
+One
+of
+the
+more
+powerful
+features
+of
+RDFa
+1.1
+Core
+is
+the
+ability
+to
+specify
+a
+collection
+of
+prefixes
+and
+terms
+that
+can
+be
+re-used
+by
+a
+processor
+to
+simplfy
+markup.
+JSON-LD
+provides
+a
+similar
+mechanism
+called
+Vocabulary
+Profiles,
+which
+is
+the
+inclusion
+of
+a
+context
+external
+to
+the
+JSON-LD
+document.
+The
+example
+below
+demonstrates
+how
+one
+may
+specify
+an
+external
+Vocabulary
+Profile.
+Assume
+the
+following
+profile
+exists
+at
+this
+imaginary
+URL:
+http://example.org/profiles/contacts
+.
+{
+  "@context": 
+  {
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+     "#types":
+     {
+        "age": "xsd:integer",
+        "homepage": "xsd:anyURI",
+     }
+  }
+}
+The
+profile
+listed
+above
+can
+be
+used
+in
+the
+following
+way:
+{
+  "@profile": "http://example.org/profiles/contacts",
+  "name": "John Smith",
+  "age": "41",
+  "homepage": "http://example.org/home/"
+}
+The
+example
+above
+would
+generate
+the
+following
+triples:
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</del>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.2
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+array
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+JSON-LD
+associative
+array.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "@": 
+</del>
+<ins class="diff-chg">  "@coerce": {
+    "foaf": "http://xmlns.com/foaf/0.1/"
+  },
+  "@subject": 
+</ins>
+  [
+    {
+<del class="diff-old">      "@": "http://example.org/people#john",
+      "a": "foaf:Person"
+</del>
+<ins class="diff-chg">      "@subject": "http://example.org/people#john",
+      "@type": "foaf:Person"
+</ins>
+    },
+    {
+<del class="diff-old">      "@": "http://example.org/people#jane",
+      "a": "foaf:Person"
+</del>
+<ins class="diff-chg">      "@subject": "http://example.org/people#jane",
+      "@type": "foaf:Person"
+</ins>
+    }
+  ]
+}
+</pre>
+<p>
+A
+disjoint
+graph
+could
+also
+be
+expressed
+like
+so:
+</p>
+<pre class="example">
+[
+  {
+<del class="diff-old">    "@": "http://example.org/people#john",
+    "a": "foaf:Person"
+</del>
+<ins class="diff-chg">    "@subject": "http://example.org/people#john",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+</ins>
+  },
+  {
+<del class="diff-old">    "@": "http://example.org/people#jane",
+    "a": "foaf:Person"
+</del>
+<ins class="diff-chg">    "@subject": "http://example.org/people#jane",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+</ins>
+  }
+]
+</pre>
+</div>
+<div id="lists" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">9.3
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+<del class="diff-old">The
+JSON-LD
+API
+</del>
+<ins class="diff-chg">Lists
+</ins>
+</h3>
+<p>
+<del class="diff-old">This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+format
+that
+is
+easier
+to
+work
+with
+</del>
+<ins class="diff-chg">Because
+graphs
+do
+not
+describe
+ordering
+for
+links
+between
+nodes,
+multi-valued
+properties
+</ins>
+in
+<del class="diff-old">various
+programming
+languages.
+</del>
+<ins class="diff-chg">JSON
+do
+not
+provide
+an
+ordering
+of
+the
+listed
+objects.
+For
+example,
+consider
+the
+following
+simple
+document:
+</ins>
+</p>
+<del class="diff-old">]
+interface  {
+};
+</del>
+  <pre class="example">
+<ins class="diff-chg">{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}
+</ins>
+</pre>
+<del class="diff-old">9.3.1
+Methods
+toGraph
+Parses
+JSON-LD
+and
+transforms
+</del>
+<p>
+<ins class="diff-chg">This
+results
+in
+three
+triples
+being
+generated,
+each
+relating
+</ins>
+the
+<del class="diff-old">data
+into
+</del>
+<ins class="diff-chg">subject
+to
+</ins>
+an
+<del class="diff-old">Graph,
+which
+is
+compatible
+</del>
+<ins class="diff-chg">individual
+object,
+</ins>
+with
+<del class="diff-old">the
+RDF
+Interfaces
+API
+specification
+</del>
+<ins class="diff-chg">no
+inherent
+order.
+To
+address
+this
+issue,
+RDF-based
+languages,
+such
+as
+</ins>
+[
+<cite>
+<del class="diff-old">RDF-INTERFACES
+</del>
+<a class="bibref" rel="biblioentry" href="#bib-TURTLE">
+<ins class="diff-chg">TURTLE
+</ins>
+</a>
+</cite>
+<del class="diff-old">].
+This
+method
+will
+return
+null
+if
+there
+are
+any
+errors,
+or
+if
+</del>
+<ins class="diff-chg">]
+use
+</ins>
+the
+<del class="diff-old">RDF
+Interfaces
+API
+is
+not
+available
+for
+use.
+Parameter
+Type
+Nullable
+Optional
+Description
+jsonld
+</del>
+<ins class="diff-chg">concept
+of
+an
+</ins>
+<code>
+<del class="diff-old">DOMString
+</del>
+<ins class="diff-chg">rdf:List
+</ins>
+</code>
+<ins class="diff-new">(as
+described
+in
+[
+</ins><cite>
+<del class="diff-old">✘
+✘
+The
+JSON-LD
+string
+to
+parse
+into
+the
+RDFGraph.
+callback
+JSONLDParserCallback
+</del>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">
+<ins class="diff-chg">RDF-SCHEMA
+</ins>
+</a>
+<del class="diff-old">✔
+✔
+A
+callback
+that
+is
+called
+whenever
+</del>
+</cite>
+<ins class="diff-chg">]).
+This
+uses
+</ins>
+a
+<del class="diff-old">processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+No
+exceptions.
+Return
+type:
+Graph
+toProjection
+Parses
+</del>
+<ins class="diff-chg">sequence
+of
+unlabeled
+nodes
+with
+properties
+describing
+a
+value,
+a
+null-terminated
+next
+property.
+Without
+specific
+syntactical
+support,
+this
+could
+be
+represented
+in
+</ins>
+JSON-LD
+<del class="diff-old">text
+into
+an
+RDF
+API
+Projection
+object
+</del>
+as
+<del class="diff-old">specified
+by
+</del>
+<ins class="diff-chg">follows:
+</ins></p>  <pre class="example"><ins class="diff-chg">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">{</span>,
+</ins>    <span class="diff">"@first": "joe"</span>,    <span class="diff">"@rest": {</span>      <span class="diff">"@first": "bob"</span>,      <span class="diff">"@rest": {</span>        <span class="diff">"@first": "jaybee"</span>,        <span class="diff">"@rest": "@nil"</span>        <span class="diff">}</span>      <span class="diff">}</span>    <span class="diff">}</span>  <span class="diff">}</span>,<ins class="diff-chg">
+...
+}
+</ins></pre><p><ins class="diff-chg">
+As
+this
+notation
+is
+rather
+unwieldy
+and
+</ins>
+the
+<del class="diff-old">RDF
+API
+specification
+[
+RDF-API
+].
+If
+there
+are
+any
+errors,
+null
+</del>
+<ins class="diff-chg">notion
+of
+ordered
+collections
+</ins>
+is
+<del class="diff-old">returned.
+Parameter
+Type
+Nullable
+Optional
+Description
+jsonld
+DOMString
+✘
+✘
+The
+JSON-LD
+string
+</del>
+<ins class="diff-chg">rather
+important
+in
+data
+modeling,
+it
+is
+useful
+</ins>
+to
+<del class="diff-old">parse
+into
+</del>
+<ins class="diff-chg">have
+specific
+language
+support.
+In
+JSON-LD,
+a
+list
+may
+be
+represented
+using
+</ins>
+the
+<del class="diff-old">Projection.
+template
+</del>
+<code>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+<del class="diff-old">✔
+✘
+The
+Projection
+template
+to
+use
+when
+building
+</del>
+<ins class="diff-chg">keyword
+as
+follows:
+</ins></p>  <pre class="example"><ins class="diff-chg">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
+...
+}
+</ins></pre><p><ins class="diff-chg">
+This
+describes
+</ins>
+the
+<del class="diff-old">Projection.
+subject
+DOMString
+✔
+✘
+The
+subject
+to
+</del>
+use
+<del class="diff-old">when
+building
+the
+Projection.
+callback
+JSONLDParserCallback
+✔
+✔
+A
+callback
+that
+</del>
+<ins class="diff-chg">of
+this
+array
+as
+being
+ordered,
+and
+order
+</ins>
+is
+<del class="diff-old">called
+whenever
+</del>
+<ins class="diff-chg">maintained
+through
+normalization
+and
+RDF
+conversion.
+If
+every
+use
+of
+</ins>
+a
+<del class="diff-old">processing
+error
+occurs
+on
+the
+</del>
+given
+<del class="diff-old">JSON-LD
+string.
+No
+exceptions.
+Return
+type:
+object
+The
+JSONLDParserCallback
+</del>
+<ins class="diff-chg">multi-valued
+property
+</ins>
+is
+<del class="diff-old">called
+whenever
+</del>
+a
+<del class="diff-old">processing
+error
+occurs
+on
+input
+data.
+</del>
+<ins class="diff-chg">list,
+this
+may
+be
+abbreviated
+by
+adding
+an
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+term:
+</ins>
+</p>
+<del class="diff-old">]
+interface  {
+};
+</del>
+  <pre class="example">
+<ins class="diff-chg">{
+</ins>  <span class="diff">"@context": {</span><ins class="diff-chg">
+    ...
+</ins>    <span class="diff">"@context": {</span>      <span class="diff">"@list": ["foaf:nick"]</span>    <span class="diff">}</span>  <span class="diff">}</span>,<ins class="diff-chg">
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}
+</ins>
+</pre>
+<div id="expansion-2" class="section">
+<h4 id="list-expansion">
+<span class="secno">
+<del class="diff-old">9.3.2
+</del>
+<ins class="diff-chg">6.2.1
+</ins>
+</span>
+<del class="diff-old">Methods
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+</h4>
+<del class="diff-old">error
+This
+callback
+is
+invoked
+whenever
+an
+error
+occurs
+during
+processing.
+Parameter
+Type
+Nullable
+Optional
+Description
+error
+DOMString
+✘
+✘
+A
+descriptive
+error
+string
+returned
+by
+the
+processor.
+No
+exceptions.
+Return
+type:
+void
+</del>
+<p class="issue">
+<ins class="diff-chg">TBD.
+</ins></p>
+</div>
+<div id="normalization-2" class="section">
+<h4 id="list-normalization">
+<del class="diff-old">The
+following
+example
+demonstrates
+how
+to
+convert
+JSON-LD
+to
+a
+projection
+that
+is
+directly
+usable
+in
+a
+programming
+environment:
+</del>
+<span class="secno">
+<ins class="diff-chg">6.2.2
+</ins></span><ins class="diff-chg">
+Normalization
+</ins></h4><p class="issue"><ins class="diff-chg">
+TBD.
+</ins>
+</p>
+<del class="diff-old">// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+// Map the JSON-LD to a language-native object
+var person = jsonld.toProjection(jsonldString, myTemplate);
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+"Their
+homepage
+is:
+"
++
+person.homepage);
+A
+JSON-LD
+Serializer
+is
+also
+available
+to
+map
+a
+language-native
+object
+to
+JSON-LD.
+]
+interface  {
+};
+</del>
+</div>
+<div id="rdf-conversion-1" class="section">
+<h4 id="list-rdf">
+<span class="secno">
+<del class="diff-old">9.3.3
+</del>
+<ins class="diff-chg">6.2.3
+</ins>
+</span>
+<del class="diff-old">Methods
+</del>
+<ins class="diff-chg">RDF
+Conversion
+</ins>
+</h4>
+<del class="diff-old">normalize
+Serializes
+a
+language-native
+object
+into
+a
+normalized
+JSON-LD
+string.
+Normalization
+is
+important
+when
+performing
+things
+like
+equality
+comparison
+and
+digital
+signature
+creation
+and
+verification.
+Parameter
+Type
+Nullable
+Optional
+Description
+obj
+object
+✘
+✘
+An
+associative
+array
+</del>
+<p>
+<ins class="diff-chg">To
+support
+RDF
+Conversion
+</ins>
+of
+<del class="diff-old">key-value
+pairs
+that
+should
+be
+converted
+to
+a
+JSON-LD
+string.
+It
+is
+assumed
+that
+a
+map
+already
+exists
+for
+the
+data.
+No
+exceptions.
+Return
+type:
+DOMString
+The
+Normalization
+</del>
+<ins class="diff-chg">lists,
+</ins><a href="#rdf-conversion-algorithm"><ins class="diff-chg">
+RDF
+Conversion
+</ins>
+Algorithm
+<del class="diff-old">This
+algorithm
+is
+very
+rough,
+untested,
+and
+probably
+contains
+many
+bugs.
+Use
+at
+your
+own
+risk.
+It
+will
+change
+in
+the
+coming
+months.
+The
+JSON-LD
+normalization
+algorithm
+</del>
+</a>
+is
+<ins class="diff-new">updated
+</ins>
+as
+follows:
+</p>
+<ol class="algorithm update">
+<li>
+<del class="diff-old">Remove
+</del>
+<span class="list-number">
+<ins class="diff-chg">2.4a.
+</ins></span><ins class="diff-chg">
+If
+</ins>
+the
+<ins class="diff-new">associative
+array
+has
+a
+</ins>
+<code>
+<del class="diff-old">@context
+</del>
+<ins class="diff-chg">@list
+</ins>
+</code>
+key
+and
+<del class="diff-old">preserve
+it
+as
+</del>
+the
+<del class="diff-old">transformation
+map
+while
+running
+this
+algorithm.
+</del>
+<ins class="diff-chg">value
+is
+an
+array
+process
+the
+value
+as
+a
+list
+starting
+at
+</ins><a href="#processing-step-list"><ins class="diff-chg">
+Step
+3a
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">For
+each
+key
+</del>
+<span class="list-number">
+<ins class="diff-chg">2.7.3.
+</ins></span><ins class="diff-chg">
+Create
+a
+new
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins></a><ins class="diff-chg">
+copies
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a>,<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>.
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">key
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+property
+</ins></a>
+is
+<ins class="diff-new">the
+target
+of
+</ins>
+a
+<del class="diff-old">CURIE,
+expand
+</del>
+<code>
+<ins class="diff-chg">@list
+</ins></code><ins class="diff-chg">
+coercion,
+and
+</ins>
+the
+<del class="diff-old">CURIE
+to
+</del>
+<ins class="diff-chg">value
+is
+</ins>
+an
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">array,
+process
+the
+value
+as
+a
+list
+starting
+at
+</ins><a href="#processing-step-list"><ins class="diff-chg">
+Step
+3a
+</ins></a>.</li><li><ins class="diff-chg">
+Otherwise,
+process
+the
+value
+starting
+at
+</ins><a href="#processing-step-associative"><ins class="diff-chg">
+Step
+2
+</ins></a>.</li><li><ins class="diff-chg">
+Proceed
+</ins>
+using
+the
+<del class="diff-old">transformation
+map
+</del>
+<ins class="diff-chg">previous
+</ins><a class="tref internalDFN" title="processor_state" href="#dfn-processor_state"><ins class="diff-chg">
+processor
+state
+</ins>
+</a>.
+</li>
+</ol>
+</li>
+<del class="diff-old">For
+</del>
+<li id="processing-step-list">
+<span class="list-number">
+<ins class="diff-chg">3a.
+</ins></span><ins class="diff-chg">
+Generate
+an
+RDF
+List
+by
+linking
+</ins>
+each
+<del class="diff-old">value
+If
+</del>
+<ins class="diff-chg">element
+of
+</ins>
+the
+<del class="diff-old">value
+should
+be
+type
+coerced
+per
+</del>
+<ins class="diff-chg">list
+using
+</ins><code><ins class="diff-chg">
+rdf:first
+</ins></code><ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+rdf:next
+</ins></code>,<ins class="diff-chg">
+terminating
+</ins>
+the
+<del class="diff-old">transformation
+map
+,
+ensure
+that
+it
+is
+transformed
+to
+</del>
+<ins class="diff-chg">list
+with
+</ins><code><ins class="diff-chg">
+rdf:nil
+</ins></code><ins class="diff-chg">
+using
+</ins>
+the
+<del class="diff-old">new
+value.
+</del>
+<ins class="diff-chg">following
+sequence:
+</ins><ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">value
+is
+</del>
+<ins class="diff-chg">list
+has
+no
+element,
+generate
+</ins>
+a
+<del class="diff-old">CURIE,
+expand
+the
+CURIE
+to
+an
+IRI
+</del>
+<ins class="diff-chg">triple
+</ins>
+using
+the
+<del class="diff-old">transformation
+map
+.
+</del>
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+<ins class="diff-chg">active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a><ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+rdf:nil
+</ins></code>.
+</li>
+<li>
+<del class="diff-old">If
+the
+value
+is
+</del>
+<ins class="diff-chg">Otherwise,
+generate
+</ins>
+a
+<del class="diff-old">typed
+literal
+</del>
+<ins class="diff-chg">triple
+using
+using
+the
+</ins><a class="tref internalDFN" title="active_subject" href="#dfn-active_subject"><ins class="diff-chg">
+active
+subject
+</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins>
+</a>
+and
+<ins class="diff-new">a
+newly
+generated
+BNode
+identified
+as
+</ins><em><ins class="diff-new">
+first
+</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1"><ins class="diff-new">
+blank
+node
+identifier
+</ins></dfn></em>.</li><li><ins class="diff-new">
+For
+each
+element
+other
+than
+</ins>
+the
+<del class="diff-old">type
+is
+</del>
+<ins class="diff-chg">last
+element
+in
+the
+list:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Create
+</ins>
+a
+<del class="diff-old">CURIE,
+expand
+it
+to
+an
+IRI
+</del>
+<ins class="diff-chg">processor
+state
+</ins>
+using
+the
+<del class="diff-old">transformation
+map
+.
+When
+generating
+</del>
+<ins class="diff-chg">active
+context,
+</ins><em><ins class="diff-chg">
+first
+</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></dfn></em><ins class="diff-chg">
+as
+</ins>
+the
+<del class="diff-old">final
+value,
+use
+expanded
+object
+value
+form
+to
+store
+all
+IRIs,
+typed
+literals
+</del>
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+<ins class="diff-chg">active
+subject
+</ins></a>,
+and
+<del class="diff-old">plain
+literal
+s
+with
+language
+information.
+</del>
+<code>
+<ins class="diff-chg">rdf:first
+</ins></code><ins class="diff-chg">
+as
+the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Output
+each
+sorted
+key-value
+pair
+without
+any
+extraneous
+whitespace.
+If
+the
+value
+is
+an
+associative
+array,
+perform
+</del>
+<ins class="diff-chg">Unless
+</ins>
+this
+<del class="diff-old">algorithm,
+starting
+at
+step
+#1,
+recursively
+on
+the
+sub-tree.
+There
+should
+be
+no
+nesting
+in
+the
+outputted
+JSON
+data.
+That
+is,
+</del>
+<ins class="diff-chg">is
+</ins>
+the
+<del class="diff-old">top-most
+</del>
+<ins class="diff-chg">last
+</ins>
+element
+<del class="diff-old">should
+be
+an
+array.
+Each
+item
+</del>
+in
+the
+<del class="diff-old">array
+contains
+a
+single
+subject
+with
+</del>
+<ins class="diff-chg">list,
+generate
+</ins>
+a
+<del class="diff-old">corresponding
+array
+of
+properties
+in
+UTF-8
+sort
+order.
+Any
+related
+objects
+that
+are
+complex
+objects
+themselves
+should
+be
+given
+</del>
+<ins class="diff-chg">new
+BNode
+identified
+as
+</ins><em><ins class="diff-chg">
+rest
+</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></dfn></em>,<ins class="diff-chg">
+otherwise
+use
+</ins><code><ins class="diff-chg">
+rdf:nil
+</ins></code>.</li><li><ins class="diff-chg">
+Generate
+</ins>
+a
+<del class="diff-old">top-level
+object
+in
+the
+top-level
+array.
+</del>
+<ins class="diff-chg">new
+triple
+using
+</ins><em><ins class="diff-chg">
+first
+</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></dfn></em>,<code><ins class="diff-chg">
+rdf:rest
+</ins></code><ins class="diff-chg">
+and
+</ins><em><ins class="diff-chg">
+rest
+</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></dfn></em>.
+</li>
+<del class="diff-old">Note
+that
+normalizing
+named
+</del>
+<li>
+<ins class="diff-chg">Set
+</ins><em><ins class="diff-chg">
+first
+</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">
+blank
+<del class="diff-old">nodes
+is
+impossible
+at
+present
+since
+one
+would
+have
+</del>
+<ins class="diff-chg">node
+identifier
+</ins></dfn></em>
+to
+<del class="diff-old">specify
+a
+</del>
+<em>
+<ins class="diff-chg">rest
+</ins><dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">
+blank
+node
+<del class="diff-old">naming
+algorithm.
+For
+the
+time
+being,
+you
+cannot
+normalize
+graphs
+that
+contain
+named
+blank
+nodes.
+However,
+normalizing
+graphs
+</del>
+<ins class="diff-chg">identifier
+</ins></dfn></em>.</li></ol></li></ol></li></ol></div></div></div><div class="appendix section" id="markup-examples"><h2><span class="secno"><ins class="diff-chg">
+A.
+</ins></span><ins class="diff-chg">
+Markup
+Examples
+</ins></h2><p><ins class="diff-chg">
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+</ins>
+that
+<del class="diff-old">contain
+non-named
+blank
+nodes
+</del>
+<ins class="diff-chg">JSON-LD
+</ins>
+is
+<del class="diff-old">supported.
+</del>
+<ins class="diff-chg">very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</ins>
+</p>
+<del class="diff-old">var myObj = { "@context" : { 
+                "xsd" : "http://www.w3.org/2001/XMLSchema#",
+                "name" : "http://xmlns.com/foaf/0.1/name",
+                "age" : "http://xmlns.com/foaf/0.1/age",
+                "homepage" : "http://xmlns.com/foaf/0.1/homepage",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "age",
+                   "xsd:anyURI": "homepage"
+                }
+              },
+              "name" : "Joe Jackson",
+              "age" : "42",
+              "homepage" : "http://example.org/people/joe" };
+</del>
+<div id="rdfa" class="section">
+<h3>
+<del class="diff-old">// Map the language-native object to JSON-LD
+var
+jsonldText
+=
+jsonld.normalize(myObj);
+</del>
+<span class="secno">
+<ins class="diff-chg">A.1
+</ins></span><ins class="diff-chg">
+RDFa
+</ins></h3>
+<p>
+<del class="diff-old">After
+the
+code
+in
+the
+</del>
+<ins class="diff-chg">The
+following
+</ins>
+example
+<del class="diff-old">above
+has
+executed,
+the
+jsonldText
+value
+will
+be
+(line-breaks
+added
+for
+readability):
+</del>
+<ins class="diff-chg">describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</ins>
+</p>
+<pre class="example">
+<del class="diff-old">[{"http://xmlns.com/foaf/0.1/age":{"@datatype":"http://www.w3.org/2001/XMLSchema#nonNegativeInteger","@literal":"42"},
+"http://xmlns.com/foaf/0.1/homepage":{"@iri":"http://example.org/people/joe"},
+"http://xmlns.com/foaf/0.1/name":"Joe
+Jackson"}]
+</del>
+<ins class="diff-chg">&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</ins>
+</pre>
+<p>
+<del class="diff-old">When
+normalizing
+xsd:double
+values,
+implementers
+must
+ensure
+</del>
+<ins class="diff-chg">An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+</ins>
+that
+the
+<del class="diff-old">normalized
+value
+</del>
+<ins class="diff-chg">context
+</ins>
+is
+<ins class="diff-new">not
+repeated.
+</ins></p><pre class="example"><ins class="diff-new">
+{
+  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
+  "@subject": [
+   {
+     "@subject": "_:bnode1",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/bob/",
+     "foaf:name": "Bob"
+   },
+   {
+     "@subject": "_:bnode2",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/eve/",
+     "foaf:name": "Eve"
+   },
+   {
+     "@subject": "_:bnode3",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/manu/",
+     "foaf:name": "Manu"
+   }
+  ]
+}
+</ins></pre></div><div id="microformats" class="section"><h3><span class="secno"><ins class="diff-new">
+A.2
+</ins></span><ins class="diff-new">
+Microformats
+</ins></h3><p><ins class="diff-new">
+The
+following
+example
+uses
+</ins>
+a
+<del class="diff-old">string.
+In
+order
+</del>
+<ins class="diff-chg">simple
+Microformats
+hCard
+example
+</ins>
+to
+<del class="diff-old">generate
+</del>
+<ins class="diff-chg">express
+how
+</ins>
+the
+<del class="diff-old">string
+from
+a
+double
+value,
+output
+equivalent
+to
+</del>
+<ins class="diff-chg">Microformat
+is
+represented
+in
+JSON-LD.
+</ins></p><pre class="example"><ins class="diff-chg">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+</ins></pre><p><ins class="diff-chg">
+The
+representation
+of
+</ins>
+the
+<del class="diff-old">printf("%1.6e",
+value)
+function
+</del>
+<ins class="diff-chg">hCard
+expresses
+the
+Microformat
+terms
+</ins>
+in
+<del class="diff-old">C
+must
+be
+used
+where
+"%1.6e"
+is
+</del>
+the
+<del class="diff-old">string
+formatter
+</del>
+<ins class="diff-chg">context
+</ins>
+and
+<del class="diff-old">value
+is
+</del>
+<ins class="diff-chg">uses
+them
+directly
+for
+</ins>
+the
+<del class="diff-old">value
+</del>
+<code>
+<ins class="diff-chg">url
+</ins></code><ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+fn
+</ins></code><ins class="diff-chg">
+properties.
+Also
+note
+that
+the
+Microformat
+</ins>
+to
+<del class="diff-old">be
+converted.
+</del>
+<ins class="diff-chg">JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+</ins><code><ins class="diff-chg">
+http://tantek.com
+</ins></code>.
+</p>
+<pre class="example">
+<ins class="diff-new">{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@subject": "_:bnode1",
+  "@type": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}
+</ins></pre></div><div id="microdata" class="section"><h3><span class="secno"><ins class="diff-new">
+A.3
+</ins></span><ins class="diff-new">
+Microdata
+</ins></h3>
+<p>
+<del class="diff-old">To
+convert
+the
+</del>
+<ins class="diff-chg">The
+Microdata
+example
+below
+expresses
+book
+information
+as
+</ins>
+a
+<del class="diff-old">double
+value
+in
+JavaScript,
+implementers
+can
+use
+</del>
+<ins class="diff-chg">Microdata
+Work
+item.
+</ins></p><pre class="example"><ins class="diff-chg">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</ins></pre><p><ins class="diff-chg">
+Note
+that
+</ins>
+the
+<del class="diff-old">following
+snippet
+</del>
+<ins class="diff-chg">JSON-LD
+representation
+</ins>
+of
+<del class="diff-old">code:
+</del>
+<ins class="diff-chg">the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</ins>
+</p>
+<pre class="example">
+<del class="diff-old">// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</del>
+<ins class="diff-chg">[
+  {
+    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "@type": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]
+</ins>
+</pre>
+<del class="diff-old">When
+data
+needs
+</del>
+</div>
+<div class="appendix section" id="mashing-up-vocabularies">
+<h3>
+<span class="secno">
+<ins class="diff-chg">A.4
+</ins></span><ins class="diff-chg">
+Mashing
+Up
+Vocabularies
+</ins></h3><p><ins class="diff-chg">
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+</ins>
+to
+be
+<del class="diff-old">normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+</del>
+<ins class="diff-chg">used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+</ins>
+that
+are
+<del class="diff-old">going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+</del>
+<ins class="diff-chg">available
+for
+use
+on
+</ins>
+the
+<del class="diff-old">lossy
+nature
+</del>
+<ins class="diff-chg">Web
+today.
+Some
+</ins>
+of
+<del class="diff-old">xsd:double
+values.
+</del>
+<ins class="diff-chg">these
+vocabularies
+are:
+</ins>
+</p>
+<del class="diff-old">Round-tripping
+data
+can
+be
+problematic
+if
+we
+mix
+</del>
+<ul>
+<li>
+<ins class="diff-chg">RDF
+-
+for
+describing
+information
+about
+objects
+on
+the
+semantic
+web.
+</ins></li><li><ins class="diff-chg">
+RDFS
+-
+for
+expressing
+things
+like
+labels
+</ins>
+and
+<del class="diff-old">match
+@coerce
+rules
+with
+JSON-native
+datatypes,
+</del>
+<ins class="diff-chg">comments.
+</ins></li><li><ins class="diff-chg">
+XSD
+-
+for
+specifying
+basic
+types
+</ins>
+like
+<del class="diff-old">integers.
+Consider
+the
+following
+code
+example:
+var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+// Convert the normalized object back to a JavaScript object
+var
+myObj2
+=
+jsonld.parse(jsonldText);
+At
+this
+point,
+myObj2
+</del>
+<ins class="diff-chg">strings,
+integers,
+dates
+</ins>
+and
+<del class="diff-old">myObj
+will
+have
+different
+values
+</del>
+<ins class="diff-chg">times.
+</ins></li><li><ins class="diff-chg">
+Dublin
+Core
+-
+</ins>
+for
+<del class="diff-old">the
+"number"
+value.
+myObj
+will
+be
+the
+number
+42,
+while
+myObj2
+will
+be
+the
+string
+"42".
+This
+type
+</del>
+<ins class="diff-chg">describing
+creative
+works.
+</ins></li><li><ins class="diff-chg">
+FOAF
+-
+for
+describing
+social
+networks.
+</ins></li><li><ins class="diff-chg">
+Calendar
+-
+for
+specifying
+events.
+</ins></li><li><ins class="diff-chg">
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</ins></li><li><ins class="diff-chg">
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+</ins>
+of
+<del class="diff-old">data
+round-tripping
+error
+</del>
+<ins class="diff-chg">licenses.
+</ins></li><li><ins class="diff-chg">
+GEO
+-
+for
+describing
+geographic
+location.
+</ins></li><li><ins class="diff-chg">
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</ins></li><li><ins class="diff-chg">
+DOAP
+-
+for
+describing
+projects.
+</ins></li></ul><p><ins class="diff-chg">
+You
+</ins>
+can
+<del class="diff-old">bite
+developers.
+We
+are
+currently
+wondering
+if
+having
+a
+"coerce
+validation"
+phase
+</del>
+<ins class="diff-chg">use
+these
+vocabularies
+</ins>
+in
+<del class="diff-old">the
+parsing/normalization
+phases
+would
+be
+a
+good
+idea.
+It
+would
+prevent
+data
+round-tripping
+issues
+</del>
+<ins class="diff-chg">combination,
+</ins>
+like
+<del class="diff-old">the
+one
+mentioned
+above.
+</del>
+<ins class="diff-chg">so:
+</ins>
+</p>
+<del class="diff-old">A.
+The
+Default
+Context
+</del>
+<pre class="example">
+<ins class="diff-chg">{
+  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</ins></pre>
+<p>
+<del class="diff-old">The
+default
+context
+is
+provided
+to
+ensure
+that
+there
+are
+a
+reasonable
+set
+of
+prefixes
+and
+terms
+available
+to
+all
+JSON-LD
+developers.
+Mappings
+specified
+</del>
+<ins class="diff-chg">Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+</ins>
+by
+<ins class="diff-new">modifying
+</ins>
+the
+<del class="diff-old">default
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+</ins>
+context
+</a>
+<del class="diff-old">should
+not
+be
+overwritten
+by
+JSON-LD
+authors.
+All
+JSON-LD
+processors
+must
+load
+the
+following
+context
+in
+as
+</del>
+<ins class="diff-chg">in-line
+using
+</ins>
+the
+<del class="diff-old">intial
+context
+before
+processing
+JSON-LD
+text.
+</del>
+<code>
+<ins class="diff-chg">@context
+</ins></code><ins class="diff-chg">
+keyword,
+like
+so:
+</ins>
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "@context":
+  {
+    "@vocab": "",
+    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
+    "owl": "http://www.w3.org/2002/07/owl#",
+    "xsd": "http://www.w3.org/2001/XMLSchema#",
+    "dcterms": "http://purl.org/dc/terms/",
+    "foaf": "http://xmlns.com/foaf/0.1/",
+    "cal": "http://www.w3.org/2002/12/cal/ical#",
+    "vcard": "http://www.w3.org/2006/vcard/ns# ",
+    "geo": "http://www.w3.org/2003/01/geo/wgs84_pos#",
+    "cc": "http://creativecommons.org/ns#",
+    "sioc": "http://rdfs.org/sioc/ns#",
+    "doap": "http://usefulinc.com/ns/doap#",
+    "com": "http://purl.org/commerce#",
+    "ps": "http://purl.org/payswarm#",
+    "gr": "http://purl.org/goodrelations/v1#",
+    "sig": "http://purl.org/signature#",
+    "ccard": "http://purl.org/commerce/creditcard#"
+    "@coerce": 
+    {
+      "xsd:anyURI": ["rdf:type", "rdf:rest", "foaf:homepage", "foaf:member"],
+      "xsd:integer": "foaf:age"
+    }
+  }
+</del>
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+<ins class="diff-chg">  "@type": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+</ins>
+}
+</pre>
+<p>
+<ins class="diff-new">The
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+keyword
+is
+used
+to
+change
+how
+the
+JSON-LD
+processor
+evaluates
+key-value
+pairs.
+In
+this
+case,
+it
+was
+used
+to
+map
+one
+string
+('myvocab')
+to
+another
+string,
+which
+is
+interpreted
+as
+a
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a>.<ins class="diff-new">
+In
+the
+example
+above,
+the
+</ins><code><ins class="diff-new">
+myvocab
+</ins></code><ins class="diff-new">
+string
+is
+replaced
+with
+"
+</ins><code><ins class="diff-new">
+http://example.org/myvocab#
+</ins></code><ins class="diff-new">
+"
+when
+it
+is
+detected.
+In
+the
+example
+above,
+"
+</ins><code><ins class="diff-new">
+myvocab:personality
+</ins></code><ins class="diff-new">
+"
+would
+expand
+to
+"
+</ins><code><ins class="diff-new">
+http://example.org/myvocab#personality
+</ins></code><ins class="diff-new">
+".
+</ins></p><p><ins class="diff-new">
+This
+mechanism
+is
+a
+short-hand
+for
+RDF,
+called
+a
+CURIE,
+and
+provides
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</ins></p><p></p>
+</div>
+<div class="appendix section" id="acknowledgements">
+<h3>
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">A.5
+</ins>
+</span>
+Acknowledgements
+</h3>
+<p>
+The
+<del class="diff-old">editor
+</del>
+<ins class="diff-chg">editors
+</ins>
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+<del class="diff-old">rationale
+and
+reasoning
+</del>
+<ins class="diff-chg">initial
+push
+</ins>
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+<del class="diff-old">Longley
+</del>
+<ins class="diff-chg">Longley,
+Dave
+Lehn
+and
+Mike
+Johnson
+</ins>
+who
+reviewed,
+provided
+feedback,
+and
+performed
+several
+<del class="diff-old">implementation
+on
+</del>
+<ins class="diff-chg">implementations
+of
+</ins>
+the
+specification,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+<del class="diff-old">Allen
+</del>
+<ins class="diff-chg">Allen,
+Kingsley
+Idehen,
+Glenn
+McDonald,
+Alexandre
+Passant,
+Danny
+Ayers,
+Ted
+Thibodeau
+Jr.,
+Olivier
+Grisel,
+Niklas
+Lindström,
+Markus
+Lanthaler,
+</ins>
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+<ins class="diff-new">Another
+huge
+thank
+you
+goes
+out
+to
+Dave
+Longley
+who
+designed
+many
+of
+the
+algorithms
+used
+in
+this
+specification,
+including
+the
+normalization
+algorithm
+which
+was
+a
+monumentally
+difficult
+design
+challenge.
+</ins>
+</p>
+</div>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+<del class="diff-old">C.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">C.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<del class="diff-old">[RDF-API]
+Manu
+Sporny,
+Benjamin
+Adrian,
+Nathan
+Rixham;
+et
+al.
+RDF
+API
+Latest.
+W3C
+Editor's
+Draft.
+URL:
+http://www.w3.org/2010/02/rdfa/sources/rdf-api/
+</del>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</a>
+</dd>
+<del class="diff-old">[RDF-INTERFACES]
+</del>
+<dt id="bib-RFC3986">
+<ins class="diff-chg">[RFC3986]
+</ins>
+</dt>
+<dd>
+<del class="diff-old">Nathan
+Rixham,
+Manu
+Sporny,
+Benjamin
+Adrian;
+et
+al.
+</del>
+<ins class="diff-chg">T.
+Berners-Lee;
+R.
+Fielding;
+L.
+Masinter.
+</ins><a href="http://www.ietf.org/rfc/rfc3986.txt">
+<cite>
+<del class="diff-old">RDF
+Interfaces
+</del>
+<ins class="diff-chg">Uniform
+Resource
+Identifier
+(URI):
+Generic
+Syntax.
+</ins>
+</cite>
+</a>
+<del class="diff-old">Latest.
+W3C
+Editor's
+Draft.
+</del>
+<ins class="diff-chg">January
+2005.
+Internet
+RFC
+3986.
+</ins>
+URL:
+<del class="diff-old">http://www.w3.org/2010/02/rdfa/sources/rdf-interfaces/
+</del>
+<a href="http://www.ietf.org/rfc/rfc3986.txt">
+<ins class="diff-chg">http://www.ietf.org/rfc/rfc3986.txt
+</ins>
+</a>
+</dd>
+<dt id="bib-RFC3987">
+[RFC3987]
+</dt>
+<dd>
+M.
+Dürst;
+M.
+Suignard.
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+<cite>
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+http://www.ietf.org/rfc/rfc3987.txt
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford.
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+<cite>
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</cite>
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+<dt id="bib-WEBIDL">
+<ins class="diff-new">[WEBIDL]
+</ins></dt><dd><ins class="diff-new">
+Cameron
+McCormack.
+</ins><a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite><ins class="diff-new">
+Web
+IDL.
+</ins></cite></a><ins class="diff-new">
+19
+December
+2008.
+W3C
+Working
+Draft.
+(Work
+in
+progress.)
+URL:
+</ins><a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><ins class="diff-new">
+http://www.w3.org/TR/2008/WD-WebIDL-20081219
+</ins></a></dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">C.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-ECMA-262">
+<ins class="diff-new">[ECMA-262]
+</ins></dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite><ins class="diff-new">
+ECMAScript
+Language
+Specification,
+Third
+Edition.
+</ins></cite></a><ins class="diff-new">
+December
+1999.
+URL:
+</ins><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><ins class="diff-new">
+http://www.ecma-international.org/publications/standards/Ecma-262.htm
+</ins></a></dd>
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDF-SCHEMA">
+<ins class="diff-new">[RDF-SCHEMA]
+</ins></dt><dd><ins class="diff-new">
+Dan
+Brickley;
+Ramanathan
+V.
+Guha.
+</ins><a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite><ins class="diff-new">
+RDF
+Vocabulary
+Description
+Language
+1.0:
+RDF
+Schema.
+</ins></cite></a><ins class="diff-new">
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+</ins><a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><ins class="diff-new">
+http://www.w3.org/TR/2004/REC-rdf-schema-20040210
+</ins></a></dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+31
+March
+2011.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+http://www.w3.org/TR/2011/WD-rdfa-core-20110331
+</a>
+</dd>
+<dt id="bib-TURTLE">
+<ins class="diff-new">[TURTLE]
+</ins></dt><dd><ins class="diff-new">
+David
+Beckett,
+Tim
+Berners-Lee.
+</ins><a href="http://www.w3.org/TeamSubmission/turtle/"><cite><ins class="diff-new">
+Turtle:
+Terse
+RDF
+Triple
+Language.
+</ins></cite></a><ins class="diff-new">
+January
+2008.
+W3C
+Team
+Submission.
+URL:
+</ins><a href="http://www.w3.org/TeamSubmission/turtle/"><ins class="diff-new">
+http://www.w3.org/TeamSubmission/turtle/
+</ins>
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110808/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,3463 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left; 
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-08-august-2011">Unofficial Draft 08 August 2011</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
+<dt>Authors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
+<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20110615.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and 
+messaging format. In an attempt to harmonize the representation of Linked Data 
+in JSON, this specification outlines a common JSON representation format for 
+expressing directed graphs; mixing both Linked Data and non-Linked Data in 
+a single document. 
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design" class="tocxref"><span class="secno">2. </span>Design</a><ul class="toc"><li class="tocline"><a href="#goals-and-rationale" class="tocxref"><span class="secno">2.1 </span>Goals and Rationale</a></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">2.2 </span>Linked Data</a></li><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">2.3 </span>Linking Data</a></li><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">2.4 </span>The Context</a><ul class="toc"><li class="tocline"><a href="#inside-a-context" class="tocxref"><span class="secno">2.4.1 </span>Inside a Context</a></li></ul></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">2.5 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno">3.4 </span>Strings</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">3.6 </span>Datatypes</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">3.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.9 </span>Expansion</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.10 </span>Compaction</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">4.1 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.2 </span>Type Coercion</a></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">4.3 </span>Chaining</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.4 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#overriding-keywords" class="tocxref"><span class="secno">4.5 </span>Overriding Keywords</a></li><li class="tocline"><a href="#normalization" class="tocxref"><span class="secno">4.6 </span>Normalization</a></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">5. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">5.1 </span>Syntax Tokens and Keywords</a></li><li class="tocline"><a href="#algorithm-terms" class="tocxref"><span class="secno">5.2 </span>Algorithm Terms</a></li><li class="tocline"><a href="#context-1" class="tocxref"><span class="secno">5.3 </span>Context</a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno">5.3.1 </span>Coerce</a></li><li class="tocline"><a href="#initial-context" class="tocxref"><span class="secno">5.3.2 </span>Initial Context</a></li></ul></li><li class="tocline"><a href="#iri-expansion" class="tocxref"><span class="secno">5.4 </span>IRI Expansion</a></li><li class="tocline"><a href="#iri-compaction" class="tocxref"><span class="secno">5.5 </span>IRI Compaction</a></li><li class="tocline"><a href="#value-expansion" class="tocxref"><span class="secno">5.6 </span>Value Expansion</a></li><li class="tocline"><a href="#value-compaction" class="tocxref"><span class="secno">5.7 </span>Value Compaction</a></li><li class="tocline"><a href="#expansion-1" class="tocxref"><span class="secno">5.8 </span>Expansion</a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno">5.8.1 </span>Expansion Algorithm</a></li></ul></li><li class="tocline"><a href="#compaction-1" class="tocxref"><span class="secno">5.9 </span>Compaction</a><ul class="toc"><li class="tocline"><a href="#compaction-algorithm" class="tocxref"><span class="secno">5.9.1 </span>Compaction Algorithm</a></li></ul></li><li class="tocline"><a href="#framing-1" class="tocxref"><span class="secno">5.10 </span>Framing</a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno">5.10.1 </span>Framing Algorithm Terms</a></li><li class="tocline"><a href="#framing-algorithm" class="tocxref"><span class="secno">5.10.2 </span>Framing Algorithm</a></li></ul></li><li class="tocline"><a href="#normalization-1" class="tocxref"><span class="secno">5.11 </span>Normalization</a><ul class="toc"><li class="tocline"><a href="#normalization-algorithm-terms" class="tocxref"><span class="secno">5.11.1 </span>Normalization Algorithm Terms</a></li><li class="tocline"><a href="#normalization-algorithm" class="tocxref"><span class="secno">5.11.2 </span>Normalization Algorithm</a></li><li class="tocline"><a href="#node-labeling-algorithm" class="tocxref"><span class="secno">5.11.3 </span>Node Labeling Algorithm</a></li><li class="tocline"><a href="#shallow-comparison-algorithm" class="tocxref"><span class="secno">5.11.4 </span>Shallow Comparison Algorithm</a></li><li class="tocline"><a href="#object-comparison-algorithm" class="tocxref"><span class="secno">5.11.5 </span>Object Comparison Algorithm</a></li><li class="tocline"><a href="#deep-comparison-algorithm" class="tocxref"><span class="secno">5.11.6 </span>Deep Comparison Algorithm</a></li><li class="tocline"><a href="#node-serialization-algorithm" class="tocxref"><span class="secno">5.11.7 </span>Node Serialization Algorithm</a></li><li class="tocline"><a href="#combinatorial-serialization-algorithm" class="tocxref"><span class="secno">5.11.8 </span>Combinatorial Serialization Algorithm</a></li><li class="tocline"><a href="#mapping-serialization-algorithm" class="tocxref"><span class="secno">5.11.9 </span>Mapping Serialization Algorithm</a></li><li class="tocline"><a href="#label-generation-algorithm" class="tocxref"><span class="secno">5.11.10 </span>Label Generation Algorithm</a></li></ul></li><li class="tocline"><a href="#data-round-tripping" class="tocxref"><span class="secno">5.12 </span>Data Round Tripping</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">5.13 </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">5.13.1 </span>Overview</a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno">5.13.2 </span>RDF Conversion Algorithm Terms</a></li><li class="tocline"><a href="#rdf-conversion-algorithm" class="tocxref"><span class="secno">5.13.3 </span>RDF Conversion Algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno">6. </span>Experimental Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">6.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#lists" class="tocxref"><span class="secno">6.2 </span>Lists</a><ul class="toc"><li class="tocline"><a href="#expansion-2" class="tocxref"><span class="secno">6.2.1 </span>Expansion</a></li><li class="tocline"><a href="#normalization-2" class="tocxref"><span class="secno">6.2.2 </span>Normalization</a></li><li class="tocline"><a href="#rdf-conversion-1" class="tocxref"><span class="secno">6.2.3 </span>RDF Conversion</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">A. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">A.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">A.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">A.3 </span>Microdata</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">A.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A.5 </span>Acknowledgements</a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p>
+JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing 
+data on the Web. Linked Data is a technique for describing content across 
+different 
+documents or Web sites. Web resources are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s, 
+and typically are dereferencable entities that may be used to find more 
+information, creating a "Web of Knowledge". JSON-LD is intended to be a simple 
+publishing method for expressing not only Linked Data in JSON, but for adding
+semantics to existing JSON.
+</p>
+
+<p>
+JSON-LD is designed as a light-weight syntax that can be used to express 
+Linked Data. It is primarily intended to be a way to express Linked Data 
+in Javascript and other Web-based programming environments. It is also 
+useful when building interoperable Web Services and when storing Linked 
+Data in JSON-based document storage engines. It is practical and designed 
+to be as simple as possible, utilizing the large number of JSON parsers 
+and existing code that is in use today. It is designed to be able to 
+express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats 
+[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports 
+every major Web-based structured data model in use today. 
+</p>
+
+<p>
+The syntax does not require many applications to change their JSON, but 
+easily add meaning by adding context in a way that is either in-band or 
+out-of-band. The syntax is designed to not disturb already deployed systems 
+running on JSON, but provide a smooth migration path from JSON to JSON with 
+added semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a very small memory footprint in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and 
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to implement processors and APIs for 
+  JSON-LD.</li>
+</ul>
+
+<p>
+To understand the basics in this specification you must first be familiar with 
+JSON, which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. To understand the API and how it is
+intended to operate  in a programming environment, it is useful to have working 
+knowledge of the JavaScript programming language [<cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and 
+WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be 
+familiar with the basic RDF concepts [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+
+<p>
+  Examples may contain references to existing vocabularies and use abbreviations in CURIEs and source code. The following is a list of all vocabularies and their abbreviations, as used in this document:
+</p>
+<ul>
+  <li>The <a href="http://purl.org/dc/terms/">Dublin Core</a>
+  vocabulary (abbreviation: <code>dc</code>, e.g., <code>dc:title</code>)</li>
+  <li>The <a href="http://xmlns.com/foaf/0.1/">Friend of a Friend</a>
+  vocabulary (abbreviation: <code>foaf</code>, e.g., <code>foaf:knows</code>)</li>
+  <li>The <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">RDF</a>
+  vocabulary (abbreviation: <code>rdf</code>, e.g., <code>rdf:type</code>)</li>
+  <li>The <a href="http://www.w3.org/2001/XMLSchema#">XSD</a>
+  vocabulary (abbreviation: <code>xsd</code>, e.g., <code>xsd:integer</code>)</li>
+</ul>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>Technical discussion typically occurs on the public mailing list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
+</li>
+
+<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held 
+on Tuesdays at 1500UTC on the second and fourth week of each month.
+</li>
+
+<li>Specification bugs and issues should be reported in the 
+<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
+
+<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the 
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design</h2>
+
+<p>The following section outlines the design goals and rationale behind the 
+JSON-LD markup language.
+</p>
+
+<div id="goals-and-rationale" class="section">
+<h3><span class="secno">2.1 </span>Goals and Rationale</h3>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers need only know JSON and three keywords to use the basic 
+ functionality in JSON-LD. No extra processors or software libraries are
+ necessary to use JSON-LD in its most basic form. The language attempts to
+ ensure that developers have an easy learning curve.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
+ all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
+ <dt>Expressiveness</dt>
+ <dd>The syntax must be able to express directed graphs, which have been proven
+ to be able to simply express almost every real world data model.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable, requiring as
+ little as possible from the developer.</dd>
+ <dt>Pragmatism</dt>
+ <dd>Mixing the expression of pure Linked Data with data that is not
+ linked was an approach that was driven by pragmatism. JSON-LD attempts to be
+ more practical than theoretical in its approach to Linked Data.</dd>
+ <dt>Zero Edits, most of the time</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers. At times, mapping JSON to 
+ a graph representation can become difficult. In these instances, rather than 
+ having JSON-LD support esoteric markup, we chose not to support the use case 
+ and support a simplified syntax instead. So, while Zero Edits was a goal,
+ it was not always possible without adding great complexity to the language.
+ </dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="linked-data" class="section">
+<h3><span class="secno">2.2 </span>Linked Data</h3>
+<p>
+The following definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> is the one that will 
+be used for this specification.
+</p>
+<ol>
+ <li><dfn title="Linked_Data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a 
+   representation of a linked data graph.</li>
+ <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is a labeled directed graph, where nodes 
+   are <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are 
+   properties.</li>
+ <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> 
+   with at least one outgoing edge.</li>
+ <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> <em class="rfc2119" title="should">should</em> be labeled with a IRI.</li>
+ <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>
+   .</li>
+ <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <em class="rfc2119" title="must">must</em> be labeled with an IRI.</li>
+ <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with 
+   at least one incoming edge.</li>
+ <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an IRI.</li>
+ <li>An IRI that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be 
+   dereferencable to a <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> document describing the 
+   labeled <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>
+   .</li>
+ <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not 
+ an IRI</li>
+</ol>
+
+<p>
+Note that the definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> above is silent on the 
+topic of unlabeled nodes. Unlabeled nodes are not considered 
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
+of unlabled nodes, as most graph-based data sets on the Web contain a number 
+of associated nodes that are not named and thus are not directly 
+de-referenceable.
+</p>
+</div>
+
+<div id="linking-data" class="section">
+<h3><span class="secno">2.3 </span>Linking Data</h3>
+
+<p>
+An Internationalized Resource Identifier 
+(<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
+as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique 
+identifiers on the web. In <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, an IRI is commonly 
+used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an 
+<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
+</p>
+
+<p>JSON-LD defines a mechanism to map JSON values to IRIs. This does not mean 
+that JSON-LD requires every key or value to be an IRI, but rather ensures that
+keys and values can be mapped to IRIs if the developer so desires to transform
+their data into Linked Data. There are a few techniques that can ensure 
+that developers will generate good Linked Data for the Web. JSON-LD 
+formalizes those techniques.
+</p>
+
+<p>We will be using the following JSON markup as the example for the
+rest of this section:
+</p>
+
+<pre class="example">
+{
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+</div>
+
+<div id="the-context" class="section">
+<h3><span class="secno">2.4 </span>The Context</h3>
+
+<p>In JSON-LD, a context is used to allow developers to map <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s 
+to <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that <em class="rfc2119" title="may">may</em> be expanded
+to an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The semantic web, just like the document-based 
+web, uses IRIs for unambiguous identification. The idea is that these 
+<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s mean something that may be of use to other developers.
+For example, the term <code>name</code> may map directly to the IRI 
+<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to 
+be constructed using the common JSON practice of simple name/value pairs while
+ensuring that the data is useful outside of the database or page in which it
+resides.
+</p>
+
+<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a context and
+then used by adding a single line to the JSON markup above:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>The addition above transforms the previous JSON document into a JSON document
+with added semantics because the <code>@context</code> specifies how the
+<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong> 
+terms map to IRIs. 
+Mapping those keys to IRIs gives the data global context. If two 
+developers use the same IRI to describe a property, they are more than likely
+expressing the same concept. This allows both developers to re-use each others
+data without having to agree to how their data will inter-operate on a 
+site-by-site basis.</p>
+
+<p>
+The semantic web uses a special type of document called a 
+<em>Web Vocabulary</em> to define <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s. A context is a type of
+Web vocabulary.
+Typically, these Web Vocabulary documents have <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es associated
+with them and contain a number of <a class="tref internalDFN" title="term" href="#dfn-term">term</a> declarations. A
+<dfn title="prefix" id="dfn-prefix">prefix</dfn>, like a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, is a short word that expands
+to a Web Vocabulary IRI. <a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are helpful when a developer
+wants to mix multiple vocabularies together in a context, but does not want
+to go to the trouble of defining every single term in every single vocabulary.
+Some Web Vocabularies may have 10-20 terms defined. If a developer wants to use 
+3-4 different vocabularies, the number of terms that 
+would have to be declared in a single context would become quite large. To 
+reduce the number of different terms that must be defined, JSON-LD also allows 
+prefixes to be used to compact IRIs.
+</p><p>
+
+</p><p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code> 
+specifies a Web Vocabulary which may be represented using the
+<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>. The <code>foaf</code> Web Vocabulary
+contains a term called <strong>name</strong>. If you join the 
+<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> with the <strong>name</strong> suffix, 
+you can build a compact IRI that will expand out into an absolute IRI for the
+<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
+That is, the compact IRI, or short-form, is <code>foaf:name</code> and the 
+expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary 
+term is used to specify a person's name.
+</p>
+
+<p>Developers, and machines, are able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much like we can use WordNet today to 
+see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Developers and machines need the same sort of 
+dictionary of terms. IRIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>The context provides a collection of vocabulary <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and 
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es that can be used to expand JSON keys and values into
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s.</p>
+
+<div id="inside-a-context" class="section">
+<h4><span class="secno">2.4.1 </span>Inside a Context</h4>
+
+<p>In the previous section, the developer used the <code>@context</code>
+keyword to pull in an external context. That context document, if 
+de-referenced, would look something like this:</p>
+
+<pre class="example">
+{
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+}</pre>
+
+<p>A JSON-LD context document is a simple mapping from <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es to expanded values such as IRIs or keywords. Contexts may also contain datatype information
+for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
+the JSON-LD processor.
+</p>
+
+<p>Contexts may be specified in-line. This ensures that JSON-LD documents
+can be processed when a JSON-LD processor does not have access to the Web.</p>
+
+<p>
+JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. This means
+that developers can also specify a context for JSON data in an out-of-band
+fashion via the API. The API is described later in this document. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> also define a context that will be pre-loaded for all
+calls to the service. This allows services that have previously been publishing
+and receiving JSON data to accept JSON-LD data without requiring client 
+software to change.
+</p>
+
+</div>
+
+</div>
+
+<div id="from-json-to-json-ld" class="section">
+<h3><span class="secno">2.5 </span>From JSON to JSON-LD</h3>
+
+<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>, 
+and <strong>avatar</strong>,
+are defined in a context, and that context is used to resolve the
+names in JSON objects, machines are able to automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Doing this allows JSON to be unambiguously machine-readable without
+requiring developers that use JSON to drastically change their workflow.</p>
+</div>
+
+</div>
+
+
+
+<div id="basic-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Basic Concepts</h2>
+
+<p>JSON-LD is designed to ensure that Linked Data concepts can be marked 
+up in a way that is simple to understand and author by Web developers. In many
+cases, regular JSON markup can become Linked Data with the simple addition
+of a context. As more JSON-LD features are used, more semantics are added
+to the JSON markup.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">3.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most 
+<a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a> are named. IRIs can be 
+expressed in a variety of different ways in JSON-LD.</p>
+
+<ol>
+  <li>In general, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in the key position in 
+    an associative array that have a mapping to an IRI or another key in the context are
+    expanded to an IRI by JSON-LD processors. There are special rules for 
+    processing keys in <code>@context</code> and when dealing with keys that 
+    start with the <code>@subject</code> character.</li>
+  <li>An IRI is generated for the value specified using <code>@subject</code>, 
+    if it is a string.</li>
+  <li>An IRI is generated for the value specified using <code>@type</code>.</li>
+  <li>An IRI is generated for the value specified using the <code>@iri</code> 
+    keyword.</li>
+  <li>An IRI is generated when there are <code>@coerce</code> rules in 
+    effect for a key named <code>@iri</code>.</li>
+</ol>
+
+<p>IRIs can be expressed directly in the key position like so:
+</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p>In the example above, the key 
+<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
+opposed to being interpreted as a string..</p>
+
+<p>Term expansion occurs for IRIs if a term is defined within the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are expanded when used in keys:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
+...
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><code>foaf:name</code> above will automatically expand out to the IRI
+<code>http://xmlns.com/foaf/0.1/name</code>.</p>
+
+<p>An IRI is generated when a value is associated with a key using 
+the <code>@iri</code> keyword:</p>
+
+<pre class="example">
+{
+...
+  "foaf:homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}</pre>
+
+<p>If type coercion rules are specified in the <code>@context</code> for
+a particular vocabulary term, an IRI is generated:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  {
+    ...
+    "@coerce": 
+    {
+      "@iri": "foaf:homepage"
+    }
+  }</span>
+...
+  "foaf:homepage": "http://manu.sporny.org/",
+...
+}</pre>
+
+<p>Even though the value <code>http://manu.sporny.org/</code> is a string,
+the type coercion rules will transform the value into an IRI when processed
+by a JSON-LD Processor</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">3.2 </span>Identifying the Subject</h3>
+
+<p>A subject is declared using the <code>@subject</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, property, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to the IRI 
+<code>http://example.org/people#joebob</code>.
+</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">3.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the 
+<code>@type</code> key. Specifying the type in this way will generate a 
+triple of the form (subject, type, type-url).</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple if the JSON-LD 
+document is mapped to RDF (in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+</div>
+
+<div id="strings" class="section">
+<h3><span class="secno">3.4 </span>Strings</h3>
+
+<p>Regular text strings, also refered to as <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn>s, are 
+easily expressed using regular JSON strings.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="string-internationalization" class="section">
+<h3><span class="secno">3.5 </span>String Internationalization</h3>
+
+<p>JSON-LD makes an assumption that strings with associated language encoding 
+information are not very common when used in JavaScript and Web Services. 
+Thus, it takes a little more effort to express strings with associated 
+language information.</p>
+
+<pre class="example">
+{
+...
+  "foaf:name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}</pre>
+
+<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for 
+<em>花澄</em> and associate the <code>ja</code> language code with the triple 
+that is generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="datatypes" class="section">
+<h3><span class="secno">3.6 </span>Datatypes</h3>
+
+<p>
+  A value with an associated datatype, also known as a 
+  <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn>, is indicated by associating a literal with
+  an IRI which indicates the typed literal's datatype. Typed literals may be 
+  expressed in JSON-LD in three ways:
+</p>
+
+<ol>
+  <li>By utilizing the <code>@coerce</code> keyword.</li>
+  <li>By utilizing the expanded form for specifying objects.</li>
+  <li>By using a native JSON datatype.</li>
+</ol>
+
+<p>The first example uses the <code>@coerce</code> keyword to express a
+typed literal:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  {
+    "dc":  "http://purl.org/dc/terms/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#"
+    "@coerce": 
+    {
+      "xsd:dateTime": "dc:modified"
+    }
+  }</span>
+...
+  "dc:modified": "2010-05-29T14:17:39+02:00",
+...
+}</pre>
+
+<p>The second example uses the expanded form for specifying objects:</p>
+
+<pre class="example">
+{
+...
+  "dc:modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "xsd:dateTime"
+  }</span>
+...
+}</pre>
+
+<p>Both examples above would generate an object with the literal value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+<p>The third example uses a built-in native JSON type, a number, to 
+express a datatype:</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:age": <span class="diff">31</span>
+...
+}</pre>
+
+<p>The example above would generate the following triple:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/age&gt; 
+      "31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .</pre>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">3.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+arrays. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an array.</p>
+
+<p class="note">In JSON-LD, Multiple objects on a property are not ordered. This is because typically graphs
+are not inherently ordered data structures. To see more on creating ordered collections
+in JSON-LD, see <a href="#lists">Lists</a>.
+</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "jaybee" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
+form for objects:</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/articles/8",
+  "dcterms:modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "xsd:dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "xsd:dateTime"
+    }
+  ]</span>
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="expansion" class="section">
+<h3><span class="secno">3.9 </span>Expansion</h3>
+
+<p>Expansion is the process of taking a JSON-LD document and applying a 
+context such that all IRI, datatypes, and literal values are expanded so
+that the context is no longer necessary. JSON-LD document expansion 
+is typically used when re-mapping JSON-LD documents to application-specific
+JSON documents or as a part of the <a href="#normalization">Normalization</a>
+process.</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}</pre>
+
+<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document 
+provided above would result in the following output:</p>
+
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}</pre>
+
+</div> 
+
+<div id="compaction" class="section">
+<h3><span class="secno">3.10 </span>Compaction</h3>
+
+<p>Compaction is the process of taking a JSON-LD document and applying a 
+context such that the most compact form of the document is generated. JSON
+is typically expressed in a very compact, key-value format. That is, full
+IRIs are rarely used as keys. At times, a JSON-LD document may be received
+that is not in its most compact form. JSON-LD, via the API, provides a way
+to compact a JSON-LD document.
+</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}</pre>
+
+<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
+
+<pre class="example">
+{
+   "name": "http://xmlns.com/foaf/0.1/name",
+   "homepage": "http://xmlns.com/foaf/0.1/homepage",
+   "@coerce": 
+   {
+      "@iri": ["homepage"]
+   }
+}</pre>
+
+<p>Running the JSON-LD Compaction algorithm given the context supplied above 
+against the JSON-LD input document provided above would result in the following
+output:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}</pre>
+
+<p>The compaction algorithm also enables the developer to map any expanded
+format into an application-specific compacted format. While the context 
+provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
+<strong>name</strong>, it could have also mapped it to any arbitrary string
+provided by the developer.
+</p>
+
+</div>
+
+<div id="framing" class="section">
+<h3><span class="secno">3.11 </span>Framing</h3>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+directed graph can have many different serializations, each expressing
+exactly the same information. Developers typically work with trees, also
+called associative arrays, when dealing with JSON. While mapping a graph to 
+a tree can be done, the layout of the end result must be specified in advance. 
+A <dfn title="Frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to 
+specify a deterministic layout for a graph.
+</p>
+
+<p>Framing is the process of taking a JSON-LD document, which expresses a
+graph of information, and applying a specific graph layout 
+(called a <a class="tref internalDFN" title="Frame" href="#dfn-frame">Frame</a>).
+</p>
+
+<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
+
+<pre class="example">
+{
+   "@coerce": {
+    "dc":  "http://purl.org/dc/terms/",
+    "ex":  "http://example.org/"
+   },
+   "@subject": 
+   [{
+      "@subject": "http://example.org/library",
+      "@type": "ex:Library",
+      "ex:contains": "http://example.org/library/the-republic"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": "http://example.org/library/the-republic#introduction"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": "ex:Chapter",
+      "dc:description": "An introductory chapter on The Republic.",
+      "dc:title": "The Introduction"
+   }],
+   "@context": 
+   {
+      "@coerce": 
+      {
+         "@iri": "ex:contains"
+      },
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   }
+}</pre>
+
+<p>Developers typically like to operate on items in a hierarchical, tree-based
+fashion. Ideally, a developer would want the data above sorted into top-level
+libraries, then the books that are contained in each library, and then the
+chapters contained in each book. To achieve that layout, the developer can
+define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
+
+<pre class="example">
+{
+   "@context": {
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   },
+   "@type": "ex:Library",
+   "ex:contains": {
+      "@type": "ex:Book",
+      "ex:contains": {
+         "@type": "ex:Chapter"
+      }
+   }
+}</pre>
+
+<p>When the framing algorithm is run against the previously defined 
+JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
+JSON-LD document is the end result:</p>
+
+<pre class="example">
+{
+   "@context": 
+   {
+      "ex": "http://example.org/vocab#",
+      "dc":  "http://purl.org/dc/terms/",
+   }
+   "@subject": "http://example.org/library",
+   "@type": "ex:Library",
+   "ex:contains": 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": 
+      {
+         "@subject": "http://example.org/library/the-republic#introduction",
+         "@type": "ex:Chapter",
+         "dc:description": "An introductory chapter on The Republic.",
+         "dc:title": "The Introduction"
+      },
+   },
+}</pre>
+
+<p>The JSON-LD framing algorithm allows developers to query by example and
+force a specific tree layout to a JSON-LD document.
+</p>
+
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Advanced Concepts</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality described above. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">4.1 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as doubles, 
+integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
+information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
+
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+<p class="note">When dealing with a number of modern programming languages,
+including JavaScript ECMA-262, there is no distinction between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
+the number <code>5.3</code> and the number 
+<code>5.3e0</code> are treated as if they were the same. When converting from 
+JSON-LD to a language-native format and back, datatype information is lost in a 
+number of these languages. Thus, one could say that <code>5.3</code> is a 
+<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
+<strong>xsd:double</strong> in JSON-LD, but when both values are 
+converted to a language-native format the datatype difference between the two 
+is lost because the machine-level representation will almost always be a 
+<strong>double</strong>. 
+Implementers should be aware of this potential round-tripping issue between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
+objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
+to a language native type.
+</p>
+
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">4.2 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of values to particular data types. 
+Type coercion allows someone deploying JSON-LD to coerce the incoming or 
+outgoing types to the proper data type based on a mapping of data type IRIs to 
+property types. Using type coercion, one may convert simple JSON data to 
+properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to 
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+        "@iri": "homepage"
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="chaining" class="section">
+  <h3><span class="secno">4.3 </span>Chaining</h3>
+  <p>
+    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to 
+    use the definition of JSON-LD objects as <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This 
+    is a commonly used mechanism for creating a parent-child relationship 
+    between two <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s.
+  </p>
+  <p>The example shows an two subjects related by a property from the first 
+  subject:</p>
+
+  <pre class="example">
+{
+...
+  "foaf:name": "Manu Sporny",
+  "<span class="diff">foaf:knows</span>": {
+    "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+    "<span class="diff">foaf:name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}</pre>
+  
+  <p>
+    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a 
+    JSON value at any point in JSON-LD.
+  </p>
+</div>
+
+<div id="identifying-unlabeled-nodes" class="section">
+<h3><span class="secno">4.4 </span>Identifying Unlabeled Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this type of node is called
+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) CURIE 
+prefix.</p>
+
+<pre class="example">
+{
+...
+  "@subject": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+unlabeled node. This practice, however, is usually frowned upon when
+generating Linked Data. If a developer finds that they refer to the unlabeled
+node more than once, they should consider naming the node using a resolve-able
+IRI.
+</p>
+
+</div>
+
+<div id="overriding-keywords" class="section">
+<h3><span class="secno">4.5 </span>Overriding Keywords</h3>
+
+<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
+to be overridden. This feature allows more legacy JSON content to be supported 
+by JSON-LD. It also allows developers to design domain-specific implementations 
+using only the JSON-LD context.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {  
+     <span class="diff">"url": "@subject"</span>,
+     <span class="diff">"a": "@type"</span>,
+     "name": "http://schema.org/name"
+  },
+  "url": "http://example.com/about#gregg",
+  "a": "http://schema.org/Person",
+  "name": "Gregg Kellogg"
+}</pre>
+
+<p>In the example above, the <code>@subject</code> and <code>@type</code> 
+keywords have been overridden by <strong>url</strong> and 
+<strong>a</strong>, respectively.
+</p>
+
+</div>
+
+<div id="normalization" class="section">
+<h3><span class="secno">4.6 </span>Normalization</h3>
+
+<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and 
+performing a deterministic transformation on that input that results in a 
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> that any conforming JSON-LD processor would have 
+generated given the same input. The problem is a fairly difficult technical 
+problem to solve because it requires a directed graph to be ordered into a 
+set of nodes and edges in a deterministic way. This is easy to do when all of 
+the nodes have unique names, but very difficult to do when some of the nodes 
+are not labeled.
+</p>
+
+<p>Normalization is useful when comparing two graphs against one another,
+when generating a detailed list of differences between two graphs, and
+when generating a cryptographic digital signature for information contained 
+in a graph or when generating a hash of the information contained in a graph.
+</p>
+
+<p>The example below is an un-normalized JSON-LD document:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
+      "@coerce": 
+      {
+         "@iri": ["homepage"]
+      }
+   }
+}</pre>
+
+<p>The example below is the normalized form of the JSON-LD document above:</p>
+
+<p class="note">Whitespace is used below to aid readability. The normalization
+algorithm for JSON-LD remove all unnecessary whitespace in the fully 
+normalized form.</p>
+
+<pre class="example">
+[{
+    "@subject": 
+    {
+        "@iri": "_:c14n0"
+    },
+    "http://xmlns.com/foaf/0.1/homepage": 
+    {
+        "@iri": "http://manu.sporny.org/"
+    },
+    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
+}]</pre>
+
+<p>Notice how all of the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s have been expanded and sorted in
+alphabetical order. Also, notice how the <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> has been 
+labeled with a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">blank node identifier</a>. Normalization ensures that any arbitrary
+graph containing exactly the same information would be normalized to exactly
+the same form shown above.</p>
+
+</div>
+
+</div>
+
+<div id="algorithms" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>Algorithms</h2>
+
+<p>All algorithms described in this section are intended to operate on
+language-native data structures. That is, the serialization to a text-based
+JSON document isn't required as input or output to any of these algorithms and 
+language-native data structures <em class="rfc2119" title="must">must</em> be used where applicable.</p>
+
+<div id="syntax-tokens-and-keywords" class="section">
+  <h3><span class="secno">5.1 </span>Syntax Tokens and Keywords</h3>
+  
+  <p>JSON-LD specifies a number of syntax tokens and keywords that are using
+  in all algorithms described in this section:</p>
+  
+  <dl>
+  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
+  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
+  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
+  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
+  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
+  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+  <dt><code>:</code></dt><dd>The separator for CURIEs when used in JSON keys or JSON values.</dd>
+  <dt><code>@subject</code></dt><dd>Sets the active subjects.</dd>
+  <dt><code>@type</code></dt><dd>Used to set the type of the active subjects.</dd>
+  </dl>
+</div>
+
+<div id="algorithm-terms" class="section">
+  <h3><span class="secno">5.2 </span>Algorithm Terms</h3>
+  <dl>
+    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
+    <dd>
+      a context that is specified to the algorithm before processing begins.
+    </dd>
+    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
+    <dd>
+      the currently active subject that the processor should use when 
+      processing.
+    </dd>
+    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
+    <dd>
+      the currently active property that the processor should use when 
+      processing.
+    </dd>
+    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
+    <dd>
+      the currently active object that the processor should use when
+      processing.
+    </dd>
+    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
+    <dd>
+      a context that is used to resolve CURIEs while the processing
+      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context 
+      contained within the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+    </dd>
+    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
+    <dd>
+      a context that is specified at the JSON associative-array level,
+      specified via the <code>@context</code> keyword.
+    </dd>
+    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
+    <dd>
+      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
+      context</a>, <a class="tref" title="current_subject">current subject</a>, and 
+      <a class="tref" title="current_property">current property</a>. The <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> is managed
+      as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
+      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new 
+      associative array.
+    </dd>
+    <dt><dfn title="JSON-LD_input" id="dfn-json-ld_input">JSON-LD input</dfn></dt>
+    <dd>
+      The JSON-LD data structure that is provided as input to the algorithm.
+    </dd>
+    <dt><dfn title="JSON-LD_output" id="dfn-json-ld_output">JSON-LD output</dfn></dt>
+    <dd>
+      The JSON-LD data structure that is produced as output by the algorithm.
+    </dd>
+
+  </dl>
+</div>
+
+<div id="context-1" class="section">
+  <h3 id="context"><span class="secno">5.3 </span>Context</h3>
+  <p>
+    Processing of JSON-LD data structure is managed recursively.
+    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
+    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
+    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+  </p>
+  <p>
+    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of an associative array (or elements
+    of a list (see <span a="#list-processing">List Processing</span>)).
+  </p>
+  <p>
+    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within an associative array having a key of
+    <code>@context</code> with string or an associative array value. When processing a <a class="tref" title="local__context">local
+    context</a>, special processing rules apply:
+  </p>
+  <ol class="algorithm">
+    <li>Create a new, empty <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
+    <li>
+      If the value is a simple string, it <em class="rfc2119" title="must">must</em> have a lexical form of IRI and used to initialize
+      a new JSON document which replaces the value for subsequent processing.
+    </li>
+    <li>If the value is an associative array, perform the following steps:
+      <ol class="algorithm">
+        <li>
+          If the associative array has a <code>@base</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
+          string with the lexical form of an absolute IRI. Add the base mapping to the <a class="tref" title="local__context">local
+          context</a>. <p class="issue">Turtle allows @base to be relative. If we did this, we
+          would have to add <a href="#iri-expansion">IRI Expansion</a>.</p>
+        </li>
+        <li>
+          If the associative array has a <code>@vocab</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
+          string with the lexical form of an absolute IRI. Add the vocabulary mapping to the
+          <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> after performing <a href="#iri-expansion">IRI Expansion</a> on
+          the associated value.
+        </li>
+        <li>
+          If the associative array has a <code>@coerce</code> key, it <em class="rfc2119" title="must">must</em> have a value of an
+          associative array. Add the <code>@coerce</code> mapping to the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>
+          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value(s).
+        </li>
+        <li>
+          Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> and
+          <em class="rfc2119" title="must">must</em> have the value of a simple string with the lexical form of IRI. Merge the key-value
+          pair into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.
+        </li>
+      </ol>
+    </li>
+    <li>
+      Merge the of <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s <code>@coerce</code> mapping into  the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping as described <a href="#coerce">below</a>.
+    </li>
+    <li>
+      Merge all entries other than the <code>@coerce</code> mapping from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>to the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> overwriting any duplicate values.
+    </li>
+  </ol>
+  
+  <div id="coerce" class="section">
+    <h4><span class="secno">5.3.1 </span>Coerce</h4>
+    <p>
+      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
+      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
+      <code>@coerce</code> mapping, overwriting any duplicate values in 
+      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
+      The <code>@coerce</code> mapping has either a single CURIE or an
+      array of CURIEs. When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+      map all CURIE values to array form and replace with the union of the value from
+      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an array
+      with a single CURIE, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
+    </p>
+  </div>
+
+  <div id="initial-context" class="section">
+    <h4><span class="secno">5.3.2 </span>Initial Context</h4>
+    <p>The <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> is initialized as follows:</p>
+    <ul>
+      <li>
+        <code>@base</code> is set using <cite><href="http: www.ietf.org="" rfc="" rfc2396.txt"="">section 5.1 Establishing a
+        Base URI</href="http:></cite> of [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>]. Processors <em class="rfc2119" title="may">may</em> provide a means
+        of setting the base IRI programatically.
+      </li>
+      <li><code>@coerce</code> is set with a single mapping from <code>@iri</code> to <code>@type</code>.</li>
+    </ul>
+    <pre class="example">
+{
+    "@base": <span class="diff">document-location</span>,
+    "@context": {
+      "@iri": "@type"
+    }
+}</pre>
+  </div>
+</div>
+
+<div id="iri-expansion" class="section">
+  <h3><span class="secno">5.4 </span>IRI Expansion</h3>
+  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
+    transforming a value representing an IRI into an actual IRI.</p>
+  <p>IRIs may be represented as an explicit string, or as a CURIE, as a value relative to <code>@base</code>
+    or <code>@vocab</code>.</p>
+  <p>
+    CURIEs are defined more formally in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">section 6 "CURIE Syntax Definition"</a></cite>.
+    Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em> separated by a ':'. In
+    JSON-LD, either the prefix may be the empty string, denoting the <dfn title="default_prefix" id="dfn-default_prefix">default prefix</dfn>.
+  </p>
+  <p>The algorithm for generating an IRI is:
+    </p><ol class="algorithm">
+      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
+      <li>If the prefix is a '_' (underscore), the IRI is unchanged.</li>
+      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
+        by prepending the mapped prefix to the (possibly empty) suffix using textual concatenation. Note that an empty
+        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
+      <li>If the IRI being processed is for a property (i.e., a key value in an associative array, or a
+        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
+        join the mapped value to the suffix using textual concatenation.</li>
+      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
+        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>].</li>
+      <li>Otherwise, use the value directly as an IRI.</li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="iri-compaction" class="section">
+  <h3><span class="secno">5.5 </span>IRI Compaction</h3>
+  <p>Some keys and values are expressed using IRIs. This section defines an 
+    algorithm for transforming an IRI to a compact IRI using the
+    <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es specified in the 
+    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</p>
+
+  <p>The algorithm for generating a compacted IRI is:
+    </p><ol class="algorithm">
+      <li>Search every key-value pair in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for
+        a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that is a complete match 
+        against the IRI. If a complete match is found, the resulting compacted
+        IRI is the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> associated with the IRI in the 
+        <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
+      <li>If a complete match is not found, search for a partial match from
+        the beginning of the IRI. For all matches that are found, the resulting
+        compacted IRI is the <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> associated with the partially
+        matched IRI in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> concatenated with a 
+        colon (:) character and the unmatched part of the string. If there is
+        more than one compacted IRI produced, the final value is the 
+        lexicographically least value of the entire set of compacted IRIs.</li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="value-expansion" class="section">
+  <h3><span class="secno">5.6 </span>Value Expansion</h3>
+  <p>Some values in JSON-LD can be expressed in a compact form. These values
+    are required to be expanded at times when processing JSON-LD documents.
+  </p>
+
+  <p>The algorithm for expanding a value is:
+    </p><ol class="algorithm">
+      <li>If the key that is associated with the value has an associated
+        coercion entry in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, the resulting
+        expansion is an object populated according to the following steps:
+        <ol class="algorithm">
+          <li>If the coercion target is <code>@iri</code>, expand the value
+            by adding a new key-value pair where the key is <code>@iri</code>
+            and the value is the expanded IRI according to the
+            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+          <li>If the coercion target is a typed literal, expand the value
+            by adding two new key-value pairs. The first key-value pair 
+            will be <code>@literal</code> and the unexpanded value. The second
+            key-value pair will be <code>@datatype</code> and the associated
+            coercion datatype expanded according to the
+            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+        </ol>
+      </li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="value-compaction" class="section">
+  <h3><span class="secno">5.7 </span>Value Compaction</h3>
+  <p>Some values, such as IRIs and typed literals, may be expressed in an
+    expanded form in JSON-LD. These values are required to be compacted at 
+    times when processing JSON-LD documents.
+  </p>
+
+  <p>The algorithm for compacting a value is:
+    </p><ol class="algorithm">
+      <li>If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> contains a coercion target for the
+        key that is associated with the value, compact the value using the
+        following steps:
+        <ol class="algorithm">
+          <li>If the coercion target is an <code>@iri</code>, the compacted
+            value is the value associated with the <code>@iri</code> key,
+            processed according to the 
+            <a href="#iri-compaction">IRI Compaction</a> steps.</li>
+          <li>If the coercion target is a typed literal, the compacted
+            value is the value associated with the <code>@literal</code> key.
+          </li>
+          <li>Otherwise, the value is not modified.</li>
+        </ol>
+      </li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="expansion-1" class="section">
+<h3><span class="secno">5.8 </span>Expansion</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>As stated previously, expansion is the process of taking a JSON-LD 
+input and expanding all IRIs and typed literals to their fully-expanded form. 
+The output will not contain a single context declaration and will have all IRIs 
+and typed literals fully expanded.
+</p>
+
+<div id="expansion-algorithm" class="section">
+<h4><span class="secno">5.8.1 </span>Expansion Algorithm</h4>
+
+<ol class="algorithm">
+  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an array, 
+  process each item in the array recursively using this algorithm.</li>
+  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an object, 
+  update the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> according to the steps outlined in
+  the <a href="#context">context</a> section. Process each key, expanding 
+  the key according to the <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+  <ol class="algorithm">
+    <li>Process each value associated with each key
+      <ol class="algorithm">
+        <li>If the value is an array, process each item in the array 
+        recursively using this algorithm.</li>
+        <li>If the value is an object, process the object recursively
+        using this algorithm.</li>
+        <li>Otherwise, check to see the associated key has an associated 
+        coercion rule. If the value should be coerced, expand the value 
+        according to the <a href="#value-expansion">Value Expansion</a> rules. 
+        If the value does not need to be coerced, leave the value as-is.
+        </li>
+      </ol>
+    </li><li>Remove the context from the object</li>
+  </ol>
+</ol>
+</div>
+
+</div>
+
+<div id="compaction-1" class="section">
+<h3><span class="secno">5.9 </span>Compaction</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>As stated previously, compaction is the process of taking a JSON-LD 
+input and compacting all IRIs using a given context. The output
+will contain a single top-level context declaration and will only use
+<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es and will ensure that all
+typed literals are fully compacted.
+</p>
+
+<div id="compaction-algorithm" class="section">
+<h4><span class="secno">5.9.1 </span>Compaction Algorithm</h4>
+
+<ol class="algorithm">
+  <li>Perform the <a href="#expansion-algorithm">Expansion Algorithm</a> on 
+  the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>.</li>
+  <li>If the top-level item is an array, process each item in the array 
+    recursively, starting at this step.
+  </li><li>If the top-level item is an object, compress each key using the steps
+    defined in <a href="#iri-compaction">IRI Compaction</a> and compress each
+    value using the steps defined in 
+    <a href="#value-compaction">Value Compaction</a></li>
+  
+</ol>
+</div>
+
+</div>
+
+
+<div id="framing-1" class="section">
+<h3><span class="secno">5.10 </span>Framing</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+directed graph can have many different serializations, each expressing
+exactly the same information. Developers typically don't work directly with
+graphs, but rather, prefer trees when dealing with JSON. While mapping a graph 
+to a tree can be done, the layout of the end result must be specified in 
+advance. This section defines an algorithm for mapping a graph to 
+a tree given a <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>.
+</p>
+
+<div id="framing-algorithm-terms" class="section">
+<h4><span class="secno">5.10.1 </span>Framing Algorithm Terms</h4>
+ <dl>
+   <dt><dfn title="input_frame" id="dfn-input_frame">input frame</dfn></dt>
+   <dd>
+     the initial <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> provided to the framing algorithm.
+   </dd>
+   <dt><dfn title="framing_context" id="dfn-framing_context">framing context</dfn></dt>
+   <dd>
+     a context containing the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, the
+     <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> and the 
+     <a class="tref" title="omit_default_flag">omit default flag</a>.
+   </dd>
+   <dt><dfn title="object_embed_flag" id="dfn-object_embed_flag">object embed flag</dfn></dt>
+   <dd>
+     a flag specifying that objects should be directly embedded in the output,
+     instead of being referred to by their IRI.
+   </dd>
+   <dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">explicit inclusion flag</dfn></dt>
+   <dd>
+     a flag specifying that for properties to be included in the output, they
+     must be explicitly declared in the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a>.
+   </dd>
+   <dt><dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">omit missing properties flag</dfn></dt>
+   <dd>
+     a flag specifying that properties that are missing from the 
+     <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> should be omitted from the output.
+   </dd>
+   <dt><dfn title="match_limit" id="dfn-match_limit">match limit</dfn></dt>
+   <dd>
+     A value specifying the maximum number of matches to accept when building
+     arrays of values during the framing algorithm. A value of -1 specifies
+     that there is no match limit.
+   </dd>
+   <dt><dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">map of embedded subjects</dfn></dt>
+   <dd>
+     A map that tracks if a subject has been embedded in the output of the
+     <a href="#framing-algorithm">Framing Algorithm</a>.
+ </dd></dl>
+</div>
+
+<div id="framing-algorithm" class="section">
+<h4><span class="secno">5.10.2 </span>Framing Algorithm</h4>
+
+<p>The framing algorithm takes <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> that has been 
+normalized according to the 
+<a href="#normalization-algorithm">Normalization Algorithm</a> 
+(<strong>normalized input</strong>), an 
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a> that has been expanded according to the
+<a href="#expansion-algorithm">Expansion Algorithm</a> 
+(<strong>expanded frame</strong>), and a number of options and produces
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The following series of steps is the recursive
+portion of the framing algorithm:
+</p>
+
+<ol class="algorithm">
+  <li>Initialize the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> by setting the
+   <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, clearing the 
+   <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a>, and clearing the
+   <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>. Override these values
+   based on input options provided to the algorithm by the application.
+  </li>
+  <li>Generate a <dfn title="list_of_frames" id="dfn-list_of_frames">list of frames</dfn> by processing the 
+    <strong>expanded frame</strong>:
+    <ol class="algorithm">
+      <li>If the <strong>expanded frame</strong> is not an array, set 
+        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to 1, place the 
+        <strong>expanded frame</strong> into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
+        and set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to <code>null</code>.</li>
+      <li>If the <strong>expanded frame</strong> is an empty array, place an
+        empty object into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
+        set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an array, and set
+        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
+      <li>If the <strong>expanded frame</strong> is a non-empty array, add
+        each item in the <strong>expanded frame</strong> into the 
+        <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>, set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an
+        array, and set <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
+    </ol></li>
+  <li>Create a <dfn title="match_array" id="dfn-match_array">match array</dfn> for each <strong>expanded frame</strong> 
+    in the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> halting when either the 
+    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> is zero or the end of the 
+    <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> is reached. If an 
+    <strong>expanded frame</strong> is 
+    not an object, the processor <em class="rfc2119" title="must">must</em> throw a <code>Invalid Frame Format</code> 
+    exception. Add each matching item from the <strong>normalized input</strong>
+    to the <a class="tref" title="matches_array">matches array</a> and decrement the 
+    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> by 1 if:
+    <ol class="algorithm">
+       <li>The <strong>expanded frame</strong> has an <code>rdf:type</code> 
+         that exists in the item's list of <code>rdf:type</code>s. Note: 
+         the <code>rdf:type</code> can be an array, but only one value needs 
+         to be in common between the item and the 
+         <strong>expanded frame</strong> for a match.</li>
+       <li>The <strong>expanded frame</strong> does not have an 
+         <code>rdf:type</code> property, but every property in the 
+         <strong>expanded frame</strong> exists in the item.</li>
+    </ol></li>
+  <li>Process each item in the <a class="tref internalDFN" title="match_array" href="#dfn-match_array">match array</a> with its associated
+    <dfn title="match_frame" id="dfn-match_frame">match frame</dfn>:
+    <ol class="algorithm">
+      <li>If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@embed</code>
+        keyword, set the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> to its value. 
+        If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@explicit</code>
+        keyword, set the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> to its value. 
+        Note: if the keyword exists, but the value is neither
+        <code>true</code> or <code>false</code>, set the associated flag to 
+        <code>true</code>.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is cleared and the item has
+        the <code>@subject</code> property, replace the item with the value
+        of the <code>@subject</code> property.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
+        the <code>@subject</code> property, and its IRI is in the 
+        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>, throw a
+        <code>Duplicate Embed</code> exception.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
+        the <code>@subject</code> property and its IRI is not in the
+        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>:
+        <ol class="algorithm">
+          <li>If the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> is set, 
+            then delete any key from the item that does not exist in the
+            <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except <code>@subject</code>.</li>
+          <li>For each key in the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except for
+            keywords and <code>rdf:type</code>:
+          <ol class="algorithm">
+            <li>If the key is in the item, then build a new 
+              <dfn title="recursion_input_list" id="dfn-recursion_input_list">recursion input list</dfn> using the object or objects 
+              associated with the key. If any object contains an
+              <code>@iri</code> value that exists in the 
+              <a class="tref" title="normalized_input">normalized input</a>, replace the object in the
+              <a class="tref" title="recusion_input_list">recusion input list</a> with a new object containing
+              the <code>@subject</code> key where the value is the value of
+              the <code>@iri</code>, and all of the other key-value pairs for
+              that subject. Set the <dfn title="recursion_match_frame" id="dfn-recursion_match_frame">recursion match frame</dfn> to the
+              value associated with the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>'s key. Replace
+              the value associated with the key by recursively calling this
+              algorithm using <a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">recursion input list</a>,
+              <a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">recursion match frame</a> as input.</li>
+            <li>If the key is not in the item, add the key to the item and
+              set the associated value to an empty array if the
+              <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> key's value is an array 
+              or <code>null</code> otherwise.</li>
+            <li>If value associated with the item's key is <code>null</code>,
+              process the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>:
+              <ol class="algorithm">
+                <li>If the value associated with the key in the 
+                  <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> is an array, use the first frame 
+                  from the array as the <dfn title="property_frame" id="dfn-property_frame">property frame</dfn>, otherwise
+                  set the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> to an empty object.</li>
+                <li>If the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> contains an
+                <code>@omitDefault</code> keyword, set the
+                <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> to its value.
+                Note: if the keyword exists, but the value is neither
+                <code>true</code> or <code>false</code>, set the associated
+                flag to <code>true</code>.</li>
+                <li>If the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> is set,
+                  delete the key in the item. Otherwise, if the
+                  <code>@default</code> keyword is set in the 
+                  <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> set the item's value to the value
+                  of <code>@default</code>.</li>
+              </ol></li>
+          </ol></li>
+        </ol>
+      </li><li>If the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> is <code>null</code> set it to
+        the item, otherwise, append the item to the
+        <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.
+    </li></ol>
+  </li><li>Return the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.</li>
+</ol>  
+
+The final, non-recursive step of the framing algorithm requires the 
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to be compacted according to the 
+<a href="#compaction-algorithm">Compaction Algorithm</a> by using the 
+context provided in the <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a>. The resulting value is the
+final output of the compaction algorithm and is what should be returned to the
+application.
+
+</div>
+
+</div>
+
+<div id="normalization-1" class="section">
+<h3><span class="secno">5.11 </span>Normalization</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and 
+performing a deterministic transformation on that input that results in all
+aspects of the graph being fully expanded and named in the 
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The normalized output is generated in such a way 
+that any conforming JSON-LD processor will generate identical output 
+given the same input. The problem is a fairly difficult technical 
+problem to solve because it requires a directed graph to be ordered into a 
+set of nodes and edges in a deterministic way. This is easy to do when all of 
+the nodes have unique names, but very difficult to do when some of the nodes 
+are not labeled.
+</p>
+
+<p>In time, there may be more than one normalization algorithm that will need
+to be identified. For identification purposes, this algorithm is named 
+<abbr title="Universal Graph Normalization Algorithm 2011">UGNA2011</abbr>.
+</p>
+
+<div id="normalization-algorithm-terms" class="section">
+<h4><span class="secno">5.11.1 </span>Normalization Algorithm Terms</h4>
+ <dl>
+   <dt><dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">list of expanded nodes</dfn></dt>
+   <dd>
+     A list of all nodes in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> graph containing no
+     embedded objects and having all keys and values expanded according to the
+     steps in the <a href="#expansion-algorithm">Expansion Algorithm</a>.
+   </dd>
+   <dt><dfn title="naming_base_string" id="dfn-naming_base_string">naming base string</dfn></dt>
+   <dd>
+     An unlabeled node naming prefix that is not used by any other node 
+     in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and does not start with the characters
+     <code>c14n</code>. The prefix is used to temporarily name nodes during
+     the normalization algorithm in a way that doesn't collide with the
+     names that already exist as well as the names that will be generated by the
+     normalization algorithm. 
+   </dd>
+   <dt><dfn title="alpha" id="dfn-alpha">alpha</dfn> and <dfn title="beta" id="dfn-beta">beta</dfn> values</dt>
+   <dd>
+     The words <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> refer to the first and
+     second nodes or values being examined in an algorithm. The names are
+     merely used to refer to each input value to a comparison algorithm.
+   </dd>
+   <dt><dfn title="naming_base_string" id="dfn-naming_base_string-1">naming base string</dfn></dt>
+   <dd>
+     An unlabeled node naming prefix that is not used by any other node 
+     in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and does not start with the characters
+     <code>c14n</code>. The prefix is used to temporarily name nodes during
+     the normalization algorithm in a way that doesn't collide with the
+     names that already exist as well as the names that will be generated by the
+     normalization algorithm. 
+   </dd>
+</dl>
+</div>
+
+<div id="normalization-algorithm" class="section">
+<h4><span class="secno">5.11.2 </span>Normalization Algorithm</h4>
+
+<p>The normalization algorithm expands the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>,
+flattens the data structure, and creates an initial set of names for all
+nodes in the graph. The flattened data structure is then processed by the
+node labeling algorithm in order to get a fully expanded and named list of
+nodes.
+</p>
+
+<ol class="algorithm">
+<li>Expand the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> according to the steps in
+the <a href="#expansion-algorithm">Expansion Algorithm</a> and store the
+result as the <strong>expanded input</strong>.</li>
+<li>Process every object in the <strong>expanded input</strong>
+searching for <code>@subject</code> values that start with the
+text string <code>_:c14n</code>. If a match is found, rename the subject and 
+all references to the subject by concatenating <code>_:</code> with the 
+<a class="tref internalDFN" title="naming_base_string" href="#dfn-naming_base_string-1">naming base string</a> and a unique identifier, such as an
+incremented counter value.
+</li>
+<li>Create an empty <a class="tref internalDFN" title="list_of_expanded_nodes" href="#dfn-list_of_expanded_nodes">list of expanded nodes</a> and recursively 
+process every object in the <strong>expanded input</strong> that is not an 
+expanded IRI, typed literal or language literal, in depth-first order:
+  <ol class="algorithm">
+    <li>If an object does not contain a <code>@subject</code>, 
+      name it by concatenating 
+      <code>_:</code> with the <a class="tref internalDFN" title="naming_base_string" href="#dfn-naming_base_string-1">naming base string</a> and a 
+      unique identifier, such as an  incremented counter value.</li>
+    <li>Add the object to the <a class="tref" title="list_of_expanded_nodes.">list of expanded nodes<tref>.</tref></a></li>
+    <li>Replace the reference to the object with the value of the
+       <code>@subject</code> in the object.</li>
+    <li>???duplicate objects for predicates???</li>
+  </ol></li>
+<li>Label all of the nodes that contain a <code>@subject</code> key associated
+with a value starting with <code>_:</code> according to the steps in the 
+<a href="#node-labeling-algorithm">Node Labeling Algorithm</a>.</li>
+</ol>
+</div>
+
+<div id="node-labeling-algorithm" class="section">
+<h4><span class="secno">5.11.3 </span>Node Labeling Algorithm</h4>
+
+<p>The node labeling algorithm takes the <a class="tref internalDFN" title="list_of_expanded_nodes" href="#dfn-list_of_expanded_nodes">list of expanded nodes</a>
+and sorts the list, deterministically naming all of the unlabeled nodes 
+in the graph.</p>
+
+<ol class="algorithm">
+  <li>Create a <dfn title="forward_mapping" id="dfn-forward_mapping">forward mapping</dfn> that relates graph
+    nodes to the IRIs of the targets nodes that 
+    they reference. For example, if a node <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> refers to a
+    node <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> via a property, the key in the 
+    <a class="tref internalDFN" title="forward_mapping" href="#dfn-forward_mapping">forward mapping</a> is the subject IRI of <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and 
+    the value is an array containing at least the subject IRI of 
+    <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>.
+    <ol class="algorithm">
+      <li>Add all forward mappings for every node in the graph.</li>
+    </ol></li>
+  <li>Create a <dfn title="reverse_mapping" id="dfn-reverse_mapping">reverse mapping</dfn> that relates graph nodes
+    to every other node that refers to them in the graph.
+    For example, if a node <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> refers to a
+    node <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> via a property, the key in the 
+    <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> is the subject IRI for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> and 
+    the value is an array containing at least the IRI for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>.
+    <ol class="algorithm">
+      <li>Add all reverse mappings for every node in the graph.</li>
+    </ol></li>
+  <li>Label every unlabeled node according to the
+    <a href="#label-generation-algorithm">Label Generation Algorithm</a>
+    in descending order using the 
+    <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
+    determine the sort order.</li>
+</ol>
+</div>
+
+<div id="shallow-comparison-algorithm" class="section">
+<h4><span class="secno">5.11.4 </span>Shallow Comparison Algorithm</h4>
+
+<p>
+The shallow comparison algorithm takes two unlabeled nodes,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, as input and
+determines which one should come first in a sorted list. The following
+algorithm determines the steps that are executed in order to determine the
+node that should come first in a list:
+</p>
+
+<ol class="algorithm">
+  <li>Compare the total number of node properties. The node with fewer 
+    properties is first.</li>
+  <li>Lexicographically sort the property IRIs for each node and compare
+    the sorted lists. If an IRI is found to be lexicographically smaller, the
+    node containing that IRI is first.</li>
+  <li>Compare the property values against one another:
+    <ol class="algorithm">
+      <li>Create an <dfn title="alpha_list" id="dfn-alpha_list">alpha list</dfn> by adding all values associated 
+        with the <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> property that is not an unlabeled node.
+        Track the number of unlabeled nodes not added to the list using an
+        <dfn title="alpha_unlabeled_counter" id="dfn-alpha_unlabeled_counter">alpha unlabeled counter</dfn>.</li>
+      <li>Create a <dfn title="beta_list" id="dfn-beta_list">beta list</dfn> by adding all values associated 
+        with the <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> property that is not an unlabeled node. 
+        Track the number of unlabeled nodes not added to the list using an
+        <dfn title="beta_unlabeled_counter" id="dfn-beta_unlabeled_counter">beta unlabeled counter</dfn>.
+      </li><li>Compare the length of <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and 
+        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a>. The node associated with the list containing the
+        lesser number of items is first.</li>
+      <li>Compare the <a class="tref internalDFN" title="alpha_unlabeled_counter" href="#dfn-alpha_unlabeled_counter">alpha unlabeled counter</a> to the 
+        <a class="tref internalDFN" title="beta_unlabeled_counter" href="#dfn-beta_unlabeled_counter">beta unlabeled counter</a>, the node associated with the lesser
+        value is first.</li>
+      <li>Sort <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> using the
+        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>
+        as the sorting comparator.
+        For each offset into the <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a>, compare the item
+        at the offset against the item at the same offset in the 
+        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> using the 
+        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
+        The node associated with the lesser item is first.
+    </li></ol></li>
+  <li>Process the <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> to determine order:
+    <ol class="algorithm">
+      <li>The node with fewer entries in the <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> 
+      is first.</li>
+      <li>Sort the <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> entry for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
+        into a <dfn title="list_of_sorted_alpha_mappings" id="dfn-list_of_sorted_alpha_mappings">list of sorted alpha mappings</dfn>. Sort the 
+        <a class="tref internalDFN" title="reverse_mapping" href="#dfn-reverse_mapping">reverse mapping</a> entry for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        into a <dfn title="list_of_sorted_beta_mappings" id="dfn-list_of_sorted_beta_mappings">list of sorted beta mappings</dfn>.
+      </li><li>The node associated with the list of sorted mappings
+        with the least number of unlabeled nodes is first.</li>
+      <li>For each offset into the <a class="tref internalDFN" title="list_of_sorted_alpha_mappings" href="#dfn-list_of_sorted_alpha_mappings">list of sorted alpha mappings</a>, 
+        compare the IRI at the offset against the IRI at the same offset in the 
+        <a class="tref internalDFN" title="list_of_sorted_beta_mappings" href="#dfn-list_of_sorted_beta_mappings">list of sorted beta mappings</a>.
+        The node associated with the lexicographically lesser IRI is first.</li>
+    </ol></li>
+  <li>Otherwise, the nodes are equal.</li>
+</ol></div>
+
+<div id="object-comparison-algorithm" class="section">
+<h4><span class="secno">5.11.5 </span>Object Comparison Algorithm</h4>
+
+<p>
+The object comparison algorithm is designed to compare two graph node 
+property values, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, against the other.
+The algorithm is useful when sorting two lists of graph node properties.
+</p>
+
+<ol class="algorithm">
+  <li>If one of the values is a string and the other is not, the value that is
+    a string is first.</li>
+  <li>If both values are strings, the lexicographically lesser string is
+    first.</li>
+  <li>If one of the values is a literal and the other is not, the value that is
+    a literal is first.</li>
+  <li>If both values are literals
+    <ol class="algorithm">
+      <li>The lexicographically lesser string associated with 
+        <code>@literal</code> is first.</li>
+      <li>The lexicographically lesser string associated with 
+        <code>@datatype</code> is first.</li>
+      <li>The lexicographically lesser string associated with 
+        <code>@language</code> is first.</li>
+    </ol></li>
+  <li>If both values are expanded IRIs, the 
+    lexicographically lesser string associated with <code>@iri</code> 
+    is first.</li>
+  <li>Otherwise, the two values are equivalent.</li>
+</ol>
+
+</div>
+
+<div id="deep-comparison-algorithm" class="section">
+<h4><span class="secno">5.11.6 </span>Deep Comparison Algorithm</h4>
+
+<p>
+DeepCompare(bnodeA, bnodeB):
+</p>
+
+<ol class="algorithm">
+  <li>Return the value of ShallowCompare if it is non-zero.</li>
+  <li>Compare property serializations and then reference serializations, recycling the mapping from property serializations for reference serializations.
+    <ol class="algorithm">
+      <li>If the serialization for bnodeA is null, do SerializeNode(bnodeA, new Mapping).</li>
+      <li>If the serialization for bnodeB is null, do SerializeNode(bnodeA, new Mapping).</li>
+      <li>Return the result of a lexicographical comparison of the two serializations.</li>
+    </ol>
+</li></ol>
+</div>
+
+<div id="node-serialization-algorithm" class="section">
+<h4><span class="secno">5.11.7 </span>Node Serialization Algorithm</h4>
+
+<p>
+SerializeNode(bnode, mapping, dir):
+</p>
+
+<ol class="algorithm">
+<li>If the bnode's label is already marked as mapped, return.</li>
+<li>Mark the bnode's label as mapped.</li>
+<li>Assign the next serialization name to the bnode's label and store it in "top".</li>
+<li>Split the bnode's adjacent bnodes into a map and a list. The map contains a reverse mapping of serialization names to bnode labels for all labels in the mapping, the list (notMapped) contains all labels not in the mapping yet.</li>
+<li>Save a copy of the mapping.</li>
+<li>Do SerializeCombos for max(1, notMapped.length) using the original mapping for the first call and a copy of the mapping for each subsequent call.</li>
+</ol>
+
+</div>
+
+<div id="combinatorial-serialization-algorithm" class="section">
+<h4><span class="secno">5.11.8 </span>Combinatorial Serialization Algorithm</h4>
+
+<p>
+SerializeCombos(top, mapping, mapped, notMapped, dir):
+</p>
+
+<ol class="algorithm">
+  <li>If notMapped is non-empty, copy mapped and assign the next serialization name to its first bnode, remove it from the list, and update mapped.
+    <ol class="algorithm">
+      <li>For max(1, notMapped.length) recurse into SerializeCombos with the original mapping for the first call and a copy of the mapping for each subsequent call. Rotate notMapped on each iteration.</li>
+    </ol>
+  </li>
+  <li>If notMapped is empty, save an entry mapping from the bnode's serialization name to the reverse mapping (mapped) and its sorted keys then do SerializeMapping.
+    <ol class="algorithm">
+      <li>If the serialization is lexicographically less than the current serialization or the current serialization is null, then iterate over the sorted keys, get the reverse-mapped adjacent bnode and recursively call SerializeNode on each iteration.</li>
+      <li>Do SerializeMapping then if the serialization is lexicographically less than the current serialization or the current serialization is null, then set it as the least serialization for the bnode in the given edge direction ('property' or 'reference').</li>
+    </ol>
+  </li>
+</ol>
+
+</div>
+
+<div id="mapping-serialization-algorithm" class="section">
+<h4><span class="secno">5.11.9 </span>Mapping Serialization Algorithm</h4>
+
+<p>
+SerializeMapping(mapping):
+(This function incrementally updates the relation serialization for a mapping)
+</p>
+
+<ol class="algorithm">
+  <li>If there is an entry on the mapping's key stack, pop it and iterate over every key.</li>
+  <li>For each key, if an entry for the key hasn't been added to the mapping yet, break out of the loop.</li>
+  <li>Update the key stack entry's index.</li>
+  <li>If the key has already been serialized, output "'_' + key" and continue.</li>
+  <li>For each key, serialize the key then its associated bnode properties, then its bnode references. The entire property list is surrounded by '[' and ']' and so is the reference list. Individual properties/references are seperated by '|'. If a property is an array, all of the serializations are concatenated together with no joining delimiter. The '@subject' property is skipped. The property IRI is turtle-serialized. If a property or reference object is a bnode, it is serialized to '_:', otherwise the turtle serialization is used.</li>
+  <li>Join all of the adjacent keys and add them to the serialization.</li>
+  <li>Push the adjacent keys onto the key stack.</li>
+  <li>Do SerializeMapping.</li>
+</ol>
+
+</div>
+
+<div id="label-generation-algorithm" class="section">
+<h4><span class="secno">5.11.10 </span>Label Generation Algorithm</h4>
+
+<p>
+NameNode(bnode):
+</p>
+
+<ol class="algorithm">
+  <li>Remove the first blank node from the list of sorted blank nodes.</li>
+  <li>Give it the next canonical name.</li>
+  <li>Give canonical names to each blank node key in its property serialization mapping in lexicographical order.</li>
+  <li>Give canonical names to each blank node key in its reference serialization mapping in lexicographical order.</li>
+  <li>Set all serializations containing newly-named blank nodes to null.</li>
+</ol>
+
+</div>
+
+</div>
+
+<div id="data-round-tripping" class="section">
+
+<h3><span class="secno">5.12 </span>Data Round Tripping</h3>
+
+<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
+ensure that the normalized value is a string. In order to generate the
+string from a <strong>double</strong> value, output equivalent to the
+<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
+<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
+is the value to be converted.</p>
+
+<p>To convert the a double value in JavaScript, implementers can use the 
+following snippet of code:</p>
+
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
+
+<p class="note">When data needs to be normalized, JSON-LD authors should
+not use values that are going to undergo automatic conversion. This is due
+to the lossy nature of <strong>xsd:double</strong> values.</p>
+
+<p class="issue">Round-tripping data can be problematic if we mix and
+match @coerce rules with JSON-native datatypes, like integers. Consider the 
+following code example:</p>
+
+<pre class="example">
+var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+
+// Convert the normalized object back to a JavaScript object
+var myObj2 = jsonld.parse(jsonldText);</pre>
+
+<p class="issue">At this point, myObj2 and myObj will have different
+values for the "number" value. myObj will be the number 42, while
+myObj2 will be the string "42". This type of data round-tripping
+error can bite developers. We are currently wondering if having a
+"coerce validation" phase in the parsing/normalization phases would be a 
+good idea. It would prevent data round-tripping issues like the
+one mentioned above.</p>
+
+</div>
+
+<div id="rdf-conversion" class="section">
+<h3><span class="secno">5.13 </span>RDF Conversion</h3>
+
+<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted to any other RDF-compatible document
+format using the algorithm specified in this section.</p>
+
+<p>
+  The JSON-LD Processing Model describes processing rules for extracting RDF
+  from a JSON-LD document. Note that many uses of JSON-LD may not require 
+  generation of RDF.
+</p>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD to RDF processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The RDF Conversion Algorithm is a work in progress.</p>
+
+<div class="informative section" id="overview">
+  <h4><span class="secno">5.13.1 </span>Overview</h4><p><em>This section is non-normative.</em></p>
+  <p>
+    JSON-LD is intended to have an easy to parse grammar that closely models existing
+    practice in using JSON for describing object representations. This allows the use
+    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
+    for stream-based parsing similar to SAX.
+  </p>
+  <p>
+    As with other grammars used for describing <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
+    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
+    externally named entities, <em>BNodes</em>, resources for which an external name does not
+    exist, or is not known, and Literals, which describe terminal entities such as strings,
+    dates and other representations having a lexical representation possibly including
+    an explicit language or datatype.
+  </p>
+  <p>
+    Data described with JSON-LD may be considered to be the representation of a graph made
+    up of <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> resources related via a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> resource.
+    However, specific implementations may choose to operate on the document as a normal
+    JSON description of objects having attributes.
+  </p>
+</div>
+
+<div id="rdf-conversion-algorithm-terms" class="section">
+  <h4><span class="secno">5.13.2 </span>RDF Conversion Algorithm Terms</h4>
+  <dl>
+    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
+    <dd>
+      the destination graph for all triples generated by JSON-LD markup.
+    </dd>
+  </dl>
+</div>
+
+<div id="rdf-conversion-algorithm" class="section">
+  <h4><span class="secno">5.13.3 </span>RDF Conversion Algorithm</h4>
+  <p>
+    The algorithm below is designed for in-memory implementations with random access to associative
+    array elements.
+  </p>
+  <p>
+    A conforming JSON-LD processor implementing RDF conversion <em class="rfc2119" title="must">must</em> implement a
+    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
+    algorithm generates:
+  </p>
+
+  <ol class="algorithm">
+    <li id="processing-step-default-context">
+      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
+      <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      initialized to NULL.
+    </li>
+
+    <li id="processing-step-associative">
+      If an associative array is detected, perform the following steps:
+      <ol class="algorithm">
+        <li>
+          If the associative array has a <code>@context</code> key, process the local context as
+          described in <a href="#context">Context</a>.
+        </li>
+        <li>
+          Create a new associative array by mapping the keys from the current associative array using the
+          <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to new keys using the associated value from the current associative array.
+          Repeat the mapping until no entry is found within the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for the key. Use the new
+          associative array in subsequent steps.
+        </li>
+        <li>
+          If the associative array has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
+          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. Generate a
+          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+          <p class="issue"><code>@iri</code> really just behaves the same as <code>@subject</code>, consider consolidating them.</p>
+        </li>
+        <li>
+          If the associative array has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+          to a literal value as follows:
+          <ol class="algorithm">
+            <li>
+              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the associative array contains a <code>@datatype</code> key
+              after performing <a href="#iri-expansion">IRI Expansion</a> on the specified<code>@datatype</code>.
+            </li>
+            <li>
+              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the associative array contains
+              a <code>@language</code> key, use it's value to set the language of the plain literal.
+            </li>
+            <li>
+              Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+            </li>
+          </ol>
+        </li>
+        <li id="processing-step-subject">If the associative array has a <code>@subject</code> key:
+          <ol class="algorithm">
+            <li>
+              If the value is a string, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
+              <a href="#iri-expansion">IRI Expansion</a>. Generate a
+              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
+            </li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
+              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          If the associative array does not have a <code>@subject</code> key, set the <a class="tref" title="active__object">active
+          object</a> to newly generated <dfn title="blank_node_identifier" id="dfn-blank_node_identifier">blank node identifier</dfn>. Generate a triple
+          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
+          object</a>.
+        </li>
+        <li>
+          For each key in the associative array that has not already been processed, perform
+          the following steps:
+          <ol class="algorithm">
+            <li>
+              If the key is <code>@type</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+              to <code>rdf:type</code>.
+            </li>
+            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
+            <a href="#iri-expansion">IRI Expansion</a> on the key.</li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
+              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+      </ol>
+    </li>
+
+    <li>
+      If a regular array is detected, process each value in the array by doing the following
+      returning the result of processing the last value in the array:
+
+      <ol class="algorithm">
+        <li>
+          Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref" title="active__context">active
+          context</a>, <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+          starting at <a href="#processing-step-associative">Step 2</a> then proceed using the previous
+          <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+        </li>
+      </ol>
+    </li>
+    
+    <li>
+      If a string is detected:
+      <ol class="algorithm">
+        <li>
+          If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@iri</code> coercion,
+          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
+          performing <a href="#iri-expansion">IRI Expansion</a> on the string.
+        </li>
+        <li>
+          Otherwise, if the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of coercion,
+          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by creating a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using
+          the string and the coercion key as the datatype IRI.
+        </li>
+        <li>
+          Otherwise, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from
+          the string.
+        </li>
+      </ol>
+      Generate a
+      triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
+    </li>
+    
+    <li>
+      If a number is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
+      the value with datatype set to either <code>xsd:integer</code> or
+      <code>xsd:double</code>, depending on if the value contains a
+      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
+      subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the generated typed literal.
+    </li>
+    
+    <li>
+      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
+      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
+      value with datatype set to <code>xsd:boolean</code>.
+    </li>
+  </ol>
+</div>
+
+
+<!--  THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT 
+
+<section>
+<h1>Best Practices</h1>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be 
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<section>
+<h2>JavaScript</h2>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in 
+JavaScript environments, however, features like the expanded form for
+object values mean that using JSON-LD directly in JavaScript may be 
+annoying without a middleware layer such as a simple library that 
+converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDF API, which enables a variety of RDF-based
+Web Applications, but some don't want to require that level of functionality 
+just to use JSON-LD. The group is still discussing the best way to proceed, 
+so input on how JSON-LD could more easily be utilized in JavaScript 
+environments would be very much appreciated.
+</p>
+</section>
+
+<section>
+<h2>Schema-less Databases</h2>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from 
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+
+<p class="issue">MongoDB does not allow the '.' character to be used in
+key names. This prevents developers from storing IRIs as keys, which also
+prevents storage of the data in normalized form. While this issue can
+be avoided by using CURIEs for key values, it is not known if this
+mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
+is useful to developers.
+</p>
+
+ -->
+
+</div>
+
+</div>
+
+<div id="experimental-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>Experimental Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear 
+whether or not the JSON-LD specification is going to support the complexity 
+necessary to support each concept. The entire section on Advanced Concepts 
+should be considered as discussion points; it is merely a list of 
+possibilities where all of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">6.1 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an array to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single JSON-LD associative
+array.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "@coerce": {
+    "foaf": "http://xmlns.com/foaf/0.1/"
+  },
+  "@subject": 
+  [
+    {
+      "@subject": "http://example.org/people#john",
+      "@type": "foaf:Person"
+    },
+    {
+      "@subject": "http://example.org/people#jane",
+      "@type": "foaf:Person"
+    }
+  ]
+}</pre>
+
+<p>A disjoint graph could also be expressed like so:</p>
+
+<pre class="example">
+[
+  {
+    "@subject": "http://example.org/people#john",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  },
+  {
+    "@subject": "http://example.org/people#jane",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  }
+]</pre>
+
+</div>
+
+<div id="lists" class="section">
+  <h3><span class="secno">6.2 </span>Lists</h3>
+  <p>
+    Because graphs do not describe ordering for links between nodes, multi-valued properties
+    in JSON do not provide an ordering of the listed objects. For example, consider the following
+    simple document:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+  <p>
+    This results in three triples being generated, each relating the subject to an individual
+    object, with no inherent order. To address this issue, RDF-based languages, such as [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>]
+    use the concept of an <code>rdf:List</code> (as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">RDF-SCHEMA</a></cite>]). This uses a sequence
+    of unlabeled nodes with properties describing a value, a null-terminated next property. Without
+    specific syntactical support, this could be represented in JSON-LD as follows:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">{</span>,
+    <span class="diff">"@first": "joe"</span>,
+    <span class="diff">"@rest": {</span>
+      <span class="diff">"@first": "bob"</span>,
+      <span class="diff">"@rest": {</span>
+        <span class="diff">"@first": "jaybee"</span>,
+        <span class="diff">"@rest": "@nil"</span>
+        <span class="diff">}</span>
+      <span class="diff">}</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+}</pre>
+  <p>
+    As this notation is rather unwieldy and the notion of ordered collections is rather important
+    in data modeling, it is useful to have specific language support. In JSON-LD, a list may
+    be represented using the <code>@list</code> keyword as follows:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
+...
+}</pre>
+  <p>
+    This describes the use of this array as being ordered, and order is maintained through
+    normalization and RDF conversion. If every use of a given multi-valued property is a
+    list, this may be abbreviated by adding an <code>@coerce</code> term:
+  </p>
+  <pre class="example">
+{
+  <span class="diff">"@context": {</span>
+    ...
+    <span class="diff">"@context": {</span>
+      <span class="diff">"@list": ["foaf:nick"]</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+  <div id="expansion-2" class="section"><h4 id="list-expansion"><span class="secno">6.2.1 </span>Expansion</h4>
+    <p class="issue">TBD.</p>
+  </div>
+  <div id="normalization-2" class="section"><h4 id="list-normalization"><span class="secno">6.2.2 </span>Normalization</h4>
+    <p class="issue">TBD.</p>
+  </div>
+  <div id="rdf-conversion-1" class="section"><h4 id="list-rdf"><span class="secno">6.2.3 </span>RDF Conversion</h4>
+    <p>
+      To support RDF Conversion of lists, <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>
+      is updated as follows:
+    </p>
+    <ol class="algorithm update">
+      <li>
+        <span class="list-number">2.4a.</span>
+        If the associative array has a <code>@list</code> key and the value is an array
+        process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
+      </li>
+      <li>
+        <span class="list-number">2.7.3.</span>
+        Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
+        <ol class="algorithm">
+          <li>
+            If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@list</code> coercion,
+            and the value is an array,
+            process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
+          </li>
+          <li>
+            Otherwise, process the value starting at
+            <a href="#processing-step-associative">Step 2</a>.
+          </li>
+          <li>Proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+        </ol>
+      </li>
+      <li id="processing-step-list">
+        <span class="list-number">3a.</span>
+        Generate an RDF List by linking
+        each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
+        using the following sequence:
+        <ol class="algorithm">
+          <li>
+            If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+            and <code>rdf:nil</code>.
+          </li>
+          <li>
+            Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+            and a newly generated BNode identified as <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">blank node identifier</dfn></em>.
+          </li>
+          <li>
+            For each element other than the last element in the list:
+            <ol class="algorithm">
+              <li>Create a processor state using the active context, <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">blank node identifier</dfn></em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+              <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">blank node identifier</dfn></em>, otherwise use <code>rdf:nil</code>.</li>
+              <li>Generate a new triple using <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">blank node identifier</dfn></em>, <code>rdf:rest</code> and <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">blank node identifier</dfn></em>.</li>
+              <li>Set <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">blank node identifier</dfn></em> to <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">blank node identifier</dfn></em>.</li>
+            </ol>
+          </li>
+        </ol>
+      </li>
+    </ol>
+  </div>
+</div>
+
+
+<!-- -section>
+<h2>The JSON-LD API</h2>
+
+<p>This API provides a clean mechanism that enables developers to convert 
+JSON-LD data into a format that is easier to work with in various programming
+languages.
+</p>
+
+<section>
+<h3>JSONLDProcessor</h3>
+<dl title="[NoInterfaceObject] interface JSONLDProcessor" class="idl">
+
+  <dt>object toProjection()</dt>
+  <dd>Parses JSON-LD text into an RDF API Projection object as specified
+    by the RDF API specification [[!RDF-API]].
+    If there are any errors, <code>null</code> is returned.
+  <dl class="parameters">
+     <dt>DOMString jsonld</dt>
+     <dd>The JSON-LD string to parse into the Projection.</dd>
+     <dt>object? template</dt>
+     <dd>The Projection template to use when building the Projection.</dd>
+     <dt>DOMString? subject</dt>
+     <dd>The subject to use when building the Projection.</dd>
+     <dt>JSONLDParserCallback optional? callback</dt>
+     <dd>A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</dd>
+  </dl>
+  </dd>
+
+  <dt>Graph toGraph()</dt>
+  <dd>Parses JSON-LD and transforms the data into an Graph, which is 
+  compatible with the RDF Interfaces API specification [[!RDF-INTERFACES]]. 
+  This method will 
+  return <code>null</code> if there are any errors, or if the RDF Interfaces 
+  API is not available for use.
+  <dl class="parameters">
+     <dt>DOMString jsonld</dt>
+     <dd>The JSON-LD string to parse into the RDFGraph.</dd>
+     <dt>JSONLDParserCallback optional? callback</dt>
+     <dd>A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</dd>
+  </dl>
+  </dd>
+
+</dl>
+</section>
+<section>
+<h3>JSONLDParserCallback</h3>
+<p>The JSONLDParserCallback is called whenever a processing error occurs on
+input data.</p>
+
+<dl title="[NoInterfaceObject Callback] interface JSONLDProcessorCallback" 
+    class="idl">
+
+  <dt>void error()</dt>
+  <dd>This callback is invoked whenever an error occurs during processing.
+  <dl class="parameters">
+     <dt>DOMString error</dt>
+     <dd>A descriptive error string returned by the processor.</dd>
+  </dl>
+  </dd>
+</dl>
+
+<p>The following example demonstrates how to convert JSON-LD to a projection
+that is directly usable in a programming environment:
+</p>
+
+<pre class="example" data-transform="updateExample">
+// retrieve JSON-LD from a Web Service
+var jsonldString = fetchPerson();
+
+// This map, usually defined once per script, defines how to map incoming 
+// JSON-LD to JavaScript objects
+var myTemplate = { "http://xmlns.com/foaf/0.1/name" : "name",
+                   "http://xmlns.com/foaf/0.1/age" : "age",
+                  "http://xmlns.com/foaf/0.1/homepage" : "homepage" };
+
+// Map the JSON-LD to a language-native object
+var person = jsonld.toProjection(jsonldString, myTemplate);
+
+// Use the language-native object
+alert(person.name + " is " + person.age + " years old. " +
+      "Their homepage is: " + person.homepage);
+</pre>
+</section>
+<section><h3>JSONLDSerializer</h3>
+<p>A JSON-LD Serializer is also available to map a language-native object
+to JSON-LD.
+
+<dl title="[NoInterfaceObject] interface JSONLDSerializer" class="idl">
+
+  <dt>DOMString normalize()</dt>
+  <dd>Serializes a language-native object into a normalized JSON-LD string.
+  Normalization is important when performing things like equality comparison
+  and digital signature creation and verification.
+  <dl class="parameters">
+     <dt>object obj</dt>
+     <dd>An associative array of key-value pairs that should be converted
+     to a JSON-LD string. It is assumed that a map already exists for the
+     data.</dd>
+  </dl>
+  </dd>
+</dl>
+
+</section>
+
+</section  -->
+
+
+</div>
+
+<div class="appendix section" id="markup-examples">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">A.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+{
+  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
+  "@subject": [
+   {
+     "@subject": "_:bnode1",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/bob/",
+     "foaf:name": "Bob"
+   },
+   {
+     "@subject": "_:bnode2",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/eve/",
+     "foaf:name": "Eve"
+   },
+   {
+     "@subject": "_:bnode3",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/manu/",
+     "foaf:name": "Manu"
+   }
+  ]
+}</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">A.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@subject": "_:bnode1",
+  "@type": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">A.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "@type": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]</pre>
+</div>
+
+<div class="appendix section" id="mashing-up-vocabularies">
+<h3><span class="secno">A.4 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>RDF - for describing information about objects on the semantic web.</li>
+   <li>RDFS - for expressing things like labels and comments.</li>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>You can use these vocabularies in combination, like so:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword, 
+like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "@type": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}</pre>
+
+<p>The <code>@context</code> keyword is used to change how the JSON-LD
+processor evaluates key-value pairs. In this case, it was used to
+map one string ('myvocab') to another string, which is interpreted as
+a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced 
+with "<code>http://example.org/myvocab#</code>" when it
+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 for RDF, called a CURIE, and provides
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div class="appendix section" id="acknowledgements">
+<h3><span class="secno">A.5 </span>Acknowledgements</h3>
+
+<p>The editors would like to thank Mark Birbeck, who provided a great deal of 
+the initial push behind the JSON-LD work via his work on RDFj, 
+Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and 
+performed several implementations of the specification, and Ian Davis, who 
+created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
+Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
+Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard 
+Cyganiak for their input on the specification. Another huge thank you goes out
+to Dave Longley who designed many of the algorithms used in this specification,
+including the normalization algorithm which was a monumentally difficult 
+design challenge.
+</p>
+</div>
+
+
+
+
+</div><div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd>T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a> 
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification, Third Edition.</cite></a> December 1999. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 
+</dd><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd>Dan Brickley; Ramanathan V. Guha. <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite>RDF Vocabulary Description Language 1.0: RDF Schema.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">http://www.w3.org/TR/2004/REC-rdf-schema-20040210</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
+</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd>David Beckett, Tim Berners-Lee. <a href="http://www.w3.org/TeamSubmission/turtle/"><cite>Turtle: Terse RDF Triple Language.</cite></a> January 2008. W3C Team Submission. URL: <a href="http://www.w3.org/TeamSubmission/turtle/">http://www.w3.org/TeamSubmission/turtle/</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110808/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110817/diff-20110808.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,23273 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left; 
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+1.0
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+Linking
+Data
+</h2>
+<h2 id="unofficial-draft-17-august-2011">
+Unofficial
+Draft
+<del class="diff-old">08
+</del>
+<ins class="diff-chg">17
+</ins>
+August
+2011
+</h2>
+<dl>
+<dt>
+Editors:
+</dt>
+<dd>
+<a href="http://manu.sporny.org/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+Kellogg
+Associates
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+<ins class="diff-new">Dave
+Longley
+</ins></a>,<a href="http://digitalbazaar.com/"><ins class="diff-new">
+Digital
+Bazaar
+</ins></a></dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+Kellogg
+Associates
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20110808.html">
+diff
+to
+previous
+version
+</a>.
+</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+JSON
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+expressing
+directed
+graphs;
+mixing
+both
+Linked
+Data
+and
+non-Linked
+Data
+in
+a
+single
+document.
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals-and-rationale" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Goals
+and
+Rationale
+</a>
+</li>
+<li class="tocline">
+<a href="#linked-data" class="tocxref">
+<span class="secno">
+2.2
+</span>
+Linked
+Data
+</a>
+</li>
+<li class="tocline">
+<a href="#linking-data" class="tocxref">
+<span class="secno">
+2.3
+</span>
+Linking
+Data
+</a>
+</li>
+<li class="tocline">
+<a href="#the-context" class="tocxref">
+<span class="secno">
+2.4
+</span>
+The
+Context
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#inside-a-context" class="tocxref">
+<span class="secno">
+2.4.1
+</span>
+Inside
+a
+Context
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#from-json-to-json-ld" class="tocxref">
+<span class="secno">
+2.5
+</span>
+From
+JSON
+to
+JSON-LD
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#basic-concepts" class="tocxref">
+<span class="secno">
+3.
+</span>
+Basic
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+3.1
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+3.2
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+3.3
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#strings" class="tocxref">
+<span class="secno">
+3.4
+</span>
+Strings
+</a>
+</li>
+<li class="tocline">
+<a href="#string-internationalization" class="tocxref">
+<span class="secno">
+3.5
+</span>
+String
+Internationalization
+</a>
+</li>
+<li class="tocline">
+<a href="#datatypes" class="tocxref">
+<span class="secno">
+3.6
+</span>
+Datatypes
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+3.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+3.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#expansion" class="tocxref">
+<span class="secno">
+3.9
+</span>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#compaction" class="tocxref">
+<span class="secno">
+3.10
+</span>
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#framing" class="tocxref">
+<span class="secno">
+3.11
+</span>
+Framing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+4.
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#curies" class="tocxref">
+<span class="secno">
+4.1
+</span>
+<ins class="diff-new">CURIEs
+</ins></a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno"><ins class="diff-new">
+4.2
+</ins></span>
+Automatic
+Typing
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">4.3
+</ins>
+</span>
+Type
+Coercion
+</a>
+</li>
+<li class="tocline">
+<a href="#chaining" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">4.4
+</ins>
+</span>
+Chaining
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-unlabeled-nodes" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">4.5
+</ins>
+</span>
+Identifying
+Unlabeled
+Nodes
+</a>
+</li>
+<li class="tocline">
+<a href="#overriding-keywords" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">4.6
+</ins>
+</span>
+Overriding
+Keywords
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">4.7
+</ins>
+</span>
+Normalization
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-application-programming-interface" class="tocxref">
+<span class="secno">
+5.
+</span>
+<ins class="diff-new">The
+Application
+Programming
+Interface
+</ins></a><ul class="toc"><li class="tocline"><a href="#jsonldprocessor" class="tocxref"><span class="secno"><ins class="diff-new">
+5.1
+</ins></span><ins class="diff-new">
+JSONLDProcessor
+</ins></a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno"><ins class="diff-new">
+5.1.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></a></li></ul></li><li class="tocline"><a href="#jsonldprocessorcallback" class="tocxref"><span class="secno"><ins class="diff-new">
+5.2
+</ins></span><ins class="diff-new">
+JSONLDProcessorCallback
+</ins></a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno"><ins class="diff-new">
+5.2.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></a></li></ul></li><li class="tocline"><a href="#jsonldtriplecallback" class="tocxref"><span class="secno"><ins class="diff-new">
+5.3
+</ins></span><ins class="diff-new">
+JSONLDTripleCallback
+</ins></a><ul class="toc"><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno"><ins class="diff-new">
+5.3.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></a></li></ul></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno"><ins class="diff-new">
+6.
+</ins></span>
+Algorithms
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#syntax-tokens-and-keywords" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Syntax
+Tokens
+and
+Keywords
+</a>
+</li>
+<li class="tocline">
+<a href="#algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#context-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.3
+</del>
+<ins class="diff-chg">6.3
+</ins>
+</span>
+Context
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#coerce" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.3.1
+</del>
+<ins class="diff-chg">6.3.1
+</ins>
+</span>
+Coerce
+</a>
+</li>
+<li class="tocline">
+<a href="#initial-context" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.3.2
+</del>
+<ins class="diff-chg">6.3.2
+</ins>
+</span>
+Initial
+Context
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#iri-expansion" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.4
+</del>
+<ins class="diff-chg">6.4
+</ins>
+</span>
+IRI
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-compaction" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.5
+</del>
+<ins class="diff-chg">6.5
+</ins>
+</span>
+IRI
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#value-expansion" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.6
+</del>
+<ins class="diff-chg">6.6
+</ins>
+</span>
+Value
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#value-compaction" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.7
+</del>
+<ins class="diff-chg">6.7
+</ins>
+</span>
+Value
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#expansion-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.8
+</del>
+<ins class="diff-chg">6.8
+</ins>
+</span>
+Expansion
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#expansion-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.8.1
+</del>
+<ins class="diff-chg">6.8.1
+</ins>
+</span>
+Expansion
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#compaction-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+Compaction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#compaction-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.9.1
+</del>
+<ins class="diff-chg">6.9.1
+</ins>
+</span>
+Compaction
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#framing-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.10
+</del>
+<ins class="diff-chg">6.10
+</ins>
+</span>
+Framing
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#framing-algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.10.1
+</del>
+<ins class="diff-chg">6.10.1
+</ins>
+</span>
+Framing
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#framing-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.10.2
+</del>
+<ins class="diff-chg">6.10.2
+</ins>
+</span>
+Framing
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#normalization-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11
+</del>
+<ins class="diff-chg">6.11
+</ins>
+</span>
+Normalization
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normalization-algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.1
+</del>
+<ins class="diff-chg">6.11.1
+</ins>
+</span>
+Normalization
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization-state" class="tocxref">
+<span class="secno">
+<ins class="diff-new">6.11.2
+</ins></span><ins class="diff-new">
+Normalization
+State
+</ins></a></li><li class="tocline">
+<a href="#normalization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.2
+</del>
+<ins class="diff-chg">6.11.3
+</ins>
+</span>
+Normalization
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#node-relabeling-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.3
+</del>
+<ins class="diff-chg">6.11.4
+</ins>
+</span>
+Node
+<ins class="diff-new">Relabeling
+Algorithm
+</ins></a></li><li class="tocline"><a href="#deterministic-labeling-algorithm" class="tocxref"><span class="secno"><ins class="diff-new">
+6.11.5
+</ins></span><ins class="diff-new">
+Deterministic
+</ins>
+Labeling
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#shallow-comparison-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.4
+</del>
+<ins class="diff-chg">6.11.6
+</ins>
+</span>
+Shallow
+Comparison
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#object-comparison-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.5
+</del>
+<ins class="diff-chg">6.11.7
+</ins>
+</span>
+Object
+Comparison
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#deep-comparison-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.6
+</del>
+<ins class="diff-chg">6.11.8
+</ins>
+</span>
+Deep
+Comparison
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#node-serialization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.7
+</del>
+<ins class="diff-chg">6.11.9
+</ins>
+</span>
+Node
+Serialization
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#serialization-label-generation-algorithm" class="tocxref">
+<span class="secno">
+<ins class="diff-new">6.11.10
+</ins></span><ins class="diff-new">
+Serialization
+Label
+Generation
+Algorithm
+</ins></a></li><li class="tocline">
+<a href="#combinatorial-serialization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.8
+</del>
+<ins class="diff-chg">6.11.11
+</ins>
+</span>
+Combinatorial
+Serialization
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#mapping-serialization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.9
+</del>
+<ins class="diff-chg">6.11.12
+</ins>
+</span>
+Mapping
+Serialization
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#label-serialization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.11.10
+</del>
+<ins class="diff-chg">6.11.13
+</ins>
+</span>
+Label
+<del class="diff-old">Generation
+</del>
+<ins class="diff-chg">Serialization
+</ins>
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#data-round-tripping" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.12
+</del>
+<ins class="diff-chg">6.12
+</ins>
+</span>
+Data
+Round
+Tripping
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.13
+</del>
+<ins class="diff-chg">6.13
+</ins>
+</span>
+RDF
+Conversion
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#overview" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.13.1
+</del>
+<ins class="diff-chg">6.13.1
+</ins>
+</span>
+Overview
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.13.2
+</del>
+<ins class="diff-chg">6.13.2
+</ins>
+</span>
+RDF
+Conversion
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">5.13.3
+</del>
+<ins class="diff-chg">6.13.3
+</ins>
+</span>
+RDF
+Conversion
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#experimental-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">7.
+</ins>
+</span>
+Experimental
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">7.1
+</ins>
+</span>
+Disjoint
+Graphs
+</a>
+</li>
+<li class="tocline">
+<a href="#lists" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">7.2
+</ins>
+</span>
+Lists
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#expansion-2" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2.1
+</del>
+<ins class="diff-chg">7.2.1
+</ins>
+</span>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization-2" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2.2
+</del>
+<ins class="diff-chg">7.2.2
+</ins>
+</span>
+Normalization
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.2.3
+</del>
+<ins class="diff-chg">7.2.3
+</ins>
+</span>
+RDF
+Conversion
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+A.
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+A.1
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+A.2
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+A.3
+</span>
+Microdata
+</a>
+</li>
+<li class="tocline">
+<a href="#mashing-up-vocabularies" class="tocxref">
+<span class="secno">
+A.4
+</span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+A.5
+</span>
+Acknowledgements
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+B.
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+JSON,
+as
+specified
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+],
+is
+a
+simple
+language
+for
+representing
+data
+on
+the
+Web.
+Linked
+Data
+is
+a
+technique
+for
+describing
+content
+across
+different
+documents
+or
+Web
+sites.
+Web
+resources
+are
+described
+using
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s,
+and
+typically
+are
+dereferencable
+entities
+that
+may
+be
+used
+to
+find
+more
+information,
+creating
+a
+"Web
+of
+Knowledge".
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+not
+only
+Linked
+Data
+in
+JSON,
+but
+for
+adding
+semantics
+to
+existing
+JSON.
+</p>
+<p>
+JSON-LD
+is
+designed
+as
+a
+light-weight
+syntax
+that
+can
+be
+used
+to
+express
+Linked
+Data.
+It
+is
+primarily
+intended
+to
+be
+a
+way
+to
+express
+Linked
+Data
+in
+Javascript
+and
+other
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+interoperable
+Web
+Services
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+document
+storage
+engines.
+It
+is
+practical
+and
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+and
+existing
+code
+that
+is
+in
+use
+today.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+]
+data,
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+data,
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+That
+is,
+it
+supports
+every
+major
+Web-based
+structured
+data
+model
+in
+use
+today.
+</p>
+<p>
+The
+syntax
+does
+not
+require
+many
+applications
+to
+change
+their
+JSON,
+but
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+either
+in-band
+or
+out-of-band.
+The
+syntax
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+migration
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+fast
+to
+parse,
+fast
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+very
+small
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+JSON
+for
+Linked
+data.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+implement
+processors
+and
+APIs
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+the
+basics
+in
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+].
+To
+understand
+the
+API
+and
+how
+it
+is
+intended
+to
+operate
+in
+a
+programming
+environment,
+it
+is
+useful
+to
+have
+working
+knowledge
+of
+the
+JavaScript
+programming
+language
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-ECMA-262">
+ECMA-262
+</a>
+</cite>
+]
+and
+WebIDL
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-WEBIDL">
+WEBIDL
+</a>
+</cite>
+].
+To
+understand
+how
+JSON-LD
+maps
+to
+RDF,
+it
+is
+helpful
+to
+be
+familiar
+with
+the
+basic
+RDF
+concepts
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+<p>
+Examples
+may
+contain
+references
+to
+existing
+vocabularies
+and
+use
+abbreviations
+in
+<del class="diff-old">CURIEs
+</del>
+<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
+<ins class="diff-chg">CURIE
+</ins></a><ins class="diff-chg">
+s
+</ins>
+and
+source
+code.
+The
+following
+is
+a
+list
+of
+all
+vocabularies
+and
+their
+abbreviations,
+as
+used
+in
+this
+document:
+</p>
+<ul>
+<li>
+The
+<a href="http://purl.org/dc/terms/">
+Dublin
+Core
+</a>
+vocabulary
+(abbreviation:
+<code>
+dc
+</code>,
+e.g.,
+<code>
+dc:title
+</code>
+)
+</li>
+<li>
+The
+<a href="http://xmlns.com/foaf/0.1/">
+Friend
+of
+a
+Friend
+</a>
+vocabulary
+(abbreviation:
+<code>
+foaf
+</code>,
+e.g.,
+<code>
+foaf:knows
+</code>
+)
+</li>
+<li>
+The
+<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+RDF
+</a>
+vocabulary
+(abbreviation:
+<code>
+rdf
+</code>,
+e.g.,
+<code>
+rdf:type
+</code>
+)
+</li>
+<li>
+The
+<a href="http://www.w3.org/2001/XMLSchema#">
+XSD
+</a>
+vocabulary
+(abbreviation:
+<code>
+xsd
+</code>,
+e.g.,
+<code>
+xsd:integer
+</code>
+)
+</li>
+</ul>
+<p>
+<ins class="diff-new">JSON
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627"><ins class="diff-new">
+RFC4627
+</ins></a></cite><ins class="diff-new">
+]
+defines
+several
+terms
+which
+are
+used
+throughout
+this
+document:
+</ins></p><dl><dt><dfn title="JSON_Object" id="dfn-json_object"><ins class="diff-new">
+JSON
+Object
+</ins></dfn></dt><dd><ins class="diff-new">
+An
+object
+structure
+is
+represented
+as
+a
+pair
+of
+curly
+brackets
+surrounding
+zero
+or
+more
+name/value
+pairs
+(or
+members).
+A
+name
+is
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-new">
+string
+</ins></a>.<ins class="diff-new">
+A
+single
+colon
+comes
+after
+each
+name,
+separating
+the
+name
+from
+the
+value.
+A
+single
+comma
+separates
+a
+value
+from
+a
+following
+name.
+The
+names
+within
+an
+object
+</ins><em class="rfc2119" title="should"><ins class="diff-new">
+should
+</ins></em><ins class="diff-new">
+be
+unique.
+</ins></dd><dt><dfn title="array" id="dfn-array"><ins class="diff-new">
+array
+</ins></dfn></dt><dd><ins class="diff-new">
+An
+</ins><em><ins class="diff-new">
+array
+</ins></em><ins class="diff-new">
+is
+an
+ordered
+collection
+of
+values.
+An
+array
+begins
+with
+[
+(left
+bracket)
+and
+ends
+with
+]
+(right
+bracket).
+Values
+are
+separated
+by
+,
+(comma).
+Within
+JSON-LD,
+array
+order
+is
+not
+preserved,
+unless
+specific
+markup
+is
+provided
+(see
+</ins><a href="#lists"><ins class="diff-new">
+Lists
+</ins></a><ins class="diff-new">
+).
+This
+is
+because
+the
+basic
+data
+model
+of
+JSON-LD
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-new">
+linked
+data
+graph
+</ins></a>,<ins class="diff-new">
+which
+is
+inherently
+unordered.
+</ins></dd><dt><dfn title="string" id="dfn-string"><ins class="diff-new">
+string
+</ins></dfn></dt><dd><ins class="diff-new">
+A
+string
+is
+a
+sequence
+of
+zero
+or
+more
+Unicode
+characters,
+wrapped
+in
+double
+quotes,
+using
+backslash
+escapes.
+A
+character
+is
+represented
+as
+a
+single
+character
+string.
+A
+string
+is
+very
+much
+like
+a
+C
+or
+Java
+string.
+</ins></dd><dt><dfn title="number" id="dfn-number"><ins class="diff-new">
+number
+</ins></dfn></dt><dd><ins class="diff-new">
+A
+number
+is
+very
+much
+like
+a
+C
+or
+Java
+number,
+except
+that
+the
+octal
+and
+hexadecimal
+formats
+are
+not
+used.
+</ins></dd><dt><dfn title="true" id="dfn-true"><ins class="diff-new">
+true
+</ins></dfn><ins class="diff-new">
+and
+</ins><dfn title="false" id="dfn-false"><ins class="diff-new">
+false
+</ins></dfn></dt><dd><ins class="diff-new">
+Boolean
+values.
+</ins></dd><dt><dfn title="null" id="dfn-null"><ins class="diff-new">
+null
+</ins></dfn></dt><dd><ins class="diff-new">
+The
+use
+of
+the
+</ins><em><ins class="diff-new">
+null
+</ins></em><ins class="diff-new">
+value
+is
+undefined
+within
+JSON-LD.
+</ins></dd></dl><p></p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+Technical
+discussion
+typically
+occurs
+on
+the
+public
+mailing
+list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
+public-linked-json@w3.org
+</a>
+</li>
+<li>
+<a href="http://json-ld.org/minutes/">
+Public
+teleconferences
+</a>
+are
+held
+on
+Tuesdays
+at
+1500UTC
+on
+the
+second
+and
+fourth
+week
+of
+each
+month.
+</li>
+<li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="https://github.com/json-ld/json-ld.org/issues">
+issue
+tracker
+</a>.
+</li>
+<li>
+<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=#json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+</div>
+</div>
+<div id="design" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="goals-and-rationale" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+Goals
+and
+Rationale
+</h3>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+need
+only
+know
+JSON
+and
+three
+keywords
+to
+use
+the
+basic
+functionality
+in
+JSON-LD.
+No
+extra
+processors
+or
+software
+libraries
+are
+necessary
+to
+use
+JSON-LD
+in
+its
+most
+basic
+form.
+The
+language
+attempts
+to
+ensure
+that
+developers
+have
+an
+easy
+learning
+curve.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+must
+be
+100%
+compatible
+with
+JSON.
+This
+ensures
+that
+all
+of
+the
+standard
+JSON
+libraries
+work
+seamlessly
+with
+JSON-LD
+documents.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+The
+syntax
+must
+be
+able
+to
+express
+directed
+graphs,
+which
+have
+been
+proven
+to
+be
+able
+to
+simply
+express
+almost
+every
+real
+world
+data
+model.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable,
+requiring
+as
+little
+as
+possible
+from
+the
+developer.
+</dd>
+<dt>
+<del class="diff-old">Pragmatism
+Mixing
+the
+expression
+of
+pure
+Linked
+Data
+with
+data
+that
+is
+not
+linked
+was
+an
+approach
+that
+was
+driven
+by
+pragmatism.
+JSON-LD
+attempts
+to
+be
+more
+practical
+than
+theoretical
+in
+its
+approach
+to
+Linked
+Data.
+</del>
+Zero
+Edits,
+most
+of
+the
+time
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+At
+times,
+mapping
+JSON
+to
+a
+graph
+representation
+can
+become
+difficult.
+In
+these
+instances,
+rather
+than
+having
+JSON-LD
+support
+esoteric
+markup,
+we
+chose
+not
+to
+support
+the
+use
+case
+and
+support
+a
+simplified
+syntax
+instead.
+So,
+while
+Zero
+Edits
+was
+a
+goal,
+it
+was
+not
+always
+possible
+without
+adding
+great
+complexity
+to
+the
+language.
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<div id="linked-data" class="section">
+<h3>
+<span class="secno">
+2.2
+</span>
+Linked
+Data
+</h3>
+<p>
+The
+following
+definition
+for
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+is
+the
+one
+that
+will
+be
+used
+for
+this
+specification.
+</p>
+<ol>
+<li>
+<dfn title="Linked_Data" id="dfn-linked_data">
+Linked
+Data
+</dfn>
+is
+a
+set
+of
+documents,
+each
+containing
+a
+representation
+of
+a
+linked
+data
+graph.
+</li>
+<li>
+A
+<dfn title="linked_data_graph" id="dfn-linked_data_graph">
+linked
+data
+graph
+</dfn>
+is
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">an
+unordered
+</ins>
+labeled
+directed
+graph,
+where
+nodes
+are
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+s
+or
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+s,
+and
+edges
+are
+properties.
+</li>
+<li>
+A
+<dfn title="subject" id="dfn-subject">
+subject
+</dfn>
+is
+any
+node
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+with
+at
+least
+one
+outgoing
+edge.
+</li>
+<li>
+A
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+<em class="rfc2119" title="should">
+should
+</em>
+be
+labeled
+with
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">an
+</ins>
+IRI.
+</li>
+<li>
+A
+<dfn title="property" id="dfn-property">
+property
+</dfn>
+is
+an
+edge
+of
+the
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+<del class="diff-old">.
+</del>
+</a>.
+</li>
+<li>
+A
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+<del class="diff-old">must
+</del>
+<em class="rfc2119" title="should">
+<ins class="diff-chg">should
+</ins>
+</em>
+be
+labeled
+with
+an
+IRI.
+</li>
+<li>
+An
+<dfn title="object" id="dfn-object">
+object
+</dfn>
+is
+a
+node
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+with
+at
+least
+one
+incoming
+edge.
+</li>
+<li>
+An
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+<em class="rfc2119" title="may">
+may
+</em>
+be
+labeled
+with
+an
+IRI.
+</li>
+<li>
+An
+IRI
+that
+is
+a
+label
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+<em class="rfc2119" title="should">
+should
+</em>
+be
+dereferencable
+to
+a
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+document
+describing
+the
+labeled
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>,
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+or
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+<del class="diff-old">.
+</del>
+</a>.
+</li>
+<li>
+A
+<dfn title="literal" id="dfn-literal">
+literal
+</dfn>
+is
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+with
+a
+label
+that
+is
+not
+an
+IRI
+</li>
+</ol>
+<p>
+Note
+that
+the
+definition
+for
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+above
+is
+silent
+on
+the
+topic
+of
+unlabeled
+nodes.
+Unlabeled
+nodes
+are
+not
+considered
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>.
+However,
+this
+specification
+allows
+for
+the
+expression
+of
+unlabled
+nodes,
+as
+most
+graph-based
+data
+sets
+on
+the
+Web
+contain
+a
+number
+of
+associated
+nodes
+that
+are
+not
+named
+and
+thus
+are
+not
+directly
+de-referenceable.
+</p>
+</div>
+<div id="linking-data" class="section">
+<h3>
+<span class="secno">
+2.3
+</span>
+Linking
+Data
+</h3>
+<p>
+An
+Internationalized
+Resource
+Identifier
+(
+<dfn title="IRI" id="dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+),
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+],
+is
+a
+mechanism
+for
+representing
+unique
+identifiers
+on
+the
+web.
+In
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+an
+IRI
+is
+commonly
+used
+for
+expressing
+a
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>,
+a
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+or
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>.
+</p>
+<p>
+JSON-LD
+defines
+a
+mechanism
+to
+map
+JSON
+values
+to
+IRIs.
+This
+does
+not
+mean
+that
+JSON-LD
+requires
+every
+key
+or
+value
+to
+be
+an
+IRI,
+but
+rather
+ensures
+that
+keys
+and
+values
+can
+be
+mapped
+to
+IRIs
+if
+the
+developer
+so
+desires
+to
+transform
+their
+data
+into
+Linked
+Data.
+There
+are
+a
+few
+techniques
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+Linked
+Data
+for
+the
+Web.
+JSON-LD
+formalizes
+those
+techniques.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+markup
+as
+the
+example
+for
+the
+rest
+of
+this
+section:
+</p>
+<pre class="example">
+{
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<div id="the-context" class="section">
+<h3>
+<span class="secno">
+2.4
+</span>
+The
+Context
+</h3>
+<p>
+In
+JSON-LD,
+a
+context
+is
+used
+to
+allow
+developers
+to
+map
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+to
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s.
+A
+<dfn title="term" id="dfn-term">
+term
+</dfn>
+is
+a
+short
+word
+that
+<em class="rfc2119" title="may">
+may
+</em>
+be
+expanded
+to
+an
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>.
+The
+semantic
+web,
+just
+like
+the
+document-based
+web,
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+mean
+something
+that
+may
+be
+of
+use
+to
+other
+developers.
+For
+example,
+the
+term
+<code>
+name
+</code>
+may
+map
+directly
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+allows
+JSON-LD
+documents
+to
+be
+constructed
+using
+the
+common
+JSON
+practice
+of
+simple
+name/value
+pairs
+while
+ensuring
+that
+the
+data
+is
+useful
+outside
+of
+the
+database
+or
+page
+in
+which
+it
+resides.
+</p>
+<p>
+These
+Linked
+Data
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+are
+typically
+collected
+in
+a
+context
+and
+then
+used
+by
+adding
+a
+single
+line
+to
+the
+JSON
+markup
+above:
+</p>
+<pre class="example">
+{
+  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+<p>
+The
+addition
+above
+transforms
+the
+previous
+JSON
+document
+into
+a
+JSON
+document
+with
+added
+semantics
+because
+the
+<code>
+@context
+</code>
+specifies
+how
+the
+<strong>
+name
+</strong>,
+<strong>
+homepage
+</strong>,
+and
+<strong>
+avatar
+</strong>
+terms
+map
+to
+IRIs.
+Mapping
+those
+keys
+to
+IRIs
+gives
+the
+data
+global
+context.
+If
+two
+developers
+use
+the
+same
+IRI
+to
+describe
+a
+property,
+they
+are
+more
+than
+likely
+expressing
+the
+same
+concept.
+This
+allows
+both
+developers
+to
+re-use
+each
+others
+data
+without
+having
+to
+agree
+to
+how
+their
+data
+will
+inter-operate
+on
+a
+site-by-site
+basis.
+</p>
+<p>
+The
+semantic
+web
+uses
+a
+special
+type
+of
+document
+called
+a
+<em>
+Web
+Vocabulary
+</em>
+to
+define
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s.
+A
+context
+is
+a
+type
+of
+Web
+vocabulary.
+Typically,
+these
+Web
+Vocabulary
+documents
+have
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+es
+associated
+with
+them
+and
+contain
+a
+number
+of
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+declarations.
+A
+<dfn title="prefix" id="dfn-prefix">
+prefix
+</dfn>,
+like
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>,
+is
+a
+short
+word
+that
+expands
+to
+a
+Web
+Vocabulary
+IRI.
+<a class="tref internalDFN" title="Prefix" href="#dfn-prefix">
+Prefix
+</a>
+es
+are
+helpful
+when
+a
+developer
+wants
+to
+mix
+multiple
+vocabularies
+together
+in
+a
+context,
+but
+does
+not
+want
+to
+go
+to
+the
+trouble
+of
+defining
+every
+single
+term
+in
+every
+single
+vocabulary.
+Some
+Web
+Vocabularies
+may
+have
+10-20
+terms
+defined.
+If
+a
+developer
+wants
+to
+use
+3-4
+different
+vocabularies,
+the
+number
+of
+terms
+that
+would
+have
+to
+be
+declared
+in
+a
+single
+context
+would
+become
+quite
+large.
+To
+reduce
+the
+number
+of
+different
+terms
+that
+must
+be
+defined,
+JSON-LD
+also
+allows
+prefixes
+to
+be
+used
+to
+compact
+IRIs.
+</p>
+<p>
+</p>
+<p>
+For
+example,
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/
+</code>
+specifies
+a
+Web
+Vocabulary
+which
+may
+be
+represented
+using
+the
+<code>
+foaf
+</code>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>.
+The
+<code>
+foaf
+</code>
+Web
+Vocabulary
+contains
+a
+term
+called
+<strong>
+name
+</strong>.
+If
+you
+join
+the
+<code>
+foaf
+</code>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+with
+the
+<strong>
+name
+</strong>
+suffix,
+you
+can
+build
+a
+compact
+IRI
+that
+will
+expand
+out
+into
+an
+absolute
+IRI
+for
+the
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+vocabulary
+term.
+That
+is,
+the
+compact
+IRI,
+or
+short-form,
+is
+<code>
+foaf:name
+</code>
+and
+the
+expanded-form
+is
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+vocabulary
+term
+is
+used
+to
+specify
+a
+person's
+name.
+</p>
+<p>
+Developers,
+and
+machines,
+are
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+WordNet
+today
+to
+see
+the
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">
+definition
+</a>
+of
+words
+in
+the
+English
+language.
+Developers
+and
+machines
+need
+the
+same
+sort
+of
+dictionary
+of
+terms.
+IRIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+The
+context
+provides
+a
+collection
+of
+vocabulary
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+es
+that
+can
+be
+used
+to
+expand
+JSON
+keys
+and
+values
+into
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s.
+</p>
+<div id="inside-a-context" class="section">
+<h4>
+<span class="secno">
+2.4.1
+</span>
+Inside
+a
+Context
+</h4>
+<p>
+In
+the
+previous
+section,
+the
+developer
+used
+the
+<code>
+@context
+</code>
+keyword
+to
+pull
+in
+an
+external
+context.
+That
+context
+document,
+if
+de-referenced,
+would
+look
+something
+like
+this:
+</p>
+<pre class="example">
+{
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+}
+</pre>
+<p>
+A
+JSON-LD
+context
+document
+is
+a
+simple
+mapping
+from
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+es
+to
+expanded
+values
+such
+as
+IRIs
+or
+keywords.
+Contexts
+may
+also
+contain
+datatype
+information
+for
+certain
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+as
+well
+as
+other
+processing
+instructions
+for
+the
+JSON-LD
+processor.
+</p>
+<p>
+Contexts
+may
+be
+specified
+in-line.
+This
+ensures
+that
+JSON-LD
+documents
+can
+be
+processed
+when
+a
+JSON-LD
+processor
+does
+not
+have
+access
+to
+the
+Web.
+</p>
+<p>
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+This
+means
+that
+developers
+can
+also
+specify
+a
+context
+for
+JSON
+data
+in
+an
+out-of-band
+fashion
+via
+the
+API.
+The
+API
+is
+described
+later
+in
+this
+document.
+A
+JSON-LD
+aware
+Web
+Service
+<em class="rfc2119" title="may">
+may
+</em>
+also
+define
+a
+context
+that
+will
+be
+pre-loaded
+for
+all
+calls
+to
+the
+service.
+This
+allows
+services
+that
+have
+previously
+been
+publishing
+and
+receiving
+JSON
+data
+to
+accept
+JSON-LD
+data
+without
+requiring
+client
+software
+to
+change.
+</p>
+</div>
+</div>
+<div id="from-json-to-json-ld" class="section">
+<h3>
+<span class="secno">
+2.5
+</span>
+From
+JSON
+to
+JSON-LD
+</h3>
+<p>
+If
+a
+set
+of
+terms
+such
+as,
+<strong>
+name
+</strong>,
+<strong>
+homepage
+</strong>,
+and
+<strong>
+avatar
+</strong>,
+are
+defined
+in
+a
+context,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+JSON
+objects,
+machines
+are
+able
+to
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<pre class="example">
+{
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+<p>
+Doing
+this
+allows
+JSON
+to
+be
+unambiguously
+machine-readable
+without
+requiring
+developers
+that
+use
+JSON
+to
+drastically
+change
+their
+workflow.
+</p>
+</div>
+</div>
+<div id="basic-concepts" class="section">
+<h2>
+<span class="secno">
+3.
+</span>
+Basic
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+regular
+JSON
+markup
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+As
+more
+JSON-LD
+features
+are
+used,
+more
+semantics
+are
+added
+to
+the
+JSON
+markup.
+</p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+3.1
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+s
+and
+many
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+are
+named.
+IRIs
+can
+be
+expressed
+in
+a
+variety
+of
+different
+ways
+in
+JSON-LD.
+</p>
+<ol>
+<li>
+In
+general,
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+in
+the
+key
+position
+in
+<del class="diff-old">an
+associative
+array
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+that
+have
+a
+mapping
+to
+an
+IRI
+or
+another
+key
+in
+the
+context
+are
+expanded
+to
+an
+IRI
+by
+JSON-LD
+processors.
+There
+are
+special
+rules
+for
+processing
+keys
+in
+<code>
+@context
+</code>
+and
+when
+dealing
+with
+keys
+that
+start
+with
+the
+<code>
+@subject
+</code>
+character.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+@subject
+</code>,
+if
+it
+is
+a
+<del class="diff-old">string.
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a>.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+@type
+</code>.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+the
+<code>
+@iri
+</code>
+keyword.
+</li>
+<li>
+An
+IRI
+is
+generated
+when
+there
+are
+<code>
+@coerce
+</code>
+rules
+in
+effect
+for
+a
+key
+named
+<code>
+@iri
+</code>.
+</li>
+</ol>
+<p>
+IRIs
+can
+be
+expressed
+directly
+in
+the
+key
+position
+like
+so:
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+In
+the
+example
+above,
+the
+key
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+is
+interpreted
+as
+an
+IRI,
+as
+opposed
+to
+being
+interpreted
+as
+a
+<del class="diff-old">string..
+</del>
+<ins class="diff-chg">string.
+</ins>
+</p>
+<p>
+Term
+expansion
+occurs
+for
+IRIs
+if
+a
+term
+is
+defined
+within
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>:
+</p>
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+<a class="tref internalDFN" title="Prefix" href="#dfn-prefix">
+Prefix
+</a>
+es
+are
+expanded
+when
+used
+in
+keys:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  ""},
+</del>
+<ins class="diff-chg">  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+</ins>
+...
+<del class="diff-old">  "": "Manu Sporny",
+</del>
+<ins class="diff-chg">  "<span class="diff">name</span>": "Manu Sporny",
+</ins>
+...
+}
+</pre>
+<p>
+<code>
+<del class="diff-old">foaf:name
+</del>
+<ins class="diff-chg">name
+</ins>
+</code>
+above
+will
+automatically
+expand
+out
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+</p>
+<p>
+An
+IRI
+is
+generated
+when
+a
+value
+is
+associated
+with
+a
+key
+using
+the
+<code>
+@iri
+</code>
+keyword:
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "foaf:homepage": { "": "http://manu.sporny.org" }
+</del>
+<ins class="diff-chg">  "homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+</ins>
+...
+}
+</pre>
+<p>
+If
+type
+coercion
+rules
+are
+specified
+in
+the
+<code>
+@context
+</code>
+for
+a
+particular
+vocabulary
+term,
+an
+IRI
+is
+generated:
+</p>
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  {
+    ...
+    "@coerce": 
+    {
+<del class="diff-old">      "@iri": "foaf:homepage"
+</del>
+<ins class="diff-chg">      "@iri": "homepage"
+</ins>
+    }
+  }</span>
+...
+<del class="diff-old">  "foaf:homepage": "http://manu.sporny.org/",
+</del>
+<ins class="diff-chg">  "homepage": "http://manu.sporny.org/",
+</ins>
+...
+}
+</pre>
+<p>
+Even
+though
+the
+value
+<code>
+http://manu.sporny.org/
+</code>
+is
+a
+<del class="diff-old">string,
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a>,
+the
+type
+coercion
+rules
+will
+transform
+the
+value
+into
+an
+IRI
+when
+processed
+by
+a
+JSON-LD
+Processor
+</p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+3.2
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+<ins class="diff-new">IRI
+</ins></a><ins class="diff-new">
+s
+are
+a
+fundamental
+concept
+of
+Linked
+Data,
+and
+nodes
+should
+have
+a
+de-referencable
+identifier
+used
+to
+name
+and
+locate
+them.
+For
+nodes
+to
+be
+truely
+linked,
+de-referencing
+the
+identifier
+should
+result
+in
+a
+representation
+of
+that
+node.
+Associating
+an
+IRI
+with
+a
+node
+tells
+an
+application
+that
+the
+returned
+document
+contains
+a
+description
+of
+of
+the
+identifier
+requested.
+</ins></p><p><ins class="diff-new">
+JSON-LD
+documents
+may
+also
+contain
+descriptions
+of
+other
+nodes,
+so
+it
+is
+necessary
+to
+be
+able
+to
+uniquely
+identify
+each
+node
+which
+may
+be
+externally
+referenced.
+</ins></p><p>
+A
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+<ins class="diff-new">of
+a
+node
+</ins>
+is
+declared
+using
+the
+<code>
+@subject
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+property,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+the
+IRI
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+3.3
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+@type
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+<del class="diff-old">type-url).
+</del>
+<ins class="diff-chg">type-uri).
+</ins></p><p><ins class="diff-chg">
+To
+be
+Linked
+Data,
+types
+should
+be
+uniquely
+identified
+by
+an
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
+IRI
+</ins></a>.
+</p>
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+if
+the
+JSON-LD
+document
+is
+mapped
+to
+RDF
+(in
+N-Triples
+notation):
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+</div>
+<div id="strings" class="section">
+<h3>
+<span class="secno">
+3.4
+</span>
+Strings
+</h3>
+<p>
+Regular
+text
+strings,
+also
+<del class="diff-old">refered
+</del>
+<ins class="diff-chg">referred
+</ins>
+to
+as
+<dfn title="plain_literal" id="dfn-plain_literal">
+plain
+literal
+</dfn>
+s,
+are
+easily
+expressed
+using
+regular
+JSON
+<del class="diff-old">strings.
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a><ins class="diff-chg">
+s.
+</ins>
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "foaf:name": "",
+</del>
+<ins class="diff-chg">  "name": "<span class="diff">Mark Birbeck</span>",
+</ins>
+...
+}
+</pre>
+</div>
+<div id="string-internationalization" class="section">
+<h3>
+<span class="secno">
+3.5
+</span>
+String
+Internationalization
+</h3>
+<p>
+JSON-LD
+makes
+an
+assumption
+that
+strings
+with
+associated
+language
+encoding
+information
+are
+not
+very
+common
+when
+used
+in
+JavaScript
+and
+Web
+Services.
+Thus,
+it
+takes
+a
+little
+more
+effort
+to
+express
+strings
+with
+associated
+language
+information.
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "foaf:name": 
+</del>
+<ins class="diff-chg">  "name": <span class="diff">
+</ins>
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+for
+<em>
+花澄
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+code
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="datatypes" class="section">
+<h3>
+<span class="secno">
+3.6
+</span>
+Datatypes
+</h3>
+<p>
+A
+value
+with
+an
+associated
+datatype,
+also
+known
+as
+a
+<dfn title="typed_literal" id="dfn-typed_literal">
+typed
+literal
+</dfn>,
+is
+indicated
+by
+associating
+a
+literal
+with
+an
+IRI
+which
+indicates
+the
+typed
+literal's
+datatype.
+Typed
+literals
+may
+be
+expressed
+in
+JSON-LD
+in
+three
+ways:
+</p>
+<ol>
+<li>
+By
+utilizing
+the
+<code>
+@coerce
+</code>
+keyword.
+</li>
+<li>
+By
+utilizing
+the
+expanded
+form
+for
+specifying
+objects.
+</li>
+<li>
+By
+using
+a
+native
+JSON
+datatype.
+</li>
+</ol>
+<p>
+The
+first
+example
+uses
+the
+<code>
+@coerce
+</code>
+keyword
+to
+express
+a
+typed
+literal:
+</p>
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  {
+<del class="diff-old">    "dc":  "http://purl.org/dc/terms/",
+    "xsd": "http://www.w3.org/2001/XMLSchema#"
+</del>
+<ins class="diff-chg">    "modified":  "http://purl.org/dc/terms/modified",
+    "dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
+</ins>
+    "@coerce": 
+    {
+<del class="diff-old">      "xsd:dateTime": "dc:modified"
+</del>
+<ins class="diff-chg">      "dateTime": "modified"
+</ins>
+    }
+  }</span>
+...
+<del class="diff-old">  "dc:modified": "2010-05-29T14:17:39+02:00",
+</del>
+<ins class="diff-chg">  "modified": "2010-05-29T14:17:39+02:00",
+</ins>
+...
+}
+</pre>
+<p>
+The
+second
+example
+uses
+the
+expanded
+form
+for
+specifying
+objects:
+</p>
+<pre class="example">
+{
+...
+<del class="diff-old">  "dc:modified": 
+</del>
+<ins class="diff-chg">  "modified": <span class="diff">
+</ins>
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+<del class="diff-old">    "@datatype": "xsd:dateTime"
+</del>
+<ins class="diff-chg">    "@datatype": "dateTime"
+</ins>
+  }</span>
+...
+}
+</pre>
+<p>
+Both
+examples
+above
+would
+generate
+an
+object
+with
+the
+literal
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+<p>
+The
+third
+example
+uses
+a
+built-in
+native
+JSON
+type,
+a
+<del class="diff-old">number,
+</del>
+<a class="tref internalDFN" title="number" href="#dfn-number">
+<ins class="diff-chg">number
+</ins></a>,
+to
+express
+a
+datatype:
+</p>
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+<del class="diff-old">  "foaf:age": 
+</del>
+<ins class="diff-chg">  "age": <span class="diff">31</span>
+</ins>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple:
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/age&gt; 
+"31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
+.
+</pre>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+3.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+<del class="diff-old">arrays.
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a><ins class="diff-chg">
+s.
+</ins>
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+<del class="diff-old">array.
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>.
+</p>
+<p class="note">
+In
+JSON-LD,
+Multiple
+objects
+on
+a
+property
+are
+not
+ordered.
+This
+is
+because
+typically
+graphs
+are
+not
+inherently
+ordered
+data
+structures.
+To
+see
+more
+on
+creating
+ordered
+collections
+in
+JSON-LD,
+see
+<a href="#lists">
+Lists
+</a>.
+</p>
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+<del class="diff-old">  "foaf:nick": ,
+</del>
+<ins class="diff-chg">  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+</ins>
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+"jaybee"
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+3.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s
+may
+also
+be
+expressed
+using
+the
+expanded
+form
+for
+objects:
+</p>
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/articles/8",
+<del class="diff-old">  "dcterms:modified": 
+</del>
+<ins class="diff-chg">  "modified": <span class="diff">
+</ins>
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+<del class="diff-old">      "@datatype": "xsd:dateTime"
+</del>
+<ins class="diff-chg">      "@datatype": "dateTime"
+</ins>
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+<del class="diff-old">      "@datatype": "xsd:dateTime"
+</del>
+<ins class="diff-chg">      "@datatype": "dateTime"
+</ins>
+    }
+  ]</span>
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="expansion" class="section">
+<h3>
+<span class="secno">
+3.9
+</span>
+Expansion
+</h3>
+<p>
+Expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+all
+IRI,
+datatypes,
+and
+literal
+values
+are
+expanded
+so
+that
+the
+context
+is
+no
+longer
+necessary.
+JSON-LD
+document
+expansion
+is
+typically
+used
+when
+re-mapping
+JSON-LD
+documents
+to
+application-specific
+JSON
+documents
+or
+as
+a
+part
+of
+the
+<a href="#normalization">
+Normalization
+</a>
+process.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}
+</pre>
+<p>
+Running
+the
+JSON-LD
+Expansion
+algorithm
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</p>
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}
+</pre>
+</div>
+<div id="compaction" class="section">
+<h3>
+<span class="secno">
+3.10
+</span>
+Compaction
+</h3>
+<p>
+Compaction
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+the
+most
+compact
+form
+of
+the
+document
+is
+generated.
+JSON
+is
+typically
+expressed
+in
+a
+very
+compact,
+key-value
+format.
+That
+is,
+full
+IRIs
+are
+rarely
+used
+as
+keys.
+At
+times,
+a
+JSON-LD
+document
+may
+be
+received
+that
+is
+not
+in
+its
+most
+compact
+form.
+JSON-LD,
+via
+the
+API,
+provides
+a
+way
+to
+compact
+a
+JSON-LD
+document.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}
+</pre>
+<p>
+Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+context:
+</p>
+<pre class="example">
+{
+   "name": "http://xmlns.com/foaf/0.1/name",
+   "homepage": "http://xmlns.com/foaf/0.1/homepage",
+   "@coerce": 
+   {
+      "@iri": ["homepage"]
+   }
+}
+</pre>
+<p>
+Running
+the
+JSON-LD
+Compaction
+algorithm
+given
+the
+context
+supplied
+above
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</p>
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}
+</pre>
+<p>
+The
+compaction
+algorithm
+also
+enables
+the
+developer
+to
+map
+any
+expanded
+format
+into
+an
+application-specific
+compacted
+format.
+While
+the
+context
+provided
+above
+mapped
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+to
+<strong>
+name
+</strong>,
+it
+could
+have
+also
+mapped
+it
+to
+any
+arbitrary
+string
+provided
+by
+the
+developer.
+</p>
+</div>
+<div id="framing" class="section">
+<h3>
+<span class="secno">
+3.11
+</span>
+Framing
+</h3>
+<p>
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+work
+with
+trees,
+<del class="diff-old">also
+called
+associative
+arrays,
+when
+dealing
+with
+JSON.
+</del>
+<ins class="diff-chg">represented
+as
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+s.
+</ins>
+While
+mapping
+a
+graph
+to
+a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+A
+<dfn title="Frame" id="dfn-frame">
+Frame
+</dfn>
+can
+be
+used
+by
+a
+developer
+on
+a
+JSON-LD
+document
+to
+specify
+a
+deterministic
+layout
+for
+a
+graph.
+</p>
+<p>
+Framing
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document,
+which
+expresses
+a
+graph
+of
+information,
+and
+applying
+a
+specific
+graph
+layout
+(called
+a
+<a class="tref internalDFN" title="Frame" href="#dfn-frame">
+Frame
+</a>
+).
+</p>
+<p>
+The
+JSON-LD
+document
+below
+expresses
+a
+library,
+a
+book
+and
+a
+chapter:
+</p>
+<pre class="example">
+{
+<del class="diff-old">   "@coerce": {
+    "dc":  "http://purl.org/dc/terms/",
+    "ex":  "http://example.org/"
+   },
+   "@subject": 
+   [{
+      "@subject": "http://example.org/library",
+      "@type": "ex:Library",
+      "ex:contains": "http://example.org/library/the-republic"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": "http://example.org/library/the-republic#introduction"
+   }, 
+   {
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": "ex:Chapter",
+      "dc:description": "An introductory chapter on The Republic.",
+      "dc:title": "The Introduction"
+   }],
+   "@context": 
+   {
+      "@coerce": 
+      {
+         "@iri": "ex:contains"
+      },
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   }
+</del>
+<ins class="diff-chg">  "@coerce": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title",
+    "@coerce": 
+    {
+      "@iri": "ex:contains"
+    },
+  },
+  "@subject": 
+  [{
+    "@subject": "http://example.com/library",
+    "@type": "Library",
+    "contains": "http://example.org/library/the-republic"
+  }, 
+  {
+    "@subject": "http://example.org/library/the-republic",
+    "@type": "Book",
+    "creator": "Plato",
+    "title": "The Republic",
+    "contains": "http://example.org/library/the-republic#introduction"
+  }, 
+  {
+    "@subject": "http://example.org/library/the-republic#introduction",
+    "@type": "Chapter",
+    "description": "An introductory chapter on The Republic.",
+    "title": "The Introduction"
+  }]
+</ins>
+}
+</pre>
+<p>
+Developers
+typically
+like
+to
+operate
+on
+items
+in
+a
+hierarchical,
+tree-based
+fashion.
+Ideally,
+a
+developer
+would
+want
+the
+data
+above
+sorted
+into
+top-level
+libraries,
+then
+the
+books
+that
+are
+contained
+in
+each
+library,
+and
+then
+the
+chapters
+contained
+in
+each
+book.
+To
+achieve
+that
+layout,
+the
+developer
+can
+define
+the
+following
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>:
+</p>
+<pre class="example">
+{
+<del class="diff-old">   "@context": {
+      "dc": "http://purl.org/dc/elements/1.1/",
+      "ex": "http://example.org/vocab#"
+   },
+   "@type": "ex:Library",
+   "ex:contains": {
+      "@type": "ex:Book",
+      "ex:contains": {
+         "@type": "ex:Chapter"
+      }
+   }
+</del>
+<ins class="diff-chg">  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title"
+  },
+  "@type": "Library",
+  "contains": {
+    "@type": "Book",
+    "contains": {
+      "@type": "Chapter"
+    }
+  }
+</ins>
+}
+</pre>
+<p>
+When
+the
+framing
+algorithm
+is
+run
+against
+the
+previously
+defined
+JSON-LD
+document,
+paired
+with
+the
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>
+above,
+the
+following
+JSON-LD
+document
+is
+the
+end
+result:
+</p>
+<pre class="example">
+{
+<del class="diff-old">   "@context": 
+   {
+      "ex": "http://example.org/vocab#",
+      "dc":  "http://purl.org/dc/terms/",
+   }
+   "@subject": "http://example.org/library",
+   "@type": "ex:Library",
+   "ex:contains": 
+   {
+      "@subject": "http://example.org/library/the-republic",
+      "@type": "ex:Book",
+      "dc:creator": "Plato",
+      "dc:title": "The Republic",
+      "ex:contains": 
+      {
+         "@subject": "http://example.org/library/the-republic#introduction",
+         "@type": "ex:Chapter",
+         "dc:description": "An introductory chapter on The Republic.",
+         "dc:title": "The Introduction"
+      },
+   },
+</del>
+<ins class="diff-chg">  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title"
+  },
+  "@subject": "http://example.org/library",
+  "@type": "Library",
+  "contains": {
+</ins>    <span class="diff">"@subject": "http://example.org/library/the-republic",</span><ins class="diff-chg">
+    "@type": "Book",
+</ins>    <span class="diff">"creator": "Plato",</span>    <span class="diff">"title": "The Republic",</span><ins class="diff-chg">
+    "contains": {
+</ins>      <span class="diff">"@subject": "http://example.org/library/the-republic#introduction",</span><ins class="diff-chg">
+      "@type": "Chapter",
+</ins>      <span class="diff">"description": "An introductory chapter on The Republic.",</span>      <span class="diff">"title": "The Introduction"</span><ins class="diff-chg">
+    },
+  },
+</ins>
+}
+</pre>
+<p>
+The
+JSON-LD
+framing
+algorithm
+allows
+developers
+to
+query
+by
+example
+and
+force
+a
+specific
+tree
+layout
+to
+a
+JSON-LD
+document.
+</p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+4.
+</span>
+Advanced
+Concepts
+</h2>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+described
+above.
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</p>
+<div id="curies" class="section">
+<h3>
+<span class="secno">
+4.1
+</span>
+<ins class="diff-new">CURIEs
+</ins></h3><p><ins class="diff-new">
+Concepts
+in
+Linked
+Data
+documents
+may
+draw
+on
+a
+number
+of
+different
+vocabularies.
+The
+@vocab
+mechanism
+is
+useful
+to
+easily
+associate
+types
+and
+properties
+with
+a
+specific
+vocabulary,
+but
+when
+many
+vocabularies
+are
+used,
+this
+becomes
+difficult.
+Consider
+the
+following
+example:
+</ins></p>  <pre class="example"><ins class="diff-new">
+{
+  "@context": {
+</ins>    <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>    <span class="diff">"ex": "http://example.org/vocab#"</span><ins class="diff-new">
+  },
+  "@subject": "http://example.org/library",
+  "@type": <span class="diff">"ex:Library"</span>,
+</ins>  <span class="diff">"ex:contains"</span>: {<ins class="diff-new">
+    "@subject": "http://example.org/library/the-republic",
+    "@type": <span class="diff">"ex:Book"</span>,
+</ins>    <span class="diff">"dc:creator"</span>: "Plato",    <span class="diff">"dc:title"</span>: "The Republic",    <span class="diff">"ex:contains"</span>: {<ins class="diff-new">
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": <span class="diff">"ex:Chapter"</span>,
+</ins>      <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",      <span class="diff">"dc:title"</span>: "The Introduction"<ins class="diff-new">
+    },
+  },
+}
+</ins></pre><p><ins class="diff-new">
+In
+this
+example,
+two
+different
+vocabularies
+are
+identified
+with
+prefixes,
+and
+used
+as
+type
+and
+property
+values
+using
+the
+CURIE
+notation.
+</ins></p><p><ins class="diff-new">
+A
+</ins><dfn title="CURIE" id="dfn-curie"><ins class="diff-new">
+CURIE
+</ins></dfn><ins class="diff-new">
+is
+a
+compact
+way
+of
+describing
+an
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-new">
+IRI
+</ins></a>.<ins class="diff-new">
+The
+term
+actually
+comes
+from
+Compact
+URI.
+Generally,
+a
+CURIE
+is
+composed
+of
+a
+</ins><em><ins class="diff-new">
+prefix
+</ins></em><ins class="diff-new">
+and
+a
+</ins><em><ins class="diff-new">
+suffix
+</ins></em><ins class="diff-new">
+separated
+by
+a
+':'.
+In
+JSON-LD,
+the
+prefix
+may
+be
+the
+empty
+string,
+denoting
+the
+</ins><dfn title="default_prefix" id="dfn-default_prefix"><ins class="diff-new">
+default
+prefix
+</ins></dfn>.</p><p><ins class="diff-new">
+CURIEs
+are
+defined
+more
+formally
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-new">
+RDFA-CORE
+</ins></a></cite><ins class="diff-new">
+]
+</ins><cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies"><ins class="diff-new">
+section
+6
+"CURIE
+Syntax
+Definition"
+</ins></a></cite>.</p></div><div id="automatic-typing" class="section"><h3><span class="secno"><ins class="diff-new">
+4.2
+</ins></span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+doubles,
+integers,
+and
+boolean
+values.
+As
+demonstrated
+below,
+JSON-LD
+utilizes
+that
+information
+to
+create
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s:
+</p>
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}
+</pre>
+<p class="note">
+When
+dealing
+with
+a
+number
+of
+modern
+programming
+languages,
+including
+JavaScript
+ECMA-262,
+there
+is
+no
+distinction
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>
+values.
+That
+is,
+the
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>
+<code>
+5.3
+</code>
+and
+the
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>
+<code>
+5.3e0
+</code>
+are
+treated
+as
+if
+they
+were
+the
+same.
+When
+converting
+from
+JSON-LD
+to
+a
+language-native
+format
+and
+back,
+datatype
+information
+is
+lost
+in
+a
+number
+of
+these
+languages.
+Thus,
+one
+could
+say
+that
+<code>
+5.3
+</code>
+is
+a
+<strong>
+xsd:decimal
+</strong>
+and
+<code>
+5.3e0
+</code>
+is
+an
+<strong>
+xsd:double
+</strong>
+in
+JSON-LD,
+but
+when
+both
+values
+are
+converted
+to
+a
+language-native
+format
+the
+datatype
+difference
+between
+the
+two
+is
+lost
+because
+the
+machine-level
+representation
+will
+almost
+always
+be
+a
+<strong>
+double
+</strong>.
+Implementers
+should
+be
+aware
+of
+this
+potential
+round-tripping
+issue
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>.
+Specifically
+objects
+with
+a
+datatype
+of
+<strong>
+xsd:decimal
+</strong>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+converted
+to
+a
+language
+native
+type.
+</p>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">4.3
+</ins>
+</span>
+Type
+Coercion
+</h3>
+<p>
+JSON-LD
+supports
+the
+coercion
+of
+values
+to
+particular
+data
+types.
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+the
+incoming
+or
+outgoing
+types
+to
+the
+proper
+data
+type
+based
+on
+a
+mapping
+of
+data
+type
+IRIs
+to
+property
+types.
+Using
+type
+coercion,
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+s,
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s
+and
+IRIs.
+</p>
+<pre class="example">
+{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+        "@iri": "homepage"
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+<div id="chaining" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">4.4
+</ins>
+</span>
+Chaining
+</h3>
+<p>
+Object
+<dfn title="chaining" id="dfn-chaining">
+chaining
+</dfn>
+is
+a
+JSON-LD
+feature
+that
+allows
+an
+author
+to
+use
+the
+definition
+of
+JSON-LD
+objects
+as
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+values.
+This
+is
+a
+commonly
+used
+mechanism
+for
+creating
+a
+parent-child
+relationship
+between
+two
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+s.
+</p>
+<p>
+The
+example
+shows
+an
+two
+subjects
+related
+by
+a
+property
+from
+the
+first
+subject:
+</p>
+  <pre class="example">
+{
+...
+<del class="diff-old">  "foaf:name": "Manu Sporny",
+  "": {
+    "",
+    "",
+</del>
+<ins class="diff-chg">  "name": "Manu Sporny",
+  "<span class="diff">knows</span>": {
+    "<span class="diff">@type</span>": "<span class="diff">Person</span>",
+    "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
+</ins>
+  }
+...
+}
+</pre>
+<p>
+An
+object
+definition,
+like
+the
+one
+used
+above,
+<em class="rfc2119" title="may">
+may
+</em>
+be
+used
+as
+a
+JSON
+value
+at
+any
+point
+in
+JSON-LD.
+</p>
+</div>
+<div id="identifying-unlabeled-nodes" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">4.5
+</ins>
+</span>
+Identifying
+Unlabeled
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+type
+of
+node
+is
+called
+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)
+<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
+CURIE
+</a>
+prefix.
+</p>
+<pre class="example">
+{
+...
+  "@subject": "<span class="diff">_:foo</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+unlabeled
+node.
+This
+practice,
+however,
+is
+usually
+frowned
+upon
+when
+generating
+Linked
+Data.
+If
+a
+developer
+finds
+that
+they
+refer
+to
+the
+unlabeled
+node
+more
+than
+once,
+they
+should
+consider
+naming
+the
+node
+using
+a
+resolve-able
+IRI.
+</p>
+</div>
+<div id="overriding-keywords" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">4.6
+</ins>
+</span>
+Overriding
+Keywords
+</h3>
+<p>
+JSON-LD
+allows
+all
+of
+the
+syntax
+keywords,
+except
+for
+<code>
+@context
+</code>,
+to
+be
+overridden.
+This
+feature
+allows
+more
+legacy
+JSON
+content
+to
+be
+supported
+by
+JSON-LD.
+It
+also
+allows
+developers
+to
+design
+domain-specific
+implementations
+using
+only
+the
+JSON-LD
+context.
+</p>
+<pre class="example">
+{
+  "@context": 
+  {  
+     <span class="diff">"url": "@subject"</span>,
+     <span class="diff">"a": "@type"</span>,
+     "name": "http://schema.org/name"
+  },
+  "url": "http://example.com/about#gregg",
+  "a": "http://schema.org/Person",
+  "name": "Gregg Kellogg"
+}
+</pre>
+<p>
+In
+the
+example
+above,
+the
+<code>
+@subject
+</code>
+and
+<code>
+@type
+</code>
+keywords
+have
+been
+overridden
+by
+<strong>
+url
+</strong>
+and
+<strong>
+a
+</strong>,
+respectively.
+</p>
+</div>
+<div id="normalization" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">4.7
+</ins>
+</span>
+Normalization
+</h3>
+<p>
+Normalization
+is
+the
+process
+of
+taking
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+and
+performing
+a
+deterministic
+transformation
+on
+that
+input
+that
+results
+in
+a
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+that
+any
+conforming
+JSON-LD
+processor
+would
+have
+generated
+given
+the
+same
+input.
+The
+problem
+is
+a
+fairly
+difficult
+technical
+problem
+to
+solve
+because
+it
+requires
+a
+directed
+graph
+to
+be
+ordered
+into
+a
+set
+of
+nodes
+and
+edges
+in
+a
+deterministic
+way.
+This
+is
+easy
+to
+do
+when
+all
+of
+the
+nodes
+have
+unique
+names,
+but
+very
+difficult
+to
+do
+when
+some
+of
+the
+nodes
+are
+not
+labeled.
+</p>
+<p>
+Normalization
+is
+useful
+when
+comparing
+two
+graphs
+against
+one
+another,
+when
+generating
+a
+detailed
+list
+of
+differences
+between
+two
+graphs,
+and
+when
+generating
+a
+cryptographic
+digital
+signature
+for
+information
+contained
+in
+a
+graph
+or
+when
+generating
+a
+hash
+of
+the
+information
+contained
+in
+a
+graph.
+</p>
+<p>
+The
+example
+below
+is
+an
+un-normalized
+JSON-LD
+document:
+</p>
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
+      "@coerce": 
+      {
+         "@iri": ["homepage"]
+      }
+   }
+}
+</pre>
+<p>
+The
+example
+below
+is
+the
+normalized
+form
+of
+the
+JSON-LD
+document
+above:
+</p>
+<p class="note">
+Whitespace
+is
+used
+below
+to
+aid
+readability.
+The
+normalization
+algorithm
+for
+JSON-LD
+remove
+all
+unnecessary
+whitespace
+in
+the
+fully
+normalized
+form.
+</p>
+<pre class="example">
+[{
+    "@subject": 
+    {
+        "@iri": "_:c14n0"
+    },
+    "http://xmlns.com/foaf/0.1/homepage": 
+    {
+        "@iri": "http://manu.sporny.org/"
+    },
+    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
+}]
+</pre>
+<p>
+Notice
+how
+all
+of
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+have
+been
+expanded
+and
+sorted
+in
+alphabetical
+order.
+Also,
+notice
+how
+the
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+has
+been
+labeled
+with
+a
+<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">
+blank
+node
+identifier
+</a>.
+Normalization
+ensures
+that
+any
+arbitrary
+graph
+containing
+exactly
+the
+same
+information
+would
+be
+normalized
+to
+exactly
+the
+same
+form
+shown
+above.
+</p>
+</div>
+</div>
+<div id="the-application-programming-interface" class="section">
+<h2>
+<span class="secno">
+5.
+</span>
+<ins class="diff-new">The
+Application
+Programming
+Interface
+</ins></h2><p><ins class="diff-new">
+This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+a
+variety
+of
+output
+formats
+that
+are
+easier
+to
+work
+with
+in
+various
+programming
+languages.
+If
+an
+API
+is
+provided
+in
+a
+programming
+environment,
+the
+entire
+API
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+implemented.
+</ins></p><div id="jsonldprocessor" class="section"><h3><span class="secno"><ins class="diff-new">
+5.1
+</ins></span><ins class="diff-new">
+JSONLDProcessor
+</ins></h3><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]<ins class="diff-new">
+interface <span class="idlInterfaceID">JSONLDProcessor</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-expand-object-object-input-JSONLDProcessorCallback-callback">expand</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-compact-object-object-input-object-context-JSONLDProcessorCallback-callback">compact</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">context</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-frame-object-object-input-object-frame-object-options-JSONLDProcessorCallback-callback">frame</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">frame</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-normalize-object-object-input-JSONLDProcessorCallback-callback">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-triples-object-object-input-JSONLDTripleCallback-tripleCallback-JSONLDProcessorCallback-parserCallback">triples</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a href="#idl-def-JSONLDTripleCallback" class="idlType"><code>JSONLDTripleCallback</code></a></span> <span class="idlParamName">tripleCallback</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">parserCallback</span></span>);</span><ins class="diff-new">
+};</span>
+</ins></pre><div id="methods" class="section"><h4><span class="secno"><ins class="diff-new">
+5.1.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></h4><dl class="methods"><dt id="widl-JSONLDProcessor-compact-object-object-input-object-context-JSONLDProcessorCallback-callback"><code><ins class="diff-new">
+compact
+</ins></code></dt><dd><a href="#compaction"><ins class="diff-new">
+Compacts
+</ins></a><ins class="diff-new">
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#compaction-algorithm"><ins class="diff-new">
+Compaction
+Algorithm
+</ins></a>.<ins class="diff-new">
+The
+</ins><code><ins class="diff-new">
+input
+</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+copied,
+compacted
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+compaction
+fails,
+</ins><code><ins class="diff-new">
+null
+</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+returned.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+input
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+object
+to
+perform
+compaction
+on.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+context
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+base
+context
+to
+use
+when
+compacting
+the
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
+JSONLDProcessorCallback
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+object
+</ins></a></code></div></dd><dt id="widl-JSONLDProcessor-expand-object-object-input-JSONLDProcessorCallback-callback"><code><ins class="diff-new">
+expand
+</ins></code></dt><dd><a href="#expansion"><ins class="diff-new">
+Expands
+</ins></a><ins class="diff-new">
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#expansion-algorithm"><ins class="diff-new">
+Expansion
+Algorithm
+</ins></a>.<ins class="diff-new">
+The
+</ins><code><ins class="diff-new">
+input
+</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+copied,
+expanded
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+expansion
+fails,
+</ins><code><ins class="diff-new">
+null
+</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+returned.
+</ins><div class="issue"><ins class="diff-new">
+How
+do
+we
+generate
+warning
+messages
+during
+this
+process?
+For
+example,
+what
+happens
+when
+a
+key
+that
+doesn't
+have
+a
+mapping
+is
+discovered?
+</ins></div><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+input
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+object
+to
+copy
+and
+perform
+the
+expansion
+upon.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
+JSONLDProcessorCallback
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+object
+</ins></a></code></div></dd><dt id="widl-JSONLDProcessor-frame-object-object-input-object-frame-object-options-JSONLDProcessorCallback-callback"><code><ins class="diff-new">
+frame
+</ins></code></dt><dd><a href="#framing"><ins class="diff-new">
+Frames
+</ins></a><ins class="diff-new">
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+using
+the
+</ins><code><ins class="diff-new">
+frame
+</ins></code><ins class="diff-new">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#framing-algorithm"><ins class="diff-new">
+Framing
+Algorithm
+</ins></a>.<ins class="diff-new">
+The
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+is
+used
+to
+build
+the
+framed
+output
+and
+is
+returned
+if
+there
+are
+no
+errors.
+Exceptions
+are
+thrown
+if
+there
+are
+errors.
+</ins><div class="issue"><ins class="diff-new">
+Define
+what
+the
+exceptions
+are.
+We
+need
+to
+specify
+whether
+or
+not
+we
+want
+exceptions
+thrown,
+or
+errors
+returned
+to
+the
+error
+callback?
+</ins></div><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+input
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+object
+to
+perform
+framing
+on.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+frame
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+frame
+to
+use
+when
+re-arranging
+the
+data.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+options
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+set
+of
+options
+that
+will
+affect
+the
+framing
+algorithm.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
+JSONLDProcessorCallback
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+object
+</ins></a></code></div></dd><dt id="widl-JSONLDProcessor-normalize-object-object-input-JSONLDProcessorCallback-callback"><code><ins class="diff-new">
+normalize
+</ins></code></dt><dd><a href="#normalization"><ins class="diff-new">
+Normalizes
+</ins></a><ins class="diff-new">
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+according
+to
+the
+steps
+in
+the
+</ins><a href="#normalization-algorithm"><ins class="diff-new">
+Normalization
+Algorithm
+</ins></a>.<ins class="diff-new">
+The
+</ins><code><ins class="diff-new">
+input
+</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+copied,
+normalized
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+compaction
+fails,
+</ins><code><ins class="diff-new">
+null
+</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+returned.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+input
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+object
+to
+perform
+normalization
+upon.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+callback
+</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
+JSONLDProcessorCallback
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+JSON-LD
+string.
+</ins></td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+object
+</ins></a></code></div></dd><dt id="widl-JSONLDProcessor-triples-object-object-input-JSONLDTripleCallback-tripleCallback-JSONLDProcessorCallback-parserCallback"><code><ins class="diff-new">
+triples
+</ins></code></dt><dd><ins class="diff-new">
+Processes
+the
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+according
+to
+the
+</ins><a href="#rdf-conversion-algorithm"><ins class="diff-new">
+RDF
+Conversion
+Algorithm
+</ins></a>,<ins class="diff-new">
+calling
+the
+provided
+</ins><code><ins class="diff-new">
+tripleCallback
+</ins></code><ins class="diff-new">
+for
+each
+triple
+generated.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+input
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+object
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+JSON-LD
+object
+to
+process
+when
+outputting
+triples.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+tripleCallback
+</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDTripleCallback" class="idlType"><code><ins class="diff-new">
+JSONLDTripleCallback
+</ins></code></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code>.<div class="issue"><ins class="diff-new">
+This
+callback
+should
+be
+aligned
+with
+the
+RDF
+API.
+</ins></div></td></tr><tr><td class="prmName"><ins class="diff-new">
+parserCallback
+</ins></td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code><ins class="diff-new">
+JSONLDProcessorCallback
+</ins></code></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+object
+</ins></a></code></div></dd></dl></div></div><div id="jsonldprocessorcallback" class="section"><h3><span class="secno"><ins class="diff-new">
+5.2
+</ins></span><ins class="diff-new">
+JSONLDProcessorCallback
+</ins></h3><p><ins class="diff-new">
+The
+JSONLDProcessorCallback
+is
+called
+whenever
+a
+processing
+error
+occurs
+while
+processing
+the
+</ins><a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input"><ins class="diff-new">
+JSON-LD
+input
+</ins></a>.</p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]<ins class="diff-new">
+interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span><ins class="diff-new">
+};</span>
+</ins></pre><div id="methods-1" class="section"><h4><span class="secno"><ins class="diff-new">
+5.2.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code><ins class="diff-new">
+error
+</ins></code></dt><dd><ins class="diff-new">
+This
+callback
+is
+invoked
+whenever
+an
+error
+occurs
+during
+processing.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+error
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+A
+descriptive
+error
+string
+returned
+by
+the
+processor.
+</ins></td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+void
+</ins></a></code></div></dd></dl></div></div><div id="jsonldtriplecallback" class="section"><h3><span class="secno"><ins class="diff-new">
+5.3
+</ins></span><ins class="diff-new">
+JSONLDTripleCallback
+</ins></h3><p><ins class="diff-new">
+The
+JSONLDTripleCallback
+is
+called
+whenever
+the
+processor
+generates
+a
+triple
+during
+the
+</ins><code><ins class="diff-new">
+triple()
+</ins></code><ins class="diff-new">
+call.
+</ins></p><pre class="idl"><span class="idlInterface" id="idl-def-JSONLDTripleCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]<ins class="diff-new">
+interface <span class="idlInterfaceID">JSONLDTripleCallback</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">triple</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">objectType</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">object</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">datatype</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">language</span></span>);</span><ins class="diff-new">
+};</span>
+</ins></pre><div id="methods-2" class="section"><h4><span class="secno"><ins class="diff-new">
+5.3.1
+</ins></span><ins class="diff-new">
+Methods
+</ins></h4><dl class="methods"><dt id="widl-JSONLDTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language"><code><ins class="diff-new">
+triple
+</ins></code></dt><dd><ins class="diff-new">
+This
+callback
+is
+invoked
+whenever
+a
+triple
+is
+generated
+by
+the
+processor.
+</ins><table class="parameters"><tr><th><ins class="diff-new">
+Parameter
+</ins></th><th><ins class="diff-new">
+Type
+</ins></th><th><ins class="diff-new">
+Nullable
+</ins></th><th><ins class="diff-new">
+Optional
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="prmName"><ins class="diff-new">
+subject
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+subject
+IRI
+that
+is
+associated
+with
+the
+triple.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+property
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+property
+IRI
+that
+is
+associated
+with
+the
+triple.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+objectType
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+type
+of
+object
+that
+is
+associated
+with
+the
+triple.
+Valid
+values
+are
+</ins><code><ins class="diff-new">
+IRI
+</ins></code><ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+literal
+</ins></code>.</td></tr><tr><td class="prmName"><ins class="diff-new">
+object
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+object
+value
+associated
+with
+the
+subject
+and
+the
+property.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+datatype
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+datatype
+associated
+with
+the
+object.
+</ins></td></tr><tr><td class="prmName"><ins class="diff-new">
+language
+</ins></td><td class="prmType"><code><a><ins class="diff-new">
+DOMString
+</ins></a></code></td><td class="prmNullTrue"><ins class="diff-new">
+✔
+</ins></td><td class="prmOptFalse"><ins class="diff-new">
+✘
+</ins></td><td class="prmDesc"><ins class="diff-new">
+The
+language
+associated
+with
+the
+object
+in
+BCP47
+format.
+</ins></td></tr></table><div><em><ins class="diff-new">
+No
+exceptions.
+</ins></em></div><div><em><ins class="diff-new">
+Return
+type:
+</ins></em><code><a><ins class="diff-new">
+void
+</ins></a></code></div></dd></dl></div></div></div><div id="algorithms" class="section"><h2><span class="secno"><ins class="diff-new">
+6.
+</ins></span>
+Algorithms
+</h2>
+<p>
+All
+algorithms
+described
+in
+this
+section
+are
+intended
+to
+operate
+on
+language-native
+data
+structures.
+That
+is,
+the
+serialization
+to
+a
+text-based
+JSON
+document
+isn't
+required
+as
+input
+or
+output
+to
+any
+of
+these
+algorithms
+and
+language-native
+data
+structures
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+applicable.
+</p>
+<div id="syntax-tokens-and-keywords" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+Syntax
+Tokens
+and
+Keywords
+</h3>
+<p>
+JSON-LD
+specifies
+a
+number
+of
+syntax
+tokens
+and
+keywords
+that
+are
+using
+in
+all
+algorithms
+described
+in
+this
+section:
+</p>
+<dl>
+<dt>
+<code>
+@context
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</dd>
+<dt>
+<code>
+@base
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<code>
+@vocab
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<code>
+@coerce
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+type
+coercion
+rules.
+</dd>
+<dt>
+<code>
+@literal
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+a
+literal
+value.
+</dd>
+<dt>
+<code>
+@iri
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+an
+IRI
+value.
+</dd>
+<dt>
+<code>
+@language
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+language
+for
+a
+literal.
+</dd>
+<dt>
+<code>
+@datatype
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+datatype
+for
+a
+literal.
+</dd>
+<dt>
+<code>:
+</code>
+</dt>
+<dd>
+The
+separator
+for
+<del class="diff-old">CURIEs
+</del>
+<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
+<ins class="diff-chg">CURIE
+</ins></a><ins class="diff-chg">
+s
+</ins>
+when
+used
+in
+JSON
+keys
+or
+JSON
+values.
+</dd>
+<dt>
+<code>
+@subject
+</code>
+</dt>
+<dd>
+Sets
+the
+active
+subjects.
+</dd>
+<dt>
+<code>
+@type
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+type
+of
+the
+active
+subjects.
+</dd>
+</dl>
+</div>
+<div id="algorithm-terms" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+Algorithm
+Terms
+</h3>
+<dl>
+<dt>
+<dfn title="initial_context" id="dfn-initial_context">
+initial
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+specified
+to
+the
+algorithm
+before
+processing
+begins.
+</dd>
+<dt>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+used
+to
+resolve
+<del class="diff-old">CURIEs
+</del>
+<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
+<ins class="diff-chg">CURIE
+</ins></a><ins class="diff-chg">
+s
+</ins>
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+context
+contained
+within
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</dd>
+<dt>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+specified
+<del class="diff-old">at
+the
+</del>
+<ins class="diff-chg">within
+a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+<del class="diff-old">associative-array
+level,
+</del>
+<ins class="diff-chg">object
+</ins></a>,
+specified
+via
+the
+<code>
+@context
+</code>
+keyword.
+</dd>
+<dt>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+</dt>
+<dd>
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>,
+which
+includes
+the
+<a class="tref" title="active__context">
+active
+context
+</a>,
+<a class="tref" title="current_subject">
+current
+subject
+</a>,
+and
+<a class="tref" title="current_property">
+current
+property
+</a>.
+The
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+is
+managed
+as
+a
+stack
+with
+elements
+from
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copied
+into
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+when
+entering
+a
+new
+<del class="diff-old">associative
+array.
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>.
+</dd>
+<dt>
+<dfn title="JSON-LD_input" id="dfn-json-ld_input">
+JSON-LD
+input
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+provided
+as
+input
+to
+the
+algorithm.
+</dd>
+<dt>
+<dfn title="JSON-LD_output" id="dfn-json-ld_output">
+JSON-LD
+output
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+produced
+as
+output
+by
+the
+algorithm.
+</dd>
+</dl>
+</div>
+<div id="context-1" class="section">
+<h3 id="context">
+<span class="secno">
+<del class="diff-old">5.3
+</del>
+<ins class="diff-chg">6.3
+</ins>
+</span>
+Context
+</h3>
+<p>
+Processing
+of
+JSON-LD
+data
+structure
+is
+managed
+recursively.
+During
+processing,
+each
+rule
+is
+applied
+using
+information
+provided
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+Processing
+begins
+by
+pushing
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+onto
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+stack
+and
+initializing
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+with
+the
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+initial
+context
+</a>.
+If
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+encountered,
+information
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+merged
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</p>
+<p>
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+used
+for
+expanding
+keys
+and
+values
+of
+<del class="diff-old">an
+associative
+array
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+(or
+elements
+of
+a
+list
+(see
+<span a="#list-processing">
+List
+Processing
+</span>
+)).
+</p>
+<p>
+A
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+identified
+within
+<del class="diff-old">an
+associative
+array
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+having
+a
+key
+of
+<code>
+@context
+</code>
+with
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+or
+<del class="diff-old">an
+associative
+array
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+value.
+When
+processing
+a
+<a class="tref" title="local__context">
+local
+context
+</a>,
+special
+processing
+rules
+apply:
+</p>
+<ol class="algorithm">
+<li>
+Create
+a
+new,
+empty
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+simple
+<del class="diff-old">string,
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a>,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+lexical
+form
+of
+IRI
+and
+used
+to
+initialize
+a
+new
+JSON
+document
+which
+replaces
+the
+value
+for
+subsequent
+processing.
+</li>
+<li>
+If
+the
+value
+is
+<del class="diff-old">an
+associative
+array,
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+has
+a
+<code>
+@base
+</code>
+key,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+with
+the
+lexical
+form
+of
+an
+absolute
+IRI.
+Add
+the
+base
+mapping
+to
+the
+<a class="tref" title="local__context">
+local
+context
+</a>.
+<p class="issue">
+Turtle
+allows
+@base
+to
+be
+relative.
+If
+we
+did
+this,
+we
+would
+have
+to
+add
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>.
+</p>
+</li>
+<li>
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+has
+a
+<code>
+@vocab
+</code>
+key,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+with
+the
+lexical
+form
+of
+an
+absolute
+IRI.
+Add
+the
+vocabulary
+mapping
+to
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+after
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+associated
+value.
+</li>
+<li>
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+has
+a
+<code>
+@coerce
+</code>
+key,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+<del class="diff-old">an
+associative
+array.
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>.
+Add
+the
+<code>
+@coerce
+</code>
+mapping
+to
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+associated
+value(s).
+</li>
+<li>
+Otherwise,
+the
+key
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+lexical
+form
+of
+<cite>
+<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">
+NCName
+</a>
+</cite>
+and
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+value
+of
+a
+simple
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+with
+the
+lexical
+form
+of
+IRI.
+Merge
+the
+key-value
+pair
+into
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Merge
+the
+of
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping
+as
+described
+<a href="#coerce">
+below
+</a>.
+</li>
+<li>
+Merge
+all
+entries
+other
+than
+the
+<code>
+@coerce
+</code>
+mapping
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+to
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+overwriting
+any
+duplicate
+values.
+</li>
+</ol>
+<div id="coerce" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.3.1
+</del>
+<ins class="diff-chg">6.3.1
+</ins>
+</span>
+Coerce
+</h4>
+<p>
+Map
+each
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping,
+overwriting
+any
+duplicate
+values
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping.
+The
+<code>
+@coerce
+</code>
+mapping
+has
+either
+a
+single
+<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
+CURIE
+</a>
+or
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+of
+CURIEs.
+When
+merging
+with
+an
+existing
+mapping
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+map
+all
+CURIE
+values
+to
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+form
+and
+replace
+with
+the
+union
+of
+the
+value
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+and
+the
+value
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+If
+the
+result
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+with
+a
+single
+CURIE,
+the
+processor
+<em class="rfc2119" title="may">
+may
+</em>
+represent
+this
+as
+a
+string
+value.
+</p>
+</div>
+<div id="initial-context" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.3.2
+</del>
+<ins class="diff-chg">6.3.2
+</ins>
+</span>
+Initial
+Context
+</h4>
+<p>
+The
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+initial
+context
+</a>
+is
+initialized
+as
+follows:
+</p>
+<ul>
+<li>
+<code>
+@base
+</code>
+is
+set
+using
+<cite>
+<href="http: www.ietf.org="" rfc="" rfc2396.txt"="">
+section
+5.1
+Establishing
+a
+Base
+URI
+</href="http:>
+</cite>
+of
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
+RFC3986
+</a>
+</cite>
+].
+Processors
+<em class="rfc2119" title="may">
+may
+</em>
+provide
+a
+means
+of
+setting
+the
+base
+IRI
+programatically.
+</li>
+<li>
+<code>
+@coerce
+</code>
+is
+set
+with
+a
+single
+mapping
+from
+<code>
+@iri
+</code>
+to
+<code>
+@type
+</code>.
+</li>
+</ul>
+    <pre class="example">
+{
+    "@base": <span class="diff">document-location</span>,
+    "@context": {
+      "@iri": "@type"
+    }
+}
+</pre>
+</div>
+</div>
+<div id="iri-expansion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.4
+</del>
+<ins class="diff-chg">6.4
+</ins>
+</span>
+IRI
+Expansion
+</h3>
+<p>
+Keys
+and
+some
+values
+are
+evaluated
+to
+produce
+an
+IRI.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+a
+value
+representing
+an
+IRI
+into
+an
+actual
+IRI.
+</p>
+<p>
+IRIs
+may
+be
+represented
+as
+an
+explicit
+string,
+or
+as
+a
+<del class="diff-old">CURIE,
+</del>
+<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
+<ins class="diff-chg">CURIE
+</ins></a>,
+as
+a
+value
+relative
+to
+<code>
+@base
+</code>
+or
+<code>
+@vocab
+</code>.
+</p>
+<p>
+<del class="diff-old">CURIEs
+are
+defined
+more
+formally
+in
+[
+RDFA-CORE
+]
+section
+6
+"CURIE
+Syntax
+Definition"
+.
+Generally,
+a
+CURIE
+is
+composed
+of
+a
+prefix
+and
+a
+suffix
+separated
+by
+a
+':'.
+In
+JSON-LD,
+either
+the
+prefix
+may
+be
+the
+empty
+string,
+denoting
+the
+default
+prefix
+.
+</del>
+The
+algorithm
+for
+generating
+an
+IRI
+is:
+</p>
+<ol class="algorithm">
+<li>
+Split
+the
+value
+into
+a
+<em>
+prefix
+</em>
+and
+<em>
+suffix
+</em>
+from
+the
+first
+occurrence
+of
+':'.
+</li>
+<li>
+If
+the
+prefix
+is
+a
+'_'
+(underscore),
+the
+IRI
+is
+unchanged.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+contains
+a
+mapping
+for
+<em>
+prefix
+</em>,
+generate
+an
+IRI
+by
+prepending
+the
+mapped
+prefix
+to
+the
+(possibly
+empty)
+suffix
+using
+textual
+concatenation.
+Note
+that
+an
+empty
+suffix
+and
+no
+suffix
+(meaning
+the
+value
+contains
+no
+':'
+string
+at
+all)
+are
+treated
+equivalently.
+</li>
+<li>
+If
+the
+IRI
+being
+processed
+is
+for
+a
+property
+(i.e.,
+a
+key
+value
+in
+<del class="diff-old">an
+associative
+array,
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>,
+or
+a
+value
+in
+a
+<code>
+@coerce
+</code>
+mapping)
+and
+the
+active
+context
+has
+a
+<code>
+@vocab
+</code>
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+textual
+concatenation.
+</li>
+<li>
+If
+the
+IRI
+being
+processed
+is
+for
+a
+subject
+or
+object
+(i.e.,
+not
+a
+property)
+and
+the
+active
+context
+has
+a
+<code>
+@base
+</code>
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+the
+method
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
+RFC3986
+</a>
+</cite>
+].
+</li>
+<li>
+Otherwise,
+use
+the
+value
+directly
+as
+an
+IRI.
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="iri-compaction" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.5
+</del>
+<ins class="diff-chg">6.5
+</ins>
+</span>
+IRI
+Compaction
+</h3>
+<p>
+Some
+keys
+and
+values
+are
+expressed
+using
+IRIs.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+an
+IRI
+to
+a
+compact
+IRI
+using
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+es
+specified
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</p>
+<p>
+The
+algorithm
+for
+generating
+a
+compacted
+IRI
+is:
+</p>
+<ol class="algorithm">
+<li>
+Search
+every
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+for
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+that
+is
+a
+complete
+match
+against
+the
+IRI.
+If
+a
+complete
+match
+is
+found,
+the
+resulting
+compacted
+IRI
+is
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+associated
+with
+the
+IRI
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</li>
+<li>
+If
+a
+complete
+match
+is
+not
+found,
+search
+for
+a
+partial
+match
+from
+the
+beginning
+of
+the
+IRI.
+For
+all
+matches
+that
+are
+found,
+the
+resulting
+compacted
+IRI
+is
+the
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+associated
+with
+the
+partially
+matched
+IRI
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+concatenated
+with
+a
+colon
+(:)
+character
+and
+the
+unmatched
+part
+of
+the
+string.
+If
+there
+is
+more
+than
+one
+compacted
+IRI
+produced,
+the
+final
+value
+is
+the
+lexicographically
+least
+value
+of
+the
+entire
+set
+of
+compacted
+IRIs.
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="value-expansion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.6
+</del>
+<ins class="diff-chg">6.6
+</ins>
+</span>
+Value
+Expansion
+</h3>
+<p>
+Some
+values
+in
+JSON-LD
+can
+be
+expressed
+in
+a
+compact
+form.
+These
+values
+are
+required
+to
+be
+expanded
+at
+times
+when
+processing
+JSON-LD
+documents.
+</p>
+<p>
+The
+algorithm
+for
+expanding
+a
+value
+is:
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+key
+that
+is
+associated
+with
+the
+value
+has
+an
+associated
+coercion
+entry
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>,
+the
+resulting
+expansion
+is
+an
+object
+populated
+according
+to
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+coercion
+target
+is
+<code>
+@iri
+</code>,
+expand
+the
+value
+by
+adding
+a
+new
+key-value
+pair
+where
+the
+key
+is
+<code>
+@iri
+</code>
+and
+the
+value
+is
+the
+expanded
+IRI
+according
+to
+the
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+rules.
+</li>
+<li>
+If
+the
+coercion
+target
+is
+a
+typed
+literal,
+expand
+the
+value
+by
+adding
+two
+new
+key-value
+pairs.
+The
+first
+key-value
+pair
+will
+be
+<code>
+@literal
+</code>
+and
+the
+unexpanded
+value.
+The
+second
+key-value
+pair
+will
+be
+<code>
+@datatype
+</code>
+and
+the
+associated
+coercion
+datatype
+expanded
+according
+to
+the
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+rules.
+</li>
+</ol>
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="value-compaction" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.7
+</del>
+<ins class="diff-chg">6.7
+</ins>
+</span>
+Value
+Compaction
+</h3>
+<p>
+Some
+values,
+such
+as
+IRIs
+and
+typed
+literals,
+may
+be
+expressed
+in
+an
+expanded
+form
+in
+JSON-LD.
+These
+values
+are
+required
+to
+be
+compacted
+at
+times
+when
+processing
+JSON-LD
+documents.
+</p>
+<p>
+The
+algorithm
+for
+compacting
+a
+value
+is:
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+contains
+a
+coercion
+target
+for
+the
+key
+that
+is
+associated
+with
+the
+value,
+compact
+the
+value
+using
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+coercion
+target
+is
+an
+<code>
+@iri
+</code>,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+<code>
+@iri
+</code>
+key,
+processed
+according
+to
+the
+<a href="#iri-compaction">
+IRI
+Compaction
+</a>
+steps.
+</li>
+<li>
+If
+the
+coercion
+target
+is
+a
+typed
+literal,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+<code>
+@literal
+</code>
+key.
+</li>
+<li>
+Otherwise,
+the
+value
+is
+not
+modified.
+</li>
+</ol>
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="expansion-1" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.8
+</del>
+<ins class="diff-chg">6.8
+</ins>
+</span>
+Expansion
+</h3>
+<p class="issue">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</p>
+<p>
+As
+stated
+previously,
+expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+input
+and
+expanding
+all
+IRIs
+and
+typed
+literals
+to
+their
+fully-expanded
+form.
+The
+output
+will
+not
+contain
+a
+single
+context
+declaration
+and
+will
+have
+all
+IRIs
+and
+typed
+literals
+fully
+expanded.
+</p>
+<div id="expansion-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.8.1
+</del>
+<ins class="diff-chg">6.8.1
+</ins>
+</span>
+Expansion
+Algorithm
+</h4>
+<ol class="algorithm">
+<li>
+If
+the
+top-level
+item
+in
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+is
+an
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+process
+each
+item
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+recursively
+using
+this
+algorithm.
+</li>
+<li>
+If
+the
+top-level
+item
+in
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+is
+an
+object,
+update
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+according
+to
+the
+steps
+outlined
+in
+the
+<a href="#context">
+context
+</a>
+section.
+Process
+each
+key,
+expanding
+the
+key
+according
+to
+the
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+rules.
+</li>
+<ol class="algorithm">
+<li>
+Process
+each
+value
+associated
+with
+each
+key
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+an
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+process
+each
+item
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+recursively
+using
+this
+algorithm.
+</li>
+<li>
+If
+the
+value
+is
+an
+object,
+process
+the
+object
+recursively
+using
+this
+algorithm.
+</li>
+<li>
+Otherwise,
+check
+to
+see
+the
+associated
+key
+has
+an
+associated
+coercion
+rule.
+If
+the
+value
+should
+be
+coerced,
+expand
+the
+value
+according
+to
+the
+<a href="#value-expansion">
+Value
+Expansion
+</a>
+rules.
+If
+the
+value
+does
+not
+need
+to
+be
+coerced,
+leave
+the
+value
+as-is.
+</li>
+</ol>
+</li>
+<li>
+Remove
+the
+context
+from
+the
+object
+</li>
+</ol>
+</ol>
+</div>
+</div>
+<div id="compaction-1" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.9
+</del>
+<ins class="diff-chg">6.9
+</ins>
+</span>
+Compaction
+</h3>
+<p class="issue">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</p>
+<p>
+As
+stated
+previously,
+compaction
+is
+the
+process
+of
+taking
+a
+JSON-LD
+input
+and
+compacting
+all
+IRIs
+using
+a
+given
+context.
+The
+output
+will
+contain
+a
+single
+top-level
+context
+declaration
+and
+will
+only
+use
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefix
+</a>
+es
+and
+will
+ensure
+that
+all
+typed
+literals
+are
+fully
+compacted.
+</p>
+<div id="compaction-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.9.1
+</del>
+<ins class="diff-chg">6.9.1
+</ins>
+</span>
+Compaction
+Algorithm
+</h4>
+<ol class="algorithm">
+<li>
+Perform
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>
+on
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>.
+</li>
+<li>
+If
+the
+top-level
+item
+is
+an
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+process
+each
+item
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+recursively,
+starting
+at
+this
+step.
+</li>
+<li>
+If
+the
+top-level
+item
+is
+an
+object,
+compress
+each
+key
+using
+the
+steps
+defined
+in
+<a href="#iri-compaction">
+IRI
+Compaction
+</a>
+and
+compress
+each
+value
+using
+the
+steps
+defined
+in
+<a href="#value-compaction">
+Value
+Compaction
+</a>
+</li>
+</ol>
+</div>
+</div>
+<div id="framing-1" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.10
+</del>
+<ins class="diff-chg">6.10
+</ins>
+</span>
+Framing
+</h3>
+<p class="issue">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</p>
+<p>
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+don't
+work
+directly
+with
+graphs,
+but
+rather,
+prefer
+trees
+when
+dealing
+with
+JSON.
+While
+mapping
+a
+graph
+to
+a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+This
+section
+defines
+an
+algorithm
+for
+mapping
+a
+graph
+to
+a
+tree
+given
+a
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>.
+</p>
+<div id="framing-algorithm-terms" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.10.1
+</del>
+<ins class="diff-chg">6.10.1
+</ins>
+</span>
+Framing
+Algorithm
+Terms
+</h4>
+<dl>
+<dt>
+<dfn title="input_frame" id="dfn-input_frame">
+input
+frame
+</dfn>
+</dt>
+<dd>
+the
+initial
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>
+provided
+to
+the
+framing
+algorithm.
+</dd>
+<dt>
+<dfn title="framing_context" id="dfn-framing_context">
+framing
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+containing
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>,
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+and
+the
+<a class="tref" title="omit_default_flag">
+omit
+default
+flag
+</a>.
+</dd>
+<dt>
+<dfn title="object_embed_flag" id="dfn-object_embed_flag">
+object
+embed
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+objects
+should
+be
+directly
+embedded
+in
+the
+output,
+instead
+of
+being
+referred
+to
+by
+their
+IRI.
+</dd>
+<dt>
+<dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+for
+properties
+to
+be
+included
+in
+the
+output,
+they
+must
+be
+explicitly
+declared
+in
+the
+<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
+framing
+context
+</a>.
+</dd>
+<dt>
+<dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+properties
+that
+are
+missing
+from
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+should
+be
+omitted
+from
+the
+output.
+</dd>
+<dt>
+<dfn title="match_limit" id="dfn-match_limit">
+match
+limit
+</dfn>
+</dt>
+<dd>
+A
+value
+specifying
+the
+maximum
+number
+of
+matches
+to
+accept
+when
+building
+arrays
+of
+values
+during
+the
+framing
+algorithm.
+A
+value
+of
+-1
+specifies
+that
+there
+is
+no
+match
+limit.
+</dd>
+<dt>
+<dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">
+map
+of
+embedded
+subjects
+</dfn>
+</dt>
+<dd>
+A
+map
+that
+tracks
+if
+a
+subject
+has
+been
+embedded
+in
+the
+output
+of
+the
+<a href="#framing-algorithm">
+Framing
+Algorithm
+</a>.
+</dd>
+</dl>
+</div>
+<div id="framing-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.10.2
+</del>
+<ins class="diff-chg">6.10.2
+</ins>
+</span>
+Framing
+Algorithm
+</h4>
+<p>
+The
+framing
+algorithm
+takes
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+that
+has
+been
+normalized
+according
+to
+the
+<a href="#normalization-algorithm">
+Normalization
+Algorithm
+</a>
+(
+<strong>
+normalized
+input
+</strong>
+),
+an
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
+input
+frame
+</a>
+that
+has
+been
+expanded
+according
+to
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>
+(
+<strong>
+expanded
+frame
+</strong>
+),
+and
+a
+number
+of
+options
+and
+produces
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+The
+following
+series
+of
+steps
+is
+the
+recursive
+portion
+of
+the
+framing
+algorithm:
+</p>
+<ol class="algorithm">
+<li>
+Initialize
+the
+<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
+framing
+context
+</a>
+by
+setting
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>,
+clearing
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>,
+and
+clearing
+the
+<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</a>.
+Override
+these
+values
+based
+on
+input
+options
+provided
+to
+the
+algorithm
+by
+the
+application.
+</li>
+<li>
+Generate
+a
+<dfn title="list_of_frames" id="dfn-list_of_frames">
+list
+of
+frames
+</dfn>
+by
+processing
+the
+<strong>
+expanded
+frame
+</strong>:
+<ol class="algorithm">
+<li>
+If
+the
+<strong>
+expanded
+frame
+</strong>
+is
+not
+an
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+set
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+to
+1,
+place
+the
+<strong>
+expanded
+frame
+</strong>
+into
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>,
+and
+set
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+to
+<code>
+null
+</code>.
+</li>
+<li>
+If
+the
+<strong>
+expanded
+frame
+</strong>
+is
+an
+empty
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+place
+an
+empty
+object
+into
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>,
+set
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+to
+an
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+and
+set
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+to
+-1.
+</li>
+<li>
+If
+the
+<strong>
+expanded
+frame
+</strong>
+is
+a
+non-empty
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+add
+each
+item
+in
+the
+<strong>
+expanded
+frame
+</strong>
+into
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>,
+set
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+to
+an
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+and
+set
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+to
+-1.
+</li>
+</ol>
+</li>
+<li>
+Create
+a
+<dfn title="match_array" id="dfn-match_array">
+match
+array
+</dfn>
+for
+each
+<strong>
+expanded
+frame
+</strong>
+in
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>
+halting
+when
+either
+the
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+is
+zero
+or
+the
+end
+of
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>
+is
+reached.
+If
+an
+<strong>
+expanded
+frame
+</strong>
+is
+not
+an
+object,
+the
+processor
+<em class="rfc2119" title="must">
+must
+</em>
+throw
+a
+<code>
+Invalid
+Frame
+Format
+</code>
+exception.
+Add
+each
+matching
+item
+from
+the
+<strong>
+normalized
+input
+</strong>
+to
+the
+<a class="tref" title="matches_array">
+matches
+array
+</a>
+and
+decrement
+the
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+by
+1
+if:
+<ol class="algorithm">
+<li>
+The
+<strong>
+expanded
+frame
+</strong>
+has
+an
+<code>
+rdf:type
+</code>
+that
+exists
+in
+the
+item's
+list
+of
+<code>
+rdf:type
+</code>
+s.
+Note:
+the
+<code>
+rdf:type
+</code>
+can
+be
+an
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+but
+only
+one
+value
+needs
+to
+be
+in
+common
+between
+the
+item
+and
+the
+<strong>
+expanded
+frame
+</strong>
+for
+a
+match.
+</li>
+<li>
+The
+<strong>
+expanded
+frame
+</strong>
+does
+not
+have
+an
+<code>
+rdf:type
+</code>
+property,
+but
+every
+property
+in
+the
+<strong>
+expanded
+frame
+</strong>
+exists
+in
+the
+item.
+</li>
+</ol>
+</li>
+<li>
+Process
+each
+item
+in
+the
+<a class="tref internalDFN" title="match_array" href="#dfn-match_array">
+match
+array
+</a>
+with
+its
+associated
+<dfn title="match_frame" id="dfn-match_frame">
+match
+frame
+</dfn>:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+contains
+an
+<code>
+@embed
+</code>
+keyword,
+set
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+to
+its
+value.
+If
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+contains
+an
+<code>
+@explicit
+</code>
+keyword,
+set
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+to
+its
+value.
+Note:
+if
+the
+keyword
+exists,
+but
+the
+value
+is
+neither
+<code>
+true
+</code>
+or
+<code>
+false
+</code>,
+set
+the
+associated
+flag
+to
+<code>
+true
+</code>.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+is
+cleared
+and
+the
+item
+has
+the
+<code>
+@subject
+</code>
+property,
+replace
+the
+item
+with
+the
+value
+of
+the
+<code>
+@subject
+</code>
+property.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+is
+set
+and
+the
+item
+has
+the
+<code>
+@subject
+</code>
+property,
+and
+its
+IRI
+is
+in
+the
+<a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">
+map
+of
+embedded
+subjects
+</a>,
+throw
+a
+<code>
+Duplicate
+Embed
+</code>
+exception.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+is
+set
+and
+the
+item
+has
+the
+<code>
+@subject
+</code>
+property
+and
+its
+IRI
+is
+not
+in
+the
+<a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">
+map
+of
+embedded
+subjects
+</a>:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+is
+set,
+then
+delete
+any
+key
+from
+the
+item
+that
+does
+not
+exist
+in
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>,
+except
+<code>
+@subject
+</code>.
+</li>
+<li>
+For
+each
+key
+in
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>,
+except
+for
+keywords
+and
+<code>
+rdf:type
+</code>:
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+in
+the
+item,
+then
+build
+a
+new
+<dfn title="recursion_input_list" id="dfn-recursion_input_list">
+recursion
+input
+list
+</dfn>
+using
+the
+object
+or
+objects
+associated
+with
+the
+key.
+If
+any
+object
+contains
+an
+<code>
+@iri
+</code>
+value
+that
+exists
+in
+the
+<a class="tref" title="normalized_input">
+normalized
+input
+</a>,
+replace
+the
+object
+in
+the
+<a class="tref" title="recusion_input_list">
+recusion
+input
+list
+</a>
+with
+a
+new
+object
+containing
+the
+<code>
+@subject
+</code>
+key
+where
+the
+value
+is
+the
+value
+of
+the
+<code>
+@iri
+</code>,
+and
+all
+of
+the
+other
+key-value
+pairs
+for
+that
+subject.
+Set
+the
+<dfn title="recursion_match_frame" id="dfn-recursion_match_frame">
+recursion
+match
+frame
+</dfn>
+to
+the
+value
+associated
+with
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+'s
+key.
+Replace
+the
+value
+associated
+with
+the
+key
+by
+recursively
+calling
+this
+algorithm
+using
+<a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">
+recursion
+input
+list
+</a>,
+<a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">
+recursion
+match
+frame
+</a>
+as
+input.
+</li>
+<li>
+If
+the
+key
+is
+not
+in
+the
+item,
+add
+the
+key
+to
+the
+item
+and
+set
+the
+associated
+value
+to
+an
+empty
+array
+if
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+key's
+value
+is
+an
+array
+or
+<code>
+null
+</code>
+otherwise.
+</li>
+<li>
+If
+value
+associated
+with
+the
+item's
+key
+is
+<code>
+null
+</code>,
+process
+the
+<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</a>:
+<ol class="algorithm">
+<li>
+If
+the
+value
+associated
+with
+the
+key
+in
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+is
+an
+array,
+use
+the
+first
+frame
+from
+the
+array
+as
+the
+<dfn title="property_frame" id="dfn-property_frame">
+property
+frame
+</dfn>,
+otherwise
+set
+the
+<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
+property
+frame
+</a>
+to
+an
+empty
+object.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
+property
+frame
+</a>
+contains
+an
+<code>
+@omitDefault
+</code>
+keyword,
+set
+the
+<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</a>
+to
+its
+value.
+Note:
+if
+the
+keyword
+exists,
+but
+the
+value
+is
+neither
+<code>
+true
+</code>
+or
+<code>
+false
+</code>,
+set
+the
+associated
+flag
+to
+<code>
+true
+</code>.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</a>
+is
+set,
+delete
+the
+key
+in
+the
+item.
+Otherwise,
+if
+the
+<code>
+@default
+</code>
+keyword
+is
+set
+in
+the
+<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
+property
+frame
+</a>
+set
+the
+item's
+value
+to
+the
+value
+of
+<code>
+@default
+</code>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+is
+<code>
+null
+</code>
+set
+it
+to
+the
+item,
+otherwise,
+append
+the
+item
+to
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Return
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+</li>
+</ol>
+The
+final,
+non-recursive
+step
+of
+the
+framing
+algorithm
+requires
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+to
+be
+compacted
+according
+to
+the
+<a href="#compaction-algorithm">
+Compaction
+Algorithm
+</a>
+by
+using
+the
+context
+provided
+in
+the
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
+input
+frame
+</a>.
+The
+resulting
+value
+is
+the
+final
+output
+of
+the
+compaction
+algorithm
+and
+is
+what
+should
+be
+returned
+to
+the
+application.
+</div>
+</div>
+<div id="normalization-1" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.11
+</del>
+<ins class="diff-chg">6.11
+</ins>
+</span>
+Normalization
+</h3>
+<p class="issue">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</p>
+<p>
+Normalization
+is
+the
+process
+of
+taking
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+and
+performing
+a
+deterministic
+transformation
+on
+that
+input
+that
+results
+in
+all
+aspects
+of
+the
+graph
+being
+fully
+expanded
+and
+named
+in
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+The
+normalized
+output
+is
+generated
+in
+such
+a
+way
+that
+any
+conforming
+JSON-LD
+processor
+will
+generate
+identical
+output
+given
+the
+same
+input.
+The
+problem
+is
+a
+fairly
+difficult
+technical
+problem
+to
+solve
+because
+it
+requires
+a
+directed
+graph
+to
+be
+ordered
+into
+a
+set
+of
+nodes
+and
+edges
+in
+a
+deterministic
+way.
+This
+is
+easy
+to
+do
+when
+all
+of
+the
+nodes
+have
+unique
+names,
+but
+very
+difficult
+to
+do
+when
+some
+of
+the
+nodes
+are
+not
+labeled.
+</p>
+<p>
+In
+time,
+there
+may
+be
+more
+than
+one
+normalization
+algorithm
+that
+will
+need
+to
+be
+identified.
+For
+identification
+purposes,
+this
+algorithm
+is
+named
+<abbr title="Universal Graph Normalization Algorithm 2011">
+UGNA2011
+</abbr>.
+</p>
+<div id="normalization-algorithm-terms" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.1
+</del>
+<ins class="diff-chg">6.11.1
+</ins>
+</span>
+Normalization
+Algorithm
+Terms
+</h4>
+<dl>
+<dt>
+<dfn title="label" id="dfn-label">
+<ins class="diff-new">label
+</ins></dfn></dt><dd><ins class="diff-new">
+The
+subject
+IRI
+associated
+with
+a
+graph
+node.
+The
+subject
+IRI
+is
+expressed
+using
+a
+key-value
+pair
+in
+a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+where
+the
+key
+is
+</ins><code><ins class="diff-new">
+@subject
+</ins></code><ins class="diff-new">
+and
+the
+value
+is
+a
+string
+that
+is
+an
+IRI
+or
+a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+containing
+the
+key
+</ins><code><ins class="diff-new">
+@iri
+</ins></code><ins class="diff-new">
+and
+a
+value
+that
+is
+a
+string
+that
+is
+an
+IRI.
+</ins></dd><dt>
+<dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">
+list
+of
+expanded
+nodes
+</dfn>
+</dt>
+<dd>
+A
+list
+of
+all
+nodes
+in
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+graph
+containing
+no
+embedded
+objects
+and
+having
+all
+keys
+and
+values
+expanded
+according
+to
+the
+steps
+in
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>.
+</dd>
+<dt>
+<del class="diff-old">naming
+base
+string
+An
+unlabeled
+node
+naming
+prefix
+that
+is
+not
+used
+by
+any
+other
+node
+in
+the
+JSON-LD
+input
+and
+does
+not
+start
+with
+the
+characters
+c14n
+.
+The
+prefix
+is
+used
+to
+temporarily
+name
+nodes
+during
+the
+normalization
+algorithm
+in
+a
+way
+that
+doesn't
+collide
+with
+the
+names
+that
+already
+exist
+as
+well
+as
+the
+names
+that
+will
+be
+generated
+by
+the
+normalization
+algorithm.
+</del>
+<dfn title="alpha" id="dfn-alpha">
+alpha
+</dfn>
+and
+<dfn title="beta" id="dfn-beta">
+beta
+</dfn>
+values
+</dt>
+<dd>
+The
+words
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+and
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+refer
+to
+the
+first
+and
+second
+nodes
+or
+values
+being
+examined
+in
+an
+algorithm.
+The
+names
+are
+merely
+used
+to
+refer
+to
+each
+input
+value
+to
+a
+comparison
+algorithm.
+</dd>
+<dt>
+<del class="diff-old">naming
+base
+string
+</del>
+<dfn title="renaming_counter" id="dfn-renaming_counter">
+<ins class="diff-chg">renaming
+counter
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+counter
+that
+is
+used
+during
+the
+</ins><a href="#node-relabeling-algorithm"><ins class="diff-chg">
+Node
+Relabeling
+Algorithm
+</ins></a>.<ins class="diff-chg">
+The
+counter
+typically
+starts
+at
+one
+(1)
+and
+counts
+up
+for
+every
+node
+that
+is
+relabeled.
+There
+will
+be
+two
+such
+renaming
+counters
+in
+an
+implementation
+of
+the
+normalization
+algorithm.
+The
+first
+is
+the
+</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-chg">
+labeling
+counter
+</ins></a><ins class="diff-chg">
+and
+the
+second
+is
+the
+</ins><a class="tref" title="deterministic_labeling_counter"><ins class="diff-chg">
+deterministic
+labeling
+counter
+</ins></a>.</dd><dt><dfn title="serialization_label" id="dfn-serialization_label"><ins class="diff-chg">
+serialization
+label
+</ins>
+</dfn>
+</dt>
+<dd>
+An
+<del class="diff-old">unlabeled
+</del>
+<ins class="diff-chg">identifier
+that
+is
+created
+to
+aid
+in
+the
+normalization
+process
+in
+the
+</ins><a href="#deep-comparison-algorithm"><ins class="diff-chg">
+Deep
+Comparison
+Algorithm
+</ins></a>.<ins class="diff-chg">
+The
+value
+typically
+takes
+the
+form
+of
+</ins><code><ins class="diff-chg">
+s
+</ins><NUMBER></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+c
+</ins><NUMBER></code>.</dd></dl></div><div id="normalization-state" class="section"><h4><span class="secno"><ins class="diff-chg">
+6.11.2
+</ins></span><ins class="diff-chg">
+Normalization
+State
+</ins></h4><p><ins class="diff-chg">
+When
+performing
+the
+steps
+required
+by
+the
+normalization
+algorithm,
+it
+is
+helpful
+to
+track
+the
+many
+pieces
+of
+information
+in
+a
+data
+structure
+called
+the
+</ins><dfn title="normalization_state" id="dfn-normalization_state"><ins class="diff-chg">
+normalization
+state
+</ins></dfn>.<ins class="diff-chg">
+Many
+of
+these
+pieces
+simply
+provide
+indexes
+into
+the
+graph.
+The
+information
+contained
+in
+the
+</ins><a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state"><ins class="diff-chg">
+normalization
+state
+</ins></a><ins class="diff-chg">
+is
+described
+below.
+</ins></p><dl><dt><dfn title="node_state" id="dfn-node_state">
+node
+<del class="diff-old">naming
+</del>
+<ins class="diff-chg">state
+</ins></dfn></dt><dd><ins class="diff-chg">
+Each
+node
+in
+the
+graph
+will
+be
+assigned
+a
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a>.<ins class="diff-chg">
+This
+state
+contains
+the
+information
+necessary
+to
+deterministically
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+all
+nodes
+in
+the
+graph.
+A
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a><ins class="diff-chg">
+includes:
+</ins><dl><dt><dfn title="node_reference" id="dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a><ins class="diff-chg">
+is
+a
+reference
+to
+a
+node
+in
+the
+graph.
+For
+a
+given
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a>,<ins class="diff-chg">
+its
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a><ins class="diff-chg">
+refers
+to
+the
+node
+that
+the
+state
+is
+for.
+When
+a
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a><ins class="diff-chg">
+is
+created,
+its
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a><ins class="diff-chg">
+should
+be
+to
+the
+node
+it
+is
+created
+for.
+</ins></dd><dt><dfn title="outgoing_list" id="dfn-outgoing_list"><ins class="diff-chg">
+outgoing
+list
+</ins></dfn></dt><dd><ins class="diff-chg">
+Lists
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+for
+all
+nodes
+that
+are
+properties
+of
+the
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a>.<ins class="diff-chg">
+This
+list
+should
+be
+initialized
+by
+iterating
+over
+every
+object
+associated
+with
+a
+property
+in
+the
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a><ins class="diff-chg">
+adding
+its
+label
+if
+it
+is
+another
+node.
+</ins></dd><dt><dfn title="incoming_list" id="dfn-incoming_list"><ins class="diff-chg">
+incoming
+list
+</ins></dfn></dt><dd><ins class="diff-chg">
+Lists
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+for
+all
+nodes
+in
+the
+graph
+for
+which
+the
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a><ins class="diff-chg">
+is
+a
+property.
+This
+list
+is
+initialized
+to
+an
+empty
+list.
+</ins></dd><dt><dfn title="outgoing_serialization_map" id="dfn-outgoing_serialization_map"><ins class="diff-chg">
+outgoing
+serialization
+map
+</ins></dfn></dt><dd><ins class="diff-chg">
+Maps
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+to
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+s.
+This
+map
+is
+initialized
+to
+an
+empty
+map.
+When
+this
+map
+is
+populated,
+it
+will
+be
+filled
+with
+keys
+that
+are
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+of
+every
+node
+in
+the
+graph
+with
+a
+label
+that
+begins
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+and
+that
+has
+a
+path,
+via
+properties,
+that
+starts
+with
+the
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a>.</dd><dt><dfn title="outgoing_serialization" id="dfn-outgoing_serialization"><ins class="diff-chg">
+outgoing
+serialization
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+string
+that
+can
+be
+lexicographically
+compared
+to
+the
+</ins><a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization"><ins class="diff-chg">
+outgoing
+serialization
+</ins></a><ins class="diff-chg">
+s
+of
+other
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a><ins class="diff-chg">
+s.
+It
+is
+a
+representation
+of
+the
+</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-chg">
+outgoing
+serialization
+map
+</ins></a><ins class="diff-chg">
+and
+other
+related
+information.
+This
+string
+is
+initialized
+to
+an
+empty
+string.
+</ins></dd><dt><dfn title="incoming_serialization_map" id="dfn-incoming_serialization_map"><ins class="diff-chg">
+incoming
+serialization
+map
+</ins></dfn></dt><dd><ins class="diff-chg">
+Maps
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+to
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+s.
+This
+map
+is
+initialized
+to
+an
+empty
+map.
+When
+this
+map
+is
+populated,
+it
+will
+be
+filled
+with
+keys
+that
+are
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+of
+every
+node
+in
+the
+graph
+with
+a
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+that
+begins
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+and
+that
+has
+a
+path,
+via
+properties,
+that
+ends
+with
+the
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a>.</dd><dt><dfn title="incoming_serialization" id="dfn-incoming_serialization"><ins class="diff-chg">
+incoming
+serialization
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+string
+that
+can
+be
+lexicographically
+compared
+to
+the
+</ins><a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization"><ins class="diff-chg">
+outgoing
+serialization
+</ins></a><ins class="diff-chg">
+s
+of
+other
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a><ins class="diff-chg">
+s.
+It
+is
+a
+representation
+of
+the
+</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-chg">
+incoming
+serialization
+map
+</ins></a><ins class="diff-chg">
+and
+other
+related
+information.
+This
+string
+is
+initialized
+to
+an
+empty
+string.
+</ins></dd></dl></dd><dt><dfn title="node_state_map" id="dfn-node_state_map"><ins class="diff-chg">
+node
+state
+map
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+mapping
+from
+a
+node's
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+to
+a
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a>.<ins class="diff-chg">
+It
+is
+initialized
+to
+an
+empty
+map.
+</ins></dd><dt><dfn title="labeling_prefix" id="dfn-labeling_prefix"><ins class="diff-chg">
+labeling
+</ins>
+prefix
+</dfn>
+</dt>
+<dd>
+<ins class="diff-new">The
+labeling
+prefix
+is
+a
+string
+</ins>
+that
+is
+<ins class="diff-new">used
+as
+the
+beginning
+of
+a
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a>.<ins class="diff-new">
+It
+should
+be
+initialized
+to
+a
+random
+base
+string
+that
+starts
+with
+the
+characters
+</ins><code><ins class="diff-new">
+_:
+</ins></code>,<ins class="diff-new">
+is
+</ins>
+not
+used
+by
+any
+other
+<del class="diff-old">node
+</del>
+<ins class="diff-chg">node's
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>
+in
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>,
+and
+does
+not
+start
+with
+the
+characters
+<code>
+<del class="diff-old">c14n
+</del>
+<ins class="diff-chg">_:c14n
+</ins>
+</code>.
+The
+prefix
+<ins class="diff-new">has
+two
+uses.
+First
+it
+</ins>
+is
+used
+to
+temporarily
+name
+nodes
+during
+the
+normalization
+algorithm
+in
+a
+way
+that
+doesn't
+collide
+with
+the
+names
+that
+already
+exist
+as
+well
+as
+the
+names
+that
+will
+be
+generated
+by
+the
+normalization
+algorithm.
+<ins class="diff-new">Second,
+it
+will
+eventually
+be
+set
+to
+</ins><code><ins class="diff-new">
+_:c14n
+</ins></code><ins class="diff-new">
+to
+generate
+the
+final,
+deterministic
+labels
+for
+nodes
+in
+the
+graph.
+This
+prefix
+will
+be
+concatenated
+with
+the
+</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-new">
+labeling
+counter
+</ins></a><ins class="diff-new">
+to
+produce
+a
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a>.<ins class="diff-new">
+For
+example,
+</ins><code><ins class="diff-new">
+_:j8r3k
+</ins></code><ins class="diff-new">
+is
+a
+proper
+initial
+value
+for
+the
+</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-new">
+labeling
+prefix
+</ins></a>.</dd><dt><dfn title="labeling_counter" id="dfn-labeling_counter"><ins class="diff-new">
+labeling
+counter
+</ins></dfn></dt><dd><ins class="diff-new">
+A
+counter
+that
+is
+used
+to
+label
+nodes.
+It
+is
+appended
+to
+the
+</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-new">
+labeling
+prefix
+</ins></a><ins class="diff-new">
+to
+create
+a
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a>.<ins class="diff-new">
+It
+is
+initialized
+to
+</ins><code><ins class="diff-new">
+1
+</ins></code>.</dd><dt><dfn title="map_of_flattened_nodes" id="dfn-map_of_flattened_nodes"><ins class="diff-new">
+map
+of
+flattened
+nodes
+</ins></dfn></dt><dd><ins class="diff-new">
+A
+map
+containing
+a
+representation
+of
+all
+nodes
+in
+the
+graph
+where
+the
+key
+is
+a
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+and
+the
+value
+is
+a
+single
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+that
+has
+no
+nested
+sub-objects
+and
+has
+had
+all
+properties
+for
+the
+same
+node
+merged
+into
+a
+single
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a>.
+</dd>
+</dl>
+</div>
+<div id="normalization-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.2
+</del>
+<ins class="diff-chg">6.11.3
+</ins>
+</span>
+Normalization
+Algorithm
+</h4>
+<p>
+The
+normalization
+algorithm
+expands
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>,
+flattens
+the
+data
+structure,
+and
+creates
+an
+initial
+set
+of
+names
+for
+all
+nodes
+in
+the
+graph.
+The
+flattened
+data
+structure
+is
+then
+processed
+by
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">a
+</ins>
+node
+labeling
+algorithm
+in
+order
+to
+get
+a
+fully
+expanded
+and
+named
+list
+of
+<ins class="diff-new">nodes
+which
+is
+then
+sorted.
+The
+result
+is
+a
+deterministically
+named
+and
+ordered
+list
+of
+graph
+</ins>
+nodes.
+</p>
+<ol class="algorithm">
+<li>
+Expand
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+according
+to
+the
+steps
+in
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>
+and
+store
+the
+result
+as
+the
+<strong>
+expanded
+input
+</strong>.
+</li>
+<li>
+<del class="diff-old">Process
+every
+object
+in
+the
+expanded
+input
+searching
+for
+@subject
+values
+that
+start
+with
+the
+text
+string
+_:c14n
+.
+If
+a
+match
+is
+found,
+rename
+the
+subject
+and
+all
+references
+to
+the
+subject
+by
+concatenating
+_:
+with
+the
+naming
+base
+string
+and
+</del>
+<ins class="diff-chg">Create
+</ins>
+a
+<del class="diff-old">unique
+identifier,
+such
+as
+an
+incremented
+counter
+value.
+</del>
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
+<ins class="diff-chg">normalization
+state
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Create
+an
+empty
+list
+</del>
+<ins class="diff-chg">Initialize
+the
+</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-chg">
+map
+</ins>
+of
+<del class="diff-old">expanded
+</del>
+<ins class="diff-chg">flattened
+</ins>
+nodes
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">by
+</ins>
+recursively
+<del class="diff-old">process
+</del>
+<ins class="diff-chg">processing
+</ins>
+every
+<del class="diff-old">object
+</del>
+<dfn title="expanded_node" id="dfn-expanded_node">
+<ins class="diff-chg">expanded
+node
+</ins></dfn>
+in
+the
+<strong>
+expanded
+input
+</strong>
+<del class="diff-old">that
+is
+not
+an
+expanded
+IRI,
+typed
+literal
+or
+language
+literal,
+</del>
+in
+depth-first
+order:
+<ol class="algorithm">
+<li>
+If
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
+expanded
+node
+</ins></a><ins class="diff-new">
+is
+</ins>
+an
+<del class="diff-old">object
+does
+not
+contain
+</del>
+<ins class="diff-chg">unlabeled
+node,
+add
+</ins>
+a
+<ins class="diff-new">new
+key-value
+pair
+to
+the
+</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
+expanded
+node
+</ins></a><ins class="diff-new">
+where
+the
+key
+is
+</ins>
+<code>
+@subject
+<del class="diff-old">,
+name
+it
+by
+concatenating
+_:
+</del>
+</code>
+<del class="diff-old">with
+</del>
+<ins class="diff-chg">and
+</ins>
+the
+<del class="diff-old">naming
+base
+string
+</del>
+<ins class="diff-chg">value
+is
+the
+concatenation
+of
+the
+</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-chg">
+labeling
+prefix
+</ins>
+</a>
+and
+<del class="diff-old">a
+unique
+identifier,
+such
+as
+an
+incremented
+</del>
+<ins class="diff-chg">the
+string
+value
+of
+the
+</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-chg">
+labeling
+</ins>
+counter
+<del class="diff-old">value.
+</del>
+</a>.
+<ins class="diff-chg">Increment
+the
+</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-chg">
+labeling
+counter
+</ins></a>.
+</li>
+<li>
+Add
+the
+<del class="diff-old">object
+</del>
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+<ins class="diff-chg">expanded
+node
+</ins></a>
+to
+the
+<del class="diff-old">list
+</del>
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+<ins class="diff-chg">map
+</ins>
+of
+<ins class="diff-new">flattened
+nodes
+</ins></a>:<ol class="algorithm"><li><ins class="diff-new">
+If
+the
+</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+<ins class="diff-new">node
+</ins></a><ins class="diff-new">
+'s
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+is
+already
+in
+the
+</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-new">
+map
+of
+flattened
+</ins>
+nodes
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-new">merge
+all
+properties
+from
+the
+entry
+in
+the
+</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-new">
+map
+of
+flattened
+nodes
+</ins></a><ins class="diff-new">
+into
+the
+</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
+expanded
+node
+</ins></a>.</li><li><ins class="diff-new">
+Go
+through
+every
+property
+associated
+with
+an
+array
+in
+the
+</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
+expanded
+node
+</ins></a><ins class="diff-new">
+and
+remove
+any
+duplicate
+IRI
+entries
+from
+the
+array.
+If
+the
+resulting
+array
+only
+has
+one
+IRI
+entry,
+change
+it
+from
+an
+array
+to
+an
+object.
+</ins></li><li><ins class="diff-new">
+Set
+the
+entry
+for
+the
+</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
+expanded
+node
+</ins></a><ins class="diff-new">
+'s
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+in
+the
+</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-new">
+map
+of
+flattened
+nodes
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node"><ins class="diff-new">
+expanded
+node
+</ins></a>.</li></ol>
+</li>
+<li>
+<del class="diff-old">Replace
+</del>
+<ins class="diff-chg">After
+exiting
+the
+recursive
+step,
+replace
+</ins>
+the
+reference
+to
+the
+<del class="diff-old">object
+</del>
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+<ins class="diff-chg">expanded
+node
+</ins></a>
+with
+<ins class="diff-new">an
+object
+containing
+a
+single
+key-value
+pair
+where
+the
+key
+is
+</ins><code><ins class="diff-new">
+@iri
+</ins></code><ins class="diff-new">
+and
+the
+value
+is
+</ins>
+the
+value
+of
+the
+<code>
+@subject
+</code>
+<ins class="diff-new">key
+</ins>
+in
+the
+<del class="diff-old">object.
+</del>
+<ins class="diff-chg">node.
+</ins></li></ol>
+</li>
+<li>
+<del class="diff-old">???duplicate
+objects
+for
+predicates???
+</del>
+<ins class="diff-chg">For
+every
+entry
+in
+the
+</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-chg">
+map
+of
+flattened
+nodes
+</ins></a>,<ins class="diff-chg">
+insert
+a
+key-value
+pair
+into
+the
+</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map"><ins class="diff-chg">
+node
+state
+map
+</ins></a><ins class="diff-chg">
+where
+the
+key
+is
+the
+key
+from
+the
+</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-chg">
+map
+of
+flattened
+nodes
+</ins></a><ins class="diff-chg">
+and
+the
+value
+is
+a
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a><ins class="diff-chg">
+where
+its
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a><ins class="diff-chg">
+refers
+to
+the
+value
+from
+the
+</ins><a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes"><ins class="diff-chg">
+map
+of
+flattened
+nodes
+</ins></a>.
+</li>
+<li>
+<ins class="diff-new">Populate
+the
+</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-new">
+incoming
+list
+</ins></a><ins class="diff-new">
+for
+each
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-new">
+node
+state
+</ins></a><ins class="diff-new">
+by
+iterating
+over
+every
+node
+in
+the
+graph
+and
+adding
+its
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-new">
+incoming
+list
+</ins></a><ins class="diff-new">
+associated
+with
+each
+node
+found
+in
+its
+properties.
+</ins>
+</li>
+<li>
+<ins class="diff-new">For
+every
+entry
+in
+the
+</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map"><ins class="diff-new">
+node
+state
+map
+</ins></a><ins class="diff-new">
+that
+has
+a
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+that
+begins
+with
+</ins><code><ins class="diff-new">
+_:c14n
+</ins></code>,<ins class="diff-new">
+relabel
+the
+node
+using
+the
+</ins><a href="#node-relabeling-algorithm"><ins class="diff-new">
+Node
+Relabeling
+Algorithm
+</ins></a>.</li><li>
+Label
+all
+of
+the
+nodes
+that
+contain
+a
+<code>
+@subject
+</code>
+key
+associated
+with
+a
+value
+starting
+with
+<code>
+_:
+</code>
+according
+to
+the
+steps
+in
+the
+<del class="diff-old">Node
+</del>
+<a href="#deterministic-labeling-algorithm">
+<ins class="diff-chg">Deterministic
+</ins>
+Labeling
+Algorithm
+</a>.
+</li>
+</ol>
+</div>
+<div id="node-relabeling-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.3
+</del>
+<ins class="diff-chg">6.11.4
+</ins>
+</span>
+Node
+<del class="diff-old">Labeling
+</del>
+<ins class="diff-chg">Relabeling
+</ins>
+Algorithm
+</h4>
+<p>
+<ins class="diff-new">This
+algorithm
+renames
+a
+node
+by
+generating
+a
+unique
+</ins><dfn title="new_label" id="dfn-new_label"><ins class="diff-new">
+new
+label
+</ins></dfn><ins class="diff-new">
+and
+updating
+all
+references
+to
+that
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+in
+the
+</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map"><ins class="diff-new">
+node
+state
+map
+</ins></a>.<ins class="diff-new">
+The
+</ins><dfn title="old_label" id="dfn-old_label"><ins class="diff-new">
+old
+label
+</ins></dfn><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state"><ins class="diff-new">
+normalization
+state
+</ins></a><ins class="diff-new">
+must
+be
+given
+as
+an
+input
+to
+the
+algorithm.
+The
+</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
+old
+label
+</ins></a><ins class="diff-new">
+is
+the
+current
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+of
+the
+node
+that
+is
+to
+be
+relabeled.
+</ins></p><p>
+The
+node
+<ins class="diff-new">relabeling
+algorithm
+is
+as
+follows:
+</ins></p><ol class="algorithm"><li><ins class="diff-new">
+If
+the
+</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-new">
+labeling
+prefix
+</ins></a><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+_:c14n
+</ins></code><ins class="diff-new">
+and
+the
+</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
+old
+label
+</ins></a><ins class="diff-new">
+begins
+with
+</ins><code><ins class="diff-new">
+_:c14n
+</ins></code><ins class="diff-new">
+then
+return
+as
+the
+node
+has
+already
+been
+renamed.
+</ins></li><li><ins class="diff-new">
+Generate
+the
+</ins><dfn title="new_label" id="dfn-new_label-1"><ins class="diff-new">
+new
+label
+</ins></dfn><ins class="diff-new">
+by
+concatenating
+the
+</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-new">
+labeling
+prefix
+</ins></a><ins class="diff-new">
+with
+the
+string
+value
+of
+the
+</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-new">
+labeling
+counter
+</ins></a>.<ins class="diff-new">
+Increment
+the
+</ins><a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter"><ins class="diff-new">
+labeling
+counter
+</ins></a>.</li><li><ins class="diff-new">
+For
+the
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-new">
+node
+state
+</ins></a><ins class="diff-new">
+associated
+with
+the
+</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
+old
+label
+</ins></a>,<ins class="diff-new">
+update
+every
+node
+in
+the
+</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-new">
+incoming
+list
+</ins></a><ins class="diff-new">
+by
+changing
+all
+the
+properties
+that
+reference
+the
+</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
+old
+label
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="new_label" href="#dfn-new_label-1"><ins class="diff-new">
+new
+label
+</ins></a>.</li><li><ins class="diff-new">
+Change
+the
+</ins><a class="tref internalDFN" title="old_label" href="#dfn-old_label"><ins class="diff-new">
+old
+label
+</ins></a><ins class="diff-new">
+key
+in
+the
+</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map"><ins class="diff-new">
+node
+state
+map
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="new_label" href="#dfn-new_label-1"><ins class="diff-new">
+new
+label
+</ins></a><ins class="diff-new">
+and
+set
+the
+associated
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-new">
+node
+reference
+</ins></a><ins class="diff-new">
+'s
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="new_label" href="#dfn-new_label-1"><ins class="diff-new">
+new
+label
+</ins></a>.</li></ol></div><div id="deterministic-labeling-algorithm" class="section"><h4><span class="secno"><ins class="diff-new">
+6.11.5
+</ins></span><ins class="diff-new">
+Deterministic
+Labeling
+Algorithm
+</ins></h4><p><ins class="diff-new">
+The
+deterministic
+</ins>
+labeling
+algorithm
+takes
+the
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
+<ins class="diff-chg">normalization
+state
+</ins></a><ins class="diff-chg">
+and
+produces
+a
+</ins><dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes">
+list
+of
+<del class="diff-old">expanded
+</del>
+<ins class="diff-chg">finished
+</ins>
+nodes
+</dfn>
+<ins class="diff-chg">that
+is
+sorted
+</ins>
+and
+<del class="diff-old">sorts
+the
+list,
+</del>
+<ins class="diff-chg">contains
+</ins>
+deterministically
+<del class="diff-old">naming
+all
+of
+the
+unlabeled
+</del>
+<ins class="diff-chg">named
+and
+expanded
+</ins>
+nodes
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">from
+</ins>
+the
+graph.
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Create
+a
+forward
+mapping
+that
+relates
+graph
+nodes
+</del>
+<ins class="diff-chg">Set
+the
+</ins><a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix"><ins class="diff-chg">
+labeling
+prefix
+</ins></a>
+to
+<code>
+<ins class="diff-new">_:c14n
+</ins></code>,
+the
+<del class="diff-old">IRIs
+</del>
+<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
+<ins class="diff-chg">labeling
+counter
+</ins></a><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+1
+</ins></code>,<ins class="diff-chg">
+the
+</ins><dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes-1"><ins class="diff-chg">
+list
+</ins>
+of
+<ins class="diff-new">finished
+nodes
+</ins></dfn><ins class="diff-new">
+to
+an
+empty
+array,
+and
+create
+an
+empty
+array,
+</ins>
+the
+<del class="diff-old">targets
+</del>
+<dfn title="list_of_unfinished_nodes" id="dfn-list_of_unfinished_nodes">
+<ins class="diff-chg">list
+of
+unfinished
+</ins>
+nodes
+<del class="diff-old">that
+they
+reference.
+</del>
+</dfn>.
+</li>
+<li>
+For
+<del class="diff-old">example,
+if
+a
+</del>
+<ins class="diff-chg">each
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+<del class="diff-old">alpha
+</del>
+<ins class="diff-chg">reference
+</ins>
+</a>
+<del class="diff-old">refers
+to
+a
+</del>
+<ins class="diff-chg">in
+the
+</ins><a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
+node
+<del class="diff-old">beta
+</del>
+<ins class="diff-chg">state
+map
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+node's
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins>
+</a>
+<del class="diff-old">via
+a
+property,
+</del>
+<ins class="diff-chg">does
+not
+start
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+then
+put
+</ins>
+the
+<del class="diff-old">key
+</del>
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+<ins class="diff-chg">node
+reference
+</ins></a>
+in
+the
+<del class="diff-old">forward
+mapping
+</del>
+<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
+<ins class="diff-chg">list
+of
+finished
+nodes
+</ins></a>.</li><li><ins class="diff-chg">
+If
+the
+node's
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins>
+</a>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">does
+start
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+then
+put
+</ins>
+the
+<del class="diff-old">subject
+IRI
+</del>
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+<ins class="diff-chg">node
+reference
+</ins></a><ins class="diff-chg">
+in
+the
+</ins><a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes"><ins class="diff-chg">
+list
+</ins>
+of
+<del class="diff-old">alpha
+</del>
+<ins class="diff-chg">unfinished
+nodes
+</ins></a>.</li></ol></li><li><ins class="diff-chg">
+Append
+to
+the
+</ins><a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1"><ins class="diff-chg">
+list
+of
+finished
+nodes
+</ins>
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">by
+processing
+</ins>
+the
+<del class="diff-old">value
+is
+an
+array
+containing
+at
+least
+</del>
+<ins class="diff-chg">remainder
+of
+</ins>
+the
+<del class="diff-old">subject
+IRI
+</del>
+<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
+<ins class="diff-chg">list
+</ins>
+of
+<del class="diff-old">beta
+.
+</del>
+<ins class="diff-chg">unfinished
+nodes
+</ins></a><ins class="diff-chg">
+until
+it
+is
+empty:
+</ins>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Add
+all
+forward
+mappings
+for
+every
+node
+</del>
+<ins class="diff-chg">Sort
+the
+</ins><a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes"><ins class="diff-chg">
+list
+of
+unfinished
+nodes
+</ins></a>
+in
+<ins class="diff-new">descending
+order
+according
+to
+</ins>
+the
+<del class="diff-old">graph.
+</del>
+<a href="#deep-comparison-algorithm">
+<ins class="diff-chg">Deep
+Comparison
+Algorithm
+</ins></a><ins class="diff-chg">
+to
+determine
+the
+sort
+order.
+</ins>
+</li>
+<li>
+Create
+a
+<del class="diff-old">reverse
+mapping
+</del>
+<dfn title="list_of_labels" id="dfn-list_of_labels">
+<ins class="diff-chg">list
+of
+labels
+</ins>
+</dfn>
+<del class="diff-old">that
+relates
+graph
+nodes
+</del>
+<ins class="diff-chg">and
+initialize
+it
+</ins>
+to
+<del class="diff-old">every
+other
+</del>
+<ins class="diff-chg">an
+empty
+array.
+</ins></li><li><ins class="diff-chg">
+For
+the
+first
+</ins>
+node
+<del class="diff-old">that
+refers
+</del>
+<ins class="diff-chg">from
+the
+</ins><a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes"><ins class="diff-chg">
+list
+of
+unfinished
+nodes
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+Add
+its
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>
+to
+<del class="diff-old">them
+in
+</del>
+the
+<del class="diff-old">graph.
+</del>
+<a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">
+<ins class="diff-chg">list
+of
+labels
+</ins></a>.</li><li>
+For
+<del class="diff-old">example,
+if
+</del>
+<ins class="diff-chg">each
+key-value
+pair
+from
+its
+associated
+</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-chg">
+outgoing
+serialization
+map
+</ins></a>,<ins class="diff-chg">
+add
+the
+key
+to
+</ins>
+a
+<del class="diff-old">node
+alpha
+refers
+</del>
+<ins class="diff-chg">list
+and
+then
+sort
+the
+list
+according
+to
+the
+lexicographical
+order
+of
+the
+keys'
+associated
+values.
+Append
+the
+list
+to
+the
+</ins><a class="tref" title="list_of_nodes_to_label"><ins class="diff-chg">
+list
+of
+nodes
+to
+label
+</ins></a>.</li><li><ins class="diff-chg">
+For
+each
+key-value
+pair
+from
+its
+associated
+</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-chg">
+incoming
+serialization
+map
+</ins></a>,<ins class="diff-chg">
+add
+the
+key
+</ins>
+to
+a
+<ins class="diff-new">list
+and
+then
+sort
+the
+list
+according
+to
+the
+lexicographical
+order
+of
+the
+keys'
+associated
+values.
+Append
+the
+list
+to
+the
+</ins><a class="tref" title="list_of_nodes_to_label"><ins class="diff-new">
+list
+of
+nodes
+to
+label
+</ins></a>.</li></ol></li><li><ins class="diff-new">
+For
+each
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+in
+the
+</ins><a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels"><ins class="diff-new">
+list
+of
+labels
+</ins></a>,<ins class="diff-new">
+relabel
+the
+associated
+</ins>
+node
+<del class="diff-old">beta
+</del>
+<ins class="diff-chg">according
+to
+the
+</ins><a href="#node-relabeling-algorithm"><ins class="diff-chg">
+Node
+Relabeling
+Algorithm
+</ins></a>.<ins class="diff-chg">
+If
+any
+</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-chg">
+outgoing
+serialization
+map
+</ins>
+</a>
+<del class="diff-old">via
+</del>
+<ins class="diff-chg">contains
+</ins>
+a
+<del class="diff-old">property,
+the
+</del>
+key
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">that
+matches
+</ins>
+the
+<del class="diff-old">reverse
+mapping
+is
+</del>
+<a class="tref internalDFN" title="label" href="#dfn-label">
+<ins class="diff-chg">label
+</ins></a>,<ins class="diff-chg">
+clear
+</ins>
+the
+<del class="diff-old">subject
+IRI
+for
+beta
+</del>
+<ins class="diff-chg">map
+</ins>
+and
+<ins class="diff-new">set
+</ins>
+the
+<del class="diff-old">value
+is
+</del>
+<ins class="diff-chg">associated
+</ins><a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization"><ins class="diff-chg">
+outgoing
+serialization
+</ins></a><ins class="diff-chg">
+to
+</ins>
+an
+<del class="diff-old">array
+containing
+at
+least
+</del>
+<ins class="diff-chg">empty
+string.
+If
+any
+</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-chg">
+incoming
+serialization
+map
+</ins></a><ins class="diff-chg">
+contains
+a
+key
+that
+matches
+</ins>
+the
+<del class="diff-old">IRI
+for
+alpha
+.
+</del>
+<a class="tref internalDFN" title="label" href="#dfn-label">
+<ins class="diff-chg">label
+</ins></a>,<ins class="diff-chg">
+clear
+the
+map
+and
+set
+the
+associated
+</ins><a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization"><ins class="diff-chg">
+incoming
+serialization
+</ins></a><ins class="diff-chg">
+to
+an
+empty
+string.
+</ins></li>
+<li>
+<del class="diff-old">Add
+all
+reverse
+mappings
+for
+every
+</del>
+<ins class="diff-chg">Remove
+each
+</ins>
+node
+<del class="diff-old">in
+</del>
+<ins class="diff-chg">with
+a
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+that
+starts
+with
+</ins><code><ins class="diff-chg">
+_:c14n
+</ins></code><ins class="diff-chg">
+from
+</ins>
+the
+<del class="diff-old">graph.
+</del>
+<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
+<ins class="diff-chg">list
+of
+unfinished
+nodes
+</ins></a><ins class="diff-chg">
+and
+add
+it
+to
+the
+</ins><a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1"><ins class="diff-chg">
+list
+of
+finished
+nodes
+</ins></a>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Label
+every
+unlabeled
+node
+according
+to
+</del>
+<ins class="diff-chg">Sort
+</ins>
+the
+<del class="diff-old">Label
+Generation
+Algorithm
+</del>
+<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
+<ins class="diff-chg">list
+of
+finished
+nodes
+</ins>
+</a>
+in
+descending
+order
+<del class="diff-old">using
+</del>
+<ins class="diff-chg">according
+to
+</ins>
+the
+<a href="#deep-comparison-algorithm">
+Deep
+Comparison
+Algorithm
+</a>
+to
+determine
+the
+sort
+order.
+</li>
+</ol>
+</div>
+<div id="shallow-comparison-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.4
+</del>
+<ins class="diff-chg">6.11.6
+</ins>
+</span>
+Shallow
+Comparison
+Algorithm
+</h4>
+<p>
+The
+shallow
+comparison
+algorithm
+takes
+two
+unlabeled
+nodes,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+and
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>,
+as
+input
+and
+determines
+which
+one
+should
+come
+first
+in
+a
+sorted
+list.
+The
+following
+algorithm
+determines
+the
+steps
+that
+are
+executed
+in
+order
+to
+determine
+the
+node
+that
+should
+come
+first
+in
+a
+list:
+</p>
+<ol class="algorithm">
+<li>
+Compare
+the
+total
+number
+of
+node
+properties.
+The
+node
+with
+fewer
+properties
+is
+first.
+</li>
+<li>
+Lexicographically
+sort
+the
+property
+IRIs
+for
+each
+node
+and
+compare
+the
+sorted
+lists.
+If
+an
+IRI
+is
+found
+to
+be
+lexicographically
+smaller,
+the
+node
+containing
+that
+IRI
+is
+first.
+</li>
+<li>
+Compare
+the
+property
+values
+against
+one
+another:
+<ol class="algorithm">
+<li>
+Create
+an
+<dfn title="alpha_list" id="dfn-alpha_list">
+alpha
+list
+</dfn>
+by
+adding
+all
+values
+associated
+with
+the
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+property
+that
+is
+not
+an
+unlabeled
+node.
+Track
+the
+number
+of
+unlabeled
+nodes
+not
+added
+to
+the
+list
+using
+an
+<dfn title="alpha_unlabeled_counter" id="dfn-alpha_unlabeled_counter">
+alpha
+unlabeled
+counter
+</dfn>.
+</li>
+<li>
+Create
+a
+<dfn title="beta_list" id="dfn-beta_list">
+beta
+list
+</dfn>
+by
+adding
+all
+values
+associated
+with
+the
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+property
+that
+is
+not
+an
+unlabeled
+node.
+Track
+the
+number
+of
+unlabeled
+nodes
+not
+added
+to
+the
+list
+using
+an
+<dfn title="beta_unlabeled_counter" id="dfn-beta_unlabeled_counter">
+beta
+unlabeled
+counter
+</dfn>.
+</li>
+<li>
+Compare
+the
+length
+of
+<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
+alpha
+list
+</a>
+and
+<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
+beta
+list
+</a>.
+The
+node
+associated
+with
+the
+list
+containing
+the
+lesser
+number
+of
+items
+is
+first.
+</li>
+<li>
+Compare
+the
+<a class="tref internalDFN" title="alpha_unlabeled_counter" href="#dfn-alpha_unlabeled_counter">
+alpha
+unlabeled
+counter
+</a>
+to
+the
+<a class="tref internalDFN" title="beta_unlabeled_counter" href="#dfn-beta_unlabeled_counter">
+beta
+unlabeled
+counter
+</a>,
+the
+node
+associated
+with
+the
+lesser
+value
+is
+first.
+</li>
+<li>
+Sort
+<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
+alpha
+list
+</a>
+and
+<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
+beta
+list
+</a>
+<del class="diff-old">using
+</del>
+<ins class="diff-chg">according
+to
+</ins>
+the
+<a href="#object-comparison-algorithm">
+Object
+Comparison
+Algorithm
+</a>
+as
+the
+sorting
+comparator.
+For
+each
+offset
+into
+the
+<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
+alpha
+list
+</a>,
+compare
+the
+item
+at
+the
+offset
+against
+the
+item
+at
+the
+same
+offset
+in
+the
+<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
+beta
+list
+</a>
+<del class="diff-old">using
+</del>
+<ins class="diff-chg">according
+to
+</ins>
+the
+<a href="#object-comparison-algorithm">
+Object
+Comparison
+Algorithm
+</a>.
+The
+node
+associated
+with
+the
+lesser
+item
+is
+first.
+</li>
+</ol>
+</li>
+<li>
+Process
+the
+<del class="diff-old">reverse
+mapping
+</del>
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+<ins class="diff-chg">incoming
+list
+</ins>
+</a>
+<ins class="diff-new">s
+associated
+with
+each
+node
+</ins>
+to
+determine
+order:
+<ol class="algorithm">
+<li>
+The
+node
+with
+<del class="diff-old">fewer
+entries
+in
+</del>
+the
+<del class="diff-old">reverse
+mapping
+</del>
+<ins class="diff-chg">shortest
+</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-chg">
+incoming
+list
+</ins>
+</a>
+is
+first.
+</li>
+<li>
+Sort
+the
+<del class="diff-old">reverse
+mapping
+entry
+for
+alpha
+into
+a
+</del>
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+<ins class="diff-chg">incoming
+</ins>
+list
+<del class="diff-old">of
+sorted
+alpha
+mappings
+.
+Sort
+the
+reverse
+mapping
+</del>
+</a>
+<del class="diff-old">entry
+for
+beta
+into
+a
+list
+of
+sorted
+beta
+mappings
+.
+</del>
+<ins class="diff-chg">s
+according
+to
+incoming
+property
+and
+then
+incoming
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>.
+</li>
+<li>
+The
+node
+associated
+with
+the
+<del class="diff-old">list
+of
+sorted
+mappings
+with
+the
+</del>
+least
+number
+of
+<ins class="diff-new">incoming
+</ins>
+unlabeled
+nodes
+is
+first.
+</li>
+<li>
+For
+each
+offset
+into
+the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+<ins class="diff-chg">incoming
+</ins>
+list
+<del class="diff-old">of
+sorted
+alpha
+mappings
+,
+</del>
+</a>
+<ins class="diff-chg">s,
+</ins>
+compare
+the
+<del class="diff-old">IRI
+at
+the
+offset
+against
+the
+IRI
+at
+the
+same
+offset
+in
+</del>
+<ins class="diff-chg">associated
+properties
+and
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s.
+The
+node
+associated
+with
+</ins>
+the
+<del class="diff-old">list
+of
+sorted
+beta
+mappings
+.
+</del>
+<ins class="diff-chg">lexicographically
+lesser
+associated
+property
+is
+first.
+</ins>
+The
+node
+associated
+with
+the
+lexicographically
+lesser
+<del class="diff-old">IRI
+</del>
+<a class="tref internalDFN" title="label" href="#dfn-label">
+<ins class="diff-chg">label
+</ins></a>
+is
+first.
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+the
+nodes
+are
+<del class="diff-old">equal.
+</del>
+<ins class="diff-chg">equivalent.
+</ins>
+</li>
+</ol>
+</div>
+<div id="object-comparison-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.5
+</del>
+<ins class="diff-chg">6.11.7
+</ins>
+</span>
+Object
+Comparison
+Algorithm
+</h4>
+<p>
+The
+object
+comparison
+algorithm
+is
+designed
+to
+compare
+two
+graph
+node
+property
+values,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+and
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>,
+against
+the
+other.
+The
+algorithm
+is
+useful
+when
+sorting
+two
+lists
+of
+graph
+node
+properties.
+</p>
+<ol class="algorithm">
+<li>
+If
+one
+of
+the
+values
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+and
+the
+other
+is
+not,
+the
+value
+that
+is
+a
+string
+is
+first.
+</li>
+<li>
+If
+both
+values
+are
+<del class="diff-old">strings,
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a><ins class="diff-chg">
+s,
+</ins>
+the
+lexicographically
+lesser
+string
+is
+first.
+</li>
+<li>
+If
+one
+of
+the
+values
+is
+a
+literal
+and
+the
+other
+is
+not,
+the
+value
+that
+is
+a
+literal
+is
+first.
+</li>
+<li>
+If
+both
+values
+are
+literals
+<ol class="algorithm">
+<li>
+The
+lexicographically
+lesser
+string
+associated
+with
+<code>
+@literal
+</code>
+is
+first.
+</li>
+<li>
+The
+lexicographically
+lesser
+string
+associated
+with
+<code>
+@datatype
+</code>
+is
+first.
+</li>
+<li>
+The
+lexicographically
+lesser
+string
+associated
+with
+<code>
+@language
+</code>
+is
+first.
+</li>
+</ol>
+</li>
+<li>
+If
+both
+values
+are
+expanded
+IRIs,
+the
+lexicographically
+lesser
+string
+associated
+with
+<code>
+@iri
+</code>
+is
+first.
+</li>
+<li>
+Otherwise,
+the
+two
+values
+are
+equivalent.
+</li>
+</ol>
+</div>
+<div id="deep-comparison-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.6
+</del>
+<ins class="diff-chg">6.11.8
+</ins>
+</span>
+Deep
+Comparison
+Algorithm
+</h4>
+<p>
+<del class="diff-old">DeepCompare(bnodeA,
+bnodeB):
+Return
+</del>
+<ins class="diff-chg">The
+deep
+comparison
+algorithm
+is
+used
+to
+compare
+the
+difference
+between
+two
+nodes,
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a>.<ins class="diff-chg">
+A
+deep
+comparison
+takes
+</ins>
+the
+<ins class="diff-new">incoming
+and
+outgoing
+node
+edges
+in
+a
+graph
+into
+account
+if
+the
+number
+of
+properties
+and
+</ins>
+value
+of
+<del class="diff-old">ShallowCompare
+</del>
+<ins class="diff-chg">those
+properties
+are
+identical.
+The
+algorithm
+is
+helpful
+when
+sorting
+a
+list
+of
+nodes
+and
+will
+return
+whichever
+node
+should
+be
+placed
+first
+in
+a
+list
+</ins>
+if
+<ins class="diff-new">the
+two
+nodes
+are
+not
+truly
+equivalent.
+</ins></p><p><ins class="diff-new">
+When
+performing
+the
+steps
+required
+by
+the
+deep
+comparison
+algorithm,
+</ins>
+it
+is
+<del class="diff-old">non-zero.
+</del>
+<ins class="diff-chg">helpful
+to
+track
+state
+information
+about
+mappings.
+The
+information
+contained
+in
+a
+</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-chg">
+mapping
+state
+</ins></a><ins class="diff-chg">
+is
+described
+below.
+</ins></p><dl class="algorithm"><dt><dfn title="mapping_state" id="dfn-mapping_state"><ins class="diff-chg">
+mapping
+state
+</ins></dfn></dt><dd><dl><dt><dfn title="mapping_counter" id="dfn-mapping_counter"><ins class="diff-chg">
+mapping
+counter
+</ins></dfn></dt><dd><ins class="diff-chg">
+Keeps
+track
+of
+the
+number
+of
+nodes
+that
+have
+been
+mapped
+to
+</ins><a class="tref" title="serialization_labels"><ins class="diff-chg">
+serialization
+labels
+</ins></a>.<ins class="diff-chg">
+It
+is
+initialized
+to
+</ins><code><ins class="diff-chg">
+1
+</ins></code>.</dd><dt><dfn title="processed_labels_map" id="dfn-processed_labels_map"><ins class="diff-chg">
+processed
+labels
+map
+</ins></dfn></dt><dd><ins class="diff-chg">
+Keeps
+track
+of
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+of
+nodes
+that
+have
+already
+been
+assigned
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+s.
+It
+is
+initialized
+to
+an
+empty
+map.
+</ins></dd><dt><dfn title="serialized_labels_map" id="dfn-serialized_labels_map"><ins class="diff-chg">
+serialized
+labels
+map
+</ins></dfn></dt><dd><ins class="diff-chg">
+Maps
+a
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+to
+its
+associated
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a>.<ins class="diff-chg">
+It
+is
+initialized
+to
+an
+empty
+map.
+</ins></dd><dt><dfn title="adjacent_info_map" id="dfn-adjacent_info_map"><ins class="diff-chg">
+adjacent
+info
+map
+</ins></dfn></dt><dd><ins class="diff-chg">
+Maps
+a
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+to
+the
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+associated
+with
+it,
+the
+list
+of
+sorted
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+s
+for
+adjacent
+nodes,
+and
+the
+map
+of
+adjacent
+node
+</ins><a class="tref" title="serialiation_label"><ins class="diff-chg">
+serialiation
+label
+</ins></a><ins class="diff-chg">
+s
+to
+their
+associated
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s.
+It
+is
+initialized
+to
+an
+empty
+map.
+</ins></dd><dt><dfn title="key_stack" id="dfn-key_stack"><ins class="diff-chg">
+key
+stack
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+stack
+where
+each
+element
+contains
+an
+array
+of
+adjacent
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+s
+and
+an
+index
+into
+that
+array.
+It
+is
+initialized
+to
+a
+stack
+containing
+a
+single
+element
+where
+its
+array
+contains
+a
+single
+string
+element
+</ins><code><ins class="diff-chg">
+s1
+</ins></code><ins class="diff-chg">
+and
+its
+index
+is
+set
+to
+</ins><code><ins class="diff-chg">
+0
+</ins></code>.</dd><dt><dfn title="serialized_keys" id="dfn-serialized_keys"><ins class="diff-chg">
+serialized
+keys
+</ins></dfn></dt><dd><ins class="diff-chg">
+Keeps
+track
+of
+which
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+s
+have
+already
+been
+written
+at
+least
+once
+to
+the
+</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
+serialization
+string
+</ins></a>.<ins class="diff-chg">
+It
+is
+initialized
+to
+an
+empty
+map.
+</ins></dd><dt><dfn title="serialization_string" id="dfn-serialization_string"><ins class="diff-chg">
+serialization
+string
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+string
+that
+is
+incrementally
+updated
+as
+a
+serialization
+is
+built.
+It
+is
+initialized
+to
+an
+empty
+string.
+</ins></dd></dl></dd></dl><p><ins class="diff-chg">
+The
+deep
+comparison
+algorithm
+is
+as
+follows:
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Perform
+a
+comparison
+between
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+according
+to
+the
+</ins><a href="#shallow-comparison-algorithm"><ins class="diff-chg">
+Shallow
+Comparison
+Algorithm
+</ins></a>.<ins class="diff-chg">
+If
+the
+result
+does
+not
+show
+that
+the
+two
+nodes
+are
+equivalent,
+return
+the
+result.
+</ins>
+</li>
+<li>
+Compare
+<del class="diff-old">property
+serializations
+</del>
+<ins class="diff-chg">incoming
+</ins>
+and
+<del class="diff-old">then
+reference
+serializations,
+recycling
+the
+mapping
+from
+property
+serializations
+</del>
+<ins class="diff-chg">outgoing
+edges
+</ins>
+for
+<del class="diff-old">reference
+serializations.
+</del>
+<ins class="diff-chg">each
+node,
+updating
+their
+associated
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a><ins class="diff-chg">
+as
+each
+node
+is
+processed:
+</ins>
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+<ins class="diff-new">outgoing
+</ins>
+serialization
+<ins class="diff-new">map
+</ins></a>
+for
+<del class="diff-old">bnodeA
+</del>
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+<ins class="diff-chg">alpha
+</ins></a>
+is
+<del class="diff-old">null,
+do
+SerializeNode(bnodeA,
+</del>
+<ins class="diff-chg">empty,
+generate
+the
+serialization
+according
+to
+the
+</ins><a href="#node-serialization-algorithm"><ins class="diff-chg">
+Node
+Serialization
+Algorithm
+</ins></a>.<ins class="diff-chg">
+Provide
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+'s
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a>,<ins class="diff-chg">
+a
+</ins>
+new
+<del class="diff-old">Mapping).
+</del>
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+<ins class="diff-chg">mapping
+state
+</ins></a>,<code><ins class="diff-chg">
+outgoing
+direction
+</ins></code><ins class="diff-chg">
+to
+the
+algorithm
+as
+inputs.
+</ins>
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+<ins class="diff-new">outgoing
+</ins>
+serialization
+<ins class="diff-new">map
+</ins></a>
+for
+<del class="diff-old">bnodeB
+</del>
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+<ins class="diff-chg">beta
+</ins></a>
+is
+<del class="diff-old">null,
+do
+SerializeNode(bnodeA,
+</del>
+<ins class="diff-chg">empty,
+generate
+the
+serialization
+according
+to
+the
+</ins><a href="#node-serialization-algorithm"><ins class="diff-chg">
+Node
+Serialization
+Algorithm
+</ins></a>.<ins class="diff-chg">
+Provide
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+'s
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a>,<ins class="diff-chg">
+a
+</ins>
+new
+<del class="diff-old">Mapping).
+</del>
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+<ins class="diff-chg">mapping
+state
+</ins></a>,<ins class="diff-chg">
+and
+</ins><code><ins class="diff-chg">
+outgoing
+direction
+</ins></code><ins class="diff-chg">
+to
+the
+algorithm
+as
+inputs.
+</ins>
+</li>
+<li>
+<del class="diff-old">Return
+</del>
+<ins class="diff-chg">If
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+'s
+</ins><a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization"><ins class="diff-chg">
+outgoing
+serialization
+</ins></a><ins class="diff-chg">
+is
+lexicographically
+less
+than
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+'s,
+then
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+is
+first.
+If
+it
+is
+greater,
+then
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+is
+first.
+</ins></li><li><ins class="diff-chg">
+If
+</ins>
+the
+<del class="diff-old">result
+</del>
+<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
+<ins class="diff-chg">incoming
+serialization
+map
+</ins></a><ins class="diff-chg">
+for
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+is
+empty,
+generate
+the
+serialization
+according
+to
+the
+</ins><a href="#node-serialization-algorithm"><ins class="diff-chg">
+Node
+Serialization
+Algorithm
+</ins></a>.<ins class="diff-chg">
+Provide
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+'s
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a>,<ins class="diff-chg">
+a
+new
+</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-chg">
+mapping
+state
+</ins></a><ins class="diff-chg">
+with
+its
+</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
+serialized
+labels
+map
+</ins></a><ins class="diff-chg">
+set
+to
+a
+copy
+</ins>
+of
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+<ins class="diff-new">alpha
+</ins></a><ins class="diff-new">
+'s
+</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-new">
+outgoing
+serialization
+map
+</ins></a>,<ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+incoming
+direction
+</ins></code><ins class="diff-new">
+to
+the
+algorithm
+as
+inputs.
+</ins></li><li><ins class="diff-new">
+If
+the
+</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-new">
+incoming
+serialization
+map
+</ins></a><ins class="diff-new">
+for
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-new">
+beta
+</ins></a><ins class="diff-new">
+is
+empty,
+generate
+the
+serialization
+according
+to
+the
+</ins><a href="#node-serialization-algorithm"><ins class="diff-new">
+Node
+Serialization
+Algorithm
+</ins></a>.<ins class="diff-new">
+Provide
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-new">
+beta
+</ins></a><ins class="diff-new">
+'s
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-new">
+node
+state
+</ins></a>,
+a
+<del class="diff-old">lexicographical
+comparison
+</del>
+<ins class="diff-chg">new
+</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-chg">
+mapping
+state
+</ins></a><ins class="diff-chg">
+with
+its
+</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
+serialized
+labels
+map
+</ins></a><ins class="diff-chg">
+set
+to
+a
+copy
+</ins>
+of
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+<ins class="diff-new">beta
+</ins></a><ins class="diff-new">
+'s
+</ins><a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map"><ins class="diff-new">
+outgoing
+serialization
+map
+</ins></a>,<ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+incoming
+direction
+</ins></code><ins class="diff-new">
+to
+</ins>
+the
+<del class="diff-old">two
+serializations.
+</del>
+<ins class="diff-chg">algorithm
+as
+inputs.
+</ins>
+</li>
+<li>
+<ins class="diff-chg">If
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+'s
+</ins><a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization"><ins class="diff-chg">
+incoming
+serialization
+</ins></a><ins class="diff-chg">
+is
+lexicographically
+less
+than
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+'s,
+then
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+is
+first.
+If
+it
+is
+greater,
+then
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+is
+first.
+</ins>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="node-serialization-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.7
+</del>
+<ins class="diff-chg">6.11.9
+</ins>
+</span>
+Node
+Serialization
+Algorithm
+</h4>
+<p>
+<del class="diff-old">SerializeNode(bnode,
+mapping,
+dir):
+</del>
+<ins class="diff-chg">The
+node
+serialization
+algorithm
+takes
+a
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-chg">
+node
+state
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-chg">
+mapping
+state
+</ins></a>,<ins class="diff-chg">
+and
+a
+</ins><dfn title="direction" id="dfn-direction"><ins class="diff-chg">
+direction
+</ins></dfn><ins class="diff-chg">
+(either
+</ins><code><ins class="diff-chg">
+outgoing
+direction
+</ins></code><ins class="diff-chg">
+or
+</ins><code><ins class="diff-chg">
+incoming
+direction
+</ins></code><ins class="diff-chg">
+)
+as
+inputs
+and
+generates
+a
+deterministic
+serialization
+for
+the
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a>.
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">bnode's
+</del>
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+<del class="diff-old">is
+already
+marked
+</del>
+</a>
+<ins class="diff-chg">exists
+in
+the
+</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
+processed
+labels
+map
+</ins></a>,<ins class="diff-chg">
+terminate
+the
+algorithm
+</ins>
+as
+<del class="diff-old">mapped,
+return.
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+has
+already
+been
+created.
+</ins>
+</li>
+<li>
+<del class="diff-old">Mark
+</del>
+<ins class="diff-chg">Set
+</ins>
+the
+<del class="diff-old">bnode's
+</del>
+<ins class="diff-chg">value
+associated
+with
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label">
+label
+<del class="diff-old">as
+mapped.
+</del>
+</a>
+<ins class="diff-chg">in
+the
+</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
+processed
+labels
+map
+</ins></a><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+true
+</ins></code>.
+</li>
+<li>
+<del class="diff-old">Assign
+</del>
+<ins class="diff-chg">Generate
+</ins>
+the
+next
+<dfn title="serialization_label" id="dfn-serialization_label-1">
+serialization
+<del class="diff-old">name
+</del>
+<ins class="diff-chg">label
+</ins></dfn><ins class="diff-chg">
+for
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+according
+</ins>
+to
+the
+<del class="diff-old">bnode's
+</del>
+<a href="#serialization-label-generation-algorithm">
+<ins class="diff-chg">Serialization
+Label
+Generation
+Algorithm
+</ins></a>.</li><li><ins class="diff-chg">
+Create
+an
+empty
+array
+called
+the
+</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
+list
+of
+unserialized
+labels
+</ins></a>.</li><li><ins class="diff-chg">
+For
+every
+</ins><a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+<ins class="diff-new">in
+a
+list,
+where
+the
+list
+the
+</ins><a class="tref internalDFN" title="outgoing_list" href="#dfn-outgoing_list"><ins class="diff-new">
+outgoing
+list
+</ins></a><ins class="diff-new">
+if
+the
+</ins><a class="tref internalDFN" title="direction" href="#dfn-direction"><ins class="diff-new">
+direction
+</ins></a><ins class="diff-new">
+is
+</ins><code><ins class="diff-new">
+outgoing
+direction
+</ins></code>
+and
+<del class="diff-old">store
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list"><ins class="diff-chg">
+incoming
+list
+</ins></a><ins class="diff-chg">
+otherwise,
+if
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+starts
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code>,
+it
+<del class="diff-old">in
+"top".
+</del>
+<ins class="diff-chg">is
+the
+</ins><dfn title="target_node_label" id="dfn-target_node_label"><ins class="diff-chg">
+target
+node
+label
+</ins></dfn>:<ol class="algorithm">
+<li>
+<del class="diff-old">Split
+</del>
+<ins class="diff-chg">Look
+up
+</ins>
+the
+<del class="diff-old">bnode's
+adjacent
+bnodes
+into
+a
+</del>
+<a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">
+<ins class="diff-chg">target
+node
+label
+</ins></a><ins class="diff-chg">
+in
+the
+</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
+processed
+labels
+</ins>
+map
+</a>
+and
+<ins class="diff-new">if
+</ins>
+a
+<del class="diff-old">list.
+The
+map
+contains
+a
+reverse
+</del>
+mapping
+<del class="diff-old">of
+serialization
+names
+to
+bnode
+labels
+for
+all
+</del>
+<ins class="diff-chg">exists,
+update
+the
+</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
+serialized
+</ins>
+labels
+<ins class="diff-new">map
+</ins></a><ins class="diff-new">
+where
+the
+key
+is
+the
+value
+</ins>
+in
+the
+<del class="diff-old">mapping,
+</del>
+<a class="tref" title="serialization_map">
+<ins class="diff-chg">serialization
+map
+</ins></a><ins class="diff-chg">
+and
+the
+value
+is
+the
+</ins><a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label"><ins class="diff-chg">
+target
+node
+label
+</ins></a>.</li><li><ins class="diff-chg">
+Otherwise,
+add
+the
+</ins><a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label"><ins class="diff-chg">
+target
+node
+label
+</ins></a><ins class="diff-chg">
+to
+</ins>
+the
+<a class="tref" title="list_of_unserialized_labels">
+list
+<del class="diff-old">(notMapped)
+contains
+all
+</del>
+<ins class="diff-chg">of
+unserialized
+</ins>
+labels
+<del class="diff-old">not
+in
+the
+mapping
+yet.
+</del>
+</a>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Save
+a
+copy
+</del>
+<ins class="diff-chg">Set
+the
+</ins><dfn title="maximum_serialization_combinations" id="dfn-maximum_serialization_combinations"><ins class="diff-chg">
+maximum
+serialization
+combinations
+</ins></dfn><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+1
+</ins></code><ins class="diff-chg">
+or
+the
+length
+</ins>
+of
+the
+<del class="diff-old">mapping.
+</del>
+<a class="tref" title="list_of_unserialized_labels">
+<ins class="diff-chg">list
+of
+unserialized
+labels
+</ins></a>,<ins class="diff-chg">
+whichever
+is
+greater.
+</ins>
+</li>
+<li>
+<del class="diff-old">Do
+SerializeCombos
+for
+max(1,
+notMapped.length)
+using
+</del>
+<ins class="diff-chg">While
+</ins>
+the
+<del class="diff-old">original
+mapping
+for
+</del>
+<a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">
+<ins class="diff-chg">maximum
+serialization
+combinations
+</ins></a><ins class="diff-chg">
+is
+greater
+than
+</ins><code><ins class="diff-chg">
+0
+</ins></code>,<ins class="diff-chg">
+perform
+</ins>
+the
+<del class="diff-old">first
+call
+</del>
+<a href="#combinatorial-serialization-algorithm">
+<ins class="diff-chg">Combinatorial
+Serialization
+Algorithm
+</ins></a><ins class="diff-chg">
+and
+decrement
+the
+</ins><a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations"><ins class="diff-chg">
+maximum
+serialization
+combinations
+</ins></a><ins class="diff-chg">
+by
+</ins><code><ins class="diff-chg">
+1
+</ins></code><ins class="diff-chg">
+for
+each
+iteration.
+</ins></li></ol></div><div id="serialization-label-generation-algorithm" class="section"><h4><span class="secno"><ins class="diff-chg">
+6.11.10
+</ins></span><ins class="diff-chg">
+Serialization
+Label
+Generation
+Algorithm
+</ins></h4><p><ins class="diff-chg">
+The
+algorithm
+generates
+a
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+given
+a
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>
+and
+a
+<del class="diff-old">copy
+</del>
+<a class="tref" title="mapping_count">
+<ins class="diff-chg">mapping
+count
+</ins></a>.</p><li><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+starts
+with
+the
+string
+</ins><code><ins class="diff-chg">
+_:c14n
+</ins></code>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+is
+the
+letter
+</ins><code><ins class="diff-chg">
+c
+</ins></code><ins class="diff-chg">
+followed
+by
+the
+number
+that
+follows
+</ins><code><ins class="diff-chg">
+_:c14n
+</ins></code><ins class="diff-chg">
+in
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>.</li><li><ins class="diff-chg">
+Otherwise,
+the
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+is
+the
+letter
+</ins><code><ins class="diff-chg">
+s
+</ins></code><ins class="diff-chg">
+followed
+by
+the
+string
+value
+</ins>
+of
+<a class="tref" title="mapping_count">
+<ins class="diff-new">mapping
+count
+</ins></a>.<ins class="diff-new">
+Increment
+</ins>
+the
+<a class="tref" title="mapping_count">
+mapping
+<del class="diff-old">for
+each
+subsequent
+call.
+</del>
+<ins class="diff-chg">count
+</ins></a><ins class="diff-chg">
+by
+</ins><code><ins class="diff-chg">
+1
+</ins></code><ins class="diff-chg">
+ensuring
+that
+the
+value
+persists
+across
+multiple
+invocations
+of
+this
+algorithm.
+</ins>
+</li>
+</ol>
+</li>
+</div>
+<div id="combinatorial-serialization-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.8
+</del>
+<ins class="diff-chg">6.11.11
+</ins>
+</span>
+Combinatorial
+Serialization
+Algorithm
+</h4>
+<p>
+<del class="diff-old">SerializeCombos(top,
+mapping,
+mapped,
+notMapped,
+dir):
+</del>
+<ins class="diff-chg">SerializeCombos()
+takes
+a
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref" title="serialization_map"><ins class="diff-chg">
+serialization
+map
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
+processed
+labels
+map
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref" title="serialization_map"><ins class="diff-chg">
+serialization
+map
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
+serialized
+labels
+map
+</ins></a>,<ins class="diff-chg">
+and
+a
+</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
+list
+of
+unserialized
+labels
+</ins></a><ins class="diff-chg">
+as
+inputs
+and
+generates
+deterministic
+serializations
+for
+all
+possible
+combinations
+of
+graphs.
+</ins>
+</p>
+<ol class="algorithm">
+<li>
+If
+<del class="diff-old">notMapped
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
+list
+of
+unserialized
+labels
+</ins></a>
+is
+<del class="diff-old">non-empty,
+copy
+mapped
+and
+assign
+</del>
+<ins class="diff-chg">not
+empty:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Copy
+</ins>
+the
+<del class="diff-old">next
+</del>
+<a class="tref" title="serialization_map">
+serialization
+<del class="diff-old">name
+</del>
+<ins class="diff-chg">map
+</ins></a>
+to
+<del class="diff-old">its
+</del>
+<ins class="diff-chg">the
+</ins><dfn title="serialization_map_copy" id="dfn-serialization_map_copy"><ins class="diff-chg">
+serialization
+map
+copy
+</ins></dfn>.</li><li><ins class="diff-chg">
+Remove
+the
+</ins>
+first
+<del class="diff-old">bnode,
+remove
+it
+</del>
+<a class="tref" title="unserialized_label">
+<ins class="diff-chg">unserialized
+label
+</ins></a>
+from
+the
+<del class="diff-old">list,
+</del>
+<a class="tref" title="list_of_unserialized_labels">
+<ins class="diff-chg">list
+of
+unserialized
+labels
+</ins></a>
+and
+<del class="diff-old">update
+mapped.
+For
+max(1,
+notMapped.length)
+recurse
+into
+SerializeCombos
+with
+</del>
+<ins class="diff-chg">create
+a
+new
+</ins><dfn title="new_serialization_label" id="dfn-new_serialization_label"><ins class="diff-chg">
+new
+serialization
+label
+</ins></dfn><ins class="diff-chg">
+according
+to
+</ins>
+the
+<del class="diff-old">original
+</del>
+<a href="#serialization-label-generation-algorithm">
+<ins class="diff-chg">Serialization
+Label
+Generation
+Algorithm
+</ins></a><ins class="diff-chg">
+passing
+the
+</ins><a class="tref" title="unserialized_label"><ins class="diff-chg">
+unserialized
+label
+</ins></a><ins class="diff-chg">
+and
+the
+</ins><a class="tref internalDFN" title="mapping_counter" href="#dfn-mapping_counter">
+mapping
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">counter
+</ins></a><ins class="diff-chg">
+as
+parameters.
+</ins></li><li><ins class="diff-chg">
+Create
+a
+new
+key-value
+mapping
+in
+the
+</ins><a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy"><ins class="diff-chg">
+serialization
+map
+copy
+</ins></a><ins class="diff-chg">
+where
+the
+key
+is
+the
+</ins><a class="tref internalDFN" title="new_serialization_label" href="#dfn-new_serialization_label"><ins class="diff-chg">
+new
+serialization
+label
+</ins></a><ins class="diff-chg">
+and
+the
+value
+is
+the
+</ins><a class="tref" title="unserialized_label"><ins class="diff-chg">
+unserialized
+label
+</ins></a>.</li><li><ins class="diff-chg">
+Set
+the
+</ins><dfn title="maximum_serialization_rotations" id="dfn-maximum_serialization_rotations"><ins class="diff-chg">
+maximum
+serialization
+rotations
+</ins></dfn><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+1
+</ins></code><ins class="diff-chg">
+or
+the
+length
+of
+the
+</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
+list
+of
+unserialized
+labels
+</ins></a>,<ins class="diff-chg">
+whichever
+is
+greater.
+</ins></li><li><ins class="diff-chg">
+While
+the
+</ins><a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations"><ins class="diff-chg">
+maximum
+serialization
+rotations
+</ins></a><ins class="diff-chg">
+is
+greater
+than
+</ins><code><ins class="diff-chg">
+0
+</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+this
+is
+</ins>
+the
+first
+<del class="diff-old">call
+</del>
+<ins class="diff-chg">iteration
+in
+the
+loop,
+perform
+the
+</ins><a href="#combinatorial-serialization-algorithm"><ins class="diff-chg">
+Combinatorial
+Serialization
+Algorithm
+</ins></a><ins class="diff-chg">
+passing
+in
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy"><ins class="diff-chg">
+serialization
+map
+copy
+</ins></a>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map"><ins class="diff-chg">
+processed
+labels
+map
+</ins></a>,<a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
+serialized
+labels
+map
+</ins></a>,
+and
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
+list
+of
+unserialized
+labels
+</ins></a>.</li><li><ins class="diff-chg">
+If
+this
+is
+not
+the
+first
+iteration
+in
+the
+loop,
+perform
+the
+</ins><a href="#combinatorial-serialization-algorithm"><ins class="diff-chg">
+Combinatorial
+Serialization
+Algorithm
+</ins></a><ins class="diff-chg">
+passing
+in
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy"><ins class="diff-chg">
+serialization
+map
+</ins>
+copy
+</a>,
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-new">
+serialization
+label
+</ins></a>,<ins class="diff-new">
+and
+temporary
+copies
+</ins>
+of
+the
+<del class="diff-old">mapping
+</del>
+<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">
+<ins class="diff-chg">processed
+labels
+map
+</ins></a>,<a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
+serialized
+labels
+map
+</ins></a>,<ins class="diff-chg">
+and
+the
+</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
+list
+of
+unserialized
+labels
+</ins></a>.</li><li><ins class="diff-chg">
+Decrement
+the
+</ins><a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations"><ins class="diff-chg">
+maximum
+serialization
+rotations
+</ins></a><ins class="diff-chg">
+by
+</ins><code><ins class="diff-chg">
+1
+</ins></code>
+for
+each
+<del class="diff-old">subsequent
+call.
+Rotate
+notMapped
+on
+each
+</del>
+iteration.
+</li>
+</ol>
+</li>
+<li>
+If
+<del class="diff-old">notMapped
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref" title="list_of_unserialized_labels"><ins class="diff-chg">
+list
+of
+unserialized
+labels
+</ins></a>
+is
+<del class="diff-old">empty,
+save
+</del>
+<ins class="diff-chg">empty:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+???Save
+</ins>
+an
+entry
+mapping
+from
+the
+bnode's
+serialization
+name
+to
+the
+reverse
+mapping
+(mapped)
+and
+its
+sorted
+keys
+then
+do
+<del class="diff-old">SerializeMapping.
+</del>
+<ins class="diff-chg">SerializeMapping:
+</ins>
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">???If
+</ins>
+the
+serialization
+is
+lexicographically
+less
+than
+the
+current
+serialization
+or
+the
+current
+serialization
+is
+null,
+then
+iterate
+over
+the
+sorted
+keys,
+get
+the
+reverse-mapped
+adjacent
+bnode
+and
+recursively
+call
+SerializeNode
+on
+each
+iteration.
+</li>
+<li>
+<del class="diff-old">Do
+</del>
+<ins class="diff-chg">???Do
+</ins>
+SerializeMapping
+then
+if
+the
+serialization
+is
+lexicographically
+less
+than
+the
+current
+serialization
+or
+the
+current
+serialization
+is
+null,
+then
+set
+it
+as
+the
+least
+serialization
+for
+the
+bnode
+in
+the
+given
+edge
+direction
+('property'
+or
+'reference').
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="mapping-serialization-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.11.9
+</del>
+<ins class="diff-chg">6.11.12
+</ins>
+</span>
+Mapping
+Serialization
+Algorithm
+</h4>
+<p>
+<a class="tref" title="map_of_all_labels">
+<ins class="diff-new">map
+of
+all
+labels
+</ins></a>,<a class="tref" title="map_of_all_properties"><ins class="diff-new">
+map
+of
+all
+properties
+</ins></a>,<dfn title="key_stack" id="dfn-key_stack-1"><ins class="diff-new">
+key
+stack
+</ins></dfn>,<dfn title="serialization_string_" id="dfn-serialization_string_"><ins class="diff-new">
+serialization
+string
+</ins></dfn></p><p>
+SerializeMapping(mapping):
+(This
+function
+incrementally
+updates
+the
+relation
+serialization
+for
+a
+mapping)
+</p>
+<ol class="algorithm">
+<li>
+If
+<del class="diff-old">there
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref" title="serialization_keys_stack"><ins class="diff-chg">
+serialization
+keys
+stack
+</ins></a>
+is
+<del class="diff-old">an
+entry
+on
+</del>
+<ins class="diff-chg">not
+empty
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Pop
+</ins>
+the
+<del class="diff-old">mapping's
+key
+stack,
+pop
+it
+and
+iterate
+over
+every
+key.
+</del>
+<dfn title="list_of_serialization_keys" id="dfn-list_of_serialization_keys">
+<ins class="diff-chg">list
+of
+serialization
+keys
+</ins></dfn><ins class="diff-chg">
+off
+of
+the
+</ins><a class="tref" title="serialization_keys_stack"><ins class="diff-chg">
+serialization
+keys
+stack
+</ins></a>.
+</li>
+<li>
+For
+each
+<del class="diff-old">key,
+if
+an
+entry
+for
+the
+</del>
+<dfn title="serialization_key" id="dfn-serialization_key">
+<ins class="diff-chg">serialization
+</ins>
+key
+<del class="diff-old">hasn't
+been
+added
+to
+</del>
+</dfn>
+<ins class="diff-chg">in
+</ins>
+the
+<del class="diff-old">mapping
+yet,
+break
+out
+</del>
+<a class="tref internalDFN" title="list_of_serialization_keys" href="#dfn-list_of_serialization_keys">
+<ins class="diff-chg">list
+</ins>
+of
+<del class="diff-old">the
+loop.
+</del>
+<ins class="diff-chg">serialization
+keys
+</ins></a>:<ol class="algorithm">
+<li>
+<del class="diff-old">Update
+</del>
+<ins class="diff-chg">If
+</ins>
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+<ins class="diff-new">serialization
+</ins>
+key
+</a>
+<ins class="diff-new">is
+not
+in
+the
+???list
+of
+adjacent
+nodes???,
+push
+the
+</ins><a class="tref internalDFN" title="list_of_serialization_keys" href="#dfn-list_of_serialization_keys"><ins class="diff-new">
+list
+of
+serialization
+keys
+</ins></a><ins class="diff-new">
+onto
+the
+</ins><a class="tref" title="serialization_keys_stack"><ins class="diff-new">
+serialization
+keys
+</ins>
+stack
+<del class="diff-old">entry's
+index.
+</del>
+</a>
+<ins class="diff-chg">and
+exit
+from
+this
+loop.
+</ins>
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+<ins class="diff-new">serialization
+</ins>
+key
+</a>
+<ins class="diff-new">is
+a
+key
+in
+the
+</ins><a class="tref" title="completed_serialization_key_map"><ins class="diff-new">
+completed
+serialization
+key
+map
+</ins></a>,<ins class="diff-new">
+a
+cycle
+</ins>
+has
+<del class="diff-old">already
+</del>
+been
+<del class="diff-old">serialized,
+output
+"'_'
++
+key"
+</del>
+<ins class="diff-chg">detected.
+Append
+the
+concatenation
+of
+the
+</ins><code><ins class="diff-chg">
+_
+</ins></code><ins class="diff-chg">
+character
+</ins>
+and
+<del class="diff-old">continue.
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-chg">
+serialization
+key
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
+serialization
+string
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">For
+each
+key,
+</del>
+<ins class="diff-chg">Otherwise,
+</ins>
+serialize
+<ins class="diff-new">all
+outgoing
+and
+incoming
+edges
+in
+the
+graph
+by
+performing
+</ins>
+the
+<ins class="diff-new">following
+steps:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+Mark
+the
+</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-new">
+serialization
+</ins>
+key
+<del class="diff-old">then
+its
+associated
+bnode
+properties,
+then
+its
+bnode
+references.
+The
+entire
+property
+list
+is
+surrounded
+</del>
+</a>
+<ins class="diff-chg">as
+being
+processed
+</ins>
+by
+<del class="diff-old">'['
+and
+']'
+</del>
+<ins class="diff-chg">adding
+a
+new
+key-value
+pair
+to
+the
+</ins><a class="tref" title="completed_serialization_key_map"><ins class="diff-chg">
+completed
+serialization
+key
+map
+</ins></a><ins class="diff-chg">
+where
+the
+key
+is
+the
+</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-chg">
+serialization
+key
+</ins></a>
+and
+<del class="diff-old">so
+</del>
+<ins class="diff-chg">the
+value
+</ins>
+is
+<code>
+<ins class="diff-new">true
+</ins></code>.</li><li><ins class="diff-new">
+Set
+</ins>
+the
+<del class="diff-old">reference
+list.
+Individual
+properties/references
+are
+seperated
+</del>
+<a class="tref" title="serialization_fragment">
+<ins class="diff-chg">serialization
+fragment
+</ins></a><ins class="diff-chg">
+to
+the
+value
+of
+the
+</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-chg">
+serialization
+key
+</ins></a>.</li><li><ins class="diff-chg">
+Set
+the
+</ins><a class="tref" title="list_of_adjacent_node_keys"><ins class="diff-chg">
+list
+of
+adjacent
+node
+keys
+</ins></a>
+by
+<del class="diff-old">'|'.
+</del>
+<ins class="diff-chg">using
+the
+</ins><a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key"><ins class="diff-chg">
+serialization
+key
+</ins></a><ins class="diff-chg">
+to
+look
+up
+the
+list
+in
+the
+</ins><a class="tref" title="adjacent_node_keys_map"><ins class="diff-chg">
+adjacent
+node
+keys
+map
+</ins></a>.</li><li><ins class="diff-chg">
+Set
+the
+</ins><a class="tref" title="adjacent_node_label"><ins class="diff-chg">
+adjacent
+node
+label
+</ins></a><ins class="diff-chg">
+???somehow???.
+</ins></li><li>
+If
+a
+<ins class="diff-new">mapping
+for
+the
+</ins><a class="tref" title="adjacent_node_label"><ins class="diff-new">
+adjacent
+node
+label
+</ins></a><ins class="diff-new">
+exists
+in
+the
+</ins><a class="tref" title="map_of_all_labels"><ins class="diff-new">
+map
+of
+all
+labels
+</ins></a>:<ol class="algorithm"><li><ins class="diff-new">
+Append
+the
+result
+of
+the
+</ins><a href=""><ins class="diff-new">
+Label
+Serialization
+Algorithm
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref" title="serialization_fragment"><ins class="diff-new">
+serialization
+fragment
+</ins></a>.</li></ol></li></ol></li></ol></li></ol></li></ol></div><div id="label-serialization-algorithm" class="section"><h4><span class="secno"><ins class="diff-new">
+6.11.13
+</ins></span><ins class="diff-new">
+Label
+Serialization
+Algorithm
+</ins></h4><p><a class="tref" title="map_of_properties"><ins class="diff-new">
+map
+of
+properties
+</ins></a>,<dfn title="label_serialization" id="dfn-label_serialization"><ins class="diff-new">
+label
+serialization
+</ins></dfn>,<a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a>,<a class="tref" title="incoming_map"><ins class="diff-new">
+incoming
+map
+</ins></a>,<dfn title="adjacent_node_labels" id="dfn-adjacent_node_labels"><ins class="diff-new">
+adjacent
+node
+labels
+</ins></dfn>,<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack-1"><ins class="diff-new">
+key
+stack
+</ins></a>.</p><ol class="algorithm"><li><ins class="diff-new">
+Initialize
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
+label
+serialization
+</ins></a><ins class="diff-new">
+to
+an
+empty
+string.
+</ins></li><li><ins class="diff-new">
+Append
+the
+</ins><code><ins class="diff-new">
+[
+</ins></code><ins class="diff-new">
+character
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
+label
+serialization
+</ins></a>.</li><li><ins class="diff-new">
+Append
+all
+properties
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
+label
+serialization
+</ins></a><ins class="diff-new">
+by
+processing
+each
+key-value
+pair
+in
+the
+</ins><a class="tref" title="map_of_properties"><ins class="diff-new">
+map
+of
+properties
+</ins></a>,<ins class="diff-new">
+excluding
+the
+</ins><code><ins class="diff-new">
+@subject
+</ins></code>
+property
+<ins class="diff-new">???do
+the
+map
+keys
+need
+to
+be
+sorted???:
+</ins><ol class="algorithm"><li><ins class="diff-new">
+Build
+a
+string
+using
+the
+pattern
+</ins><code><</code><strong><ins class="diff-new">
+KEY
+</ins></strong><code><ins class="diff-new">
+>
+</ins></code><ins class="diff-new">
+where
+</ins><strong><ins class="diff-new">
+KEY
+</ins></strong>
+is
+<ins class="diff-new">the
+current
+key.
+Append
+string
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
+label
+serialization
+</ins></a>.</li><li><ins class="diff-new">
+The
+value
+may
+be
+a
+single
+object
+or
+</ins>
+an
+<del class="diff-old">array,
+</del>
+<ins class="diff-chg">array
+of
+objects.
+Process
+</ins>
+all
+of
+the
+<del class="diff-old">serializations
+</del>
+<ins class="diff-chg">objects
+that
+</ins>
+are
+<del class="diff-old">concatenated
+together
+</del>
+<ins class="diff-chg">associated
+</ins>
+with
+<del class="diff-old">no
+joining
+delimiter.
+The
+'@subject'
+property
+is
+skipped.
+The
+property
+</del>
+<ins class="diff-chg">the
+key,
+building
+an
+</ins><dfn title="object_string" id="dfn-object_string"><ins class="diff-chg">
+object
+string
+</ins></dfn><ins class="diff-chg">
+for
+each
+item:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+object
+contains
+an
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code><ins class="diff-chg">
+key
+with
+a
+value
+that
+starts
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code>,<ins class="diff-chg">
+set
+the
+</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string"><ins class="diff-chg">
+object
+string
+</ins></a><ins class="diff-chg">
+to
+the
+value
+</ins><code><ins class="diff-chg">
+_:
+</ins></code>.<ins class="diff-chg">
+If
+the
+value
+does
+not
+start
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code>,<ins class="diff-chg">
+build
+the
+</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string"><ins class="diff-chg">
+object
+string
+</ins></a><ins class="diff-chg">
+using
+the
+pattern
+</ins><code><</code><strong>
+IRI
+</strong>
+<code>
+<ins class="diff-new">>
+</ins></code><ins class="diff-new">
+where
+</ins><strong><ins class="diff-new">
+IRI
+</ins></strong>
+is
+<del class="diff-old">turtle-serialized.
+</del>
+<ins class="diff-chg">the
+value
+associated
+with
+the
+</ins><code><ins class="diff-chg">
+@iri
+</ins></code><ins class="diff-chg">
+key.
+</ins></li><li>
+If
+<ins class="diff-new">the
+object
+contains
+</ins>
+a
+<del class="diff-old">property
+or
+reference
+</del>
+<code>
+<ins class="diff-chg">@literal
+</ins></code><ins class="diff-chg">
+key
+and
+a
+</ins><code><ins class="diff-chg">
+@datatype
+</ins></code><ins class="diff-chg">
+key,
+build
+the
+</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string">
+object
+<ins class="diff-new">string
+</ins></a><ins class="diff-new">
+using
+the
+pattern
+</ins><code><ins class="diff-new">
+"
+</ins></code><strong><ins class="diff-new">
+LITERAL
+</ins></strong><code><ins class="diff-new">
+"^^
+</ins><</code><strong><ins class="diff-new">
+DATATYPE
+</ins></strong><code><ins class="diff-new">
+>
+</ins></code><ins class="diff-new">
+where
+</ins><strong><ins class="diff-new">
+LITERAL
+</ins></strong>
+is
+<ins class="diff-new">the
+value
+associated
+with
+the
+</ins><code><ins class="diff-new">
+@literal
+</ins></code><ins class="diff-new">
+key
+and
+</ins><strong><ins class="diff-new">
+DATATYPE
+</ins></strong><ins class="diff-new">
+is
+the
+value
+associated
+with
+the
+</ins><code><ins class="diff-new">
+@datatype
+</ins></code><ins class="diff-new">
+key.
+</ins></li><li><ins class="diff-new">
+If
+the
+object
+contains
+</ins>
+a
+<del class="diff-old">bnode,
+it
+</del>
+<code>
+<ins class="diff-chg">@literal
+</ins></code><ins class="diff-chg">
+key
+and
+a
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+key,
+build
+the
+</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string"><ins class="diff-chg">
+object
+string
+</ins></a><ins class="diff-chg">
+using
+the
+pattern
+</ins><code><ins class="diff-chg">
+"
+</ins></code><strong><ins class="diff-chg">
+LITERAL
+</ins></strong><code><ins class="diff-chg">
+"@
+</ins></code><strong><ins class="diff-chg">
+LANGUAGE
+</ins></strong><ins class="diff-chg">
+where
+</ins><strong><ins class="diff-chg">
+LITERAL
+</ins></strong>
+is
+<del class="diff-old">serialized
+to
+'_:',
+otherwise
+</del>
+the
+<del class="diff-old">turtle
+serialization
+</del>
+<ins class="diff-chg">value
+associated
+with
+the
+</ins><code><ins class="diff-chg">
+@literal
+</ins></code><ins class="diff-chg">
+key
+and
+</ins><strong><ins class="diff-chg">
+LANGUAGE
+</ins></strong>
+is
+<del class="diff-old">used.
+</del>
+<ins class="diff-chg">the
+value
+associated
+with
+the
+</ins><code><ins class="diff-chg">
+@language
+</ins></code><ins class="diff-chg">
+key.
+</ins>
+</li>
+<li>
+<del class="diff-old">Join
+all
+of
+</del>
+<ins class="diff-chg">Otherwise,
+</ins>
+the
+<del class="diff-old">adjacent
+keys
+and
+add
+them
+to
+</del>
+<ins class="diff-chg">value
+is
+a
+string.
+Build
+</ins>
+the
+<del class="diff-old">serialization.
+</del>
+<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
+<ins class="diff-chg">object
+string
+</ins></a><ins class="diff-chg">
+using
+the
+pattern
+</ins><code><ins class="diff-chg">
+"
+</ins></code><strong><ins class="diff-chg">
+LITERAL
+</ins></strong><code><ins class="diff-chg">
+"
+</ins></code><ins class="diff-chg">
+where
+</ins><strong><ins class="diff-chg">
+LITERAL
+</ins></strong><ins class="diff-chg">
+is
+the
+value
+associated
+with
+the
+current
+key.
+</ins>
+</li>
+<li>
+<del class="diff-old">Push
+</del>
+<ins class="diff-chg">If
+this
+is
+</ins>
+the
+<del class="diff-old">adjacent
+keys
+onto
+</del>
+<ins class="diff-chg">second
+iteration
+of
+</ins>
+the
+<del class="diff-old">key
+stack.
+</del>
+<ins class="diff-chg">loop,
+append
+a
+</ins><code><ins class="diff-chg">
+|
+</ins></code><ins class="diff-chg">
+separator
+character
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Do
+SerializeMapping.
+</del>
+<ins class="diff-chg">Append
+the
+</ins><a class="tref internalDFN" title="object_string" href="#dfn-object_string"><ins class="diff-chg">
+object
+string
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a>.
+</li>
+</ol>
+</li>
+<del class="diff-old">5.11.10
+Label
+Generation
+Algorithm
+NameNode(bnode):
+</del>
+</ol>
+</li>
+<li>
+<del class="diff-old">Remove
+</del>
+<ins class="diff-chg">Append
+</ins>
+the
+<del class="diff-old">first
+blank
+node
+from
+</del>
+<code>
+<ins class="diff-chg">]
+</ins></code><ins class="diff-chg">
+character
+to
+</ins>
+the
+<del class="diff-old">list
+of
+sorted
+blank
+nodes.
+</del>
+<a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">
+<ins class="diff-chg">label
+serialization
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Give
+it
+</del>
+<ins class="diff-chg">Append
+</ins>
+the
+<del class="diff-old">next
+canonical
+name.
+</del>
+<code>
+<ins class="diff-chg">[
+</ins></code><ins class="diff-chg">
+character
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Give
+canonical
+names
+</del>
+<ins class="diff-chg">Append
+all
+incoming
+references
+for
+the
+current
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>
+to
+<del class="diff-old">each
+blank
+node
+key
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a><ins class="diff-chg">
+by
+processing
+all
+of
+the
+items
+associated
+with
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>
+in
+<del class="diff-old">its
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref" title="incoming_map"><ins class="diff-chg">
+incoming
+map
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+Build
+a
+</ins><dfn title="reference_string" id="dfn-reference_string"><ins class="diff-chg">
+reference
+string
+</ins></dfn><ins class="diff-chg">
+using
+the
+pattern
+</ins><code><</code><strong><ins class="diff-chg">
+PROPERTY
+</ins></strong><code><ins class="diff-chg">
+>
+</ins></code><code><</code><strong><ins class="diff-chg">
+REFERER
+</ins></strong><code><ins class="diff-chg">
+>
+</ins></code><ins class="diff-chg">
+where
+</ins><strong><ins class="diff-chg">
+PROPERTY
+</ins></strong><ins class="diff-chg">
+is
+the
+</ins>
+property
+<del class="diff-old">serialization
+mapping
+</del>
+<ins class="diff-chg">associated
+with
+the
+incoming
+reference
+and
+</ins><strong><ins class="diff-chg">
+REFERER
+</ins></strong><ins class="diff-chg">
+is
+either
+the
+subject
+of
+the
+node
+referring
+to
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a>
+in
+<del class="diff-old">lexicographical
+order.
+</del>
+<ins class="diff-chg">the
+incoming
+reference
+or
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+if
+</ins><strong><ins class="diff-chg">
+REFERER
+</ins></strong><ins class="diff-chg">
+begins
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code>.
+</li>
+<li>
+<del class="diff-old">Give
+canonical
+names
+</del>
+<ins class="diff-chg">If
+this
+is
+the
+second
+iteration
+of
+the
+loop,
+append
+a
+</ins><code><ins class="diff-chg">
+|
+</ins></code><ins class="diff-chg">
+separator
+character
+</ins>
+to
+<del class="diff-old">each
+blank
+node
+key
+in
+its
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a>.</li><li><ins class="diff-chg">
+Append
+the
+</ins><a class="tref internalDFN" title="reference_string" href="#dfn-reference_string">
+reference
+<ins class="diff-new">string
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-new">
+label
+</ins>
+serialization
+<del class="diff-old">mapping
+in
+lexicographical
+order.
+</del>
+</a>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Set
+</del>
+<ins class="diff-chg">Append
+the
+</ins><code><ins class="diff-chg">
+]
+</ins></code><ins class="diff-chg">
+character
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a>.</li><li><ins class="diff-chg">
+Append
+</ins>
+all
+<del class="diff-old">serializations
+containing
+newly-named
+blank
+nodes
+</del>
+<a class="tref internalDFN" title="adjacent_node_labels" href="#dfn-adjacent_node_labels">
+<ins class="diff-chg">adjacent
+node
+labels
+</ins></a>
+to
+<del class="diff-old">null.
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a><ins class="diff-chg">
+by
+concatenating
+the
+string
+value
+for
+all
+of
+them,
+one
+after
+the
+other,
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a>.</li><li><ins class="diff-chg">
+Push
+the
+</ins><a class="tref internalDFN" title="adjacent_node_labels" href="#dfn-adjacent_node_labels"><ins class="diff-chg">
+adjacent
+node
+labels
+</ins></a><ins class="diff-chg">
+onto
+the
+</ins><a class="tref internalDFN" title="key_stack" href="#dfn-key_stack-1"><ins class="diff-chg">
+key
+stack
+</ins></a><ins class="diff-chg">
+and
+append
+the
+result
+of
+the
+</ins><a href="#mapping-serialization-algorithm"><ins class="diff-chg">
+Mapping
+Serialization
+Algorithm
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization"><ins class="diff-chg">
+label
+serialization
+</ins></a>.
+</li>
+</ol>
+</div>
+</div>
+<div id="data-round-tripping" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.12
+</del>
+<ins class="diff-chg">6.12
+</ins>
+</span>
+Data
+Round
+Tripping
+</h3>
+<p>
+When
+normalizing
+<strong>
+xsd:double
+</strong>
+values,
+implementers
+<em class="rfc2119" title="must">
+must
+</em>
+ensure
+that
+the
+normalized
+value
+is
+a
+string.
+In
+order
+to
+generate
+the
+string
+from
+a
+<strong>
+double
+</strong>
+value,
+output
+equivalent
+to
+the
+<code>
+printf("%1.6e",
+value)
+</code>
+function
+in
+C
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+<strong>
+"%1.6e"
+</strong>
+is
+the
+string
+formatter
+and
+<strong>
+value
+</strong>
+is
+the
+value
+to
+be
+converted.
+</p>
+<p>
+To
+convert
+the
+a
+double
+value
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</p>
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</pre>
+<p class="note">
+When
+data
+needs
+to
+be
+normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+that
+are
+going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+the
+lossy
+nature
+of
+<strong>
+xsd:double
+</strong>
+values.
+</p>
+<p class="issue">
+Round-tripping
+data
+can
+be
+problematic
+if
+we
+mix
+and
+match
+@coerce
+rules
+with
+JSON-native
+datatypes,
+like
+integers.
+Consider
+the
+following
+code
+example:
+</p>
+<pre class="example">
+var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+// Convert the normalized object back to a JavaScript object
+var
+myObj2
+=
+jsonld.parse(jsonldText);
+</pre>
+<p class="issue">
+At
+this
+point,
+myObj2
+and
+myObj
+will
+have
+different
+values
+for
+the
+"number"
+value.
+myObj
+will
+be
+the
+number
+42,
+while
+myObj2
+will
+be
+the
+string
+"42".
+This
+type
+of
+data
+round-tripping
+error
+can
+bite
+developers.
+We
+are
+currently
+wondering
+if
+having
+a
+"coerce
+validation"
+phase
+in
+the
+parsing/normalization
+phases
+would
+be
+a
+good
+idea.
+It
+would
+prevent
+data
+round-tripping
+issues
+like
+the
+one
+mentioned
+above.
+</p>
+</div>
+<div id="rdf-conversion" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.13
+</del>
+<ins class="diff-chg">6.13
+</ins>
+</span>
+RDF
+Conversion
+</h3>
+<p>
+A
+JSON-LD
+document
+<em class="rfc2119" title="may">
+may
+</em>
+be
+converted
+to
+any
+other
+RDF-compatible
+document
+format
+using
+the
+algorithm
+specified
+in
+this
+section.
+</p>
+<p>
+The
+JSON-LD
+Processing
+Model
+describes
+processing
+rules
+for
+extracting
+RDF
+from
+a
+JSON-LD
+document.
+Note
+that
+many
+uses
+of
+JSON-LD
+may
+not
+require
+generation
+of
+RDF.
+</p>
+<p>
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+to
+RDF
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<p class="issue">
+The
+RDF
+Conversion
+Algorithm
+is
+a
+work
+in
+progress.
+</p>
+<div class="informative section" id="overview">
+<h4>
+<span class="secno">
+<del class="diff-old">5.13.1
+</del>
+<ins class="diff-chg">6.13.1
+</ins>
+</span>
+Overview
+</h4>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+JSON-LD
+is
+intended
+to
+have
+an
+easy
+to
+parse
+grammar
+that
+closely
+models
+existing
+practice
+in
+using
+JSON
+for
+describing
+object
+representations.
+This
+allows
+the
+use
+of
+existing
+libraries
+for
+parsing
+JSON
+in
+a
+document-oriented
+fashion,
+or
+can
+allow
+for
+stream-based
+parsing
+similar
+to
+SAX.
+</p>
+<p>
+As
+with
+other
+grammars
+used
+for
+describing
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+a
+key
+concept
+is
+that
+of
+a
+<em>
+resource
+</em>.
+Resources
+may
+be
+of
+three
+basic
+types:
+<em>
+IRI
+</em>
+s,
+for
+describing
+externally
+named
+entities,
+<em>
+BNodes
+</em>,
+resources
+for
+which
+an
+external
+name
+does
+not
+exist,
+or
+is
+not
+known,
+and
+Literals,
+which
+describe
+terminal
+entities
+such
+as
+strings,
+dates
+and
+other
+representations
+having
+a
+lexical
+representation
+possibly
+including
+an
+explicit
+language
+or
+datatype.
+</p>
+<p>
+Data
+described
+with
+JSON-LD
+may
+be
+considered
+to
+be
+the
+representation
+of
+a
+graph
+made
+up
+of
+<a class="tref internalDFN" title="subject" href="#dfn-subject">
+subject
+</a>
+and
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+resources
+related
+via
+a
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+resource.
+However,
+specific
+implementations
+may
+choose
+to
+operate
+on
+the
+document
+as
+a
+normal
+JSON
+description
+of
+objects
+having
+attributes.
+</p>
+</div>
+<div id="rdf-conversion-algorithm-terms" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.13.2
+</del>
+<ins class="diff-chg">6.13.2
+</ins>
+</span>
+RDF
+Conversion
+Algorithm
+Terms
+</h4>
+<dl>
+<dt>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+</dt>
+<dd>
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</dd>
+</dl>
+</div>
+<div id="rdf-conversion-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.13.3
+</del>
+<ins class="diff-chg">6.13.3
+</ins>
+</span>
+RDF
+Conversion
+Algorithm
+</h4>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+in-memory
+implementations
+with
+random
+access
+to
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+elements.
+</p>
+<p>
+A
+conforming
+JSON-LD
+processor
+implementing
+RDF
+conversion
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<ol class="algorithm">
+<li id="processing-step-default-context">
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+with
+with
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+set
+to
+the
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+initial
+context
+</a>
+and
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+initialized
+to
+NULL.
+</li>
+<li id="processing-step-associative">
+If
+<del class="diff-old">an
+associative
+array
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="JSON_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+is
+detected,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+has
+a
+<code>
+@context
+</code>
+key,
+process
+the
+local
+context
+as
+described
+in
+<a href="#context">
+Context
+</a>.
+</li>
+<li>
+Create
+a
+new
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+by
+mapping
+the
+keys
+from
+the
+current
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+using
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+to
+new
+keys
+using
+the
+associated
+value
+from
+the
+current
+<del class="diff-old">associative
+array.
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>.
+Repeat
+the
+mapping
+until
+no
+entry
+is
+found
+within
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+for
+the
+key.
+Use
+the
+new
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+in
+subsequent
+steps.
+</li>
+<li>
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+has
+an
+<code>
+@iri
+</code>
+key,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+associated
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+<p class="issue">
+<code>
+@iri
+</code>
+really
+just
+behaves
+the
+same
+as
+<code>
+@subject
+</code>,
+consider
+consolidating
+them.
+</p>
+</li>
+<li>
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+has
+a
+<code>
+@literal
+</code>
+key,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+literal
+value
+as
+follows:
+<ol class="algorithm">
+<li>
+as
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+if
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+contains
+a
+<code>
+@datatype
+</code>
+key
+after
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+specified
+<code>
+@datatype
+</code>.
+</li>
+<li>
+otherwise,
+as
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>.
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+contains
+a
+<code>
+@language
+</code>
+key,
+use
+it's
+value
+to
+set
+the
+language
+of
+the
+plain
+literal.
+</li>
+<li>
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+</ol>
+</li>
+<li id="processing-step-subject">
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+has
+a
+<code>
+@subject
+</code>
+key:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+a
+<del class="diff-old">string,
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a>,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+result
+of
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+using
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>,
+set
+the
+<a class="tref" title="active__subject">
+active
+subject
+</a>
+to
+the
+result
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+does
+not
+have
+a
+<code>
+@subject
+</code>
+key,
+set
+the
+<a class="tref" title="active__object">
+active
+object
+</a>
+to
+newly
+generated
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier">
+blank
+node
+identifier
+</dfn>.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+<a class="tref" title="active__object">
+active
+object
+</a>.
+</li>
+<li>
+For
+each
+key
+in
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+that
+has
+not
+already
+been
+processed,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+<code>
+@type
+</code>,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+rdf:type
+</code>.
+</li>
+<li>
+Otherwise,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+the
+result
+of
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+key.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+</ol>
+</li>
+<li>
+If
+a
+regular
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+is
+detected,
+process
+each
+value
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+by
+doing
+the
+following
+returning
+the
+result
+of
+processing
+the
+last
+value
+in
+the
+<del class="diff-old">array:
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>:
+<ol class="algorithm">
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+using
+copies
+of
+the
+<a class="tref" title="active__context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>
+then
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+is
+detected:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+the
+target
+of
+a
+<code>
+@iri
+</code>
+coercion,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+string.
+</li>
+<li>
+Otherwise,
+if
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+the
+target
+of
+coercion,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+creating
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+using
+the
+string
+and
+the
+coercion
+key
+as
+the
+datatype
+IRI.
+</li>
+<li>
+Otherwise,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+value
+created
+from
+the
+string.
+</li>
+</ol>
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+If
+a
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>
+is
+detected,
+generate
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+using
+a
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+either
+<code>
+xsd:integer
+</code>
+or
+<code>
+xsd:double
+</code>,
+depending
+on
+if
+the
+value
+contains
+a
+fractional
+and/or
+an
+exponential
+component.
+Generate
+a
+triple
+using
+the
+<a class="tref" title="active__subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+generated
+typed
+literal.
+</li>
+<li>
+Otherwise,
+if
+<strong>
+true
+</strong>
+or
+<strong>
+false
+</strong>
+is
+detected,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+value
+created
+from
+the
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+<code>
+xsd:boolean
+</code>.
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div id="experimental-concepts" class="section">
+<h2>
+<span class="secno">
+<del class="diff-old">6.
+</del>
+<ins class="diff-chg">7.
+</ins>
+</span>
+Experimental
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+considered
+as
+discussion
+points;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">7.1
+</ins>
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+<del class="diff-old">JSON-LD
+associative
+array.
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "@coerce": {
+    "foaf": "http://xmlns.com/foaf/0.1/"
+</del>
+<ins class="diff-chg">  "@context": {
+    "Person": "http://xmlns.com/foaf/0.1/Person"
+</ins>
+  },
+  "@subject": 
+  [
+    {
+      "@subject": "http://example.org/people#john",
+<del class="diff-old">      "@type": "foaf:Person"
+</del>
+<ins class="diff-chg">      "@type": "Person"
+</ins>
+    },
+    {
+      "@subject": "http://example.org/people#jane",
+<del class="diff-old">      "@type": "foaf:Person"
+</del>
+<ins class="diff-chg">      "@type": "Person"
+</ins>
+    }
+  ]
+}
+</pre>
+<p>
+A
+disjoint
+graph
+could
+also
+be
+expressed
+like
+so:
+</p>
+<pre class="example">
+[
+  {
+    "@subject": "http://example.org/people#john",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  },
+  {
+    "@subject": "http://example.org/people#jane",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  }
+]
+</pre>
+</div>
+<div id="lists" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">7.2
+</ins>
+</span>
+Lists
+</h3>
+<p>
+Because
+graphs
+do
+not
+describe
+ordering
+for
+links
+between
+nodes,
+multi-valued
+properties
+in
+JSON
+do
+not
+provide
+an
+ordering
+of
+the
+listed
+objects.
+For
+example,
+consider
+the
+following
+simple
+document:
+</p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+<del class="diff-old">  "foaf:nick": ,
+</del>
+<ins class="diff-chg">  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+</ins>
+...
+}
+</pre>
+<p>
+This
+results
+in
+three
+triples
+being
+generated,
+each
+relating
+the
+subject
+to
+an
+individual
+object,
+with
+no
+inherent
+order.
+To
+address
+this
+issue,
+RDF-based
+languages,
+such
+as
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-TURTLE">
+TURTLE
+</a>
+</cite>
+]
+use
+the
+concept
+of
+an
+<code>
+rdf:List
+</code>
+(as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">
+RDF-SCHEMA
+</a>
+</cite>
+]).
+This
+uses
+a
+sequence
+of
+unlabeled
+nodes
+with
+properties
+describing
+a
+value,
+a
+null-terminated
+next
+property.
+Without
+specific
+syntactical
+support,
+this
+could
+be
+represented
+in
+JSON-LD
+as
+follows:
+</p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+<del class="diff-old">  "foaf:nick": ,
+</del>
+<ins class="diff-chg">  "nick": <span class="diff">{</span>,
+</ins>
+    <span class="diff">"@first": "joe"</span>,
+    <span class="diff">"@rest": {</span>
+      <span class="diff">"@first": "bob"</span>,
+      <span class="diff">"@rest": {</span>
+        <span class="diff">"@first": "jaybee"</span>,
+        <span class="diff">"@rest": "@nil"</span>
+        <span class="diff">}</span>
+      <span class="diff">}</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+}
+</pre>
+<p>
+As
+this
+notation
+is
+rather
+unwieldy
+and
+the
+notion
+of
+ordered
+collections
+is
+rather
+important
+in
+data
+modeling,
+it
+is
+useful
+to
+have
+specific
+language
+support.
+In
+JSON-LD,
+a
+list
+may
+be
+represented
+using
+the
+<code>
+@list
+</code>
+keyword
+as
+follows:
+</p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
+...
+}
+</pre>
+<p>
+This
+describes
+the
+use
+of
+this
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+as
+being
+ordered,
+and
+order
+is
+maintained
+through
+normalization
+and
+RDF
+conversion.
+If
+every
+use
+of
+a
+given
+multi-valued
+property
+is
+a
+list,
+this
+may
+be
+abbreviated
+by
+adding
+an
+<code>
+@coerce
+</code>
+term:
+</p>
+  <pre class="example">
+{
+  <span class="diff">"@context": {</span>
+    ...
+    <span class="diff">"@context": {</span>
+      <span class="diff">"@list": ["foaf:nick"]</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}
+</pre>
+<div id="expansion-2" class="section">
+<h4 id="list-expansion">
+<span class="secno">
+<del class="diff-old">6.2.1
+</del>
+<ins class="diff-chg">7.2.1
+</ins>
+</span>
+Expansion
+</h4>
+<p class="issue">
+TBD.
+</p>
+</div>
+<div id="normalization-2" class="section">
+<h4 id="list-normalization">
+<span class="secno">
+<del class="diff-old">6.2.2
+</del>
+<ins class="diff-chg">7.2.2
+</ins>
+</span>
+Normalization
+</h4>
+<p class="issue">
+TBD.
+</p>
+</div>
+<div id="rdf-conversion-1" class="section">
+<h4 id="list-rdf">
+<span class="secno">
+<del class="diff-old">6.2.3
+</del>
+<ins class="diff-chg">7.2.3
+</ins>
+</span>
+RDF
+Conversion
+</h4>
+<p>
+To
+support
+RDF
+Conversion
+of
+lists,
+<a href="#rdf-conversion-algorithm">
+RDF
+Conversion
+Algorithm
+</a>
+is
+updated
+as
+follows:
+</p>
+<ol class="algorithm update">
+<li>
+<span class="list-number">
+2.4a.
+</span>
+If
+the
+<del class="diff-old">associative
+array
+</del>
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins></a>
+has
+a
+<code>
+@list
+</code>
+key
+and
+the
+value
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+process
+the
+value
+as
+a
+list
+starting
+at
+<a href="#processing-step-list">
+Step
+3a
+</a>.
+</li>
+<li>
+<span class="list-number">
+2.7.3.
+</span>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+the
+target
+of
+a
+<code>
+@list
+</code>
+coercion,
+and
+the
+value
+is
+an
+<del class="diff-old">array,
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+process
+the
+value
+as
+a
+list
+starting
+at
+<a href="#processing-step-list">
+Step
+3a
+</a>.
+</li>
+<li>
+Otherwise,
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>.
+</li>
+<li>
+Proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li id="processing-step-list">
+<span class="list-number">
+3a.
+</span>
+Generate
+an
+RDF
+List
+by
+linking
+each
+element
+of
+the
+list
+using
+<code>
+rdf:first
+</code>
+and
+<code>
+rdf:next
+</code>,
+terminating
+the
+list
+with
+<code>
+rdf:nil
+</code>
+using
+the
+following
+sequence:
+<ol class="algorithm">
+<li>
+If
+the
+list
+has
+no
+element,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Otherwise,
+generate
+a
+triple
+using
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+a
+newly
+generated
+BNode
+identified
+as
+<em>
+first
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">
+blank
+node
+identifier
+</dfn>
+</em>.
+</li>
+<li>
+For
+each
+element
+other
+than
+the
+last
+element
+in
+the
+list:
+<ol class="algorithm">
+<li>
+Create
+a
+processor
+state
+using
+the
+active
+context,
+<em>
+first
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">
+blank
+node
+identifier
+</dfn>
+</em>
+as
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+and
+<code>
+rdf:first
+</code>
+as
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+</li>
+<li>
+Unless
+this
+is
+the
+last
+element
+in
+the
+list,
+generate
+a
+new
+BNode
+identified
+as
+<em>
+rest
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">
+blank
+node
+identifier
+</dfn>
+</em>,
+otherwise
+use
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Generate
+a
+new
+triple
+using
+<em>
+first
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">
+blank
+node
+identifier
+</dfn>
+</em>,
+<code>
+rdf:rest
+</code>
+and
+<em>
+rest
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">
+blank
+node
+identifier
+</dfn>
+</em>.
+</li>
+<li>
+Set
+<em>
+first
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">
+blank
+node
+identifier
+</dfn>
+</em>
+to
+<em>
+rest
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">
+blank
+node
+identifier
+</dfn>
+</em>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="appendix section" id="markup-examples">
+<h2>
+<span class="secno">
+A.
+</span>
+Markup
+Examples
+</h2>
+<p>
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</p>
+<div id="rdfa" class="section">
+<h3>
+<span class="secno">
+A.1
+</span>
+RDFa
+</h3>
+<p>
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</p>
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</pre>
+<p>
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</p>
+<pre class="example">
+{
+  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
+  "@subject": [
+   {
+     "@subject": "_:bnode1",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/bob/",
+     "foaf:name": "Bob"
+   },
+   {
+     "@subject": "_:bnode2",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/eve/",
+     "foaf:name": "Eve"
+   },
+   {
+     "@subject": "_:bnode3",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/manu/",
+     "foaf:name": "Manu"
+   }
+  ]
+}
+</pre>
+</div>
+<div id="microformats" class="section">
+<h3>
+<span class="secno">
+A.2
+</span>
+Microformats
+</h3>
+<p>
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</p>
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+</pre>
+<p>
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+<code>
+url
+</code>
+and
+<code>
+fn
+</code>
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+<code>
+http://tantek.com
+</code>.
+</p>
+<pre class="example">
+{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@subject": "_:bnode1",
+  "@type": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}
+</pre>
+</div>
+<div id="microdata" class="section">
+<h3>
+<span class="secno">
+A.3
+</span>
+Microdata
+</h3>
+<p>
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</p>
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</pre>
+<p>
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</p>
+<pre class="example">
+[
+  {
+    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "@type": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]
+</pre>
+</div>
+<div class="appendix section" id="mashing-up-vocabularies">
+<h3>
+<span class="secno">
+A.4
+</span>
+Mashing
+Up
+Vocabularies
+</h3>
+<p>
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+Vocabulary
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</p>
+<ul>
+<li>
+RDF
+-
+for
+describing
+information
+about
+objects
+on
+the
+semantic
+web.
+</li>
+<li>
+RDFS
+-
+for
+expressing
+things
+like
+labels
+and
+comments.
+</li>
+<li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+You
+can
+use
+these
+vocabularies
+in
+combination,
+like
+so:
+</p>
+<pre class="example">
+{
+  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+<p>
+Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+in-line
+using
+the
+<code>
+@context
+</code>
+keyword,
+like
+so:
+</p>
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "@type": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}
+</pre>
+<p>
+The
+<code>
+@context
+</code>
+keyword
+is
+used
+to
+change
+how
+the
+JSON-LD
+processor
+evaluates
+key-value
+pairs.
+In
+this
+case,
+it
+was
+used
+to
+map
+one
+string
+('myvocab')
+to
+another
+string,
+which
+is
+interpreted
+as
+a
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>.
+In
+the
+example
+above,
+the
+<code>
+myvocab
+</code>
+string
+is
+replaced
+with
+"
+<code>
+http://example.org/myvocab#
+</code>
+"
+when
+it
+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
+for
+RDF,
+called
+a
+<del class="diff-old">CURIE,
+</del>
+<a class="tref internalDFN" title="CURIE" href="#dfn-curie">
+<ins class="diff-chg">CURIE
+</ins></a>,
+and
+provides
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</p>
+<p>
+</p>
+</div>
+<div class="appendix section" id="acknowledgements">
+<h3>
+<span class="secno">
+A.5
+</span>
+Acknowledgements
+</h3>
+<p>
+The
+editors
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+initial
+push
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+Longley,
+Dave
+Lehn
+and
+Mike
+Johnson
+who
+reviewed,
+provided
+feedback,
+and
+performed
+several
+implementations
+of
+the
+specification,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+Allen,
+Kingsley
+Idehen,
+Glenn
+McDonald,
+Alexandre
+Passant,
+Danny
+Ayers,
+Ted
+Thibodeau
+Jr.,
+Olivier
+Grisel,
+Niklas
+Lindström,
+Markus
+Lanthaler,
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+Another
+huge
+thank
+you
+goes
+out
+to
+Dave
+Longley
+who
+designed
+many
+of
+the
+algorithms
+used
+in
+this
+specification,
+including
+the
+normalization
+algorithm
+which
+was
+a
+monumentally
+difficult
+design
+challenge.
+</p>
+</div>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+B.
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</a>
+</dd>
+<dt id="bib-RFC3986">
+[RFC3986]
+</dt>
+<dd>
+T.
+Berners-Lee;
+R.
+Fielding;
+L.
+Masinter.
+<a href="http://www.ietf.org/rfc/rfc3986.txt">
+<cite>
+Uniform
+Resource
+Identifier
+(URI):
+Generic
+Syntax.
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3986.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3986.txt">
+http://www.ietf.org/rfc/rfc3986.txt
+</a>
+</dd>
+<dt id="bib-RFC3987">
+[RFC3987]
+</dt>
+<dd>
+M.
+Dürst;
+M.
+Suignard.
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+<cite>
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+http://www.ietf.org/rfc/rfc3987.txt
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford.
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+<cite>
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</cite>
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+<dt id="bib-WEBIDL">
+[WEBIDL]
+</dt>
+<dd>
+Cameron
+McCormack.
+<a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">
+<cite>
+Web
+IDL.
+</cite>
+</a>
+19
+December
+2008.
+W3C
+Working
+Draft.
+(Work
+in
+progress.)
+URL:
+<a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">
+http://www.w3.org/TR/2008/WD-WebIDL-20081219
+</a>
+</dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-ECMA-262">
+[ECMA-262]
+</dt>
+<dd>
+<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
+<cite>
+ECMAScript
+Language
+Specification,
+Third
+Edition.
+</cite>
+</a>
+December
+1999.
+URL:
+<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
+http://www.ecma-international.org/publications/standards/Ecma-262.htm
+</a>
+</dd>
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDF-SCHEMA">
+[RDF-SCHEMA]
+</dt>
+<dd>
+Dan
+Brickley;
+Ramanathan
+V.
+Guha.
+<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
+<cite>
+RDF
+Vocabulary
+Description
+Language
+1.0:
+RDF
+Schema.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
+http://www.w3.org/TR/2004/REC-rdf-schema-20040210
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+31
+March
+2011.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+http://www.w3.org/TR/2011/WD-rdfa-core-20110331
+</a>
+</dd>
+<dt id="bib-TURTLE">
+[TURTLE]
+</dt>
+<dd>
+David
+Beckett,
+Tim
+Berners-Lee.
+<a href="http://www.w3.org/TeamSubmission/turtle/">
+<cite>
+Turtle:
+Terse
+RDF
+Triple
+Language.
+</cite>
+</a>
+January
+2008.
+W3C
+Team
+Submission.
+URL:
+<a href="http://www.w3.org/TeamSubmission/turtle/">
+http://www.w3.org/TeamSubmission/turtle/
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110817/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4086 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--  
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left; 
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-17-august-2011">Unofficial Draft 17 August 2011</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
+<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dt>Authors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
+<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20110808.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and 
+messaging format. In an attempt to harmonize the representation of Linked Data 
+in JSON, this specification outlines a common JSON representation format for 
+expressing directed graphs; mixing both Linked Data and non-Linked Data in 
+a single document. 
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design" class="tocxref"><span class="secno">2. </span>Design</a><ul class="toc"><li class="tocline"><a href="#goals-and-rationale" class="tocxref"><span class="secno">2.1 </span>Goals and Rationale</a></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">2.2 </span>Linked Data</a></li><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">2.3 </span>Linking Data</a></li><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">2.4 </span>The Context</a><ul class="toc"><li class="tocline"><a href="#inside-a-context" class="tocxref"><span class="secno">2.4.1 </span>Inside a Context</a></li></ul></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">2.5 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno">3.4 </span>Strings</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">3.6 </span>Datatypes</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">3.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.9 </span>Expansion</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.10 </span>Compaction</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#curies" class="tocxref"><span class="secno">4.1 </span>CURIEs</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">4.2 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.3 </span>Type Coercion</a></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">4.4 </span>Chaining</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.5 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#overriding-keywords" class="tocxref"><span class="secno">4.6 </span>Overriding Keywords</a></li><li class="tocline"><a href="#normalization" class="tocxref"><span class="secno">4.7 </span>Normalization</a></li></ul></li><li class="tocline"><a href="#the-application-programming-interface" class="tocxref"><span class="secno">5. </span>The Application Programming Interface</a><ul class="toc"><li class="tocline"><a href="#jsonldprocessor" class="tocxref"><span class="secno">5.1 </span>JSONLDProcessor</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">5.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#jsonldprocessorcallback" class="tocxref"><span class="secno">5.2 </span>JSONLDProcessorCallback</a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">5.2.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#jsonldtriplecallback" class="tocxref"><span class="secno">5.3 </span>JSONLDTripleCallback</a><ul class="toc"><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">5.3.1 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">6. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">6.1 </span>Syntax Tokens and Keywords</a></li><li class="tocline"><a href="#algorithm-terms" class="tocxref"><span class="secno">6.2 </span>Algorithm Terms</a></li><li class="tocline"><a href="#context-1" class="tocxref"><span class="secno">6.3 </span>Context</a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno">6.3.1 </span>Coerce</a></li><li class="tocline"><a href="#initial-context" class="tocxref"><span class="secno">6.3.2 </span>Initial Context</a></li></ul></li><li class="tocline"><a href="#iri-expansion" class="tocxref"><span class="secno">6.4 </span>IRI Expansion</a></li><li class="tocline"><a href="#iri-compaction" class="tocxref"><span class="secno">6.5 </span>IRI Compaction</a></li><li class="tocline"><a href="#value-expansion" class="tocxref"><span class="secno">6.6 </span>Value Expansion</a></li><li class="tocline"><a href="#value-compaction" class="tocxref"><span class="secno">6.7 </span>Value Compaction</a></li><li class="tocline"><a href="#expansion-1" class="tocxref"><span class="secno">6.8 </span>Expansion</a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno">6.8.1 </span>Expansion Algorithm</a></li></ul></li><li class="tocline"><a href="#compaction-1" class="tocxref"><span class="secno">6.9 </span>Compaction</a><ul class="toc"><li class="tocline"><a href="#compaction-algorithm" class="tocxref"><span class="secno">6.9.1 </span>Compaction Algorithm</a></li></ul></li><li class="tocline"><a href="#framing-1" class="tocxref"><span class="secno">6.10 </span>Framing</a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno">6.10.1 </span>Framing Algorithm Terms</a></li><li class="tocline"><a href="#framing-algorithm" class="tocxref"><span class="secno">6.10.2 </span>Framing Algorithm</a></li></ul></li><li class="tocline"><a href="#normalization-1" class="tocxref"><span class="secno">6.11 </span>Normalization</a><ul class="toc"><li class="tocline"><a href="#normalization-algorithm-terms" class="tocxref"><span class="secno">6.11.1 </span>Normalization Algorithm Terms</a></li><li class="tocline"><a href="#normalization-state" class="tocxref"><span class="secno">6.11.2 </span>Normalization State</a></li><li class="tocline"><a href="#normalization-algorithm" class="tocxref"><span class="secno">6.11.3 </span>Normalization Algorithm</a></li><li class="tocline"><a href="#node-relabeling-algorithm" class="tocxref"><span class="secno">6.11.4 </span>Node Relabeling Algorithm</a></li><li class="tocline"><a href="#deterministic-labeling-algorithm" class="tocxref"><span class="secno">6.11.5 </span>Deterministic Labeling Algorithm</a></li><li class="tocline"><a href="#shallow-comparison-algorithm" class="tocxref"><span class="secno">6.11.6 </span>Shallow Comparison Algorithm</a></li><li class="tocline"><a href="#object-comparison-algorithm" class="tocxref"><span class="secno">6.11.7 </span>Object Comparison Algorithm</a></li><li class="tocline"><a href="#deep-comparison-algorithm" class="tocxref"><span class="secno">6.11.8 </span>Deep Comparison Algorithm</a></li><li class="tocline"><a href="#node-serialization-algorithm" class="tocxref"><span class="secno">6.11.9 </span>Node Serialization Algorithm</a></li><li class="tocline"><a href="#serialization-label-generation-algorithm" class="tocxref"><span class="secno">6.11.10 </span>Serialization Label Generation Algorithm</a></li><li class="tocline"><a href="#combinatorial-serialization-algorithm" class="tocxref"><span class="secno">6.11.11 </span>Combinatorial Serialization Algorithm</a></li><li class="tocline"><a href="#mapping-serialization-algorithm" class="tocxref"><span class="secno">6.11.12 </span>Mapping Serialization Algorithm</a></li><li class="tocline"><a href="#label-serialization-algorithm" class="tocxref"><span class="secno">6.11.13 </span>Label Serialization Algorithm</a></li></ul></li><li class="tocline"><a href="#data-round-tripping" class="tocxref"><span class="secno">6.12 </span>Data Round Tripping</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">6.13 </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">6.13.1 </span>Overview</a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno">6.13.2 </span>RDF Conversion Algorithm Terms</a></li><li class="tocline"><a href="#rdf-conversion-algorithm" class="tocxref"><span class="secno">6.13.3 </span>RDF Conversion Algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno">7. </span>Experimental Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">7.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#lists" class="tocxref"><span class="secno">7.2 </span>Lists</a><ul class="toc"><li class="tocline"><a href="#expansion-2" class="tocxref"><span class="secno">7.2.1 </span>Expansion</a></li><li class="tocline"><a href="#normalization-2" class="tocxref"><span class="secno">7.2.2 </span>Normalization</a></li><li class="tocline"><a href="#rdf-conversion-1" class="tocxref"><span class="secno">7.2.3 </span>RDF Conversion</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">A. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">A.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">A.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">A.3 </span>Microdata</a></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">A.4 </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">A.5 </span>Acknowledgements</a></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">B. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">B.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">B.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p>
+JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing 
+data on the Web. Linked Data is a technique for describing content across 
+different 
+documents or Web sites. Web resources are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s, 
+and typically are dereferencable entities that may be used to find more 
+information, creating a "Web of Knowledge". JSON-LD is intended to be a simple 
+publishing method for expressing not only Linked Data in JSON, but for adding
+semantics to existing JSON.
+</p>
+
+<p>
+JSON-LD is designed as a light-weight syntax that can be used to express 
+Linked Data. It is primarily intended to be a way to express Linked Data 
+in Javascript and other Web-based programming environments. It is also 
+useful when building interoperable Web Services and when storing Linked 
+Data in JSON-based document storage engines. It is practical and designed 
+to be as simple as possible, utilizing the large number of JSON parsers 
+and existing code that is in use today. It is designed to be able to 
+express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats 
+[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports 
+every major Web-based structured data model in use today. 
+</p>
+
+<p>
+The syntax does not require many applications to change their JSON, but 
+easily add meaning by adding context in a way that is either in-band or 
+out-of-band. The syntax is designed to not disturb already deployed systems 
+running on JSON, but provide a smooth migration path from JSON to JSON with 
+added semantics. Finally, the format is intended to be fast to parse, fast to 
+generate, stream-based and document-based processing compatible, and require
+a very small memory footprint in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of JSON for Linked
+data. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and 
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata 
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to implement processors and APIs for 
+  JSON-LD.</li>
+</ul>
+
+<p>
+To understand the basics in this specification you must first be familiar with 
+JSON, which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. To understand the API and how it is
+intended to operate  in a programming environment, it is useful to have working 
+knowledge of the JavaScript programming language [<cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and 
+WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be 
+familiar with the basic RDF concepts [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+
+<p>
+  Examples may contain references to existing vocabularies and use abbreviations in <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>s and source code. The following is a list of all vocabularies and their abbreviations, as used in this document:
+</p>
+<ul>
+  <li>The <a href="http://purl.org/dc/terms/">Dublin Core</a>
+  vocabulary (abbreviation: <code>dc</code>, e.g., <code>dc:title</code>)</li>
+  <li>The <a href="http://xmlns.com/foaf/0.1/">Friend of a Friend</a>
+  vocabulary (abbreviation: <code>foaf</code>, e.g., <code>foaf:knows</code>)</li>
+  <li>The <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">RDF</a>
+  vocabulary (abbreviation: <code>rdf</code>, e.g., <code>rdf:type</code>)</li>
+  <li>The <a href="http://www.w3.org/2001/XMLSchema#">XSD</a>
+  vocabulary (abbreviation: <code>xsd</code>, e.g., <code>xsd:integer</code>)</li>
+</ul>
+
+<p>
+  JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] defines several terms which are used throughout this document:
+  </p><dl>
+    <dt><dfn title="JSON_Object" id="dfn-json_object">JSON Object</dfn></dt><dd>
+      An object structure is represented as a pair of curly brackets surrounding zero or
+      more name/value pairs (or members). A name is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A single colon comes after
+      each name, separating the name from the value. A single comma separates a value
+      from a following name. The names within an object <em class="rfc2119" title="should">should</em> be unique.
+    </dd>
+    <dt><dfn title="array" id="dfn-array">array</dfn></dt><dd>
+      An <em>array</em> is an ordered collection of values. An array begins with [ (left bracket) and ends with ]
+      (right bracket). Values are separated by , (comma). Within JSON-LD, array order is not preserved, unless
+      specific markup is provided (see <a href="#lists">Lists</a>). This is because the basic data model of JSON-LD
+      <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>, which is inherently unordered.
+    </dd>
+    <dt><dfn title="string" id="dfn-string">string</dfn></dt><dd>
+      A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A
+      character is represented as a single character string. A string is very much like a C or Java string.
+    </dd>
+    <dt><dfn title="number" id="dfn-number">number</dfn></dt><dd>
+      A number is very much like a C or Java number, except that the octal and hexadecimal formats are not used.
+    </dd>
+    <dt><dfn title="true" id="dfn-true">true</dfn> and <dfn title="false" id="dfn-false">false</dfn></dt><dd>
+      Boolean values.
+    </dd>
+    <dt><dfn title="null" id="dfn-null">null</dfn></dt><dd>
+      The use of the <em>null</em> value is undefined within JSON-LD.
+    </dd>
+  </dl>
+<p></p>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>Technical discussion typically occurs on the public mailing list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
+</li>
+
+<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held 
+on Tuesdays at 1500UTC on the second and fourth week of each month.
+</li>
+
+<li>Specification bugs and issues should be reported in the 
+<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
+
+<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the 
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a> 
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design</h2>
+
+<p>The following section outlines the design goals and rationale behind the 
+JSON-LD markup language.
+</p>
+
+<div id="goals-and-rationale" class="section">
+<h3><span class="secno">2.1 </span>Goals and Rationale</h3>
+
+<p>
+A number of design considerations were explored during the creation of this 
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers need only know JSON and three keywords to use the basic 
+ functionality in JSON-LD. No extra processors or software libraries are
+ necessary to use JSON-LD in its most basic form. The language attempts to
+ ensure that developers have an easy learning curve.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
+ all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
+ <dt>Expressiveness</dt>
+ <dd>The syntax must be able to express directed graphs, which have been proven
+ to be able to simply express almost every real world data model.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable, requiring as
+ little as possible from the developer.</dd>
+ 
+<!-- <dt>Pragmatism</dt>
+ <dd>Mixing the expression of pure Linked Data with data that is not
+ linked was an approach that was driven by pragmatism. JSON-LD attempts to be
+ more practical than theoretical in its approach to Linked Data.</dd> -->
+
+ <dt>Zero Edits, most of the time</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify 
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers. At times, mapping JSON to 
+ a graph representation can become difficult. In these instances, rather than 
+ having JSON-LD support esoteric markup, we chose not to support the use case 
+ and support a simplified syntax instead. So, while Zero Edits was a goal,
+ it was not always possible without adding great complexity to the language.
+ </dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="linked-data" class="section">
+<h3><span class="secno">2.2 </span>Linked Data</h3>
+<p>
+The following definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> is the one that will 
+be used for this specification.
+</p>
+<ol>
+  <li><dfn title="Linked_Data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a representation of a linked data graph.</li>
+  <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is an unordered labeled directed graph, where nodes are <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are properties.</li>
+  <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one outgoing edge.</li>
+  <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> <em class="rfc2119" title="should">should</em> be labeled with an IRI.</li>
+  <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>.</li>
+  <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <em class="rfc2119" title="should">should</em> be labeled with an IRI.</li>
+  <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one incoming edge.</li>
+  <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an IRI.</li>
+  <li>An IRI that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be dereferencable to a <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> document describing the labeled <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>.</li>
+  <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not an IRI</li>
+</ol>
+
+<p>
+Note that the definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> above is silent on the 
+topic of unlabeled nodes. Unlabeled nodes are not considered 
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
+of unlabled nodes, as most graph-based data sets on the Web contain a number 
+of associated nodes that are not named and thus are not directly 
+de-referenceable.
+</p>
+</div>
+
+<div id="linking-data" class="section">
+<h3><span class="secno">2.3 </span>Linking Data</h3>
+
+<p>
+An Internationalized Resource Identifier 
+(<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
+as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique 
+identifiers on the web. In <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, an IRI is commonly 
+used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an 
+<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
+</p>
+
+<p>JSON-LD defines a mechanism to map JSON values to IRIs. This does not mean 
+that JSON-LD requires every key or value to be an IRI, but rather ensures that
+keys and values can be mapped to IRIs if the developer so desires to transform
+their data into Linked Data. There are a few techniques that can ensure 
+that developers will generate good Linked Data for the Web. JSON-LD 
+formalizes those techniques.
+</p>
+
+<p>We will be using the following JSON markup as the example for the
+rest of this section:
+</p>
+
+<pre class="example">
+{
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+</div>
+
+<div id="the-context" class="section">
+<h3><span class="secno">2.4 </span>The Context</h3>
+
+<p>In JSON-LD, a context is used to allow developers to map <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s 
+to <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that <em class="rfc2119" title="may">may</em> be expanded
+to an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The semantic web, just like the document-based 
+web, uses IRIs for unambiguous identification. The idea is that these 
+<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s mean something that may be of use to other developers.
+For example, the term <code>name</code> may map directly to the IRI 
+<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to 
+be constructed using the common JSON practice of simple name/value pairs while
+ensuring that the data is useful outside of the database or page in which it
+resides.
+</p>
+
+<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a context and
+then used by adding a single line to the JSON markup above:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>The addition above transforms the previous JSON document into a JSON document
+with added semantics because the <code>@context</code> specifies how the
+<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong> 
+terms map to IRIs. 
+Mapping those keys to IRIs gives the data global context. If two 
+developers use the same IRI to describe a property, they are more than likely
+expressing the same concept. This allows both developers to re-use each others
+data without having to agree to how their data will inter-operate on a 
+site-by-site basis.</p>
+
+<p>
+The semantic web uses a special type of document called a 
+<em>Web Vocabulary</em> to define <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s. A context is a type of
+Web vocabulary.
+Typically, these Web Vocabulary documents have <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es associated
+with them and contain a number of <a class="tref internalDFN" title="term" href="#dfn-term">term</a> declarations. A
+<dfn title="prefix" id="dfn-prefix">prefix</dfn>, like a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, is a short word that expands
+to a Web Vocabulary IRI. <a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are helpful when a developer
+wants to mix multiple vocabularies together in a context, but does not want
+to go to the trouble of defining every single term in every single vocabulary.
+Some Web Vocabularies may have 10-20 terms defined. If a developer wants to use 
+3-4 different vocabularies, the number of terms that 
+would have to be declared in a single context would become quite large. To 
+reduce the number of different terms that must be defined, JSON-LD also allows 
+prefixes to be used to compact IRIs.
+</p><p>
+
+</p><p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code> 
+specifies a Web Vocabulary which may be represented using the
+<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>. The <code>foaf</code> Web Vocabulary
+contains a term called <strong>name</strong>. If you join the 
+<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> with the <strong>name</strong> suffix, 
+you can build a compact IRI that will expand out into an absolute IRI for the
+<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
+That is, the compact IRI, or short-form, is <code>foaf:name</code> and the 
+expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary 
+term is used to specify a person's name.
+</p>
+
+<p>Developers, and machines, are able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a 
+definition of what the term means. Much like we can use WordNet today to 
+see the 
+<a href="http://wordnetweb.princeton.edu/perl/webwn?s=definition">definition</a>
+of words in the English language. Developers and machines need the same sort of 
+dictionary of terms. IRIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>The context provides a collection of vocabulary <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and 
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es that can be used to expand JSON keys and values into
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s.</p>
+
+<div id="inside-a-context" class="section">
+<h4><span class="secno">2.4.1 </span>Inside a Context</h4>
+
+<p>In the previous section, the developer used the <code>@context</code>
+keyword to pull in an external context. That context document, if 
+de-referenced, would look something like this:</p>
+
+<pre class="example">
+{
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+}</pre>
+
+<p>A JSON-LD context document is a simple mapping from <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es to expanded values such as IRIs or keywords. Contexts may also contain datatype information
+for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
+the JSON-LD processor.
+</p>
+
+<p>Contexts may be specified in-line. This ensures that JSON-LD documents
+can be processed when a JSON-LD processor does not have access to the Web.</p>
+
+<p>
+JSON-LD strives to ensure that developers don't have to change the JSON
+that is going into and being returned from their Web applications. This means
+that developers can also specify a context for JSON data in an out-of-band
+fashion via the API. The API is described later in this document. A JSON-LD 
+aware Web Service <em class="rfc2119" title="may">may</em> also define a context that will be pre-loaded for all
+calls to the service. This allows services that have previously been publishing
+and receiving JSON data to accept JSON-LD data without requiring client 
+software to change.
+</p>
+
+</div>
+
+</div>
+
+<div id="from-json-to-json-ld" class="section">
+<h3><span class="secno">2.5 </span>From JSON to JSON-LD</h3>
+
+<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>, 
+and <strong>avatar</strong>,
+are defined in a context, and that context is used to resolve the
+names in JSON objects, machines are able to automatically expand the terms to 
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Doing this allows JSON to be unambiguously machine-readable without
+requiring developers that use JSON to drastically change their workflow.</p>
+</div>
+
+</div>
+
+
+
+<div id="basic-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Basic Concepts</h2>
+
+<p>JSON-LD is designed to ensure that Linked Data concepts can be marked 
+up in a way that is simple to understand and author by Web developers. In many
+cases, regular JSON markup can become Linked Data with the simple addition
+of a context. As more JSON-LD features are used, more semantics are added
+to the JSON markup.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">3.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most 
+<a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a> are named. IRIs can be 
+expressed in a variety of different ways in JSON-LD.</p>
+
+<ol>
+  <li>In general, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in the key position in 
+    a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that have a mapping to an IRI or another key in the context are
+    expanded to an IRI by JSON-LD processors. There are special rules for 
+    processing keys in <code>@context</code> and when dealing with keys that 
+    start with the <code>@subject</code> character.</li>
+  <li>An IRI is generated for the value specified using <code>@subject</code>, 
+    if it is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>.</li>
+  <li>An IRI is generated for the value specified using <code>@type</code>.</li>
+  <li>An IRI is generated for the value specified using the <code>@iri</code> 
+    keyword.</li>
+  <li>An IRI is generated when there are <code>@coerce</code> rules in 
+    effect for a key named <code>@iri</code>.</li>
+</ol>
+
+<p>IRIs can be expressed directly in the key position like so:
+</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p>In the example above, the key 
+<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as 
+opposed to being interpreted as a string.</p>
+
+<p>Term expansion occurs for IRIs if a term is defined within the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><a class="tref internalDFN" title="Prefix" href="#dfn-prefix">Prefix</a>es are expanded when used in keys:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><code>name</code> above will automatically expand out to the IRI
+<code>http://xmlns.com/foaf/0.1/name</code>.</p>
+
+<p>An IRI is generated when a value is associated with a key using 
+the <code>@iri</code> keyword:</p>
+
+<pre class="example">
+{
+...
+  "homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}</pre>
+
+<p>If type coercion rules are specified in the <code>@context</code> for
+a particular vocabulary term, an IRI is generated:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  {
+    ...
+    "@coerce": 
+    {
+      "@iri": "homepage"
+    }
+  }</span>
+...
+  "homepage": "http://manu.sporny.org/",
+...
+}</pre>
+
+<p>Even though the value <code>http://manu.sporny.org/</code> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>,
+the type coercion rules will transform the value into an IRI when processed
+by a JSON-LD Processor</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">3.2 </span>Identifying the Subject</h3>
+
+<p>
+  <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s are a fundamental concept of Linked Data, and nodes should have a de-referencable
+  identifier used to name and locate them. For nodes to be truely linked, de-referencing the identifier
+  should result in a representation of that node. Associating an IRI with a node tells an application
+  that the returned document contains a description of of the identifier requested.
+</p>
+<p>
+  JSON-LD documents may also contain descriptions of other nodes, so it is necessary to be able to
+  uniquely identify each node which may be externally referenced.
+</p>
+<p>A <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> of a node is declared using the <code>@subject</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, property, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to the IRI 
+<code>http://example.org/people#joebob</code>.
+</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">3.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the 
+<code>@type</code> key. Specifying the type in this way will generate a 
+triple of the form (subject, type, type-uri).</p>
+
+<p>To be Linked Data, types should be uniquely identified by an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>.</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple if the JSON-LD 
+document is mapped to RDF (in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+</div>
+
+<div id="strings" class="section">
+<h3><span class="secno">3.4 </span>Strings</h3>
+
+<p>Regular text strings, also referred to as <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn>s, are 
+easily expressed using regular JSON <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s.</p>
+
+<pre class="example">
+{
+...
+  "name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="string-internationalization" class="section">
+<h3><span class="secno">3.5 </span>String Internationalization</h3>
+
+<p>JSON-LD makes an assumption that strings with associated language encoding 
+information are not very common when used in JavaScript and Web Services. 
+Thus, it takes a little more effort to express strings with associated 
+language information.</p>
+
+<pre class="example">
+{
+...
+  "name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}</pre>
+
+<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for 
+<em>花澄</em> and associate the <code>ja</code> language code with the triple 
+that is generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="datatypes" class="section">
+<h3><span class="secno">3.6 </span>Datatypes</h3>
+
+<p>
+  A value with an associated datatype, also known as a 
+  <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn>, is indicated by associating a literal with
+  an IRI which indicates the typed literal's datatype. Typed literals may be 
+  expressed in JSON-LD in three ways:
+</p>
+
+<ol>
+  <li>By utilizing the <code>@coerce</code> keyword.</li>
+  <li>By utilizing the expanded form for specifying objects.</li>
+  <li>By using a native JSON datatype.</li>
+</ol>
+
+<p>The first example uses the <code>@coerce</code> keyword to express a
+typed literal:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context": 
+  {
+    "modified":  "http://purl.org/dc/terms/modified",
+    "dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
+    "@coerce": 
+    {
+      "dateTime": "modified"
+    }
+  }</span>
+...
+  "modified": "2010-05-29T14:17:39+02:00",
+...
+}</pre>
+
+<p>The second example uses the expanded form for specifying objects:</p>
+
+<pre class="example">
+{
+...
+  "modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "dateTime"
+  }</span>
+...
+}</pre>
+
+<p>Both examples above would generate an object with the literal value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+<p>The third example uses a built-in native JSON type, a <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, to 
+express a datatype:</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "age": <span class="diff">31</span>
+...
+}</pre>
+
+<p>The example above would generate the following triple:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/age&gt; 
+      "31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .</pre>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">3.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+<a class="tref internalDFN" title="array" href="#dfn-array">array</a>s. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</p>
+
+<p class="note">In JSON-LD, Multiple objects on a property are not ordered. This is because typically graphs
+are not inherently ordered data structures. To see more on creating ordered collections
+in JSON-LD, see <a href="#lists">Lists</a>.
+</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "jaybee" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
+form for objects:</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/articles/8",
+  "modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "dateTime"
+    }
+  ]</span>
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt; 
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="expansion" class="section">
+<h3><span class="secno">3.9 </span>Expansion</h3>
+
+<p>Expansion is the process of taking a JSON-LD document and applying a 
+context such that all IRI, datatypes, and literal values are expanded so
+that the context is no longer necessary. JSON-LD document expansion 
+is typically used when re-mapping JSON-LD documents to application-specific
+JSON documents or as a part of the <a href="#normalization">Normalization</a>
+process.</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}</pre>
+
+<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document 
+provided above would result in the following output:</p>
+
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}</pre>
+
+</div> 
+
+<div id="compaction" class="section">
+<h3><span class="secno">3.10 </span>Compaction</h3>
+
+<p>Compaction is the process of taking a JSON-LD document and applying a 
+context such that the most compact form of the document is generated. JSON
+is typically expressed in a very compact, key-value format. That is, full
+IRIs are rarely used as keys. At times, a JSON-LD document may be received
+that is not in its most compact form. JSON-LD, via the API, provides a way
+to compact a JSON-LD document.
+</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage": 
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}</pre>
+
+<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
+
+<pre class="example">
+{
+   "name": "http://xmlns.com/foaf/0.1/name",
+   "homepage": "http://xmlns.com/foaf/0.1/homepage",
+   "@coerce": 
+   {
+      "@iri": ["homepage"]
+   }
+}</pre>
+
+<p>Running the JSON-LD Compaction algorithm given the context supplied above 
+against the JSON-LD input document provided above would result in the following
+output:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce": 
+      {
+         "@iri": "homepage"
+      }
+   }
+}</pre>
+
+<p>The compaction algorithm also enables the developer to map any expanded
+format into an application-specific compacted format. While the context 
+provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
+<strong>name</strong>, it could have also mapped it to any arbitrary string
+provided by the developer.
+</p>
+
+</div>
+
+<div id="framing" class="section">
+<h3><span class="secno">3.11 </span>Framing</h3>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+directed graph can have many different serializations, each expressing
+exactly the same information. Developers typically work with trees, represented as
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>s. While mapping a graph to 
+a tree can be done, the layout of the end result must be specified in advance. 
+A <dfn title="Frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to 
+specify a deterministic layout for a graph.
+</p>
+
+<p>Framing is the process of taking a JSON-LD document, which expresses a
+graph of information, and applying a specific graph layout 
+(called a <a class="tref internalDFN" title="Frame" href="#dfn-frame">Frame</a>).
+</p>
+
+<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
+
+<pre class="example">
+{
+  "@coerce": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title",
+    "@coerce": 
+    {
+      "@iri": "ex:contains"
+    },
+  },
+  "@subject": 
+  [{
+    "@subject": "http://example.com/library",
+    "@type": "Library",
+    "contains": "http://example.org/library/the-republic"
+  }, 
+  {
+    "@subject": "http://example.org/library/the-republic",
+    "@type": "Book",
+    "creator": "Plato",
+    "title": "The Republic",
+    "contains": "http://example.org/library/the-republic#introduction"
+  }, 
+  {
+    "@subject": "http://example.org/library/the-republic#introduction",
+    "@type": "Chapter",
+    "description": "An introductory chapter on The Republic.",
+    "title": "The Introduction"
+  }]
+}</pre>
+
+<p>Developers typically like to operate on items in a hierarchical, tree-based
+fashion. Ideally, a developer would want the data above sorted into top-level
+libraries, then the books that are contained in each library, and then the
+chapters contained in each book. To achieve that layout, the developer can
+define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
+
+<pre class="example">
+{
+  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title"
+  },
+  "@type": "Library",
+  "contains": {
+    "@type": "Book",
+    "contains": {
+      "@type": "Chapter"
+    }
+  }
+}</pre>
+
+<p>When the framing algorithm is run against the previously defined 
+JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
+JSON-LD document is the end result:</p>
+
+<pre class="example">
+{
+  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title"
+  },
+  "@subject": "http://example.org/library",
+  "@type": "Library",
+  "contains": {
+    <span class="diff">"@subject": "http://example.org/library/the-republic",</span>
+    "@type": "Book",
+    <span class="diff">"creator": "Plato",</span>
+    <span class="diff">"title": "The Republic",</span>
+    "contains": {
+      <span class="diff">"@subject": "http://example.org/library/the-republic#introduction",</span>
+      "@type": "Chapter",
+      <span class="diff">"description": "An introductory chapter on The Republic.",</span>
+      <span class="diff">"title": "The Introduction"</span>
+    },
+  },
+}</pre>
+
+<p>The JSON-LD framing algorithm allows developers to query by example and
+force a specific tree layout to a JSON-LD document.
+</p>
+
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Advanced Concepts</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality described above. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="curies" class="section">
+  <h3><span class="secno">4.1 </span>CURIEs</h3>
+  <p>
+    Concepts in Linked Data documents may draw on a number of different vocabularies. The @vocab mechanism
+    is useful to easily associate types and properties with a specific vocabulary, but when many vocabularies
+    are used, this becomes difficult. Consider the following example:
+  </p>
+  <pre class="example">
+{
+  "@context": {
+    <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>
+    <span class="diff">"ex": "http://example.org/vocab#"</span>
+  },
+  "@subject": "http://example.org/library",
+  "@type": <span class="diff">"ex:Library"</span>,
+  <span class="diff">"ex:contains"</span>: {
+    "@subject": "http://example.org/library/the-republic",
+    "@type": <span class="diff">"ex:Book"</span>,
+    <span class="diff">"dc:creator"</span>: "Plato",
+    <span class="diff">"dc:title"</span>: "The Republic",
+    <span class="diff">"ex:contains"</span>: {
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": <span class="diff">"ex:Chapter"</span>,
+      <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",
+      <span class="diff">"dc:title"</span>: "The Introduction"
+    },
+  },
+}</pre>
+  <p>
+    In this example, two different vocabularies are identified with prefixes, and used as type
+    and property values using the CURIE notation.
+  </p>
+  <p>
+    A <dfn title="CURIE" id="dfn-curie">CURIE</dfn> is a compact way of describing an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The term actually comes
+    from Compact URI.
+    Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em> separated by a ':'. In
+    JSON-LD, the prefix may be the empty string, denoting the <dfn title="default_prefix" id="dfn-default_prefix">default prefix</dfn>.
+  </p>
+  <p>
+    CURIEs are defined more formally in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">section 6 "CURIE Syntax Definition"</a></cite>.
+  </p>
+</div>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">4.2 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as doubles, 
+integers, and boolean values. As demonstrated below, JSON-LD utilizes that 
+information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
+
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+<p class="note">When dealing with a number of modern programming languages,
+including JavaScript ECMA-262, there is no distinction between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is, 
+the <a class="tref internalDFN" title="number" href="#dfn-number">number</a> <code>5.3</code> and the <a class="tref internalDFN" title="number" href="#dfn-number">number</a> 
+<code>5.3e0</code> are treated as if they were the same. When converting from 
+JSON-LD to a language-native format and back, datatype information is lost in a 
+number of these languages. Thus, one could say that <code>5.3</code> is a 
+<strong>xsd:decimal</strong> and <code>5.3e0</code> is an 
+<strong>xsd:double</strong> in JSON-LD, but when both values are 
+converted to a language-native format the datatype difference between the two 
+is lost because the machine-level representation will almost always be a 
+<strong>double</strong>. 
+Implementers should be aware of this potential round-tripping issue between 
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
+objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
+to a language native type.
+</p>
+
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">4.3 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of values to particular data types. 
+Type coercion allows someone deploying JSON-LD to coerce the incoming or 
+outgoing types to the proper data type based on a mapping of data type IRIs to 
+property types. Using type coercion, one may convert simple JSON data to 
+properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to 
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {  
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+        "@iri": "homepage"
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="chaining" class="section">
+  <h3><span class="secno">4.4 </span>Chaining</h3>
+  <p>
+    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to 
+    use the definition of JSON-LD objects as <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This 
+    is a commonly used mechanism for creating a parent-child relationship 
+    between two <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a>s.
+  </p>
+  <p>The example shows an two subjects related by a property from the first 
+  subject:</p>
+
+  <pre class="example">
+{
+...
+  "name": "Manu Sporny",
+  "<span class="diff">knows</span>": {
+    "<span class="diff">@type</span>": "<span class="diff">Person</span>",
+    "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}</pre>
+  
+  <p>
+    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a 
+    JSON value at any point in JSON-LD.
+  </p>
+</div>
+
+<div id="identifying-unlabeled-nodes" class="section">
+<h3><span class="secno">4.5 </span>Identifying Unlabeled Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this type of node is called
+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) <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a> 
+prefix.</p>
+
+<pre class="example">
+{
+...
+  "@subject": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the 
+unlabeled node. This practice, however, is usually frowned upon when
+generating Linked Data. If a developer finds that they refer to the unlabeled
+node more than once, they should consider naming the node using a resolve-able
+IRI.
+</p>
+
+</div>
+
+<div id="overriding-keywords" class="section">
+<h3><span class="secno">4.6 </span>Overriding Keywords</h3>
+
+<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
+to be overridden. This feature allows more legacy JSON content to be supported 
+by JSON-LD. It also allows developers to design domain-specific implementations 
+using only the JSON-LD context.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {  
+     <span class="diff">"url": "@subject"</span>,
+     <span class="diff">"a": "@type"</span>,
+     "name": "http://schema.org/name"
+  },
+  "url": "http://example.com/about#gregg",
+  "a": "http://schema.org/Person",
+  "name": "Gregg Kellogg"
+}</pre>
+
+<p>In the example above, the <code>@subject</code> and <code>@type</code> 
+keywords have been overridden by <strong>url</strong> and 
+<strong>a</strong>, respectively.
+</p>
+
+</div>
+
+<div id="normalization" class="section">
+<h3><span class="secno">4.7 </span>Normalization</h3>
+
+<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and 
+performing a deterministic transformation on that input that results in a 
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> that any conforming JSON-LD processor would have 
+generated given the same input. The problem is a fairly difficult technical 
+problem to solve because it requires a directed graph to be ordered into a 
+set of nodes and edges in a deterministic way. This is easy to do when all of 
+the nodes have unique names, but very difficult to do when some of the nodes 
+are not labeled.
+</p>
+
+<p>Normalization is useful when comparing two graphs against one another,
+when generating a detailed list of differences between two graphs, and
+when generating a cryptographic digital signature for information contained 
+in a graph or when generating a hash of the information contained in a graph.
+</p>
+
+<p>The example below is an un-normalized JSON-LD document:</p>
+
+<pre class="example">
+{
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
+      "@coerce": 
+      {
+         "@iri": ["homepage"]
+      }
+   }
+}</pre>
+
+<p>The example below is the normalized form of the JSON-LD document above:</p>
+
+<p class="note">Whitespace is used below to aid readability. The normalization
+algorithm for JSON-LD remove all unnecessary whitespace in the fully 
+normalized form.</p>
+
+<pre class="example">
+[{
+    "@subject": 
+    {
+        "@iri": "_:c14n0"
+    },
+    "http://xmlns.com/foaf/0.1/homepage": 
+    {
+        "@iri": "http://manu.sporny.org/"
+    },
+    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
+}]</pre>
+
+<p>Notice how all of the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s have been expanded and sorted in
+alphabetical order. Also, notice how the <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> has been 
+labeled with a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">blank node identifier</a>. Normalization ensures that any arbitrary
+graph containing exactly the same information would be normalized to exactly
+the same form shown above.</p>
+
+</div>
+
+</div>
+
+<div id="the-application-programming-interface" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>The Application Programming Interface</h2>
+
+<p>This API provides a clean mechanism that enables developers to convert 
+JSON-LD data into a a variety of output formats that are easier to work with in 
+various programming languages. If an API is provided in a programming 
+environment, the entire API <em class="rfc2119" title="must">must</em> be implemented.
+</p>
+
+<div id="jsonldprocessor" class="section">
+<h3><span class="secno">5.1 </span>JSONLDProcessor</h3>
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JSONLDProcessor</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-expand-object-object-input-JSONLDProcessorCallback-callback">expand</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-compact-object-object-input-object-context-JSONLDProcessorCallback-callback">compact</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">context</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-frame-object-object-input-object-frame-object-options-JSONLDProcessorCallback-callback">frame</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">frame</span></span>, <span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">options</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-normalize-object-object-input-JSONLDProcessorCallback-callback">normalize</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">callback</span></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessor-triples-object-object-input-JSONLDTripleCallback-tripleCallback-JSONLDProcessorCallback-parserCallback">triples</a></span> (<span class="idlParam">in <span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">in <span class="idlParamType"><a href="#idl-def-JSONLDTripleCallback" class="idlType"><code>JSONLDTripleCallback</code></a></span> <span class="idlParamName">tripleCallback</span></span>, <span class="idlParam">in optional <span class="idlParamType"><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a>?</span> <span class="idlParamName">parserCallback</span></span>);</span>
+};</span>
+</pre><div id="methods" class="section"><h4><span class="secno">5.1.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessor-compact-object-object-input-object-context-JSONLDProcessorCallback-callback"><code>compact</code></dt><dd><a href="#compaction">Compacts</a> the given <code>input</code>
+    according to the steps in the
+    <a href="#compaction-algorithm">Compaction Algorithm</a>. The
+    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, compacted and returned if there are
+    no errors. If the compaction fails, <code>null</code> <em class="rfc2119" title="must">must</em> be returned.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform compaction on.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The base context to use when compacting the <code>input</code>.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+       the given <code>input</code>.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDProcessor-expand-object-object-input-JSONLDProcessorCallback-callback"><code>expand</code></dt><dd><a href="#expansion">Expands</a> the given <code>input</code>
+    according to the steps in the
+    <a href="#expansion-algorithm">Expansion Algorithm</a>. The
+    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, expanded and returned if there are
+    no errors. If the expansion fails, <code>null</code> <em class="rfc2119" title="must">must</em> be returned.
+    <div class="issue">How do we generate warning messages during this process?
+      For example, what happens when a key that doesn't have a mapping is
+      discovered?</div>
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to copy and perform the expansion upon.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the <code>input</code>.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDProcessor-frame-object-object-input-object-frame-object-options-JSONLDProcessorCallback-callback"><code>frame</code></dt><dd><a href="#framing">Frames</a> the given <code>input</code>
+    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. Exceptions are thrown if there are errors.
+    <div class="issue">Define what the exceptions are. We need to specify
+    whether or not we want exceptions thrown, or errors returned to the
+    error callback?</div>
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform framing on.</td></tr><tr><td class="prmName">frame</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The frame to use when re-arranging the data.</td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A set of options that will affect the framing algorithm.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given <code>input</code>.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDProcessor-normalize-object-object-input-JSONLDProcessorCallback-callback"><code>normalize</code></dt><dd><a href="#normalization">Normalizes</a> the given <code>input</code>
+    according to the steps in the
+    <a href="#normalization-algorithm">Normalization Algorithm</a>. The
+    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, normalized and returned if there are
+    no errors. If the compaction fails, <code>null</code> <em class="rfc2119" title="must">must</em> be returned.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform normalization upon.</td></tr><tr><td class="prmName">callback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given JSON-LD string.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JSONLDProcessor-triples-object-object-input-JSONLDTripleCallback-tripleCallback-JSONLDProcessorCallback-parserCallback"><code>triples</code></dt><dd>Processes the <code>input</code> according to the 
+    <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>, calling
+    the provided <code>tripleCallback</code> for each triple generated.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to process when outputting triples.</td></tr><tr><td class="prmName">tripleCallback</td><td class="prmType"><code><a href="#idl-def-JSONLDTripleCallback" class="idlType"><code>JSONLDTripleCallback</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given <code>input</code>.
+     <div class="issue">This callback should be aligned with the 
+       RDF API.</div></td></tr><tr><td class="prmName">parserCallback</td><td class="prmType"><code><a href="#idl-def-JSONLDProcessorCallback" class="idlType"><code>JSONLDProcessorCallback</code></a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given <code>input</code>.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
+</div>
+
+<div id="jsonldprocessorcallback" class="section">
+<h3><span class="secno">5.2 </span>JSONLDProcessorCallback</h3>
+<p>The JSONLDProcessorCallback is called whenever a processing error occurs 
+while processing the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>.</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDProcessorCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDProcessorCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDProcessorCallback-error-void-DOMString-error">error</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">error</span></span>);</span>
+};</span>
+</pre><div id="methods-1" class="section"><h4><span class="secno">5.2.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDProcessorCallback-error-void-DOMString-error"><code>error</code></dt><dd>This callback is invoked whenever an error occurs during processing.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">error</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A descriptive error string returned by the processor.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+</div>
+
+<div id="jsonldtriplecallback" class="section">
+<h3><span class="secno">5.3 </span>JSONLDTripleCallback</h3>
+<p>The JSONLDTripleCallback is called whenever the processor generates a
+triple during the <code>triple()</code> call.</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JSONLDTripleCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JSONLDTripleCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JSONLDTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">triple</a></span> (<span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">subject</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">objectType</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">object</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">datatype</span></span>, <span class="idlParam">in <span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">language</span></span>);</span>
+};</span>
+</pre><div id="methods-2" class="section"><h4><span class="secno">5.3.1 </span>Methods</h4><dl class="methods"><dt id="widl-JSONLDTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language"><code>triple</code></dt><dd>This callback is invoked whenever a triple is generated by the processor.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject IRI that is associated with the triple.</td></tr><tr><td class="prmName">property</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The property IRI that is associated with the triple.</td></tr><tr><td class="prmName">objectType</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The type of object that is associated with the triple. Valid values
+       are <code>IRI</code> and <code>literal</code>.</td></tr><tr><td class="prmName">object</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The object value associated with the subject and the property.</td></tr><tr><td class="prmName">datatype</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The datatype associated with the object.</td></tr><tr><td class="prmName">language</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The language associated with the object in BCP47 format.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+</div>
+
+
+</div>
+
+<div id="algorithms" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>Algorithms</h2>
+
+<p>All algorithms described in this section are intended to operate on
+language-native data structures. That is, the serialization to a text-based
+JSON document isn't required as input or output to any of these algorithms and 
+language-native data structures <em class="rfc2119" title="must">must</em> be used where applicable.</p>
+
+<div id="syntax-tokens-and-keywords" class="section">
+  <h3><span class="secno">6.1 </span>Syntax Tokens and Keywords</h3>
+  
+  <p>JSON-LD specifies a number of syntax tokens and keywords that are using
+  in all algorithms described in this section:</p>
+  
+  <dl>
+  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
+  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
+  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
+  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
+  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
+  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+  <dt><code>:</code></dt><dd>The separator for <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>s when used in JSON keys or JSON values.</dd>
+  <dt><code>@subject</code></dt><dd>Sets the active subjects.</dd>
+  <dt><code>@type</code></dt><dd>Used to set the type of the active subjects.</dd>
+  </dl>
+</div>
+
+<div id="algorithm-terms" class="section">
+  <h3><span class="secno">6.2 </span>Algorithm Terms</h3>
+  <dl>
+    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
+    <dd>
+      a context that is specified to the algorithm before processing begins.
+    </dd>
+    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
+    <dd>
+      the currently active subject that the processor should use when 
+      processing.
+    </dd>
+    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
+    <dd>
+      the currently active property that the processor should use when 
+      processing.
+    </dd>
+    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
+    <dd>
+      the currently active object that the processor should use when
+      processing.
+    </dd>
+    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
+    <dd>
+      a context that is used to resolve <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>s while the processing
+      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context 
+      contained within the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+    </dd>
+    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
+    <dd>
+      a context that is specified within a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>,
+      specified via the <code>@context</code> keyword.
+    </dd>
+    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
+    <dd>
+      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
+      context</a>, <a class="tref" title="current_subject">current subject</a>, and 
+      <a class="tref" title="current_property">current property</a>. The <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> is managed
+      as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
+      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new 
+      <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
+    </dd>
+    <dt><dfn title="JSON-LD_input" id="dfn-json-ld_input">JSON-LD input</dfn></dt>
+    <dd>
+      The JSON-LD data structure that is provided as input to the algorithm.
+    </dd>
+    <dt><dfn title="JSON-LD_output" id="dfn-json-ld_output">JSON-LD output</dfn></dt>
+    <dd>
+      The JSON-LD data structure that is produced as output by the algorithm.
+    </dd>
+
+  </dl>
+</div>
+
+<div id="context-1" class="section">
+  <h3 id="context"><span class="secno">6.3 </span>Context</h3>
+  <p>
+    Processing of JSON-LD data structure is managed recursively.
+    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
+    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
+    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+  </p>
+  <p>
+    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> (or elements
+    of a list (see <span a="#list-processing">List Processing</span>)).
+  </p>
+  <p>
+    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> having a key of
+    <code>@context</code> with <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> value. When processing a <a class="tref" title="local__context">local
+    context</a>, special processing rules apply:
+  </p>
+  <ol class="algorithm">
+    <li>Create a new, empty <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
+    <li>
+      If the value is a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, it <em class="rfc2119" title="must">must</em> have a lexical form of IRI and used to initialize
+      a new JSON document which replaces the value for subsequent processing.
+    </li>
+    <li>If the value is a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>, perform the following steps:
+      <ol class="algorithm">
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@base</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
+          <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of an absolute IRI. Add the base mapping to the <a class="tref" title="local__context">local
+          context</a>. <p class="issue">Turtle allows @base to be relative. If we did this, we
+          would have to add <a href="#iri-expansion">IRI Expansion</a>.</p>
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@vocab</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
+          <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of an absolute IRI. Add the vocabulary mapping to the
+          <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> after performing <a href="#iri-expansion">IRI Expansion</a> on
+          the associated value.
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@coerce</code> key, it <em class="rfc2119" title="must">must</em> have a value of a
+          <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>. Add the <code>@coerce</code> mapping to the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>
+          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value(s).
+        </li>
+        <li>
+          Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> and
+          <em class="rfc2119" title="must">must</em> have the value of a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of IRI. Merge the key-value
+          pair into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.
+        </li>
+      </ol>
+    </li>
+    <li>
+      Merge the of <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s <code>@coerce</code> mapping into  the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping as described <a href="#coerce">below</a>.
+    </li>
+    <li>
+      Merge all entries other than the <code>@coerce</code> mapping from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>to the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> overwriting any duplicate values.
+    </li>
+  </ol>
+  
+  <div id="coerce" class="section">
+    <h4><span class="secno">6.3.1 </span>Coerce</h4>
+    <p>
+      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
+      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
+      <code>@coerce</code> mapping, overwriting any duplicate values in 
+      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
+      The <code>@coerce</code> mapping has either a single <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a> or an
+      <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of CURIEs. When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+      map all CURIE values to <a class="tref internalDFN" title="array" href="#dfn-array">array</a> form and replace with the union of the value from
+      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+      with a single CURIE, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
+    </p>
+  </div>
+
+  <div id="initial-context" class="section">
+    <h4><span class="secno">6.3.2 </span>Initial Context</h4>
+    <p>The <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> is initialized as follows:</p>
+    <ul>
+      <li>
+        <code>@base</code> is set using <cite><href="http: www.ietf.org="" rfc="" rfc2396.txt"="">section 5.1 Establishing a
+        Base URI</href="http:></cite> of [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>]. Processors <em class="rfc2119" title="may">may</em> provide a means
+        of setting the base IRI programatically.
+      </li>
+      <li><code>@coerce</code> is set with a single mapping from <code>@iri</code> to <code>@type</code>.</li>
+    </ul>
+    <pre class="example">
+{
+    "@base": <span class="diff">document-location</span>,
+    "@context": {
+      "@iri": "@type"
+    }
+}</pre>
+  </div>
+</div>
+
+<div id="iri-expansion" class="section">
+  <h3><span class="secno">6.4 </span>IRI Expansion</h3>
+  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
+    transforming a value representing an IRI into an actual IRI.</p>
+  <p>IRIs may be represented as an explicit string, or as a <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>, as a value relative to <code>@base</code>
+    or <code>@vocab</code>.</p>
+  <p>The algorithm for generating an IRI is:
+    </p><ol class="algorithm">
+      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
+      <li>If the prefix is a '_' (underscore), the IRI is unchanged.</li>
+      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
+        by prepending the mapped prefix to the (possibly empty) suffix using textual concatenation. Note that an empty
+        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
+      <li>If the IRI being processed is for a property (i.e., a key value in a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>, or a
+        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
+        join the mapped value to the suffix using textual concatenation.</li>
+      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
+        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>].</li>
+      <li>Otherwise, use the value directly as an IRI.</li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="iri-compaction" class="section">
+  <h3><span class="secno">6.5 </span>IRI Compaction</h3>
+  <p>Some keys and values are expressed using IRIs. This section defines an 
+    algorithm for transforming an IRI to a compact IRI using the
+    <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es specified in the 
+    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</p>
+
+  <p>The algorithm for generating a compacted IRI is:
+    </p><ol class="algorithm">
+      <li>Search every key-value pair in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for
+        a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that is a complete match 
+        against the IRI. If a complete match is found, the resulting compacted
+        IRI is the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> associated with the IRI in the 
+        <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
+      <li>If a complete match is not found, search for a partial match from
+        the beginning of the IRI. For all matches that are found, the resulting
+        compacted IRI is the <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a> associated with the partially
+        matched IRI in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> concatenated with a 
+        colon (:) character and the unmatched part of the string. If there is
+        more than one compacted IRI produced, the final value is the 
+        lexicographically least value of the entire set of compacted IRIs.</li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="value-expansion" class="section">
+  <h3><span class="secno">6.6 </span>Value Expansion</h3>
+  <p>Some values in JSON-LD can be expressed in a compact form. These values
+    are required to be expanded at times when processing JSON-LD documents.
+  </p>
+
+  <p>The algorithm for expanding a value is:
+    </p><ol class="algorithm">
+      <li>If the key that is associated with the value has an associated
+        coercion entry in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, the resulting
+        expansion is an object populated according to the following steps:
+        <ol class="algorithm">
+          <li>If the coercion target is <code>@iri</code>, expand the value
+            by adding a new key-value pair where the key is <code>@iri</code>
+            and the value is the expanded IRI according to the
+            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+          <li>If the coercion target is a typed literal, expand the value
+            by adding two new key-value pairs. The first key-value pair 
+            will be <code>@literal</code> and the unexpanded value. The second
+            key-value pair will be <code>@datatype</code> and the associated
+            coercion datatype expanded according to the
+            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+        </ol>
+      </li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="value-compaction" class="section">
+  <h3><span class="secno">6.7 </span>Value Compaction</h3>
+  <p>Some values, such as IRIs and typed literals, may be expressed in an
+    expanded form in JSON-LD. These values are required to be compacted at 
+    times when processing JSON-LD documents.
+  </p>
+
+  <p>The algorithm for compacting a value is:
+    </p><ol class="algorithm">
+      <li>If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> contains a coercion target for the
+        key that is associated with the value, compact the value using the
+        following steps:
+        <ol class="algorithm">
+          <li>If the coercion target is an <code>@iri</code>, the compacted
+            value is the value associated with the <code>@iri</code> key,
+            processed according to the 
+            <a href="#iri-compaction">IRI Compaction</a> steps.</li>
+          <li>If the coercion target is a typed literal, the compacted
+            value is the value associated with the <code>@literal</code> key.
+          </li>
+          <li>Otherwise, the value is not modified.</li>
+        </ol>
+      </li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="expansion-1" class="section">
+<h3><span class="secno">6.8 </span>Expansion</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>As stated previously, expansion is the process of taking a JSON-LD 
+input and expanding all IRIs and typed literals to their fully-expanded form. 
+The output will not contain a single context declaration and will have all IRIs 
+and typed literals fully expanded.
+</p>
+
+<div id="expansion-algorithm" class="section">
+<h4><span class="secno">6.8.1 </span>Expansion Algorithm</h4>
+
+<ol class="algorithm">
+  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, 
+  process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> recursively using this algorithm.</li>
+  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an object, 
+  update the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> according to the steps outlined in
+  the <a href="#context">context</a> section. Process each key, expanding 
+  the key according to the <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+  <ol class="algorithm">
+    <li>Process each value associated with each key
+      <ol class="algorithm">
+        <li>If the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> 
+        recursively using this algorithm.</li>
+        <li>If the value is an object, process the object recursively
+        using this algorithm.</li>
+        <li>Otherwise, check to see the associated key has an associated 
+        coercion rule. If the value should be coerced, expand the value 
+        according to the <a href="#value-expansion">Value Expansion</a> rules. 
+        If the value does not need to be coerced, leave the value as-is.
+        </li>
+      </ol>
+    </li><li>Remove the context from the object</li>
+  </ol>
+</ol>
+</div>
+
+</div>
+
+<div id="compaction-1" class="section">
+<h3><span class="secno">6.9 </span>Compaction</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>As stated previously, compaction is the process of taking a JSON-LD 
+input and compacting all IRIs using a given context. The output
+will contain a single top-level context declaration and will only use
+<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix">prefix</a>es and will ensure that all
+typed literals are fully compacted.
+</p>
+
+<div id="compaction-algorithm" class="section">
+<h4><span class="secno">6.9.1 </span>Compaction Algorithm</h4>
+
+<ol class="algorithm">
+  <li>Perform the <a href="#expansion-algorithm">Expansion Algorithm</a> on 
+  the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>.</li>
+  <li>If the top-level item is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> 
+    recursively, starting at this step.
+  </li><li>If the top-level item is an object, compress each key using the steps
+    defined in <a href="#iri-compaction">IRI Compaction</a> and compress each
+    value using the steps defined in 
+    <a href="#value-compaction">Value Compaction</a></li>
+  
+</ol>
+</div>
+
+</div>
+
+
+<div id="framing-1" class="section">
+<h3><span class="secno">6.10 </span>Framing</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+directed graph can have many different serializations, each expressing
+exactly the same information. Developers typically don't work directly with
+graphs, but rather, prefer trees when dealing with JSON. While mapping a graph 
+to a tree can be done, the layout of the end result must be specified in 
+advance. This section defines an algorithm for mapping a graph to 
+a tree given a <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>.
+</p>
+
+<div id="framing-algorithm-terms" class="section">
+<h4><span class="secno">6.10.1 </span>Framing Algorithm Terms</h4>
+ <dl>
+   <dt><dfn title="input_frame" id="dfn-input_frame">input frame</dfn></dt>
+   <dd>
+     the initial <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> provided to the framing algorithm.
+   </dd>
+   <dt><dfn title="framing_context" id="dfn-framing_context">framing context</dfn></dt>
+   <dd>
+     a context containing the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, the
+     <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> and the 
+     <a class="tref" title="omit_default_flag">omit default flag</a>.
+   </dd>
+   <dt><dfn title="object_embed_flag" id="dfn-object_embed_flag">object embed flag</dfn></dt>
+   <dd>
+     a flag specifying that objects should be directly embedded in the output,
+     instead of being referred to by their IRI.
+   </dd>
+   <dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">explicit inclusion flag</dfn></dt>
+   <dd>
+     a flag specifying that for properties to be included in the output, they
+     must be explicitly declared in the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a>.
+   </dd>
+   <dt><dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">omit missing properties flag</dfn></dt>
+   <dd>
+     a flag specifying that properties that are missing from the 
+     <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> should be omitted from the output.
+   </dd>
+   <dt><dfn title="match_limit" id="dfn-match_limit">match limit</dfn></dt>
+   <dd>
+     A value specifying the maximum number of matches to accept when building
+     arrays of values during the framing algorithm. A value of -1 specifies
+     that there is no match limit.
+   </dd>
+   <dt><dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">map of embedded subjects</dfn></dt>
+   <dd>
+     A map that tracks if a subject has been embedded in the output of the
+     <a href="#framing-algorithm">Framing Algorithm</a>.
+   </dd>
+ </dl>
+</div>
+
+<div id="framing-algorithm" class="section">
+<h4><span class="secno">6.10.2 </span>Framing Algorithm</h4>
+
+<p>The framing algorithm takes <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> that has been 
+normalized according to the 
+<a href="#normalization-algorithm">Normalization Algorithm</a> 
+(<strong>normalized input</strong>), an 
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a> that has been expanded according to the
+<a href="#expansion-algorithm">Expansion Algorithm</a> 
+(<strong>expanded frame</strong>), and a number of options and produces
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The following series of steps is the recursive
+portion of the framing algorithm:
+</p>
+
+<ol class="algorithm">
+  <li>Initialize the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> by setting the
+   <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, clearing the 
+   <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a>, and clearing the
+   <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>. Override these values
+   based on input options provided to the algorithm by the application.
+  </li>
+  <li>Generate a <dfn title="list_of_frames" id="dfn-list_of_frames">list of frames</dfn> by processing the 
+    <strong>expanded frame</strong>:
+    <ol class="algorithm">
+      <li>If the <strong>expanded frame</strong> is not an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, set 
+        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to 1, place the 
+        <strong>expanded frame</strong> into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
+        and set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to <code>null</code>.</li>
+      <li>If the <strong>expanded frame</strong> is an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, place an
+        empty object into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
+        set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and set
+        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
+      <li>If the <strong>expanded frame</strong> is a non-empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, add
+        each item in the <strong>expanded frame</strong> into the 
+        <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>, set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an
+        <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and set <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
+    </ol></li>
+  <li>Create a <dfn title="match_array" id="dfn-match_array">match array</dfn> for each <strong>expanded frame</strong> 
+    in the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> halting when either the 
+    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> is zero or the end of the 
+    <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> is reached. If an 
+    <strong>expanded frame</strong> is 
+    not an object, the processor <em class="rfc2119" title="must">must</em> throw a <code>Invalid Frame Format</code> 
+    exception. Add each matching item from the <strong>normalized input</strong>
+    to the <a class="tref" title="matches_array">matches array</a> and decrement the 
+    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> by 1 if:
+    <ol class="algorithm">
+       <li>The <strong>expanded frame</strong> has an <code>rdf:type</code> 
+         that exists in the item's list of <code>rdf:type</code>s. Note: 
+         the <code>rdf:type</code> can be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, but only one value needs 
+         to be in common between the item and the 
+         <strong>expanded frame</strong> for a match.</li>
+       <li>The <strong>expanded frame</strong> does not have an 
+         <code>rdf:type</code> property, but every property in the 
+         <strong>expanded frame</strong> exists in the item.</li>
+    </ol></li>
+  <li>Process each item in the <a class="tref internalDFN" title="match_array" href="#dfn-match_array">match array</a> with its associated
+    <dfn title="match_frame" id="dfn-match_frame">match frame</dfn>:
+    <ol class="algorithm">
+      <li>If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@embed</code>
+        keyword, set the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> to its value. 
+        If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@explicit</code>
+        keyword, set the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> to its value. 
+        Note: if the keyword exists, but the value is neither
+        <code>true</code> or <code>false</code>, set the associated flag to 
+        <code>true</code>.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is cleared and the item has
+        the <code>@subject</code> property, replace the item with the value
+        of the <code>@subject</code> property.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
+        the <code>@subject</code> property, and its IRI is in the 
+        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>, throw a
+        <code>Duplicate Embed</code> exception.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
+        the <code>@subject</code> property and its IRI is not in the
+        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>:
+        <ol class="algorithm">
+          <li>If the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> is set, 
+            then delete any key from the item that does not exist in the
+            <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except <code>@subject</code>.</li>
+          <li>For each key in the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except for
+            keywords and <code>rdf:type</code>:
+          <ol class="algorithm">
+            <li>If the key is in the item, then build a new 
+              <dfn title="recursion_input_list" id="dfn-recursion_input_list">recursion input list</dfn> using the object or objects 
+              associated with the key. If any object contains an
+              <code>@iri</code> value that exists in the 
+              <a class="tref" title="normalized_input">normalized input</a>, replace the object in the
+              <a class="tref" title="recusion_input_list">recusion input list</a> with a new object containing
+              the <code>@subject</code> key where the value is the value of
+              the <code>@iri</code>, and all of the other key-value pairs for
+              that subject. Set the <dfn title="recursion_match_frame" id="dfn-recursion_match_frame">recursion match frame</dfn> to the
+              value associated with the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>'s key. Replace
+              the value associated with the key by recursively calling this
+              algorithm using <a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">recursion input list</a>,
+              <a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">recursion match frame</a> as input.</li>
+            <li>If the key is not in the item, add the key to the item and
+              set the associated value to an empty array if the
+              <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> key's value is an array 
+              or <code>null</code> otherwise.</li>
+            <li>If value associated with the item's key is <code>null</code>,
+              process the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>:
+              <ol class="algorithm">
+                <li>If the value associated with the key in the 
+                  <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> is an array, use the first frame 
+                  from the array as the <dfn title="property_frame" id="dfn-property_frame">property frame</dfn>, otherwise
+                  set the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> to an empty object.</li>
+                <li>If the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> contains an
+                <code>@omitDefault</code> keyword, set the
+                <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> to its value.
+                Note: if the keyword exists, but the value is neither
+                <code>true</code> or <code>false</code>, set the associated
+                flag to <code>true</code>.</li>
+                <li>If the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> is set,
+                  delete the key in the item. Otherwise, if the
+                  <code>@default</code> keyword is set in the 
+                  <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> set the item's value to the value
+                  of <code>@default</code>.</li>
+              </ol></li>
+          </ol></li>
+        </ol>
+      </li><li>If the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> is <code>null</code> set it to
+        the item, otherwise, append the item to the
+        <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.
+    </li></ol>
+  </li><li>Return the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.</li>
+</ol>  
+
+The final, non-recursive step of the framing algorithm requires the 
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to be compacted according to the 
+<a href="#compaction-algorithm">Compaction Algorithm</a> by using the 
+context provided in the <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a>. The resulting value is the
+final output of the compaction algorithm and is what should be returned to the
+application.
+
+</div>
+
+</div>
+
+<div id="normalization-1" class="section">
+<h3><span class="secno">6.11 </span>Normalization</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and 
+performing a deterministic transformation on that input that results in all
+aspects of the graph being fully expanded and named in the 
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The normalized output is generated in such a way 
+that any conforming JSON-LD processor will generate identical output 
+given the same input. The problem is a fairly difficult technical 
+problem to solve because it requires a directed graph to be ordered into a 
+set of nodes and edges in a deterministic way. This is easy to do when all of 
+the nodes have unique names, but very difficult to do when some of the nodes 
+are not labeled.
+</p>
+
+<p>In time, there may be more than one normalization algorithm that will need
+to be identified. For identification purposes, this algorithm is named 
+<abbr title="Universal Graph Normalization Algorithm 2011">UGNA2011</abbr>.
+</p>
+
+<div id="normalization-algorithm-terms" class="section">
+<h4><span class="secno">6.11.1 </span>Normalization Algorithm Terms</h4>
+ <dl>
+   <dt><dfn title="label" id="dfn-label">label</dfn></dt>
+   <dd>
+     The subject IRI associated with a graph node. The subject IRI is expressed
+     using a key-value pair in a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> where the key is
+     <code>@subject</code> and the value is a string that is an IRI or 
+     a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> containing the key <code>@iri</code> and
+     a value that is a string that is an IRI.
+   </dd>
+   <dt><dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">list of expanded nodes</dfn></dt>
+   <dd>
+     A list of all nodes in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> graph containing no
+     embedded objects and having all keys and values expanded according to the
+     steps in the <a href="#expansion-algorithm">Expansion Algorithm</a>.
+   </dd>
+   <dt><dfn title="alpha" id="dfn-alpha">alpha</dfn> and <dfn title="beta" id="dfn-beta">beta</dfn> values</dt>
+   <dd>
+     The words <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> refer to the first and
+     second nodes or values being examined in an algorithm. The names are
+     merely used to refer to each input value to a comparison algorithm.
+   </dd>
+   <dt><dfn title="renaming_counter" id="dfn-renaming_counter">renaming counter</dfn></dt>
+   <dd>
+     A counter that is used during the 
+     <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. The
+     counter typically starts at one (1) and counts up for every node that is
+     relabeled. There will be two such renaming counters in an implementation
+     of the normalization algorithm. The first is the
+     <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> and the second is the
+     <a class="tref" title="deterministic_labeling_counter">deterministic labeling counter</a>.
+   </dd>
+   <dt><dfn title="serialization_label" id="dfn-serialization_label">serialization label</dfn></dt>
+   <dd>
+     An identifier that is created to aid in the normalization process in the
+     <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a>. The
+     value typically takes the form of <code>s<NUMBER></code> or 
+     <code>c<NUMBER></code>.
+   </dd>
+</dl>
+</div>
+
+<div id="normalization-state" class="section">
+<h4><span class="secno">6.11.2 </span>Normalization State</h4>
+
+<p>When performing the steps required by the normalization algorithm, 
+it is helpful to track the many pieces of information in a
+data structure called the <dfn title="normalization_state" id="dfn-normalization_state">normalization state</dfn>. Many of these
+pieces simply provide indexes into the graph. The information
+contained in the <a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a> is described below.</p>
+
+<dl>
+   <dt><dfn title="node_state" id="dfn-node_state">node state</dfn></dt>
+   <dd>
+     Each node in the graph will be assigned a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>. This
+     state contains the information necessary to deterministically
+     <a class="tref internalDFN" title="label" href="#dfn-label">label</a> all nodes in the graph. A <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>
+     includes:
+     <dl>
+        <dt><dfn title="node_reference" id="dfn-node_reference">node reference</dfn></dt>
+        <dd>
+          A <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> is a reference to a node in the graph.
+          For a given <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>
+          refers to the node that the state is for. When a
+          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> is created, its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>
+          should be to the node it is created for.
+        </dd>
+        <dt><dfn title="outgoing_list" id="dfn-outgoing_list">outgoing list</dfn></dt>
+        <dd>
+          Lists the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s for all nodes that are properties of
+          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>. This list should be initialized
+          by iterating over every object associated with a property in the
+          <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> adding its label if it is another node.
+        </dd>
+        <dt><dfn title="incoming_list" id="dfn-incoming_list">incoming list</dfn></dt>
+        <dd>
+          Lists the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s for all nodes in the graph for which
+          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> is a property. This list is 
+          initialized to an empty list.
+        </dd>
+        <dt><dfn title="outgoing_serialization_map" id="dfn-outgoing_serialization_map">outgoing serialization map</dfn></dt>
+        <dd>
+          Maps node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s to <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s.
+          This map is initialized to an empty map. When this map is populated,
+          it will be filled with keys that are the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of every node in the
+          graph with a label that begins with <code>_:</code> and that has a
+          path, via properties, that starts with the
+          <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
+        </dd>
+        <dt><dfn title="outgoing_serialization" id="dfn-outgoing_serialization">outgoing serialization</dfn></dt>
+        <dd>
+          A string that can be lexicographically compared to the
+          <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a>s of other
+          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>s. It is a representation of the
+          <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> and other related
+          information. This string is initialized to an empty string.
+        </dd>
+        <dt><dfn title="incoming_serialization_map" id="dfn-incoming_serialization_map">incoming serialization map</dfn></dt>
+        <dd>
+          Maps node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s to <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s.
+          This map is initialized to an empty map. When this map is populated,
+          it will be filled with keys that are the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of every
+          node in the graph with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that begins with
+          <code>_:</code> and that has a path, via properties, that ends with
+          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
+        </dd>
+        <dt><dfn title="incoming_serialization" id="dfn-incoming_serialization">incoming serialization</dfn></dt>
+        <dd>
+          A string that can be lexicographically compared to the
+          <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a>s of other
+          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>s. It is a representation of the
+          <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> and other related
+          information. This string is initialized to an empty string.
+        </dd>
+     </dl>
+   </dd>
+   <dt><dfn title="node_state_map" id="dfn-node_state_map">node state map</dfn></dt>
+   <dd>
+     A mapping from a node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>.
+     It is initialized to an empty map.
+   </dd>
+   <dt><dfn title="labeling_prefix" id="dfn-labeling_prefix">labeling prefix</dfn></dt>
+   <dd>
+     The labeling prefix is a string that is used as the beginning of a node
+     <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. It should be initialized to a random base string that
+     starts with the characters <code>_:</code>, is not used by any other
+     node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>, and does not
+     start with the characters <code>_:c14n</code>. The prefix has two uses.
+     First it is used to temporarily name nodes during the normalization
+     algorithm in a way that doesn't collide with the names that already
+     exist as well as the names that will be generated by the normalization
+     algorithm. Second, it will eventually be set to <code>_:c14n</code> to
+     generate the final, deterministic labels for nodes in the graph. This
+     prefix will be concatenated with the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> to
+     produce a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. For example, <code>_:j8r3k</code> is
+     a proper initial value for the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a>.
+   </dd>
+   <dt><dfn title="labeling_counter" id="dfn-labeling_counter">labeling counter</dfn></dt>
+   <dd>
+     A counter that is used to label nodes. It is appended to the
+     <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> to create a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. It is
+     initialized to <code>1</code>.
+   </dd>
+   <dt><dfn title="map_of_flattened_nodes" id="dfn-map_of_flattened_nodes">map of flattened nodes</dfn></dt>
+   <dd>
+     A map containing a representation of all nodes in the graph where the
+     key is a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a> and the value is a single
+     <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that has no nested sub-objects 
+     and has had all properties for the same node merged into a single
+     <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
+   </dd>
+</dl>
+
+</div>
+
+<div id="normalization-algorithm" class="section">
+<h4><span class="secno">6.11.3 </span>Normalization Algorithm</h4>
+
+<p>The normalization algorithm expands the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>,
+flattens the data structure, and creates an initial set of names for all
+nodes in the graph. The flattened data structure is then processed by a
+node labeling algorithm in order to get a fully expanded and named list of
+nodes which is then sorted. The result is a deterministically named and
+ordered list of graph nodes.
+</p>
+
+<ol class="algorithm">
+<li>Expand the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> according to the steps in
+the <a href="#expansion-algorithm">Expansion Algorithm</a> and store the
+result as the <strong>expanded input</strong>.</li>
+<li>Create a <a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a>.</li>
+<li>Initialize the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> by recursively 
+processing every <dfn title="expanded_node" id="dfn-expanded_node">expanded node</dfn> in the 
+<strong>expanded input</strong> in depth-first order:
+  <ol class="algorithm">
+    <li>If the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> is an unlabeled node, add a 
+      new key-value pair to the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>
+      where the key is <code>@subject</code> and the value is the 
+      concatenation of the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> 
+      and the string value of the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.
+      Increment the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.</li>
+    <li>Add the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> to the 
+      <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>:
+      <ol class="algorithm">
+        <li>If the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is already 
+          in the 
+          <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> merge all properties from the 
+          entry in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> into the 
+          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>.</li>
+        <li>Go through every property associated with an array in the 
+          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> and remove any duplicate IRI entries from
+          the array. If the resulting array only has one IRI entry, change it 
+          from an array to an object.</li>
+        <li>Set the entry for the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
+          in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> to the
+          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>.
+        </li></ol></li>
+    <li>After exiting the recursive step, replace the reference to the
+      <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> with an object containing a single
+       key-value pair where the key is <code>@iri</code> and the value is
+       the value of the <code>@subject</code> key in the node.</li>
+  </ol></li>
+<li>For every entry in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>, insert a
+  key-value pair into the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> where the key is the
+  key from the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> and the value is a
+  <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> where its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> refers to
+  the value from the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>.
+</li><li>Populate the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> for each <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>
+  by iterating over every node in the graph and adding its <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
+  to the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> associated with each node found in its
+  properties.</li>
+<li>For every entry in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> that has a 
+<a class="tref internalDFN" title="label" href="#dfn-label">label</a> that begins with <code>_:c14n</code>, relabel the node
+using the <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>.
+</li><li>Label all of the nodes that contain a <code>@subject</code> key associated
+with a value starting with <code>_:</code> according to the steps in the 
+<a href="#deterministic-labeling-algorithm">Deterministic Labeling Algorithm</a>.
+</li>
+</ol>
+</div>
+
+<div id="node-relabeling-algorithm" class="section">
+<h4><span class="secno">6.11.4 </span>Node Relabeling Algorithm</h4>
+
+<p>This algorithm renames a node by generating a unique 
+<dfn title="new_label" id="dfn-new_label">new label</dfn> and updating all references to that <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
+in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>. The <dfn title="old_label" id="dfn-old_label">old label</dfn> and the
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a> must be given as an input to the
+algorithm. The <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> is the current <a class="tref internalDFN" title="label" href="#dfn-label">label</a> of
+the node that is to be relabeled.
+
+</p><p>The node relabeling algorithm is as follows:</p>
+
+<ol class="algorithm">
+  <li>If the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> is <code>_:c14n</code> and the
+    <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> begins with <code>_:c14n</code> then return as
+    the node has already been renamed.
+  </li>
+  <li>Generate the <dfn title="new_label" id="dfn-new_label-1">new label</dfn> by concatenating the
+    <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> with the string value of the 
+    <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>. Increment the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.
+  </li>
+  <li>For the <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> associated with the
+  <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a>, update every node in the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>
+  by changing all the properties that reference the <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> to
+  the <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a>.
+  </li>
+  <li>Change the <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> key in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> 
+    to the <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a> and set the associated
+    <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the
+    <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a>.
+  </li>
+</ol>
+</div>
+
+<div id="deterministic-labeling-algorithm" class="section">
+<h4><span class="secno">6.11.5 </span>Deterministic Labeling Algorithm</h4>
+
+<p>The deterministic labeling algorithm takes the 
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a>
+and produces a <dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes">list of finished nodes</dfn> that is sorted and
+contains deterministically named and expanded nodes from the graph.
+
+</p><ol class="algorithm">
+  <li>Set the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> to <code>_:c14n</code>, the
+    <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> to <code>1</code>,
+    the <dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes-1">list of finished nodes</dfn> to an empty array, and create
+    an empty array, the <dfn title="list_of_unfinished_nodes" id="dfn-list_of_unfinished_nodes">list of unfinished nodes</dfn>.</li>
+  <li>For each <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>:
+    <ol class="algorithm">
+      <li>If the node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> does not start with <code>_:</code>
+        then put the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the
+        <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a>.
+      </li>
+      <li>If the node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> does start with <code>_:</code>
+        then put the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the
+        <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a>.
+      </li>
+    </ol>
+  </li>
+  <li>Append to the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a> by processing
+    the remainder of the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> until it is
+    empty:
+    <ol class="algorithm">
+      <li>Sort the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> in descending order 
+        according to the 
+        <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
+        determine the sort order.</li>
+      <li>Create a <dfn title="list_of_labels" id="dfn-list_of_labels">list of labels</dfn> and initialize it to an
+        empty array.</li>
+      <li>For the first node from the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a>:
+        <ol class="algorithm">
+          <li>Add its <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the <a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">list of labels</a>.
+          </li>
+          <li>For each key-value pair from its associated
+            <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, add the key to a list and
+            then sort the list according to the lexicographical order of the
+            keys' associated values. Append the list to the
+            <a class="tref" title="list_of_nodes_to_label">list of nodes to label</a>.
+          </li>
+          <li>For each key-value pair from its associated
+            <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a>, add the key to a list and
+            then sort the list according to the lexicographical order of the
+            keys' associated values. Append the list to the
+            <a class="tref" title="list_of_nodes_to_label">list of nodes to label</a>.
+          </li></ol></li>
+      <li>For each <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the <a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">list of labels</a>,
+        relabel the associated node according to the 
+        <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. If
+        any <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> contains a key that
+        matches the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, clear the map and set the associated
+        <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> to an empty string. If any
+        <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> contains a key that
+        matches the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, clear the map and set the associated
+        <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> to an empty string.
+      </li>
+      <li>
+        Remove each node with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that starts with
+        <code>_:c14n</code> from the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> and
+        add it to the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a>.
+      </li>
+    </ol>
+  </li>
+  <li>Sort the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a> in descending order 
+    according to the 
+    <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
+    determine the sort order.</li>
+</ol>
+</div>
+
+<div id="shallow-comparison-algorithm" class="section">
+<h4><span class="secno">6.11.6 </span>Shallow Comparison Algorithm</h4>
+
+<p>
+The shallow comparison algorithm takes two unlabeled nodes,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, as input and
+determines which one should come first in a sorted list. The following
+algorithm determines the steps that are executed in order to determine the
+node that should come first in a list:
+</p>
+
+<ol class="algorithm">
+  <li>Compare the total number of node properties. The node with fewer 
+    properties is first.</li>
+  <li>Lexicographically sort the property IRIs for each node and compare
+    the sorted lists. If an IRI is found to be lexicographically smaller, the
+    node containing that IRI is first.</li>
+  <li>Compare the property values against one another:
+    <ol class="algorithm">
+      <li>Create an <dfn title="alpha_list" id="dfn-alpha_list">alpha list</dfn> by adding all values associated 
+        with the <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> property that is not an unlabeled node.
+        Track the number of unlabeled nodes not added to the list using an
+        <dfn title="alpha_unlabeled_counter" id="dfn-alpha_unlabeled_counter">alpha unlabeled counter</dfn>.</li>
+      <li>Create a <dfn title="beta_list" id="dfn-beta_list">beta list</dfn> by adding all values associated 
+        with the <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> property that is not an unlabeled node. 
+        Track the number of unlabeled nodes not added to the list using an
+        <dfn title="beta_unlabeled_counter" id="dfn-beta_unlabeled_counter">beta unlabeled counter</dfn>.
+      </li><li>Compare the length of <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and 
+        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a>. The node associated with the list containing the
+        lesser number of items is first.</li>
+      <li>Compare the <a class="tref internalDFN" title="alpha_unlabeled_counter" href="#dfn-alpha_unlabeled_counter">alpha unlabeled counter</a> to the 
+        <a class="tref internalDFN" title="beta_unlabeled_counter" href="#dfn-beta_unlabeled_counter">beta unlabeled counter</a>, the node associated with the lesser
+        value is first.</li>
+      <li>Sort <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> according to
+        the
+        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>
+        as the sorting comparator.
+        For each offset into the <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a>, compare the item
+        at the offset against the item at the same offset in the 
+        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> according to the
+        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
+        The node associated with the lesser item is first.
+    </li></ol></li>
+  <li>Process the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s associated with each node to
+    determine order:
+    <ol class="algorithm">
+      <li>The node with the shortest <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> is first.</li>
+      <li>Sort the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s according to incoming property
+         and then incoming <a class="tref internalDFN" title="label" href="#dfn-label">label</a>.
+      </li><li>The node associated with the least number of incoming unlabeled
+         nodes is first.</li>
+      <li>For each offset into the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s, 
+        compare the associated properties and <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s.
+        The node associated with the lexicographically lesser associated
+        property is first. The node associated with the lexicographically
+        lesser <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is first.</li>
+    </ol></li>
+  <li>Otherwise, the nodes are equivalent.</li>
+</ol></div>
+
+<div id="object-comparison-algorithm" class="section">
+<h4><span class="secno">6.11.7 </span>Object Comparison Algorithm</h4>
+
+<p>
+The object comparison algorithm is designed to compare two graph node 
+property values, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, against the other.
+The algorithm is useful when sorting two lists of graph node properties.
+</p>
+
+<ol class="algorithm">
+  <li>If one of the values is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> and the other is not, the value that is
+    a string is first.</li>
+  <li>If both values are <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s, the lexicographically lesser string is
+    first.</li>
+  <li>If one of the values is a literal and the other is not, the value that is
+    a literal is first.</li>
+  <li>If both values are literals
+    <ol class="algorithm">
+      <li>The lexicographically lesser string associated with 
+        <code>@literal</code> is first.</li>
+      <li>The lexicographically lesser string associated with 
+        <code>@datatype</code> is first.</li>
+      <li>The lexicographically lesser string associated with 
+        <code>@language</code> is first.</li>
+    </ol></li>
+  <li>If both values are expanded IRIs, the 
+    lexicographically lesser string associated with <code>@iri</code> 
+    is first.</li>
+  <li>Otherwise, the two values are equivalent.</li>
+</ol>
+
+</div>
+
+<div id="deep-comparison-algorithm" class="section">
+<h4><span class="secno">6.11.8 </span>Deep Comparison Algorithm</h4>
+
+<p>
+The deep comparison algorithm is used to compare the difference between two
+nodes, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>. 
+A deep comparison takes the incoming and outgoing node edges in
+a graph into account if the number of properties and value of those properties 
+are identical. The algorithm is helpful when sorting a list of nodes and will
+return whichever node should be placed first in a list if the two nodes are
+not truly equivalent.
+</p>
+
+<p>When performing the steps required by the deep comparison algorithm, it
+is helpful to track state information about mappings. The information
+contained in a <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> is described below.</p>
+
+<dl class="algorithm">
+   <dt><dfn title="mapping_state" id="dfn-mapping_state">mapping state</dfn></dt>
+   <dd>
+     <dl>
+        <dt><dfn title="mapping_counter" id="dfn-mapping_counter">mapping counter</dfn></dt>
+        <dd>
+          Keeps track of the number of nodes that have been mapped to
+          <a class="tref" title="serialization_labels">serialization labels</a>. It is initialized to
+          <code>1</code>.
+        </dd>
+        <dt><dfn title="processed_labels_map" id="dfn-processed_labels_map">processed labels map</dfn></dt>
+        <dd>
+          Keeps track of the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of nodes that have already
+          been assigned <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s. It is initialized
+          to an empty map.
+        </dd>
+        <dt><dfn title="serialized_labels_map" id="dfn-serialized_labels_map">serialized labels map</dfn></dt>
+        <dd>
+          Maps a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to its associated
+          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>. It is initialized to an empty map.
+        </dd>
+        <dt><dfn title="adjacent_info_map" id="dfn-adjacent_info_map">adjacent info map</dfn></dt>
+        <dd>
+          Maps a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> to the node
+          <a class="tref internalDFN" title="label" href="#dfn-label">label</a> associated with it, the list of sorted
+          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s for adjacent nodes, and the map of
+          adjacent node <a class="tref" title="serialiation_label">serialiation label</a>s to their associated
+          node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s. It is initialized to an empty map.
+        </dd>
+        <dt><dfn title="key_stack" id="dfn-key_stack">key stack</dfn></dt>
+        <dd>
+          A stack where each element contains an array of adjacent
+          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s and an index into that array. It
+          is initialized to a stack containing a single element where its
+          array contains a single string element <code>s1</code> and its
+          index is set to <code>0</code>.
+        </dd>
+        <dt><dfn title="serialized_keys" id="dfn-serialized_keys">serialized keys</dfn></dt>
+        <dd>
+          Keeps track of which <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s have already
+          been written at least once to the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
+          It is initialized to an empty map.
+        </dd>
+        <dt><dfn title="serialization_string" id="dfn-serialization_string">serialization string</dfn></dt>
+        <dd>
+          A string that is incrementally updated as a serialization is built.
+          It is initialized to an empty string.
+        </dd>
+     </dl>
+   </dd>
+</dl>
+
+<p>The deep comparison algorithm is as follows:</p>
+   
+<ol class="algorithm">
+  <li>Perform a comparison between <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+    according to the 
+    <a href="#shallow-comparison-algorithm">Shallow Comparison Algorithm</a>.
+    If the result does not show that the two nodes are equivalent, return 
+    the result.
+    </li>
+  <li>Compare incoming and outgoing edges for each node, updating their
+    associated <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> as each node is processed:
+    <ol class="algorithm">
+      <li>If the <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
+        is empty, generate the serialization according to the 
+        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+        Provide <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
+        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>,
+        <code>outgoing direction</code> to the algorithm as inputs.       
+      </li><li>If the <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        is empty, generate the serialization according to the 
+        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+        Provide <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
+        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, and
+        <code>outgoing direction</code> to the algorithm as inputs.
+      </li><li>If <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> is
+        lexicographically less than <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s, then 
+        <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> is first. If it is greater, then <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        is first.</li>
+      <li>If the <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
+        is empty, generate the serialization according to the 
+        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+        Provide <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
+        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> with its <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>
+        set to a copy of <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s
+        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, and
+        <code>incoming direction</code> to the algorithm as inputs.
+      </li><li>If the <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        is empty, generate the serialization according to the 
+        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+        Provide <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
+        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> with its <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>
+        set to a copy of <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s
+        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, and
+        <code>incoming direction</code> to the algorithm as inputs.
+      </li><li>If <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> is
+        lexicographically less than <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s, then 
+        <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> is first. If it is greater, then <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        is first.</li>
+    </ol></li>
+</ol>
+</div>
+
+<div id="node-serialization-algorithm" class="section">
+<h4><span class="secno">6.11.9 </span>Node Serialization Algorithm</h4>
+
+<p>
+The node serialization algorithm takes a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, and a <dfn title="direction" id="dfn-direction">direction</dfn> (either
+<code>outgoing direction</code> or <code>incoming direction</code>) as
+inputs and generates a deterministic serialization for the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
+</p>
+
+<ol class="algorithm">
+<li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> exists in the 
+  <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, terminate the algorithm as the 
+  <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> has already been created.
+</li>
+<li>Set the value associated with the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the
+  <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a> to <code>true</code>.
+</li>
+<li>Generate the next <dfn title="serialization_label" id="dfn-serialization_label-1">serialization label</dfn> for the 
+  <a class="tref internalDFN" title="label" href="#dfn-label">label</a> according to the
+  <a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>.
+</li>
+<li>Create an empty array called the <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>.
+</li>
+<li>For every <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in a list, where the list the <a class="tref internalDFN" title="outgoing_list" href="#dfn-outgoing_list">outgoing list</a> if
+the <a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a> is <code>outgoing direction</code> and the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> otherwise, if the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> starts with
+<code>_:</code>, it is the <dfn title="target_node_label" id="dfn-target_node_label">target node label</dfn>:
+  <ol class="algorithm">
+    <li>Look up the <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a> in the 
+      <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a> and if a mapping exists,
+      update the <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a> where the key is
+      the value in the <a class="tref" title="serialization_map">serialization map</a> and the value is the
+      <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a>.</li>
+    <li>Otherwise, add the <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a> to the 
+      <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>.
+  </li></ol>
+</li> 
+<li>Set the <dfn title="maximum_serialization_combinations" id="dfn-maximum_serialization_combinations">maximum serialization combinations</dfn> to 
+  <code>1</code> or the length of the 
+  <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>, whichever is greater.</li>
+<li>While the <a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">maximum serialization combinations</a> is greater than
+  <code>0</code>, perform the
+  <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
+  and decrement the <a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">maximum serialization combinations</a> by
+  <code>1</code> for each iteration.
+</li></ol>
+
+</div>
+
+<div id="serialization-label-generation-algorithm" class="section">
+<h4><span class="secno">6.11.10 </span>Serialization Label Generation Algorithm</h4>
+
+<p>
+The algorithm generates a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> given a 
+<a class="tref internalDFN" title="label" href="#dfn-label">label</a> and a <a class="tref" title="mapping_count">mapping count</a>.
+</p>
+
+<li>
+  <ol class="algorithm">
+    <li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> starts with the string <code>_:c14n</code>,
+      the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> is the letter <code>c</code>
+      followed by the number that follows <code>_:c14n</code> in the
+      <a class="tref internalDFN" title="label" href="#dfn-label">label</a>.</li>
+    <li>Otherwise, the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> is the
+      letter <code>s</code> followed by the string value of 
+      <a class="tref" title="mapping_count">mapping count</a>. Increment the <a class="tref" title="mapping_count">mapping count</a> by
+      <code>1</code> ensuring that the value persists across multiple
+      invocations of this algorithm.</li>
+  </ol>
+</li>
+</div>
+
+<div id="combinatorial-serialization-algorithm" class="section">
+<h4><span class="secno">6.11.11 </span>Combinatorial Serialization Algorithm</h4>
+
+<p>
+SerializeCombos() takes a <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, 
+a <a class="tref" title="serialization_map">serialization map</a>, a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, a
+<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, a <a class="tref" title="serialization_map">serialization map</a>, 
+a <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>, and a 
+<a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a> as inputs and generates
+deterministic serializations for all possible combinations of graphs.
+</p>
+
+<ol class="algorithm">
+  <li>If the <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a> is not empty:
+    <ol class="algorithm">
+      <li>Copy the <a class="tref" title="serialization_map">serialization map</a> to the 
+        <dfn title="serialization_map_copy" id="dfn-serialization_map_copy">serialization map copy</dfn>.</li>
+      <li>Remove the first <a class="tref" title="unserialized_label">unserialized label</a> from the
+        <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a> and create a new 
+        <dfn title="new_serialization_label" id="dfn-new_serialization_label">new serialization label</dfn> according to the
+        <a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>
+        passing the <a class="tref" title="unserialized_label">unserialized label</a> and the 
+        <a class="tref internalDFN" title="mapping_counter" href="#dfn-mapping_counter">mapping counter</a> as parameters.
+      </li><li>Create a new key-value mapping in the 
+        <a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy">serialization map copy</a> 
+        where the key is the <a class="tref internalDFN" title="new_serialization_label" href="#dfn-new_serialization_label">new serialization label</a> and the value
+        is the <a class="tref" title="unserialized_label">unserialized label</a>.
+</li><li>Set the <dfn title="maximum_serialization_rotations" id="dfn-maximum_serialization_rotations">maximum serialization rotations</dfn> to 
+  <code>1</code> or the length of the 
+  <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>, whichever is greater.</li>
+<li>While the <a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">maximum serialization rotations</a> is greater than
+  <code>0</code>:
+  <ol class="algorithm">
+    <li>If this is the first iteration in the loop, perform the
+      <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
+      passing in the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, the <a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy">serialization map copy</a>,
+      the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, the
+      <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, 
+      <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>, and the
+      <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>.</li>
+    <li>If this is not the first iteration in the loop, perform the
+      <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
+      passing in the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, the <a class="tref internalDFN" title="serialization_map_copy" href="#dfn-serialization_map_copy">serialization map copy</a>,
+      the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, and temporary copies of the
+      <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, 
+      <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>, and the
+      <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a>.</li>
+    <li>Decrement the <a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">maximum serialization rotations</a> by
+    <code>1</code> for each iteration.
+  </li></ol></li>
+  <li>If the <a class="tref" title="list_of_unserialized_labels">list of unserialized labels</a> is empty:
+    <ol class="algorithm">
+      <li>???Save an entry mapping from the bnode's 
+serialization name to the reverse mapping (mapped) and its sorted keys then do SerializeMapping:
+    <ol class="algorithm">
+      <li>???If the serialization is lexicographically less than the current 
+serialization or the current serialization is null, then iterate over the 
+sorted keys, get the reverse-mapped adjacent bnode and recursively call 
+SerializeNode on each iteration.</li>
+      <li>???Do SerializeMapping then if the serialization is lexicographically 
+less than the current serialization or the current serialization is null, then 
+set it as the least serialization for the bnode in the given edge direction 
+('property' or 'reference').</li>
+    </ol>
+  </li>
+</ol>
+
+</li></ol></li></ol></div>
+
+<div id="mapping-serialization-algorithm" class="section">
+<h4><span class="secno">6.11.12 </span>Mapping Serialization Algorithm</h4>
+
+<p>
+<a class="tref" title="map_of_all_labels">map of all labels</a>, <a class="tref" title="map_of_all_properties">map of all properties</a>,
+<dfn title="key_stack" id="dfn-key_stack-1">key stack</dfn>, <dfn title="serialization_string_" id="dfn-serialization_string_">serialization string
+</dfn></p>
+
+<p>
+SerializeMapping(mapping):
+(This function incrementally updates the relation serialization for a mapping)
+</p>
+
+<ol class="algorithm">
+  <li>If the <a class="tref" title="serialization_keys_stack">serialization keys stack</a> is not empty
+    <ol class="algorithm">
+      <li>Pop the <dfn title="list_of_serialization_keys" id="dfn-list_of_serialization_keys">list of serialization keys</dfn> off of the 
+        <a class="tref" title="serialization_keys_stack">serialization keys stack</a>.</li>
+      <li>For each <dfn title="serialization_key" id="dfn-serialization_key">serialization key</dfn> in the 
+        <a class="tref internalDFN" title="list_of_serialization_keys" href="#dfn-list_of_serialization_keys">list of serialization keys</a>:
+        <ol class="algorithm">
+          <li>If the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> is not in the
+            ???list of adjacent nodes???, push the 
+            <a class="tref internalDFN" title="list_of_serialization_keys" href="#dfn-list_of_serialization_keys">list of serialization keys</a> onto the
+            <a class="tref" title="serialization_keys_stack">serialization keys stack</a> and exit from this loop.</li>
+          <li>If the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> is a key in the
+            <a class="tref" title="completed_serialization_key_map">completed serialization key map</a>, a cycle has
+            been detected. Append the concatenation of the <code>_</code> 
+            character and the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> to the 
+            <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
+          </li><li>Otherwise, serialize all outgoing and incoming edges in the
+            graph by performing the following steps:
+            <ol class="algorithm">
+              <li>Mark the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> as being processed
+                by adding a new key-value pair to the 
+                <a class="tref" title="completed_serialization_key_map">completed serialization key map</a> where the key
+                is the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> and the value is
+                <code>true</code>.
+                </li>
+              <li>Set the <a class="tref" title="serialization_fragment">serialization fragment</a> to the value of
+                the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a>.</li>
+              <li>Set the <a class="tref" title="list_of_adjacent_node_keys">list of adjacent node keys</a> by using the
+                <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> to look up the list in the
+                <a class="tref" title="adjacent_node_keys_map">adjacent node keys map</a>.</li>
+              <li>Set the <a class="tref" title="adjacent_node_label">adjacent node label</a> ???somehow???.</li>
+              <li>If a mapping for the <a class="tref" title="adjacent_node_label">adjacent node label</a>
+                exists in the <a class="tref" title="map_of_all_labels">map of all labels</a>:
+                <ol class="algorithm">
+                  <li>Append the result of the
+                    <a href="">Label Serialization Algorithm</a> to the
+                    <a class="tref" title="serialization_fragment">serialization fragment</a>.</li>
+                </ol>
+        </li></ol></li>
+    </ol></li>
+  
+<!-- li>If there is an entry on the mapping's key stack, pop it and iterate over every key.</li>
+  <li>For each key, if an entry for the key hasn't been added to the mapping yet, break out of the loop.</li>
+  <li>Update the key stack entry's index.</li>
+  <li>If the key has already been serialized, output "'_' + key" and continue.</li>
+  <li>For each key, serialize the key then its associated bnode properties, then its bnode references. The entire property list is surrounded by '[' and ']' and so is the reference list. Individual properties/references are seperated by '|'. If a property is an array, all of the serializations are concatenated together with no joining delimiter. The '@subject' property is skipped. The property IRI is turtle-serialized. If a property or reference object is a bnode, it is serialized to '_:', otherwise the turtle serialization is used.</li>
+  <li>Join all of the adjacent keys and add them to the serialization.</li>
+  <li>Push the adjacent keys onto the key stack.</li>
+  <li>Do SerializeMapping.</li  -->
+
+</ol>
+
+</li></ol></div>
+
+<div id="label-serialization-algorithm" class="section">
+<h4><span class="secno">6.11.13 </span>Label Serialization Algorithm</h4>
+
+<p>
+<a class="tref" title="map_of_properties">map of properties</a>, <dfn title="label_serialization" id="dfn-label_serialization">label serialization</dfn>,
+<a class="tref internalDFN" title="label" href="#dfn-label">label</a>, <a class="tref" title="incoming_map">incoming map</a>, 
+<dfn title="adjacent_node_labels" id="dfn-adjacent_node_labels">adjacent node labels</dfn>, <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack-1">key stack</a>.
+</p>
+
+<ol class="algorithm">
+  <li>Initialize the <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a> to an empty string.</li>
+  <li>Append the <code>[</code> character to the 
+    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+  <li>Append all properties to the <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a> by 
+    processing each key-value pair in the <a class="tref" title="map_of_properties">map of properties</a>, 
+    excluding the
+    <code>@subject</code> property ???do the map keys need to be sorted???:
+    <ol class="algorithm">
+      <li>Build a string using the pattern <code><</code><strong>KEY</strong><code>></code> 
+        where <strong>KEY</strong> is the current key. Append string to the
+        <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+      <li>The value may be a single object or an array of objects.
+        Process all of the objects that are associated with the key, building
+        an <dfn title="object_string" id="dfn-object_string">object string</dfn> for each item:
+        <ol class="algorithm">
+          <li>If the object contains an <code>@iri</code> key with a
+            value that starts
+            with <code>_:</code>, set the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> to
+            the value <code>_:</code>. If the value does not
+            start with <code>_:</code>, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> 
+            using the pattern 
+            <code><</code><strong>IRI</strong><code>></code> 
+            where <strong>IRI</strong> is the value associated with the
+            <code>@iri</code> key.</li>
+          <li>If the object contains a <code>@literal</code> key and a
+            <code>@datatype</code> key, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> 
+            using the pattern 
+            <code>"</code><strong>LITERAL</strong><code>"^^<</code><strong>DATATYPE</strong><code>></code>
+            where <strong>LITERAL</strong> is the value associated with the
+            <code>@literal</code> key and <strong>DATATYPE</strong> is the
+            value associated with the <code>@datatype</code> key.</li>
+          <li>If the object contains a <code>@literal</code> key and a
+            <code>@language</code> key, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> 
+            using the pattern 
+            <code>"</code><strong>LITERAL</strong><code>"@</code><strong>LANGUAGE</strong>
+            where <strong>LITERAL</strong> is the value associated with the
+            <code>@literal</code> key and <strong>LANGUAGE</strong> is the
+            value associated with the <code>@language</code> key.</li>
+          <li>Otherwise, the value is a string. Build the 
+            <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> using the pattern 
+            <code>"</code><strong>LITERAL</strong><code>"</code> 
+            where <strong>LITERAL</strong> is the value associated with the
+            current key.</li>
+          <li>If this is the second iteration of the loop,
+            append a <code>|</code> separator character to the
+            <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+          <li>Append the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> to the 
+            <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+        </ol>
+    </li></ol>
+  </li>
+  <li>Append the <code>]</code> character to the 
+    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+  <li>Append the <code>[</code> character to the 
+    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+  <li>Append all incoming references for the current
+    <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a> by 
+    processing all of the items associated with the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
+    in the <a class="tref" title="incoming_map">incoming map</a>:
+    <ol class="algorithm">
+      <li>Build a <dfn title="reference_string" id="dfn-reference_string">reference string</dfn> 
+        using the pattern <code><</code><strong>PROPERTY</strong><code>></code><code><</code><strong>REFERER</strong><code>></code>
+        where <strong>PROPERTY</strong> is the property associated with the
+        incoming reference and <strong>REFERER</strong> is either the subject of
+        the node referring to the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the incoming reference
+        or <code>_:</code> if <strong>REFERER</strong> begins with
+        <code>_:</code>.
+      </li><li>If this is the second iteration of the loop,
+        append a <code>|</code> separator character to the
+        <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+      <li>Append the <a class="tref internalDFN" title="reference_string" href="#dfn-reference_string">reference string</a> to the 
+        <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+    </ol>
+  </li><li>Append the <code>]</code> character to the 
+    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+  <li>Append all <a class="tref internalDFN" title="adjacent_node_labels" href="#dfn-adjacent_node_labels">adjacent node labels</a> to the
+    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a> by concatenating the string value
+    for all of them, one after the other, to the 
+    <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.</li>
+  <li>Push the <a class="tref internalDFN" title="adjacent_node_labels" href="#dfn-adjacent_node_labels">adjacent node labels</a> onto the 
+    <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack-1">key stack</a> and append the result of the
+    <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a> 
+    to the <a class="tref internalDFN" title="label_serialization" href="#dfn-label_serialization">label serialization</a>.
+</li></ol>
+
+</div>
+
+</div>
+
+<div id="data-round-tripping" class="section">
+
+<h3><span class="secno">6.12 </span>Data Round Tripping</h3>
+
+<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
+ensure that the normalized value is a string. In order to generate the
+string from a <strong>double</strong> value, output equivalent to the
+<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
+<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
+is the value to be converted.</p>
+
+<p>To convert the a double value in JavaScript, implementers can use the 
+following snippet of code:</p>
+
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
+
+<p class="note">When data needs to be normalized, JSON-LD authors should
+not use values that are going to undergo automatic conversion. This is due
+to the lossy nature of <strong>xsd:double</strong> values.</p>
+
+<p class="issue">Round-tripping data can be problematic if we mix and
+match @coerce rules with JSON-native datatypes, like integers. Consider the 
+following code example:</p>
+
+<pre class="example">
+var myObj = { "@context" : { 
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+
+// Convert the normalized object back to a JavaScript object
+var myObj2 = jsonld.parse(jsonldText);</pre>
+
+<p class="issue">At this point, myObj2 and myObj will have different
+values for the "number" value. myObj will be the number 42, while
+myObj2 will be the string "42". This type of data round-tripping
+error can bite developers. We are currently wondering if having a
+"coerce validation" phase in the parsing/normalization phases would be a 
+good idea. It would prevent data round-tripping issues like the
+one mentioned above.</p>
+
+</div>
+
+<div id="rdf-conversion" class="section">
+<h3><span class="secno">6.13 </span>RDF Conversion</h3>
+
+<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted to any other RDF-compatible document
+format using the algorithm specified in this section.</p>
+
+<p>
+  The JSON-LD Processing Model describes processing rules for extracting RDF
+  from a JSON-LD document. Note that many uses of JSON-LD may not require 
+  generation of RDF.
+</p>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD to RDF processor. 
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to 
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The RDF Conversion Algorithm is a work in progress.</p>
+
+<div class="informative section" id="overview">
+  <h4><span class="secno">6.13.1 </span>Overview</h4><p><em>This section is non-normative.</em></p>
+  <p>
+    JSON-LD is intended to have an easy to parse grammar that closely models existing
+    practice in using JSON for describing object representations. This allows the use
+    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
+    for stream-based parsing similar to SAX.
+  </p>
+  <p>
+    As with other grammars used for describing <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
+    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
+    externally named entities, <em>BNodes</em>, resources for which an external name does not
+    exist, or is not known, and Literals, which describe terminal entities such as strings,
+    dates and other representations having a lexical representation possibly including
+    an explicit language or datatype.
+  </p>
+  <p>
+    Data described with JSON-LD may be considered to be the representation of a graph made
+    up of <a class="tref internalDFN" title="subject" href="#dfn-subject">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> resources related via a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> resource.
+    However, specific implementations may choose to operate on the document as a normal
+    JSON description of objects having attributes.
+  </p>
+</div>
+
+<div id="rdf-conversion-algorithm-terms" class="section">
+  <h4><span class="secno">6.13.2 </span>RDF Conversion Algorithm Terms</h4>
+  <dl>
+    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
+    <dd>
+      the destination graph for all triples generated by JSON-LD markup.
+    </dd>
+  </dl>
+</div>
+
+<div id="rdf-conversion-algorithm" class="section">
+  <h4><span class="secno">6.13.3 </span>RDF Conversion Algorithm</h4>
+  <p>
+    The algorithm below is designed for in-memory implementations with random access to <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> elements.
+  </p>
+  <p>
+    A conforming JSON-LD processor implementing RDF conversion <em class="rfc2119" title="must">must</em> implement a
+    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
+    algorithm generates:
+  </p>
+
+  <ol class="algorithm">
+    <li id="processing-step-default-context">
+      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
+      <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      initialized to NULL.
+    </li>
+
+    <li id="processing-step-associative">
+      If a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> is detected, perform the following steps:
+      <ol class="algorithm">
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@context</code> key, process the local context as
+          described in <a href="#context">Context</a>.
+        </li>
+        <li>
+          Create a new <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> by mapping the keys from the current <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> using the
+          <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to new keys using the associated value from the current <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
+          Repeat the mapping until no entry is found within the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for the key. Use the new
+          <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> in subsequent steps.
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
+          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. Generate a
+          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+          <p class="issue"><code>@iri</code> really just behaves the same as <code>@subject</code>, consider consolidating them.</p>
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+          to a literal value as follows:
+          <ol class="algorithm">
+            <li>
+              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> contains a <code>@datatype</code> key
+              after performing <a href="#iri-expansion">IRI Expansion</a> on the specified<code>@datatype</code>.
+            </li>
+            <li>
+              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> contains
+              a <code>@language</code> key, use it's value to set the language of the plain literal.
+            </li>
+            <li>
+              Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+            </li>
+          </ol>
+        </li>
+        <li id="processing-step-subject">If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@subject</code> key:
+          <ol class="algorithm">
+            <li>
+              If the value is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
+              <a href="#iri-expansion">IRI Expansion</a>. Generate a
+              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
+            </li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
+              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> does not have a <code>@subject</code> key, set the <a class="tref" title="active__object">active
+          object</a> to newly generated <dfn title="blank_node_identifier" id="dfn-blank_node_identifier">blank node identifier</dfn>. Generate a triple
+          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
+          object</a>.
+        </li>
+        <li>
+          For each key in the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that has not already been processed, perform
+          the following steps:
+          <ol class="algorithm">
+            <li>
+              If the key is <code>@type</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> 
+              to <code>rdf:type</code>.
+            </li>
+            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
+            <a href="#iri-expansion">IRI Expansion</a> on the key.</li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
+              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+      </ol>
+    </li>
+
+    <li>
+      If a regular <a class="tref internalDFN" title="array" href="#dfn-array">array</a> is detected, process each value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> by doing the following
+      returning the result of processing the last value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>:
+
+      <ol class="algorithm">
+        <li>
+          Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref" title="active__context">active
+          context</a>, <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+          starting at <a href="#processing-step-associative">Step 2</a> then proceed using the previous
+          <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+        </li>
+      </ol>
+    </li>
+    
+    <li>
+      If a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> is detected:
+      <ol class="algorithm">
+        <li>
+          If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@iri</code> coercion,
+          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
+          performing <a href="#iri-expansion">IRI Expansion</a> on the string.
+        </li>
+        <li>
+          Otherwise, if the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of coercion,
+          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by creating a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using
+          the string and the coercion key as the datatype IRI.
+        </li>
+        <li>
+          Otherwise, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from
+          the string.
+        </li>
+      </ol>
+      Generate a
+      triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
+    </li>
+    
+    <li>
+      If a <a class="tref internalDFN" title="number" href="#dfn-number">number</a> is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
+      the value with datatype set to either <code>xsd:integer</code> or
+      <code>xsd:double</code>, depending on if the value contains a
+      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
+      subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the generated typed literal.
+    </li>
+    
+    <li>
+      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
+      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
+      value with datatype set to <code>xsd:boolean</code>.
+    </li>
+  </ol>
+</div>
+
+
+<!--  THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT 
+
+<section>
+<h1>Best Practices</h1>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be 
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<section>
+<h2>JavaScript</h2>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in 
+JavaScript environments, however, features like the expanded form for
+object values mean that using JSON-LD directly in JavaScript may be 
+annoying without a middleware layer such as a simple library that 
+converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDF API, which enables a variety of RDF-based
+Web Applications, but some don't want to require that level of functionality 
+just to use JSON-LD. The group is still discussing the best way to proceed, 
+so input on how JSON-LD could more easily be utilized in JavaScript 
+environments would be very much appreciated.
+</p>
+</section>
+
+<section>
+<h2>Schema-less Databases</h2>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from 
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+
+<p class="issue">MongoDB does not allow the '.' character to be used in
+key names. This prevents developers from storing IRIs as keys, which also
+prevents storage of the data in normalized form. While this issue can
+be avoided by using <tref>CURIE</tref>s for key values, it is not known if this
+mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
+is useful to developers.
+</p>
+
+ -->
+
+</div>
+
+</div>
+
+<div id="experimental-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">7. </span>Experimental Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear 
+whether or not the JSON-LD specification is going to support the complexity 
+necessary to support each concept. The entire section on Advanced Concepts 
+should be considered as discussion points; it is merely a list of 
+possibilities where all of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">7.1 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt; 
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a 
+single graph:</p>
+
+<pre class="example">
+{
+  "@context": {
+    "Person": "http://xmlns.com/foaf/0.1/Person"
+  },
+  "@subject": 
+  [
+    {
+      "@subject": "http://example.org/people#john",
+      "@type": "Person"
+    },
+    {
+      "@subject": "http://example.org/people#jane",
+      "@type": "Person"
+    }
+  ]
+}</pre>
+
+<p>A disjoint graph could also be expressed like so:</p>
+
+<pre class="example">
+[
+  {
+    "@subject": "http://example.org/people#john",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  },
+  {
+    "@subject": "http://example.org/people#jane",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  }
+]</pre>
+
+</div>
+
+<div id="lists" class="section">
+  <h3><span class="secno">7.2 </span>Lists</h3>
+  <p>
+    Because graphs do not describe ordering for links between nodes, multi-valued properties
+    in JSON do not provide an ordering of the listed objects. For example, consider the following
+    simple document:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+  <p>
+    This results in three triples being generated, each relating the subject to an individual
+    object, with no inherent order. To address this issue, RDF-based languages, such as [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>]
+    use the concept of an <code>rdf:List</code> (as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">RDF-SCHEMA</a></cite>]). This uses a sequence
+    of unlabeled nodes with properties describing a value, a null-terminated next property. Without
+    specific syntactical support, this could be represented in JSON-LD as follows:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">{</span>,
+    <span class="diff">"@first": "joe"</span>,
+    <span class="diff">"@rest": {</span>
+      <span class="diff">"@first": "bob"</span>,
+      <span class="diff">"@rest": {</span>
+        <span class="diff">"@first": "jaybee"</span>,
+        <span class="diff">"@rest": "@nil"</span>
+        <span class="diff">}</span>
+      <span class="diff">}</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+}</pre>
+  <p>
+    As this notation is rather unwieldy and the notion of ordered collections is rather important
+    in data modeling, it is useful to have specific language support. In JSON-LD, a list may
+    be represented using the <code>@list</code> keyword as follows:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
+...
+}</pre>
+  <p>
+    This describes the use of this <a class="tref internalDFN" title="array" href="#dfn-array">array</a> as being ordered, and order is maintained through
+    normalization and RDF conversion. If every use of a given multi-valued property is a
+    list, this may be abbreviated by adding an <code>@coerce</code> term:
+  </p>
+  <pre class="example">
+{
+  <span class="diff">"@context": {</span>
+    ...
+    <span class="diff">"@context": {</span>
+      <span class="diff">"@list": ["foaf:nick"]</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+  <div id="expansion-2" class="section"><h4 id="list-expansion"><span class="secno">7.2.1 </span>Expansion</h4>
+    <p class="issue">TBD.</p>
+  </div>
+  <div id="normalization-2" class="section"><h4 id="list-normalization"><span class="secno">7.2.2 </span>Normalization</h4>
+    <p class="issue">TBD.</p>
+  </div>
+  <div id="rdf-conversion-1" class="section"><h4 id="list-rdf"><span class="secno">7.2.3 </span>RDF Conversion</h4>
+    <p>
+      To support RDF Conversion of lists, <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>
+      is updated as follows:
+    </p>
+    <ol class="algorithm update">
+      <li>
+        <span class="list-number">2.4a.</span>
+        If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@list</code> key and the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+        process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
+      </li>
+      <li>
+        <span class="list-number">2.7.3.</span>
+        Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
+        <ol class="algorithm">
+          <li>
+            If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@list</code> coercion,
+            and the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+            process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
+          </li>
+          <li>
+            Otherwise, process the value starting at
+            <a href="#processing-step-associative">Step 2</a>.
+          </li>
+          <li>Proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+        </ol>
+      </li>
+      <li id="processing-step-list">
+        <span class="list-number">3a.</span>
+        Generate an RDF List by linking
+        each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
+        using the following sequence:
+        <ol class="algorithm">
+          <li>
+            If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+            and <code>rdf:nil</code>.
+          </li>
+          <li>
+            Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+            and a newly generated BNode identified as <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">blank node identifier</dfn></em>.
+          </li>
+          <li>
+            For each element other than the last element in the list:
+            <ol class="algorithm">
+              <li>Create a processor state using the active context, <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">blank node identifier</dfn></em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+              <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">blank node identifier</dfn></em>, otherwise use <code>rdf:nil</code>.</li>
+              <li>Generate a new triple using <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">blank node identifier</dfn></em>, <code>rdf:rest</code> and <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">blank node identifier</dfn></em>.</li>
+              <li>Set <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">blank node identifier</dfn></em> to <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">blank node identifier</dfn></em>.</li>
+            </ol>
+          </li>
+        </ol>
+      </li>
+    </ol>
+  </div>
+</div>
+
+</div>
+
+<div class="appendix section" id="markup-examples">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">A.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+{
+  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
+  "@subject": [
+   {
+     "@subject": "_:bnode1",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/bob/",
+     "foaf:name": "Bob"
+   },
+   {
+     "@subject": "_:bnode2",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/eve/",
+     "foaf:name": "Eve"
+   },
+   {
+     "@subject": "_:bnode3",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/manu/",
+     "foaf:name": "Manu"
+   }
+  ]
+}</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">A.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has 
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "@context": 
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "xsd:anyURI": "url" }
+  },
+  "@subject": "_:bnode1",
+  "@type": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">A.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "@type": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization": 
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]</pre>
+</div>
+
+<div class="appendix section" id="mashing-up-vocabularies">
+<h3><span class="secno">A.4 </span>Mashing Up Vocabularies</h3>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200 
+Vocabulary Documents that are available for use on the Web today. Some
+of these vocabularies are:
+</p>
+
+<ul>
+   <li>RDF - for describing information about objects on the semantic web.</li>
+   <li>RDFS - for expressing things like labels and comments.</li>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>You can use these vocabularies in combination, like so:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the 
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword, 
+like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "@type": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}</pre>
+
+<p>The <code>@context</code> keyword is used to change how the JSON-LD
+processor evaluates key-value pairs. In this case, it was used to
+map one string ('myvocab') to another string, which is interpreted as
+a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced 
+with "<code>http://example.org/myvocab#</code>" when it
+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 for RDF, called a <a class="tref internalDFN" title="CURIE" href="#dfn-curie">CURIE</a>, and provides
+developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div class="appendix section" id="acknowledgements">
+<h3><span class="secno">A.5 </span>Acknowledgements</h3>
+
+<p>The editors would like to thank Mark Birbeck, who provided a great deal of 
+the initial push behind the JSON-LD work via his work on RDFj, 
+Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and 
+performed several implementations of the specification, and Ian Davis, who 
+created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
+Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
+Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard 
+Cyganiak for their input on the specification. Another huge thank you goes out
+to Dave Longley who designed many of the algorithms used in this specification,
+including the normalization algorithm which was a monumentally difficult 
+design challenge.
+</p>
+</div>
+
+
+
+
+</div><div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd>T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a> 
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification, Third Edition.</cite></a> December 1999. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 
+</dd><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd>Dan Brickley; Ramanathan V. Guha. <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite>RDF Vocabulary Description Language 1.0: RDF Schema.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">http://www.w3.org/TR/2004/REC-rdf-schema-20040210</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
+</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd>David Beckett, Tim Berners-Lee. <a href="http://www.w3.org/TeamSubmission/turtle/"><cite>Turtle: Terse RDF Triple Language.</cite></a> January 2008. W3C Team Submission. URL: <a href="http://www.w3.org/TeamSubmission/turtle/">http://www.w3.org/TeamSubmission/turtle/</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110817/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110911/diff-20110817.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,25913 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!-- 
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left;
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+    }
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /><style type='text/css'>
+.diff-old-a {
+  font-size: smaller;
+  color: red;
+}
+
+.diff-new { background-color: yellow; }
+.diff-chg { background-color: lime; }
+.diff-new:before,
+.diff-new:after
+    { content: "\2191" }
+.diff-chg:before, .diff-chg:after
+    { content: "\2195" }
+.diff-old { text-decoration: line-through; background-color: #FBB; }
+.diff-old:before,
+.diff-old:after
+    { content: "\2193" }
+:focus { border: thin red solid}
+</style>
+</head>
+
+
+<body style="display: inherit; ">
+<div class="head">
+<p>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+1.0
+</h1>
+<h2 id="subtitle">
+A
+Context-based
+JSON
+Serialization
+for
+Linking
+Data
+</h2>
+<h2 id="unofficial-draft-12-september-2011">
+Unofficial
+Draft
+<del class="diff-old">17
+August
+</del>
+<ins class="diff-chg">12
+September
+</ins>
+2011
+</h2>
+<dl>
+<dt>
+Editors:
+</dt>
+<dd>
+<a href="http://manu.sporny.org/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+Kellogg
+Associates
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd>
+<a href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+Kellogg
+Associates
+</dd>
+<dd>
+<a href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</dd>
+<dd>
+<a href="http://webbackplane.com/">
+Mark
+Birbeck
+</a>,
+<a href="http://webbackplane.com/">
+Backplane
+Ltd.
+</a>
+</dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20110808.html">
+diff
+to
+previous
+version
+</a>.
+</p>
+<p class="copyright">
+This
+document
+is
+licensed
+under
+a
+<a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">
+Creative
+Commons
+Attribution
+3.0
+License
+</a>.
+</p>
+<hr />
+</div>
+<div id="abstract" class="introductory section">
+<h2>
+Abstract
+</h2>
+<p>
+JSON
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+In
+an
+attempt
+to
+harmonize
+the
+representation
+of
+Linked
+Data
+in
+JSON,
+this
+specification
+outlines
+a
+common
+JSON
+representation
+format
+for
+expressing
+directed
+graphs;
+mixing
+both
+Linked
+Data
+and
+non-Linked
+Data
+in
+a
+single
+document.
+</p>
+</div>
+<div id="sotd" class="introductory section">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+document
+is
+merely
+a
+public
+working
+draft
+of
+a
+potential
+specification.
+It
+has
+no
+official
+standing
+of
+any
+kind
+and
+does
+not
+represent
+the
+support
+or
+consensus
+of
+any
+standards
+organisation.
+</p>
+<p>
+This
+document
+is
+an
+experimental
+work
+in
+progress.
+</p>
+</div>
+<div id="toc" class="section">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#how-to-read-this-document" class="tocxref">
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</a>
+</li>
+<li class="tocline">
+<a href="#contributing" class="tocxref">
+<span class="secno">
+1.2
+</span>
+Contributing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#design" class="tocxref">
+<span class="secno">
+2.
+</span>
+Design
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#goals-and-rationale" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Goals
+and
+Rationale
+</a>
+</li>
+<li class="tocline">
+<a href="#linked-data" class="tocxref">
+<span class="secno">
+2.2
+</span>
+Linked
+Data
+</a>
+</li>
+<li class="tocline">
+<a href="#linking-data" class="tocxref">
+<span class="secno">
+2.3
+</span>
+Linking
+Data
+</a>
+</li>
+<li class="tocline">
+<a href="#the-context" class="tocxref">
+<span class="secno">
+2.4
+</span>
+The
+Context
+</a>
+<del class="diff-old">2.4.1
+Inside
+a
+Context
+</del>
+</li>
+<li class="tocline">
+<a href="#from-json-to-json-ld" class="tocxref">
+<span class="secno">
+2.5
+</span>
+From
+JSON
+to
+JSON-LD
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#basic-concepts" class="tocxref">
+<span class="secno">
+3.
+</span>
+Basic
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#iris" class="tocxref">
+<span class="secno">
+3.1
+</span>
+IRIs
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-the-subject" class="tocxref">
+<span class="secno">
+3.2
+</span>
+Identifying
+the
+Subject
+</a>
+</li>
+<li class="tocline">
+<a href="#specifying-the-type" class="tocxref">
+<span class="secno">
+3.3
+</span>
+Specifying
+the
+Type
+</a>
+</li>
+<li class="tocline">
+<a href="#strings" class="tocxref">
+<span class="secno">
+3.4
+</span>
+Strings
+</a>
+</li>
+<li class="tocline">
+<a href="#string-internationalization" class="tocxref">
+<span class="secno">
+3.5
+</span>
+String
+Internationalization
+</a>
+</li>
+<li class="tocline">
+<a href="#datatypes" class="tocxref">
+<span class="secno">
+3.6
+</span>
+Datatypes
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-objects-for-a-single-property" class="tocxref">
+<span class="secno">
+3.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#multiple-typed-literals-for-a-single-property" class="tocxref">
+<span class="secno">
+3.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</a>
+</li>
+<li class="tocline">
+<a href="#expansion" class="tocxref">
+<span class="secno">
+3.9
+</span>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#compaction" class="tocxref">
+<span class="secno">
+3.10
+</span>
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#framing" class="tocxref">
+<span class="secno">
+3.11
+</span>
+Framing
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#advanced-concepts" class="tocxref">
+<span class="secno">
+4.
+</span>
+Advanced
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#vocabulary-prefixes" class="tocxref">
+<span class="secno">
+4.1
+</span>
+<del class="diff-old">CURIEs
+</del>
+<ins class="diff-chg">Vocabulary
+Prefixes
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#automatic-typing" class="tocxref">
+<span class="secno">
+4.2
+</span>
+Automatic
+Typing
+</a>
+</li>
+<li class="tocline">
+<a href="#type-coercion" class="tocxref">
+<span class="secno">
+4.3
+</span>
+Type
+Coercion
+</a>
+</li>
+<li class="tocline">
+<a href="#chaining" class="tocxref">
+<span class="secno">
+4.4
+</span>
+Chaining
+</a>
+</li>
+<li class="tocline">
+<a href="#identifying-unlabeled-nodes" class="tocxref">
+<span class="secno">
+4.5
+</span>
+Identifying
+Unlabeled
+Nodes
+</a>
+</li>
+<li class="tocline">
+<a href="#aliasing-keywords" class="tocxref">
+<span class="secno">
+4.6
+</span>
+<del class="diff-old">Overriding
+</del>
+<ins class="diff-chg">Aliasing
+</ins>
+Keywords
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization" class="tocxref">
+<span class="secno">
+4.7
+</span>
+Normalization
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-application-programming-interface" class="tocxref">
+<span class="secno">
+5.
+</span>
+The
+Application
+Programming
+Interface
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#jsonldprocessor" class="tocxref">
+<span class="secno">
+5.1
+</span>
+<del class="diff-old">JSONLDProcessor
+</del>
+<ins class="diff-chg">JsonLdProcessor
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods" class="tocxref">
+<span class="secno">
+5.1.1
+</span>
+Methods
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#jsonldtriplecallback" class="tocxref">
+<span class="secno">
+5.2
+</span>
+<del class="diff-old">JSONLDProcessorCallback
+</del>
+<ins class="diff-chg">JsonLdTripleCallback
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods-1" class="tocxref">
+<span class="secno">
+5.2.1
+</span>
+Methods
+</a>
+</li>
+</ul>
+</li>
+<del class="diff-old">5.3
+JSONLDTripleCallback
+5.3.1
+Methods
+</del>
+</ul>
+</li>
+<li class="tocline">
+<a href="#algorithms" class="tocxref">
+<span class="secno">
+6.
+</span>
+Algorithms
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#syntax-tokens-and-keywords" class="tocxref">
+<span class="secno">
+6.1
+</span>
+Syntax
+Tokens
+and
+Keywords
+</a>
+</li>
+<li class="tocline">
+<a href="#algorithm-terms" class="tocxref">
+<span class="secno">
+6.2
+</span>
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#context-1" class="tocxref">
+<span class="secno">
+6.3
+</span>
+Context
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#coerce" class="tocxref">
+<span class="secno">
+6.3.1
+</span>
+Coerce
+</a>
+</li>
+<li class="tocline">
+<a href="#initial-context" class="tocxref">
+<span class="secno">
+6.3.2
+</span>
+Initial
+Context
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#iri-expansion" class="tocxref">
+<span class="secno">
+6.4
+</span>
+IRI
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-compaction" class="tocxref">
+<span class="secno">
+6.5
+</span>
+IRI
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#value-expansion" class="tocxref">
+<span class="secno">
+6.6
+</span>
+Value
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#value-compaction" class="tocxref">
+<span class="secno">
+6.7
+</span>
+Value
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#expansion-1" class="tocxref">
+<span class="secno">
+6.8
+</span>
+Expansion
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#expansion-algorithm" class="tocxref">
+<span class="secno">
+6.8.1
+</span>
+Expansion
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#compaction-1" class="tocxref">
+<span class="secno">
+6.9
+</span>
+Compaction
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#compaction-algorithm" class="tocxref">
+<span class="secno">
+6.9.1
+</span>
+Compaction
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#framing-1" class="tocxref">
+<span class="secno">
+6.10
+</span>
+Framing
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#framing-algorithm-terms" class="tocxref">
+<span class="secno">
+6.10.1
+</span>
+Framing
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#framing-algorithm" class="tocxref">
+<span class="secno">
+6.10.2
+</span>
+Framing
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#normalization-1" class="tocxref">
+<span class="secno">
+6.11
+</span>
+Normalization
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normalization-algorithm-terms" class="tocxref">
+<span class="secno">
+6.11.1
+</span>
+Normalization
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization-state" class="tocxref">
+<span class="secno">
+6.11.2
+</span>
+Normalization
+State
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization-algorithm" class="tocxref">
+<span class="secno">
+6.11.3
+</span>
+Normalization
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#node-relabeling-algorithm" class="tocxref">
+<span class="secno">
+6.11.4
+</span>
+Node
+Relabeling
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#deterministic-labeling-algorithm" class="tocxref">
+<span class="secno">
+6.11.5
+</span>
+Deterministic
+Labeling
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#shallow-comparison-algorithm" class="tocxref">
+<span class="secno">
+6.11.6
+</span>
+Shallow
+Comparison
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#object-comparison-algorithm" class="tocxref">
+<span class="secno">
+6.11.7
+</span>
+Object
+Comparison
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#deep-comparison-algorithm" class="tocxref">
+<span class="secno">
+6.11.8
+</span>
+Deep
+Comparison
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#node-serialization-algorithm" class="tocxref">
+<span class="secno">
+6.11.9
+</span>
+Node
+Serialization
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#serialization-label-generation-algorithm" class="tocxref">
+<span class="secno">
+6.11.10
+</span>
+Serialization
+Label
+Generation
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#combinatorial-serialization-algorithm" class="tocxref">
+<span class="secno">
+6.11.11
+</span>
+Combinatorial
+Serialization
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#serialization-comparison-algorithm" class="tocxref">
+<span class="secno">
+6.11.12
+</span>
+<ins class="diff-new">Serialization
+Comparison
+Algorithm
+</ins></a></li><li class="tocline"><a href="#mapping-serialization-algorithm" class="tocxref"><span class="secno"><ins class="diff-new">
+6.11.13
+</ins></span>
+Mapping
+Serialization
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#label-serialization-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">6.11.13
+</del>
+<ins class="diff-chg">6.11.14
+</ins>
+</span>
+Label
+Serialization
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#data-round-tripping" class="tocxref">
+<span class="secno">
+6.12
+</span>
+Data
+Round
+Tripping
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion" class="tocxref">
+<span class="secno">
+6.13
+</span>
+RDF
+Conversion
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#overview" class="tocxref">
+<span class="secno">
+6.13.1
+</span>
+Overview
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-algorithm-terms" class="tocxref">
+<span class="secno">
+6.13.2
+</span>
+RDF
+Conversion
+Algorithm
+Terms
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-algorithm" class="tocxref">
+<span class="secno">
+6.13.3
+</span>
+RDF
+Conversion
+Algorithm
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#experimental-concepts" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">A.
+</ins>
+</span>
+Experimental
+Concepts
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#disjoint-graphs" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.1
+</del>
+<ins class="diff-chg">A.1
+</ins>
+</span>
+Disjoint
+Graphs
+</a>
+</li>
+<li class="tocline">
+<a href="#lists" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.2
+</del>
+<ins class="diff-chg">A.2
+</ins>
+</span>
+Lists
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#expansion-2" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.2.1
+</del>
+<ins class="diff-chg">A.2.1
+</ins>
+</span>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#normalization-2" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.2.2
+</del>
+<ins class="diff-chg">A.2.2
+</ins>
+</span>
+Normalization
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-1" class="tocxref">
+<span class="secno">
+<del class="diff-old">7.2.3
+</del>
+<ins class="diff-chg">A.2.3
+</ins>
+</span>
+RDF
+Conversion
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#markup-examples" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+Markup
+Examples
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#rdfa" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+RDFa
+</a>
+</li>
+<li class="tocline">
+<a href="#microformats" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+Microformats
+</a>
+</li>
+<li class="tocline">
+<a href="#microdata" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.3
+</del>
+<ins class="diff-chg">B.3
+</ins>
+</span>
+Microdata
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#mashing-up-vocabularies" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.4
+</del>
+<ins class="diff-chg">C.
+</ins>
+</span>
+Mashing
+Up
+Vocabularies
+</a>
+</li>
+<li class="tocline">
+<a href="#iana-considerations" class="tocxref">
+<span class="secno">
+<del class="diff-old">A.5
+</del>
+<ins class="diff-chg">D.
+</ins>
+</span>
+<del class="diff-old">Acknowledgements
+</del>
+<ins class="diff-chg">IANA
+Considerations
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+<ins class="diff-chg">E.
+</ins></span><ins class="diff-chg">
+Acknowledgements
+</ins></a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">F.
+</ins>
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.1
+</del>
+<ins class="diff-chg">F.1
+</ins>
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+<del class="diff-old">B.2
+</del>
+<ins class="diff-chg">F.2
+</ins>
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+<div id="introduction" class="section">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+JSON,
+as
+specified
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+],
+is
+a
+simple
+language
+for
+representing
+data
+on
+the
+Web.
+Linked
+Data
+is
+a
+technique
+for
+<del class="diff-old">describing
+content
+</del>
+<ins class="diff-chg">creating
+a
+graph
+of
+interlinked
+data
+</ins>
+across
+different
+documents
+or
+Web
+sites.
+<del class="diff-old">Web
+resources
+</del>
+<ins class="diff-chg">Data
+entities
+</ins>
+are
+described
+using
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s,
+<del class="diff-old">and
+typically
+</del>
+<ins class="diff-chg">which
+</ins>
+are
+<ins class="diff-new">typically
+</ins>
+dereferencable
+<del class="diff-old">entities
+that
+</del>
+<ins class="diff-chg">and
+thus
+</ins>
+may
+be
+used
+to
+find
+more
+<del class="diff-old">information,
+</del>
+<ins class="diff-chg">information
+about
+an
+entity,
+</ins>
+creating
+a
+"Web
+of
+Knowledge".
+JSON-LD
+is
+intended
+to
+be
+a
+simple
+publishing
+method
+for
+expressing
+not
+only
+Linked
+Data
+in
+JSON,
+but
+<ins class="diff-new">also
+</ins>
+for
+adding
+semantics
+to
+existing
+JSON.
+</p>
+<p>
+JSON-LD
+is
+designed
+as
+a
+light-weight
+syntax
+that
+can
+be
+used
+to
+express
+Linked
+Data.
+It
+is
+primarily
+intended
+to
+be
+a
+way
+to
+<del class="diff-old">express
+</del>
+<ins class="diff-chg">use
+</ins>
+Linked
+Data
+in
+Javascript
+and
+other
+Web-based
+programming
+environments.
+It
+is
+also
+useful
+when
+building
+interoperable
+Web
+<del class="diff-old">Services
+</del>
+<ins class="diff-chg">services
+</ins>
+and
+when
+storing
+Linked
+Data
+in
+JSON-based
+document
+storage
+engines.
+It
+is
+practical
+and
+designed
+to
+be
+as
+simple
+as
+possible,
+utilizing
+the
+large
+number
+of
+JSON
+parsers
+and
+<del class="diff-old">existing
+code
+that
+is
+in
+use
+</del>
+<ins class="diff-chg">libraries
+available
+</ins>
+today.
+It
+is
+designed
+to
+be
+able
+to
+express
+key-value
+pairs,
+RDF
+data,
+RDFa
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">
+RDFA-CORE
+</a>
+</cite>
+]
+data,
+Microformats
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">
+MICROFORMATS
+</a>
+</cite>
+]
+data,
+and
+Microdata
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-MICRODATA">
+MICRODATA
+</a>
+</cite>
+].
+That
+is,
+it
+supports
+every
+major
+Web-based
+structured
+data
+model
+in
+use
+today.
+</p>
+<p>
+The
+syntax
+does
+not
+<ins class="diff-new">necessarily
+</ins>
+require
+<del class="diff-old">many
+</del>
+applications
+to
+change
+their
+JSON,
+but
+<ins class="diff-new">allows
+to
+</ins>
+easily
+add
+meaning
+by
+adding
+context
+in
+a
+way
+that
+is
+either
+in-band
+or
+out-of-band.
+The
+syntax
+is
+designed
+to
+not
+disturb
+already
+deployed
+systems
+running
+on
+JSON,
+but
+provide
+a
+smooth
+<del class="diff-old">migration
+</del>
+<ins class="diff-chg">upgrade
+</ins>
+path
+from
+JSON
+to
+JSON
+with
+added
+semantics.
+Finally,
+the
+format
+is
+intended
+to
+be
+<del class="diff-old">fast
+</del>
+<ins class="diff-chg">easy
+</ins>
+to
+parse,
+<del class="diff-old">fast
+</del>
+<ins class="diff-chg">efficient
+</ins>
+to
+generate,
+stream-based
+and
+document-based
+processing
+compatible,
+and
+require
+a
+very
+small
+memory
+footprint
+in
+order
+to
+operate.
+</p>
+<div id="how-to-read-this-document" class="section">
+<h3>
+<span class="secno">
+1.1
+</span>
+How
+to
+Read
+this
+Document
+</h3>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+a
+serialization
+of
+<del class="diff-old">JSON
+for
+</del>
+Linked
+<del class="diff-old">data.
+</del>
+<ins class="diff-chg">Data
+in
+JSON.
+</ins>
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+developers
+that
+want
+to
+understand
+the
+design
+decisions
+and
+language
+syntax
+for
+JSON-LD.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+encode
+Microformats,
+RDFa,
+or
+Microdata
+in
+a
+way
+that
+is
+cross-language
+compatible
+via
+JSON.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+implement
+processors
+and
+APIs
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+the
+basics
+in
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+].
+To
+understand
+the
+API
+and
+how
+it
+is
+intended
+to
+operate
+in
+a
+programming
+environment,
+it
+is
+useful
+to
+have
+working
+knowledge
+of
+the
+JavaScript
+programming
+language
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-ECMA-262">
+ECMA-262
+</a>
+</cite>
+]
+and
+WebIDL
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-WEBIDL">
+WEBIDL
+</a>
+</cite>
+].
+To
+understand
+how
+JSON-LD
+maps
+to
+RDF,
+it
+is
+helpful
+to
+be
+familiar
+with
+the
+basic
+RDF
+concepts
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+<p>
+Examples
+may
+contain
+references
+to
+existing
+vocabularies
+and
+use
+<del class="diff-old">abbreviations
+in
+CURIE
+</del>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+<ins class="diff-chg">prefix
+</ins>
+</a>
+<del class="diff-old">s
+and
+source
+code.
+</del>
+<ins class="diff-chg">es
+to
+refer
+to
+Web
+Vocabularies.
+</ins>
+The
+following
+is
+a
+list
+of
+all
+vocabularies
+and
+their
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+<ins class="diff-new">prefix
+</ins></a>
+abbreviations,
+as
+used
+in
+this
+document:
+</p>
+<ul>
+<li>
+The
+<a href="http://purl.org/dc/terms/">
+Dublin
+Core
+</a>
+vocabulary
+(abbreviation:
+<code>
+dc
+</code>,
+e.g.,
+<code>
+dc:title
+</code>
+)
+</li>
+<li>
+The
+<a href="http://xmlns.com/foaf/0.1/">
+Friend
+of
+a
+Friend
+</a>
+vocabulary
+(abbreviation:
+<code>
+foaf
+</code>,
+e.g.,
+<code>
+foaf:knows
+</code>
+)
+</li>
+<li>
+The
+<a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+RDF
+</a>
+vocabulary
+(abbreviation:
+<code>
+rdf
+</code>,
+e.g.,
+<code>
+rdf:type
+</code>
+)
+</li>
+<li>
+The
+<a href="http://www.w3.org/2001/XMLSchema#">
+XSD
+</a>
+vocabulary
+(abbreviation:
+<code>
+xsd
+</code>,
+e.g.,
+<code>
+xsd:integer
+</code>
+)
+</li>
+</ul>
+<p>
+JSON
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+defines
+several
+terms
+which
+are
+used
+throughout
+this
+document:
+</p>
+<dl>
+<dt>
+<dfn title="JSON_Object" id="dfn-json_object">
+JSON
+Object
+</dfn>
+</dt>
+<dd>
+An
+object
+structure
+is
+represented
+as
+a
+pair
+of
+curly
+brackets
+surrounding
+zero
+or
+more
+name/value
+pairs
+(or
+members).
+A
+name
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+A
+single
+colon
+comes
+after
+each
+name,
+separating
+the
+name
+from
+the
+value.
+A
+single
+comma
+separates
+a
+value
+from
+a
+following
+name.
+The
+names
+within
+an
+object
+<em class="rfc2119" title="should">
+should
+</em>
+be
+unique.
+</dd>
+<dt>
+<dfn title="array" id="dfn-array">
+array
+</dfn>
+</dt>
+<dd>
+An
+array
+is
+an
+ordered
+collection
+of
+values.
+An
+array
+<del class="diff-old">begins
+with
+[
+(left
+bracket)
+and
+ends
+with
+]
+(right
+bracket).
+Values
+</del>
+<ins class="diff-chg">structure
+is
+represented
+as
+square
+brackets
+surrounding
+zero
+or
+more
+values
+(or
+elements).
+Elements
+</ins>
+are
+separated
+by
+<del class="diff-old">,
+(comma).
+</del>
+<ins class="diff-chg">commas.
+</ins>
+Within
+JSON-LD,
+array
+order
+is
+not
+<del class="diff-old">preserved,
+</del>
+<ins class="diff-chg">preserved
+by
+default,
+</ins>
+unless
+specific
+markup
+is
+provided
+(see
+<a href="#lists">
+Lists
+</a>
+).
+This
+is
+because
+the
+basic
+data
+model
+of
+JSON-LD
+<del class="diff-old">linked
+data
+</del>
+<ins class="diff-chg">is
+a
+directed
+</ins><a class="tref" title="graph">
+graph
+</a>,
+which
+is
+inherently
+unordered.
+</dd>
+<dt>
+<dfn title="string" id="dfn-string">
+string
+</dfn>
+</dt>
+<dd>
+A
+string
+is
+a
+sequence
+of
+zero
+or
+more
+Unicode
+characters,
+wrapped
+in
+double
+quotes,
+using
+backslash
+escapes.
+A
+character
+is
+represented
+as
+a
+single
+character
+string.
+<del class="diff-old">A
+string
+is
+very
+much
+like
+a
+C
+or
+Java
+string.
+</del>
+</dd>
+<dt>
+<dfn title="number" id="dfn-number">
+number
+</dfn>
+</dt>
+<dd>
+A
+number
+is
+<del class="diff-old">very
+much
+like
+a
+C
+or
+Java
+number,
+</del>
+<ins class="diff-chg">is
+similar
+to
+that
+used
+in
+most
+programming
+languages,
+</ins>
+except
+that
+the
+octal
+and
+hexadecimal
+formats
+are
+not
+<del class="diff-old">used.
+</del>
+<ins class="diff-chg">used
+and
+that
+leading
+zeros
+are
+not
+allowed.
+</ins>
+</dd>
+<dt>
+<dfn title="true" id="dfn-true">
+true
+</dfn>
+and
+<dfn title="false" id="dfn-false">
+false
+</dfn>
+</dt>
+<dd>
+Boolean
+values.
+</dd>
+<dt>
+<dfn title="null" id="dfn-null">
+null
+</dfn>
+</dt>
+<dd>
+The
+use
+of
+the
+<em>
+null
+</em>
+value
+is
+undefined
+within
+JSON-LD.
+<div class="issue">
+<ins class="diff-new">Supporting
+</ins><em><ins class="diff-new">
+null
+</ins></em><ins class="diff-new">
+in
+JSON-LD
+might
+have
+a
+number
+of
+advantages
+and
+should
+be
+evaluated.
+This
+is
+currently
+an
+</ins><a href="https://github.com/json-ld/json-ld.org/issues/11"><ins class="diff-new">
+open
+issue
+</ins></a>.</div>
+</dd>
+</dl>
+<p>
+</p>
+</div>
+<div id="contributing" class="section">
+<h3>
+<span class="secno">
+1.2
+</span>
+Contributing
+</h3>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+Technical
+discussion
+typically
+occurs
+on
+the
+public
+mailing
+list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
+public-linked-json@w3.org
+</a>
+</li>
+<li>
+<a href="http://json-ld.org/minutes/">
+Public
+teleconferences
+</a>
+are
+held
+on
+Tuesdays
+at
+1500UTC
+on
+the
+second
+and
+fourth
+week
+of
+each
+month.
+</li>
+<li>
+Specification
+bugs
+and
+issues
+should
+be
+reported
+in
+the
+<a href="https://github.com/json-ld/json-ld.org/issues">
+issue
+tracker
+</a>.
+</li>
+<li>
+<a href="https://github.com/json-ld/json-ld.org/tree/master/spec">
+Source
+code
+</a>
+for
+the
+specification
+can
+be
+found
+on
+Github.
+</li>
+<li>
+The
+<a href="http://webchat.freenode.net/?channels=#json-ld">
+#json-ld
+</a>
+IRC
+channel
+is
+available
+for
+real-time
+discussion
+on
+irc.freenode.net.
+</li>
+</ul>
+</div>
+</div>
+<div id="design" class="section">
+<h2>
+<span class="secno">
+2.
+</span>
+Design
+</h2>
+<p>
+The
+following
+section
+outlines
+the
+design
+goals
+and
+rationale
+behind
+the
+JSON-LD
+markup
+language.
+</p>
+<div id="goals-and-rationale" class="section">
+<h3>
+<span class="secno">
+2.1
+</span>
+Goals
+and
+Rationale
+</h3>
+<p>
+A
+number
+of
+design
+considerations
+were
+explored
+during
+the
+creation
+of
+this
+markup
+language:
+</p>
+<dl>
+<dt>
+Simplicity
+</dt>
+<dd>
+Developers
+need
+only
+know
+JSON
+and
+three
+keywords
+to
+use
+the
+basic
+functionality
+in
+JSON-LD.
+No
+extra
+processors
+or
+software
+libraries
+are
+necessary
+to
+use
+JSON-LD
+in
+its
+most
+basic
+form.
+The
+language
+attempts
+to
+ensure
+that
+developers
+have
+an
+easy
+learning
+curve.
+</dd>
+<dt>
+Compatibility
+</dt>
+<dd>
+The
+JSON-LD
+markup
+must
+be
+100%
+compatible
+with
+JSON.
+This
+ensures
+that
+all
+of
+the
+standard
+JSON
+libraries
+work
+seamlessly
+with
+JSON-LD
+documents.
+</dd>
+<dt>
+Expressiveness
+</dt>
+<dd>
+The
+syntax
+must
+be
+able
+to
+express
+directed
+graphs,
+which
+have
+been
+proven
+to
+be
+able
+to
+simply
+express
+almost
+every
+real
+world
+data
+model.
+</dd>
+<dt>
+Terseness
+</dt>
+<dd>
+The
+JSON-LD
+syntax
+must
+be
+very
+terse
+and
+human
+readable,
+requiring
+as
+little
+as
+possible
+<ins class="diff-new">effort
+</ins>
+from
+the
+developer.
+</dd>
+<dt>
+Zero
+Edits,
+most
+of
+the
+time
+</dt>
+<dd>
+JSON-LD
+provides
+a
+mechanism
+that
+allows
+developers
+to
+specify
+context
+in
+a
+way
+that
+is
+out-of-band.
+This
+allows
+organizations
+that
+have
+already
+deployed
+large
+JSON-based
+infrastructure
+to
+add
+meaning
+to
+their
+JSON
+<ins class="diff-new">documents
+</ins>
+in
+a
+way
+that
+is
+not
+disruptive
+to
+their
+day-to-day
+operations
+and
+is
+transparent
+to
+their
+current
+customers.
+At
+times,
+mapping
+JSON
+to
+a
+graph
+representation
+can
+become
+difficult.
+In
+these
+instances,
+rather
+than
+having
+JSON-LD
+support
+esoteric
+markup,
+we
+chose
+not
+to
+support
+the
+use
+case
+and
+support
+a
+simplified
+syntax
+instead.
+So,
+while
+Zero
+Edits
+<del class="diff-old">was
+</del>
+<ins class="diff-chg">is
+</ins>
+a
+goal,
+it
+<del class="diff-old">was
+</del>
+<ins class="diff-chg">is
+</ins>
+not
+always
+possible
+without
+adding
+great
+complexity
+to
+the
+language.
+</dd>
+<dt>
+Streaming
+</dt>
+<dd>
+The
+format
+supports
+both
+document-based
+and
+stream-based
+processing.
+</dd>
+</dl>
+</div>
+<div id="linked-data" class="section">
+<h3>
+<span class="secno">
+2.2
+</span>
+Linked
+Data
+</h3>
+<p>
+The
+following
+definition
+for
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+is
+the
+one
+that
+will
+be
+used
+for
+this
+specification.
+</p>
+<ol>
+<li>
+<dfn title="Linked_Data" id="dfn-linked_data">
+Linked
+Data
+</dfn>
+is
+a
+set
+of
+documents,
+each
+containing
+a
+representation
+of
+a
+linked
+data
+graph.
+</li>
+<li>
+A
+<dfn title="linked_data_graph" id="dfn-linked_data_graph">
+linked
+data
+graph
+</dfn>
+is
+an
+unordered
+labeled
+directed
+graph,
+where
+nodes
+are
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>
+s
+or
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+s,
+and
+edges
+are
+properties.
+</li>
+<li>
+A
+<dfn title="subject" id="dfn-subject">
+subject
+</dfn>
+is
+any
+node
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+with
+at
+least
+one
+outgoing
+edge.
+</li>
+<li>
+A
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>
+<em class="rfc2119" title="should">
+should
+</em>
+be
+labeled
+with
+an
+<del class="diff-old">IRI.
+A
+property
+is
+an
+edge
+of
+the
+linked
+data
+graph
+.
+A
+property
+</del>
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+<ins class="diff-chg">IRI
+</ins>
+</a>
+<del class="diff-old">should
+be
+labeled
+with
+an
+IRI.
+</del>
+<ins class="diff-chg">(an
+Internationalized
+Resource
+Identifier
+as
+described
+in
+[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987"><ins class="diff-chg">
+RFC3987
+</ins></a></cite><ins class="diff-chg">
+]).
+</ins>
+</li>
+<li>
+An
+<dfn title="object" id="dfn-object">
+object
+</dfn>
+is
+a
+node
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+with
+at
+least
+one
+incoming
+edge.
+</li>
+<li>
+An
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+<em class="rfc2119" title="may">
+may
+</em>
+be
+labeled
+with
+an
+<del class="diff-old">IRI.
+</del>
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+<ins class="diff-chg">IRI
+</ins></a>.</li><li><ins class="diff-chg">
+An
+object
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+be
+a
+</ins><dfn title="subject" id="dfn-subject-1"><ins class="diff-chg">
+subject
+</ins></dfn><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="object" href="#dfn-object"><ins class="diff-chg">
+object
+</ins></a><ins class="diff-chg">
+at
+the
+same
+time.
+</ins></li><li><ins class="diff-chg">
+A
+</ins><dfn title="property" id="dfn-property"><ins class="diff-chg">
+property
+</ins></dfn><ins class="diff-chg">
+is
+an
+edge
+of
+the
+</ins><a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph"><ins class="diff-chg">
+linked
+data
+graph
+</ins></a>.</li><li><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="property" href="#dfn-property"><ins class="diff-chg">
+property
+</ins></a><em class="rfc2119" title="should"><ins class="diff-chg">
+should
+</ins></em><ins class="diff-chg">
+be
+labeled
+with
+an
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
+IRI
+</ins></a>.
+</li>
+<li>
+An
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+that
+is
+a
+label
+in
+a
+<a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">
+linked
+data
+graph
+</a>
+<em class="rfc2119" title="should">
+should
+</em>
+be
+dereferencable
+to
+a
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+document
+describing
+the
+labeled
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>,
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+or
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>.
+</li>
+<li>
+A
+<dfn title="literal" id="dfn-literal">
+literal
+</dfn>
+is
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+with
+a
+label
+that
+is
+not
+an
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+</li>
+</ol>
+<p>
+Note
+that
+the
+definition
+for
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>
+above
+is
+silent
+on
+the
+topic
+of
+unlabeled
+nodes.
+Unlabeled
+nodes
+are
+not
+considered
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>.
+However,
+this
+specification
+allows
+for
+the
+expression
+of
+unlabled
+nodes,
+as
+most
+graph-based
+data
+sets
+on
+the
+Web
+contain
+a
+number
+of
+associated
+nodes
+that
+are
+not
+named
+and
+thus
+are
+not
+directly
+de-referenceable.
+</p>
+</div>
+<div id="linking-data" class="section">
+<h3>
+<span class="secno">
+2.3
+</span>
+Linking
+Data
+</h3>
+<p>
+An
+Internationalized
+Resource
+Identifier
+(
+<dfn title="IRI" id="dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+),
+as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+],
+is
+a
+mechanism
+for
+representing
+unique
+identifiers
+on
+the
+web.
+In
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+an
+IRI
+is
+commonly
+used
+for
+expressing
+a
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>,
+a
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+or
+an
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>.
+</p>
+<p>
+JSON-LD
+defines
+a
+mechanism
+to
+map
+JSON
+<del class="diff-old">values
+</del>
+<ins class="diff-chg">terms,
+i.e.,
+keys
+and
+values,
+</ins>
+to
+IRIs.
+This
+does
+not
+mean
+that
+JSON-LD
+requires
+every
+key
+or
+value
+to
+be
+an
+IRI,
+but
+rather
+ensures
+that
+keys
+and
+values
+can
+be
+mapped
+to
+IRIs
+if
+the
+developer
+<del class="diff-old">so
+</del>
+desires
+to
+transform
+their
+data
+into
+Linked
+Data.
+There
+are
+a
+few
+techniques
+that
+can
+ensure
+that
+developers
+will
+generate
+good
+Linked
+Data
+for
+the
+Web.
+JSON-LD
+formalizes
+those
+techniques.
+</p>
+<p>
+We
+will
+be
+using
+the
+following
+JSON
+markup
+as
+the
+example
+for
+the
+rest
+of
+this
+section:
+</p>
+<pre class="example">
+{
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+</div>
+<div id="the-context" class="section">
+<h3>
+<span class="secno">
+2.4
+</span>
+The
+Context
+</h3>
+<p>
+In
+JSON-LD,
+a
+context
+is
+used
+to
+<del class="diff-old">allow
+developers
+to
+</del>
+map
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+<del class="diff-old">s
+</del>
+<ins class="diff-chg">s,
+i.e.,
+keys
+and
+values
+in
+an
+JSON
+document,
+</ins>
+to
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s.
+A
+<dfn title="term" id="dfn-term">
+term
+</dfn>
+is
+a
+short
+word
+that
+<em class="rfc2119" title="may">
+may
+</em>
+be
+expanded
+to
+an
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>.
+The
+<del class="diff-old">semantic
+web,
+just
+like
+the
+document-based
+web,
+</del>
+<ins class="diff-chg">Web
+</ins>
+uses
+IRIs
+for
+unambiguous
+identification.
+The
+idea
+is
+that
+these
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+mean
+something
+that
+may
+be
+of
+use
+to
+other
+<del class="diff-old">developers.
+</del>
+<ins class="diff-chg">developers
+and
+that
+it
+is
+useful
+to
+give
+them
+an
+unambiguous
+identifier.
+That
+is,
+it
+is
+useful
+for
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+s
+to
+expand
+to
+IRIs
+so
+that
+developers
+don't
+accidentally
+step
+on
+each
+other's
+Web
+Vocabulary
+terms.
+</ins>
+For
+example,
+the
+term
+<code>
+name
+</code>
+may
+map
+directly
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+allows
+JSON-LD
+documents
+to
+be
+constructed
+using
+the
+common
+JSON
+practice
+of
+simple
+name/value
+pairs
+while
+ensuring
+that
+the
+data
+is
+useful
+outside
+of
+the
+<del class="diff-old">database
+</del>
+<ins class="diff-chg">page,
+API
+</ins>
+or
+<del class="diff-old">page
+</del>
+<ins class="diff-chg">database
+</ins>
+in
+which
+it
+resides.
+</p>
+<p>
+These
+Linked
+Data
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+are
+typically
+collected
+in
+a
+context
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">document
+that
+would
+look
+something
+like
+this:
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+}
+</ins></pre><p><ins class="diff-chg">
+This
+context
+document
+can
+</ins>
+then
+<ins class="diff-new">be
+</ins>
+used
+<ins class="diff-new">in
+an
+JSON-LD
+document
+</ins>
+by
+adding
+a
+single
+<del class="diff-old">line
+to
+the
+</del>
+<ins class="diff-chg">line.
+The
+</ins>
+JSON
+markup
+<del class="diff-old">above:
+</del>
+<ins class="diff-chg">as
+shown
+in
+the
+previous
+section
+could
+be
+changed
+as
+follows
+to
+link
+to
+the
+context
+document:
+</ins>
+</p>
+<pre class="example">
+{
+  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+<p>
+The
+addition
+above
+transforms
+the
+previous
+JSON
+document
+into
+a
+JSON
+document
+with
+added
+semantics
+because
+the
+<code>
+@context
+</code>
+specifies
+how
+the
+<strong>
+name
+</strong>,
+<strong>
+homepage
+</strong>,
+and
+<strong>
+avatar
+</strong>
+terms
+map
+to
+IRIs.
+Mapping
+those
+keys
+to
+IRIs
+gives
+the
+data
+global
+context.
+If
+two
+developers
+use
+the
+same
+IRI
+to
+describe
+a
+property,
+they
+are
+more
+than
+likely
+expressing
+the
+same
+concept.
+This
+allows
+both
+developers
+to
+re-use
+each
+others
+data
+without
+having
+to
+agree
+to
+how
+their
+data
+will
+inter-operate
+on
+a
+site-by-site
+basis.
+<ins class="diff-new">Contexts
+may
+also
+contain
+datatype
+information
+for
+certain
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+s
+as
+well
+as
+other
+processing
+instructions
+for
+the
+JSON-LD
+processor.
+</ins>
+</p>
+<p>
+<del class="diff-old">The
+semantic
+web
+</del>
+<ins class="diff-chg">Contexts
+may
+be
+specified
+in-line.
+This
+ensures
+that
+JSON-LD
+documents
+can
+be
+processed
+when
+a
+JSON-LD
+processor
+does
+not
+have
+access
+to
+the
+Web.
+</ins></p><pre class="example"><ins class="diff-chg">
+{
+</ins>  <span class="diff">"@context": {<ins class="diff-chg">
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+  },</span>
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}
+</ins></pre><p><ins class="diff-chg">
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+APIs.
+This
+means
+that
+developers
+can
+also
+specify
+a
+context
+for
+JSON
+data
+in
+an
+out-of-band
+fashion.
+This
+is
+described
+later
+in
+this
+document.
+</ins></p><p><ins class="diff-chg">
+JSON-LD
+</ins>
+uses
+a
+special
+type
+of
+<ins class="diff-new">machine-readable
+</ins>
+document
+called
+a
+<dfn title="Web_Vocabulary" id="dfn-web_vocabulary">
+Web
+Vocabulary
+</dfn>
+to
+define
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+<del class="diff-old">s.
+A
+context
+is
+a
+type
+of
+Web
+vocabulary.
+</del>
+<ins class="diff-chg">s
+that
+are
+then
+used
+to
+describe
+concepts
+and
+"things"
+in
+the
+world.
+</ins>
+Typically,
+these
+Web
+Vocabulary
+documents
+have
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+prefix
+</a>
+es
+associated
+with
+them
+and
+contain
+a
+number
+of
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+declarations.
+A
+<dfn title="prefix" id="dfn-prefix">
+prefix
+</dfn>,
+like
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>,
+is
+a
+short
+word
+that
+expands
+to
+a
+Web
+Vocabulary
+<ins class="diff-new">base
+</ins>
+IRI.
+<a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">
+Prefix
+</a>
+es
+are
+helpful
+when
+a
+developer
+wants
+to
+mix
+multiple
+vocabularies
+together
+in
+a
+context,
+but
+does
+not
+want
+to
+go
+to
+the
+trouble
+of
+defining
+every
+single
+term
+in
+every
+single
+vocabulary.
+Some
+Web
+Vocabularies
+may
+have
+<del class="diff-old">10-20
+</del>
+<ins class="diff-chg">dozens
+of
+</ins>
+terms
+defined.
+If
+a
+developer
+wants
+to
+use
+3-4
+different
+vocabularies,
+the
+number
+of
+terms
+that
+would
+have
+to
+be
+declared
+in
+a
+single
+context
+<del class="diff-old">would
+</del>
+<ins class="diff-chg">could
+</ins>
+become
+quite
+large.
+To
+reduce
+the
+number
+of
+different
+terms
+that
+must
+be
+defined,
+JSON-LD
+also
+allows
+prefixes
+to
+be
+used
+to
+compact
+IRIs.
+</p>
+<p>
+</p>
+<p>
+For
+example,
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/
+</code>
+specifies
+a
+<a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">
+Web
+Vocabulary
+</a>
+which
+may
+be
+represented
+using
+the
+<code>
+foaf
+</code>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+prefix
+</a>.
+The
+<code>
+foaf
+</code>
+Web
+Vocabulary
+contains
+a
+term
+called
+<strong>
+name
+</strong>.
+If
+you
+join
+the
+<code>
+foaf
+</code>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+prefix
+</a>
+with
+the
+<strong>
+name
+</strong>
+suffix,
+you
+can
+build
+a
+compact
+IRI
+that
+will
+expand
+out
+into
+an
+absolute
+IRI
+for
+the
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+vocabulary
+term.
+That
+is,
+the
+compact
+IRI,
+or
+short-form,
+is
+<code>
+foaf:name
+</code>
+and
+the
+expanded-form
+is
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+This
+vocabulary
+term
+is
+used
+to
+specify
+a
+person's
+name.
+</p>
+<p>
+Developers,
+and
+machines,
+are
+able
+to
+use
+this
+IRI
+(plugging
+it
+directly
+into
+a
+web
+browser,
+for
+instance)
+to
+go
+to
+the
+term
+and
+get
+a
+definition
+of
+what
+the
+term
+means.
+Much
+like
+we
+can
+use
+<a href="http://wordnet.princeton.edu/">
+WordNet
+</a>
+today
+to
+see
+the
+definition
+of
+words
+in
+the
+English
+language.
+Developers
+and
+machines
+need
+the
+same
+sort
+of
+<del class="diff-old">dictionary
+</del>
+<ins class="diff-chg">definition
+</ins>
+of
+terms.
+IRIs
+provide
+a
+way
+to
+ensure
+that
+these
+terms
+are
+unambiguous.
+</p>
+<p>
+The
+context
+provides
+a
+collection
+of
+vocabulary
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+prefix
+</a>
+es
+that
+can
+be
+used
+to
+expand
+JSON
+keys
+and
+values
+into
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s.
+</p>
+<del class="diff-old">2.4.1
+Inside
+a
+Context
+In
+the
+previous
+section,
+the
+developer
+used
+the
+@context
+keyword
+to
+pull
+in
+an
+external
+context.
+That
+context
+document,
+if
+de-referenced,
+would
+look
+something
+like
+this:
+{
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+}
+A
+JSON-LD
+context
+document
+is
+a
+simple
+mapping
+from
+term
+s
+and
+prefix
+es
+to
+expanded
+values
+such
+as
+IRIs
+or
+keywords.
+Contexts
+may
+also
+contain
+datatype
+information
+for
+certain
+term
+s
+as
+well
+as
+other
+processing
+instructions
+for
+the
+JSON-LD
+processor.
+Contexts
+may
+be
+specified
+in-line.
+This
+ensures
+that
+JSON-LD
+documents
+can
+be
+processed
+when
+a
+JSON-LD
+processor
+does
+not
+have
+access
+to
+the
+Web.
+JSON-LD
+strives
+to
+ensure
+that
+developers
+don't
+have
+to
+change
+the
+JSON
+that
+is
+going
+into
+and
+being
+returned
+from
+their
+Web
+applications.
+This
+means
+that
+developers
+can
+also
+specify
+a
+context
+for
+JSON
+data
+in
+an
+out-of-band
+fashion
+via
+the
+API.
+The
+API
+is
+described
+later
+in
+this
+document.
+A
+JSON-LD
+aware
+Web
+Service
+may
+also
+define
+a
+context
+that
+will
+be
+pre-loaded
+for
+all
+calls
+to
+the
+service.
+This
+allows
+services
+that
+have
+previously
+been
+publishing
+and
+receiving
+JSON
+data
+to
+accept
+JSON-LD
+data
+without
+requiring
+client
+software
+to
+change.
+</del>
+</div>
+<div id="from-json-to-json-ld" class="section">
+<h3>
+<span class="secno">
+2.5
+</span>
+From
+JSON
+to
+JSON-LD
+</h3>
+<p>
+If
+a
+set
+of
+terms
+such
+as,
+<strong>
+name
+</strong>,
+<strong>
+homepage
+</strong>,
+and
+<strong>
+avatar
+</strong>,
+are
+defined
+in
+a
+context,
+and
+that
+context
+is
+used
+to
+resolve
+the
+names
+in
+JSON
+objects,
+machines
+are
+able
+to
+automatically
+expand
+the
+terms
+to
+something
+meaningful
+and
+unambiguous,
+like
+this:
+</p>
+<pre class="example">
+{
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+<p>
+Doing
+this
+allows
+JSON
+to
+be
+unambiguously
+machine-readable
+without
+requiring
+developers
+<del class="diff-old">that
+use
+JSON
+</del>
+to
+drastically
+change
+their
+workflow.
+</p>
+<p class="note">
+<ins class="diff-new">Please
+note
+that
+this
+JSON-LD
+document
+doesn't
+define
+the
+subject
+and
+will
+thus
+result
+in
+an
+unlabeled
+or
+blank
+node.
+</ins></p>
+</div>
+</div>
+<div id="basic-concepts" class="section">
+<h2>
+<span class="secno">
+3.
+</span>
+Basic
+Concepts
+</h2>
+<p>
+JSON-LD
+is
+designed
+to
+ensure
+that
+Linked
+Data
+concepts
+can
+be
+marked
+up
+in
+a
+way
+that
+is
+simple
+to
+understand
+and
+author
+by
+Web
+developers.
+In
+many
+cases,
+regular
+JSON
+markup
+can
+become
+Linked
+Data
+with
+the
+simple
+addition
+of
+a
+context.
+As
+more
+JSON-LD
+features
+are
+used,
+more
+semantics
+are
+added
+to
+the
+JSON
+markup.
+</p>
+<div id="iris" class="section">
+<h3>
+<span class="secno">
+3.1
+</span>
+IRIs
+</h3>
+<p>
+Expressing
+IRIs
+are
+fundamental
+to
+Linked
+Data
+as
+that
+is
+how
+most
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>
+s
+and
+many
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+are
+named.
+IRIs
+can
+be
+expressed
+in
+a
+variety
+of
+different
+ways
+in
+JSON-LD.
+</p>
+<ol>
+<li>
+In
+general,
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+in
+the
+key
+position
+in
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+that
+have
+a
+mapping
+to
+an
+IRI
+or
+another
+key
+in
+the
+context
+are
+expanded
+to
+an
+IRI
+by
+JSON-LD
+processors.
+There
+are
+special
+rules
+for
+processing
+keys
+in
+<code>
+@context
+</code>
+and
+when
+dealing
+with
+keys
+that
+start
+with
+the
+<code>
+@subject
+</code>
+character.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+@subject
+</code>,
+if
+it
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+<code>
+@type
+</code>.
+</li>
+<li>
+An
+IRI
+is
+generated
+for
+the
+value
+specified
+using
+the
+<code>
+@iri
+</code>
+keyword.
+</li>
+<li>
+An
+IRI
+is
+generated
+when
+there
+are
+<code>
+@coerce
+</code>
+rules
+in
+effect
+for
+a
+key
+named
+<code>
+@iri
+</code>.
+</li>
+</ol>
+<p>
+IRIs
+can
+be
+expressed
+directly
+in
+the
+key
+position
+like
+so:
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+In
+the
+example
+above,
+the
+key
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+is
+interpreted
+as
+an
+IRI,
+as
+opposed
+to
+being
+interpreted
+as
+a
+string.
+</p>
+<p>
+Term
+expansion
+occurs
+for
+IRIs
+if
+a
+term
+is
+defined
+within
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>:
+</p>
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}
+</pre>
+<p>
+<a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">
+Prefix
+</a>
+es
+are
+expanded
+when
+used
+in
+keys:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  ""},
+</del>
+<ins class="diff-chg">  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
+</ins>
+...
+<del class="diff-old">  "": "Manu Sporny",
+</del>
+<ins class="diff-chg">  "<span class="diff">foaf:name</span>": "Manu Sporny",
+</ins>
+...
+}
+</pre>
+<p>
+<code>
+<del class="diff-old">name
+</del>
+<ins class="diff-chg">foaf:name
+</ins>
+</code>
+above
+will
+automatically
+expand
+out
+to
+the
+IRI
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>.
+</p>
+<p>
+An
+IRI
+is
+generated
+when
+a
+value
+is
+associated
+with
+a
+key
+using
+the
+<code>
+@iri
+</code>
+keyword:
+</p>
+<pre class="example">
+{
+...
+  "homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}
+</pre>
+<p>
+If
+type
+coercion
+rules
+are
+specified
+in
+the
+<code>
+@context
+</code>
+for
+a
+particular
+vocabulary
+term,
+an
+IRI
+is
+generated:
+</p>
+<pre class="example">
+{<span class="diff">
+<del class="diff-old">  "@context": 
+</del>
+<ins class="diff-chg">  "@context":
+</ins>
+  {
+    ...
+<del class="diff-old">    "@coerce": 
+</del>
+<ins class="diff-chg">    "@coerce":
+</ins>
+    {
+      "@iri": "homepage"
+    }
+  }</span>
+...
+  "homepage": "http://manu.sporny.org/",
+...
+}
+</pre>
+<p>
+Even
+though
+the
+value
+<code>
+http://manu.sporny.org/
+</code>
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+the
+type
+coercion
+rules
+will
+transform
+the
+value
+into
+an
+IRI
+when
+processed
+by
+a
+JSON-LD
+Processor
+</p>
+</div>
+<div id="identifying-the-subject" class="section">
+<h3>
+<span class="secno">
+3.2
+</span>
+Identifying
+the
+Subject
+</h3>
+<p>
+<ins class="diff-new">To
+be
+able
+to
+externally
+reference
+nodes,
+it
+is
+important
+that
+each
+node
+has
+an
+unambiguous
+identifier.
+</ins>
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>
+s
+are
+a
+fundamental
+concept
+of
+Linked
+Data,
+and
+nodes
+should
+have
+a
+de-referencable
+identifier
+used
+to
+name
+and
+locate
+them.
+For
+nodes
+to
+be
+truely
+linked,
+de-referencing
+the
+identifier
+should
+result
+in
+a
+representation
+of
+that
+node.
+Associating
+an
+IRI
+with
+a
+node
+tells
+an
+application
+that
+the
+returned
+document
+contains
+a
+description
+of
+<del class="diff-old">of
+</del>
+the
+<del class="diff-old">identifier
+</del>
+<ins class="diff-chg">node
+</ins>
+requested.
+</p>
+<p>
+JSON-LD
+documents
+may
+also
+contain
+descriptions
+of
+other
+nodes,
+so
+it
+is
+necessary
+to
+be
+able
+to
+uniquely
+identify
+each
+node
+which
+may
+be
+externally
+referenced.
+</p>
+<p>
+A
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>
+of
+<del class="diff-old">a
+node
+</del>
+<ins class="diff-chg">an
+object
+in
+JSON
+</ins>
+is
+declared
+using
+the
+<code>
+@subject
+</code>
+key.
+The
+subject
+is
+the
+first
+piece
+of
+information
+needed
+by
+the
+JSON-LD
+processor
+in
+order
+to
+create
+the
+(subject,
+property,
+object)
+tuple,
+also
+known
+as
+a
+triple.
+</p>
+<pre class="example">
+{
+...
+  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+the
+IRI
+<code>
+http://example.org/people#joebob
+</code>.
+</p>
+</div>
+<div id="specifying-the-type" class="section">
+<h3>
+<span class="secno">
+3.3
+</span>
+Specifying
+the
+Type
+</h3>
+<p>
+The
+type
+of
+a
+particular
+subject
+can
+be
+specified
+using
+the
+<code>
+@type
+</code>
+key.
+Specifying
+the
+type
+in
+this
+way
+will
+generate
+a
+triple
+of
+the
+form
+(subject,
+type,
+<del class="diff-old">type-uri).
+</del>
+<ins class="diff-chg">type-iri).
+</ins>
+</p>
+<p>
+To
+be
+Linked
+Data,
+types
+<del class="diff-old">should
+</del>
+<em class="rfc2119" title="must">
+<ins class="diff-chg">must
+</ins></em>
+be
+uniquely
+identified
+by
+an
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>.
+</p>
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple
+if
+the
+JSON-LD
+document
+is
+mapped
+to
+RDF
+(in
+N-Triples
+notation):
+</p>
+<pre class="example">
+<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
+</ins>
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+</div>
+<div id="strings" class="section">
+<h3>
+<span class="secno">
+3.4
+</span>
+Strings
+</h3>
+<p>
+Regular
+text
+strings,
+also
+referred
+to
+as
+<dfn title="plain_literal" id="dfn-plain_literal">
+plain
+literal
+</dfn>
+s,
+are
+easily
+expressed
+using
+regular
+JSON
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+s.
+</p>
+<pre class="example">
+{
+...
+  "name": "<span class="diff">Mark Birbeck</span>",
+...
+}
+</pre>
+</div>
+<div id="string-internationalization" class="section">
+<h3>
+<span class="secno">
+3.5
+</span>
+String
+Internationalization
+</h3>
+<p>
+JSON-LD
+makes
+an
+assumption
+that
+strings
+with
+associated
+language
+encoding
+information
+are
+not
+very
+common
+when
+used
+in
+JavaScript
+and
+Web
+Services.
+Thus,
+it
+takes
+a
+little
+more
+effort
+to
+express
+strings
+with
+associated
+language
+information.
+</p>
+<pre class="example">
+{
+...
+  "name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+for
+<em>
+花澄
+</em>
+and
+associate
+the
+<code>
+ja
+</code>
+language
+code
+with
+the
+triple
+that
+is
+generated.
+Languages
+<em class="rfc2119" title="must">
+must
+</em>
+be
+expressed
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+]
+format.
+</p>
+</div>
+<div id="datatypes" class="section">
+<h3>
+<span class="secno">
+3.6
+</span>
+Datatypes
+</h3>
+<p>
+A
+value
+with
+an
+associated
+datatype,
+also
+known
+as
+a
+<dfn title="typed_literal" id="dfn-typed_literal">
+typed
+literal
+</dfn>,
+is
+indicated
+by
+associating
+a
+literal
+with
+an
+IRI
+which
+indicates
+the
+<del class="diff-old">typed
+</del>
+literal's
+datatype.
+Typed
+literals
+may
+be
+expressed
+in
+JSON-LD
+in
+three
+ways:
+</p>
+<ol>
+<li>
+By
+utilizing
+the
+<code>
+@coerce
+</code>
+keyword.
+</li>
+<li>
+By
+utilizing
+the
+expanded
+form
+for
+specifying
+objects.
+</li>
+<li>
+By
+using
+a
+native
+JSON
+datatype.
+</li>
+</ol>
+<p>
+The
+first
+example
+uses
+the
+<code>
+@coerce
+</code>
+keyword
+to
+express
+a
+typed
+literal:
+</p>
+<pre class="example">
+{<span class="diff">
+<del class="diff-old">  "@context": 
+</del>
+<ins class="diff-chg">  "@context":
+</ins>
+  {
+    "modified":  "http://purl.org/dc/terms/modified",
+    "dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
+<del class="diff-old">    "@coerce": 
+</del>
+<ins class="diff-chg">    "@coerce":
+</ins>
+    {
+      "dateTime": "modified"
+    }
+  }</span>
+...
+  "modified": "2010-05-29T14:17:39+02:00",
+...
+}
+</pre>
+<p>
+The
+second
+example
+uses
+the
+expanded
+form
+for
+specifying
+objects:
+</p>
+<pre class="example">
+{
+...
+  "modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "dateTime"
+  }</span>
+...
+}
+</pre>
+<p>
+Both
+examples
+above
+would
+generate
+an
+object
+with
+the
+literal
+value
+of
+<code>
+2010-05-29T14:17:39+02:00
+</code>
+and
+the
+datatype
+of
+<code>
+http://www.w3.org/2001/XMLSchema#dateTime
+</code>.
+</p>
+<p>
+The
+third
+example
+uses
+a
+built-in
+native
+JSON
+type,
+a
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>,
+to
+express
+a
+datatype:
+</p>
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "age": <span class="diff">31</span>
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triple:
+</p>
+<pre class="example">
+<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
+   &lt;http://xmlns.com/foaf/0.1/age&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+</ins>
+"31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt;
+.
+</pre>
+</div>
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+3.7
+</span>
+Multiple
+Objects
+for
+a
+Single
+Property
+</h3>
+<p>
+A
+JSON-LD
+author
+can
+express
+multiple
+triples
+in
+a
+compact
+way
+by
+using
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+s.
+If
+a
+subject
+has
+multiple
+values
+for
+the
+same
+property,
+the
+author
+<em class="rfc2119" title="may">
+may
+</em>
+express
+each
+property
+as
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>.
+</p>
+<p class="note">
+In
+JSON-LD,
+<del class="diff-old">Multiple
+</del>
+<ins class="diff-chg">multiple
+</ins>
+objects
+on
+a
+property
+are
+not
+ordered.
+This
+is
+because
+typically
+graphs
+are
+not
+inherently
+ordered
+data
+structures.
+To
+see
+more
+on
+creating
+ordered
+collections
+in
+JSON-LD,
+see
+<a href="#lists">
+Lists
+</a>.
+</p>
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
+</ins>
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
+</ins>
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+<del class="diff-old">&lt;http://example.org/people#joebob&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/people#joebob&gt;
+</ins>
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+"jaybee"
+.
+</pre>
+</div>
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3>
+<span class="secno">
+3.8
+</span>
+Multiple
+Typed
+Literals
+for
+a
+Single
+Property
+</h3>
+<p>
+Multiple
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s
+may
+also
+be
+expressed
+using
+the
+expanded
+form
+for
+objects:
+</p>
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/articles/8",
+  "modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "dateTime"
+    }
+  ]</span>
+...
+}
+</pre>
+<p>
+The
+markup
+shown
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+<del class="diff-old">&lt;http://example.org/articles/8&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/articles/8&gt;
+</ins>
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+<del class="diff-old">&lt;http://example.org/articles/8&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/articles/8&gt;
+</ins>
+   &lt;http://purl.org/dc/terms/modified&gt;
+"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime
+.
+</pre>
+</div>
+<div id="expansion" class="section">
+<h3>
+<span class="secno">
+3.9
+</span>
+Expansion
+</h3>
+<p>
+Expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+all
+IRI,
+datatypes,
+and
+literal
+values
+are
+expanded
+so
+that
+the
+context
+is
+no
+longer
+necessary.
+JSON-LD
+document
+expansion
+is
+typically
+used
+<del class="diff-old">when
+re-mapping
+JSON-LD
+documents
+to
+application-specific
+JSON
+documents
+or
+</del>
+as
+a
+part
+of
+<del class="diff-old">the
+</del>
+<a href="#normalization">
+<del class="diff-old">Normalization
+</del>
+<ins class="diff-chg">Framing
+</ins>
+</a>
+<del class="diff-old">process.
+</del>
+<ins class="diff-chg">or
+</ins><a href="#normalization"><ins class="diff-chg">
+Normalization
+</ins></a>.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<pre class="example">
+{
+<del class="diff-old">   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+</del>
+<ins class="diff-chg">   "@context":
+</ins>
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<del class="diff-old">      "@coerce": 
+</del>
+<ins class="diff-chg">      "@coerce":
+</ins>
+      {
+         "@iri": "homepage"
+      }
+<del class="diff-old">   }
+</del>
+<ins class="diff-chg">   },
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/"
+</ins>
+}
+</pre>
+<p>
+Running
+the
+JSON-LD
+Expansion
+algorithm
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</p>
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+<del class="diff-old">   "http://xmlns.com/foaf/0.1/homepage": 
+</del>
+<ins class="diff-chg">   "http://xmlns.com/foaf/0.1/homepage":
+</ins>
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}
+</pre>
+</div>
+<div id="compaction" class="section">
+<h3>
+<span class="secno">
+3.10
+</span>
+Compaction
+</h3>
+<p>
+Compaction
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document
+and
+applying
+a
+context
+such
+that
+the
+most
+compact
+form
+of
+the
+document
+is
+generated.
+JSON
+is
+typically
+expressed
+in
+a
+very
+compact,
+key-value
+format.
+That
+is,
+full
+IRIs
+are
+rarely
+used
+as
+keys.
+At
+times,
+a
+JSON-LD
+document
+may
+be
+received
+that
+is
+not
+in
+its
+most
+compact
+form.
+JSON-LD,
+via
+the
+API,
+provides
+a
+way
+to
+compact
+a
+JSON-LD
+document.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+<del class="diff-old">   "http://xmlns.com/foaf/0.1/homepage": 
+</del>
+<ins class="diff-chg">   "http://xmlns.com/foaf/0.1/homepage":
+</ins>
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}
+</pre>
+<p>
+Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+context:
+</p>
+<pre class="example">
+{
+   "name": "http://xmlns.com/foaf/0.1/name",
+   "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<del class="diff-old">   "@coerce": 
+</del>
+<ins class="diff-chg">   "@coerce":
+</ins>
+   {
+<del class="diff-old">      "@iri": ["homepage"]
+</del>
+<ins class="diff-chg">      "@iri": "homepage"
+</ins>
+   }
+}
+</pre>
+<p>
+Running
+the
+JSON-LD
+Compaction
+algorithm
+given
+the
+context
+supplied
+above
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</p>
+<pre class="example">
+{
+<del class="diff-old">   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+</del>
+<ins class="diff-chg">   "@context":
+</ins>
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<del class="diff-old">      "@coerce": 
+</del>
+<ins class="diff-chg">      "@coerce":
+</ins>
+      {
+         "@iri": "homepage"
+      }
+<del class="diff-old">   }
+</del>
+<ins class="diff-chg">   },
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/"
+</ins>
+}
+</pre>
+<p>
+The
+compaction
+algorithm
+also
+enables
+the
+developer
+to
+map
+any
+expanded
+format
+into
+an
+application-specific
+compacted
+format.
+While
+the
+context
+provided
+above
+mapped
+<code>
+http://xmlns.com/foaf/0.1/name
+</code>
+to
+<strong>
+name
+</strong>,
+it
+could
+have
+also
+mapped
+it
+to
+any
+arbitrary
+string
+provided
+by
+the
+developer.
+</p>
+</div>
+<div id="framing" class="section">
+<h3>
+<span class="secno">
+3.11
+</span>
+Framing
+</h3>
+<p>
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+work
+with
+trees,
+represented
+as
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+s.
+While
+mapping
+a
+graph
+to
+a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+A
+<dfn title="Frame" id="dfn-frame">
+Frame
+</dfn>
+can
+be
+used
+by
+a
+developer
+on
+a
+JSON-LD
+document
+to
+specify
+a
+deterministic
+layout
+for
+a
+graph.
+</p>
+<p>
+Framing
+is
+the
+process
+of
+taking
+a
+JSON-LD
+document,
+which
+expresses
+a
+graph
+of
+information,
+and
+applying
+a
+specific
+graph
+layout
+(called
+a
+<a class="tref internalDFN" title="Frame" href="#dfn-frame">
+Frame
+</a>
+).
+</p>
+<p>
+The
+JSON-LD
+document
+below
+expresses
+a
+library,
+a
+book
+and
+a
+chapter:
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "@coerce": {
+</del>
+<ins class="diff-chg">  "@context": {
+</ins>
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title",
+<del class="diff-old">    "@coerce": 
+</del>
+<ins class="diff-chg">    "@coerce":
+</ins>
+    {
+<del class="diff-old">      "@iri": "ex:contains"
+</del>
+<ins class="diff-chg">      "@iri": "contains"
+</ins>
+    },
+  },
+<del class="diff-old">  "@subject": 
+</del>
+<ins class="diff-chg">  "@subject":
+</ins>
+  [{
+    "@subject": "http://example.com/library",
+    "@type": "Library",
+    "contains": "http://example.org/library/the-republic"
+<del class="diff-old">  }, 
+</del>
+<ins class="diff-chg">  },
+</ins>
+  {
+    "@subject": "http://example.org/library/the-republic",
+    "@type": "Book",
+    "creator": "Plato",
+    "title": "The Republic",
+    "contains": "http://example.org/library/the-republic#introduction"
+<del class="diff-old">  }, 
+</del>
+<ins class="diff-chg">  },
+</ins>
+  {
+    "@subject": "http://example.org/library/the-republic#introduction",
+    "@type": "Chapter",
+    "description": "An introductory chapter on The Republic.",
+    "title": "The Introduction"
+  }]
+}
+</pre>
+<p>
+Developers
+typically
+like
+to
+operate
+on
+items
+in
+a
+hierarchical,
+tree-based
+fashion.
+Ideally,
+a
+developer
+would
+want
+the
+data
+above
+sorted
+into
+top-level
+libraries,
+then
+the
+books
+that
+are
+contained
+in
+each
+library,
+and
+then
+the
+chapters
+contained
+in
+each
+book.
+To
+achieve
+that
+layout,
+the
+developer
+can
+define
+the
+following
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>:
+</p>
+<pre class="example">
+{
+  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title"
+  },
+  "@type": "Library",
+  "contains": {
+    "@type": "Book",
+    "contains": {
+      "@type": "Chapter"
+    }
+  }
+}
+</pre>
+<p>
+When
+the
+framing
+algorithm
+is
+run
+against
+the
+previously
+defined
+JSON-LD
+document,
+paired
+with
+the
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>
+above,
+the
+following
+JSON-LD
+document
+is
+the
+end
+result:
+</p>
+<pre class="example">
+{
+  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title"
+  },
+  "@subject": "http://example.org/library",
+  "@type": "Library",
+  "contains": {
+    <span class="diff">"@subject": "http://example.org/library/the-republic",</span>
+    "@type": "Book",
+    <span class="diff">"creator": "Plato",</span>
+    <span class="diff">"title": "The Republic",</span>
+    "contains": {
+      <span class="diff">"@subject": "http://example.org/library/the-republic#introduction",</span>
+      "@type": "Chapter",
+      <span class="diff">"description": "An introductory chapter on The Republic.",</span>
+      <span class="diff">"title": "The Introduction"</span>
+    },
+  },
+}
+</pre>
+<p>
+The
+JSON-LD
+framing
+algorithm
+allows
+developers
+to
+query
+by
+example
+and
+force
+a
+specific
+tree
+layout
+to
+a
+JSON-LD
+document.
+</p>
+</div>
+</div>
+<div id="advanced-concepts" class="section">
+<h2>
+<span class="secno">
+4.
+</span>
+Advanced
+Concepts
+</h2>
+<p>
+JSON-LD
+has
+a
+number
+of
+features
+that
+provide
+functionality
+above
+and
+beyond
+the
+core
+functionality
+described
+above.
+The
+following
+sections
+outline
+the
+features
+that
+are
+specific
+to
+JSON-LD.
+</p>
+<div id="vocabulary-prefixes" class="section">
+<h3>
+<span class="secno">
+4.1
+</span>
+<del class="diff-old">CURIEs
+</del>
+<ins class="diff-chg">Vocabulary
+Prefixes
+</ins>
+</h3>
+<p>
+<del class="diff-old">Concepts
+</del>
+<ins class="diff-chg">Vocabulary
+terms
+</ins>
+in
+Linked
+Data
+documents
+may
+draw
+<del class="diff-old">on
+</del>
+<ins class="diff-chg">from
+</ins>
+a
+number
+of
+different
+<ins class="diff-new">Web
+</ins>
+vocabularies.
+<del class="diff-old">The
+@vocab
+</del>
+<ins class="diff-chg">At
+times,
+declaring
+every
+single
+term
+that
+a
+document
+uses
+can
+require
+the
+developer
+to
+declare
+tens,
+if
+not
+hundreds
+of
+potential
+vocabulary
+terms
+that
+may
+be
+used
+across
+an
+application.
+This
+is
+a
+concern
+for
+at
+least
+three
+reasons;
+the
+first
+is
+the
+cognitive
+load
+on
+the
+developer,
+the
+second
+is
+the
+serialized
+size
+of
+the
+context,
+the
+third
+is
+future-proofing
+application
+contexts.
+In
+order
+to
+address
+these
+issues,
+the
+concept
+of
+a
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-chg">
+prefix
+</ins></a>
+mechanism
+is
+<del class="diff-old">useful
+</del>
+<ins class="diff-chg">introduced.
+</ins></p><p><ins class="diff-chg">
+A
+</ins><dfn title="prefix" id="dfn-prefix-1"><ins class="diff-chg">
+prefix
+</ins></dfn><ins class="diff-chg">
+is
+a
+compact
+way
+of
+expressing
+a
+base
+</ins><a class="tref internalDFN" title="IRI" href="#dfn-iri"><ins class="diff-chg">
+IRI
+</ins></a>
+to
+<del class="diff-old">easily
+associate
+types
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary"><ins class="diff-chg">
+Web
+Vocabulary
+</ins></a>.<ins class="diff-chg">
+Generally,
+these
+prefixes
+are
+used
+by
+concatenating
+the
+</ins><em><ins class="diff-chg">
+prefix
+</ins></em>
+and
+<del class="diff-old">properties
+</del>
+<ins class="diff-chg">a
+</ins><em><ins class="diff-chg">
+term
+</ins></em><ins class="diff-chg">
+separated
+by
+a
+colon
+(
+</ins><code>:</code><ins class="diff-chg">
+).
+The
+prefix
+is
+a
+short
+string
+that
+identifies
+a
+particular
+Web
+vocabulary.
+For
+example,
+the
+prefix
+</ins><code><ins class="diff-chg">
+foaf
+</ins></code><ins class="diff-chg">
+may
+be
+used
+as
+a
+short
+hand
+for
+the
+Friend-of-a-Friend
+Web
+Vocabulary,
+which
+is
+identified
+using
+the
+IRI
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/
+</ins></code>.<ins class="diff-chg">
+A
+developer
+may
+append
+any
+of
+the
+FOAF
+Vocabulary
+terms
+to
+the
+end
+of
+the
+prefix
+to
+specify
+a
+short-hand
+version
+of
+the
+full
+IRI
+for
+the
+vocabulary
+term.
+For
+example,
+</ins><code><ins class="diff-chg">
+foaf:name
+</ins></code><ins class="diff-chg">
+would
+be
+expanded
+out
+to
+the
+IRI
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/name
+</ins></code>.<ins class="diff-chg">
+Instead
+of
+having
+to
+remember
+and
+type
+out
+the
+entire
+IRI,
+the
+developer
+can
+instead
+use
+the
+prefix
+in
+their
+JSON-LD
+markup.
+</ins></p><p><ins class="diff-chg">
+The
+ability
+to
+use
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+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.
+</ins><a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1"><ins class="diff-chg">
+Prefix
+</ins></a><ins class="diff-chg">
+also
+reduce
+the
+cognitive
+load
+on
+the
+developer.
+It
+is
+far
+easier
+to
+remember
+</ins><code><ins class="diff-chg">
+foaf:name
+</ins></code><ins class="diff-chg">
+than
+it
+is
+to
+remember
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/name
+</ins></code>.<ins class="diff-chg">
+The
+use
+of
+prefixes
+also
+ensures
+that
+a
+context
+document
+does
+not
+have
+to
+be
+updated
+in
+lock-step
+</ins>
+with
+<ins class="diff-new">an
+externally
+defined
+</ins><a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary"><ins class="diff-new">
+Web
+Vocabulary
+</ins></a>.<ins class="diff-new">
+Without
+prefixes,
+</ins>
+a
+<del class="diff-old">specific
+vocabulary,
+but
+when
+many
+vocabularies
+are
+used,
+this
+becomes
+difficult.
+</del>
+<ins class="diff-chg">developer
+would
+need
+to
+keep
+their
+application
+context
+terms
+in
+lock-step
+with
+an
+externally
+defined
+Web
+Vocabulary.
+Rather,
+by
+just
+declaring
+the
+Web
+Vocabulary
+prefix,
+one
+can
+use
+new
+terms
+as
+they're
+declared
+without
+having
+to
+update
+the
+application's
+JSON-LD
+context.
+</ins></p><p>
+Consider
+the
+following
+example:
+</p>
+  <pre class="example">
+{
+  "@context": {
+    <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>
+    <span class="diff">"ex": "http://example.org/vocab#"</span>
+  },
+  "@subject": "http://example.org/library",
+  "@type": <span class="diff">"ex:Library"</span>,
+  <span class="diff">"ex:contains"</span>: {
+    "@subject": "http://example.org/library/the-republic",
+    "@type": <span class="diff">"ex:Book"</span>,
+    <span class="diff">"dc:creator"</span>: "Plato",
+    <span class="diff">"dc:title"</span>: "The Republic",
+    <span class="diff">"ex:contains"</span>: {
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": <span class="diff">"ex:Chapter"</span>,
+      <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",
+      <span class="diff">"dc:title"</span>: "The Introduction"
+    },
+  },
+}
+</pre>
+<p>
+In
+this
+example,
+two
+different
+vocabularies
+are
+<del class="diff-old">identified
+with
+prefixes,
+and
+</del>
+<ins class="diff-chg">referred
+to
+using
+prefixes.
+Those
+prefixes
+are
+then
+</ins>
+used
+as
+type
+and
+property
+values
+using
+the
+<del class="diff-old">CURIE
+</del>
+<code>
+<ins class="diff-chg">prefix:term
+</ins></code>
+notation.
+</p>
+<p>
+<del class="diff-old">A
+CURIE
+is
+a
+compact
+way
+of
+describing
+an
+IRI
+.
+The
+term
+actually
+comes
+from
+Compact
+URI.
+Generally,
+a
+CURIE
+is
+composed
+of
+a
+prefix
+and
+a
+suffix
+separated
+by
+a
+':'.
+In
+JSON-LD,
+the
+prefix
+may
+be
+the
+empty
+string,
+denoting
+the
+default
+prefix
+.
+CURIEs
+</del>
+<ins class="diff-chg">Prefixes,
+also
+known
+as
+CURIEs,
+</ins>
+are
+defined
+more
+formally
+in
+<del class="diff-old">[
+RDFA-CORE
+]
+</del>
+<ins class="diff-chg">RDFa
+Core
+1.1,
+</ins>
+<cite>
+<a href="http://www.w3.org/TR/rdfa-core/#s_curies">
+<del class="diff-old">section
+</del>
+<ins class="diff-chg">Section
+</ins>
+6
+"CURIE
+Syntax
+Definition"
+</a>
+<del class="diff-old">.
+</del>
+</cite>
+<ins class="diff-chg">[
+</ins><cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE"><ins class="diff-chg">
+RDFA-CORE
+</ins></a></cite><ins class="diff-chg">
+].
+JSON-LD
+does
+not
+support
+the
+square-bracketed
+CURIE
+syntax
+as
+the
+mechanism
+is
+not
+required
+to
+disambiguate
+IRIs
+in
+a
+JSON-LD
+document
+like
+it
+is
+in
+HTML
+documents.
+</ins>
+</p>
+</div>
+<div id="automatic-typing" class="section">
+<h3>
+<span class="secno">
+4.2
+</span>
+Automatic
+Typing
+</h3>
+<p>
+Since
+JSON
+is
+capable
+of
+expressing
+typed
+information
+such
+as
+doubles,
+integers,
+and
+boolean
+values.
+As
+demonstrated
+below,
+JSON-LD
+utilizes
+that
+information
+to
+create
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s:
+</p>
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}
+</pre>
+<p class="note">
+When
+dealing
+with
+a
+number
+of
+modern
+programming
+languages,
+including
+JavaScript
+ECMA-262,
+there
+is
+no
+distinction
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>
+values.
+That
+is,
+the
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>
+<code>
+5.3
+</code>
+and
+the
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>
+<code>
+5.3e0
+</code>
+are
+treated
+as
+if
+they
+were
+the
+same.
+When
+converting
+from
+JSON-LD
+to
+a
+language-native
+format
+and
+back,
+datatype
+information
+is
+lost
+in
+a
+number
+of
+these
+languages.
+Thus,
+one
+could
+say
+that
+<code>
+5.3
+</code>
+is
+a
+<strong>
+xsd:decimal
+</strong>
+and
+<code>
+5.3e0
+</code>
+is
+an
+<strong>
+xsd:double
+</strong>
+in
+JSON-LD,
+but
+when
+both
+values
+are
+converted
+to
+a
+language-native
+format
+the
+datatype
+difference
+between
+the
+two
+is
+lost
+because
+the
+machine-level
+representation
+will
+almost
+always
+be
+a
+<strong>
+double
+</strong>.
+Implementers
+should
+be
+aware
+of
+this
+potential
+round-tripping
+issue
+between
+<strong>
+xsd:decimal
+</strong>
+and
+<strong>
+xsd:double
+</strong>.
+Specifically
+objects
+with
+a
+datatype
+of
+<strong>
+xsd:decimal
+</strong>
+<em class="rfc2119" title="must not">
+must
+not
+</em>
+be
+converted
+to
+a
+language
+native
+type.
+</p>
+</div>
+<div id="type-coercion" class="section">
+<h3>
+<span class="secno">
+4.3
+</span>
+Type
+Coercion
+</h3>
+<p>
+JSON-LD
+supports
+the
+coercion
+of
+values
+to
+particular
+data
+types.
+Type
+coercion
+allows
+someone
+deploying
+JSON-LD
+to
+coerce
+the
+incoming
+or
+outgoing
+types
+to
+the
+proper
+data
+type
+based
+on
+a
+mapping
+of
+data
+type
+IRIs
+to
+property
+types.
+Using
+type
+coercion,
+one
+may
+convert
+simple
+JSON
+data
+to
+properly
+typed
+RDF
+data.
+</p>
+<p>
+The
+example
+below
+demonstrates
+how
+a
+JSON-LD
+author
+can
+coerce
+values
+to
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+s,
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+s
+and
+IRIs.
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "@context": 
+  {  
+</del>
+<ins class="diff-chg">  "@context":
+  {
+</ins>
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+        "@iri": "homepage"
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}
+</pre>
+<p>
+The
+example
+above
+would
+generate
+the
+following
+triples:
+</p>
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://example.org/home/&gt;
+.
+</pre>
+</div>
+<div id="chaining" class="section">
+<h3>
+<span class="secno">
+4.4
+</span>
+Chaining
+</h3>
+<p>
+Object
+<dfn title="chaining" id="dfn-chaining">
+chaining
+</dfn>
+is
+a
+JSON-LD
+feature
+that
+allows
+an
+author
+to
+use
+the
+definition
+of
+JSON-LD
+objects
+as
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+values.
+This
+is
+a
+commonly
+used
+mechanism
+for
+creating
+a
+parent-child
+relationship
+between
+two
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>
+s.
+</p>
+<p>
+The
+example
+shows
+an
+two
+subjects
+related
+by
+a
+property
+from
+the
+first
+subject:
+</p>
+  <pre class="example">
+{
+...
+  "name": "Manu Sporny",
+  "<span class="diff">knows</span>": {
+    "<span class="diff">@type</span>": "<span class="diff">Person</span>",
+    "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}
+</pre>
+<p>
+An
+object
+definition,
+like
+the
+one
+used
+above,
+<em class="rfc2119" title="may">
+may
+</em>
+be
+used
+as
+a
+JSON
+value
+at
+any
+point
+in
+JSON-LD.
+</p>
+</div>
+<div id="identifying-unlabeled-nodes" class="section">
+<h3>
+<span class="secno">
+4.5
+</span>
+Identifying
+Unlabeled
+Nodes
+</h3>
+<p>
+At
+times,
+it
+becomes
+necessary
+to
+be
+able
+to
+express
+information
+without
+being
+able
+to
+specify
+the
+subject.
+Typically,
+this
+type
+of
+node
+is
+called
+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)
+<del class="diff-old">CURIE
+prefix.
+</del>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+<ins class="diff-chg">prefix
+</ins></a>.<ins class="diff-chg">
+This
+allows
+to
+reference
+the
+node
+locally
+within
+the
+document
+but
+not
+in
+an
+external
+document.
+</ins>
+</p>
+<pre class="example">
+{
+...
+  "@subject": "<span class="diff">_:foo</span>",
+...
+}
+</pre>
+<p>
+The
+example
+above
+would
+set
+the
+subject
+to
+<code>
+_:foo
+</code>,
+which
+can
+then
+be
+used
+later
+on
+in
+the
+JSON-LD
+markup
+to
+refer
+back
+to
+the
+unlabeled
+node.
+This
+practice,
+however,
+is
+usually
+frowned
+upon
+when
+generating
+Linked
+Data.
+If
+a
+developer
+finds
+that
+they
+refer
+to
+the
+unlabeled
+node
+more
+than
+once,
+they
+should
+consider
+naming
+the
+node
+using
+a
+resolve-able
+IRI.
+</p>
+</div>
+<div id="aliasing-keywords" class="section">
+<h3>
+<span class="secno">
+4.6
+</span>
+<del class="diff-old">Overriding
+</del>
+<ins class="diff-chg">Aliasing
+</ins>
+Keywords
+</h3>
+<p>
+JSON-LD
+allows
+all
+of
+the
+syntax
+keywords,
+except
+for
+<code>
+@context
+</code>,
+to
+be
+<del class="diff-old">overridden.
+</del>
+<ins class="diff-chg">aliased.
+</ins>
+This
+feature
+allows
+more
+legacy
+JSON
+content
+to
+be
+supported
+by
+JSON-LD.
+It
+also
+allows
+developers
+to
+design
+domain-specific
+implementations
+using
+only
+the
+JSON-LD
+context.
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "@context": 
+  {  
+</del>
+<ins class="diff-chg">  "@context":
+  {
+</ins>
+     <span class="diff">"url": "@subject"</span>,
+     <span class="diff">"a": "@type"</span>,
+     "name": "http://schema.org/name"
+  },
+  "url": "http://example.com/about#gregg",
+  "a": "http://schema.org/Person",
+  "name": "Gregg Kellogg"
+}
+</pre>
+<p>
+In
+the
+example
+above,
+the
+<code>
+@subject
+</code>
+and
+<code>
+@type
+</code>
+keywords
+have
+been
+<del class="diff-old">overridden
+by
+</del>
+<ins class="diff-chg">given
+the
+aliases
+</ins>
+<strong>
+url
+</strong>
+and
+<strong>
+a
+</strong>,
+respectively.
+</p>
+</div>
+<div id="normalization" class="section">
+<h3>
+<span class="secno">
+4.7
+</span>
+Normalization
+</h3>
+<p>
+Normalization
+is
+the
+process
+of
+taking
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+and
+performing
+a
+deterministic
+transformation
+on
+that
+input
+that
+results
+in
+a
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+that
+any
+conforming
+JSON-LD
+processor
+would
+have
+generated
+given
+the
+same
+input.
+The
+problem
+is
+a
+fairly
+difficult
+technical
+problem
+to
+solve
+because
+it
+requires
+a
+directed
+graph
+to
+be
+ordered
+into
+a
+set
+of
+nodes
+and
+edges
+in
+a
+deterministic
+way.
+This
+is
+easy
+to
+do
+when
+all
+of
+the
+nodes
+have
+unique
+names,
+but
+very
+difficult
+to
+do
+when
+some
+of
+the
+nodes
+are
+not
+labeled.
+</p>
+<p>
+Normalization
+is
+useful
+when
+comparing
+two
+graphs
+against
+one
+another,
+when
+generating
+a
+detailed
+list
+of
+differences
+between
+two
+graphs,
+and
+when
+generating
+a
+cryptographic
+digital
+signature
+for
+information
+contained
+in
+a
+graph
+or
+when
+generating
+a
+hash
+of
+the
+information
+contained
+in
+a
+graph.
+</p>
+<p>
+The
+example
+below
+is
+an
+un-normalized
+JSON-LD
+document:
+</p>
+<pre class="example">
+{
+<del class="diff-old">   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/",
+   "@context": 
+</del>
+<ins class="diff-chg">   "@context":
+</ins>
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
+<del class="diff-old">      "@coerce": 
+</del>
+<ins class="diff-chg">      "@coerce":
+</ins>
+      {
+         "@iri": ["homepage"]
+      }
+<del class="diff-old">   }
+</del>
+<ins class="diff-chg">   },
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/"
+</ins>
+}
+</pre>
+<p>
+The
+example
+below
+is
+the
+normalized
+form
+of
+the
+JSON-LD
+document
+above:
+</p>
+<p class="note">
+Whitespace
+is
+used
+below
+to
+aid
+readability.
+The
+normalization
+algorithm
+for
+JSON-LD
+<del class="diff-old">remove
+</del>
+<ins class="diff-chg">removes
+</ins>
+all
+unnecessary
+whitespace
+in
+the
+fully
+normalized
+form.
+</p>
+<pre class="example">
+[{
+<del class="diff-old">    "@subject": 
+</del>
+<ins class="diff-chg">    "@subject":
+</ins>
+    {
+        "@iri": "_:c14n0"
+    },
+<del class="diff-old">    "http://xmlns.com/foaf/0.1/homepage": 
+</del>
+<ins class="diff-chg">    "http://xmlns.com/foaf/0.1/homepage":
+</ins>
+    {
+        "@iri": "http://manu.sporny.org/"
+    },
+    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
+}]
+</pre>
+<p>
+Notice
+how
+all
+of
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+have
+been
+expanded
+and
+sorted
+in
+alphabetical
+order.
+Also,
+notice
+how
+the
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>
+has
+been
+labeled
+with
+a
+<a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">
+blank
+node
+identifier
+</a>.
+Normalization
+ensures
+that
+any
+arbitrary
+graph
+containing
+exactly
+the
+same
+information
+would
+be
+normalized
+to
+exactly
+the
+same
+form
+shown
+above.
+</p>
+</div>
+</div>
+<div id="the-application-programming-interface" class="section">
+<h2>
+<span class="secno">
+5.
+</span>
+The
+Application
+Programming
+Interface
+</h2>
+<p>
+This
+API
+provides
+a
+clean
+mechanism
+that
+enables
+developers
+to
+convert
+JSON-LD
+data
+into
+a
+a
+variety
+of
+output
+formats
+that
+are
+easier
+to
+work
+with
+in
+various
+programming
+languages.
+If
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">a
+JSON-LD
+</ins>
+API
+is
+provided
+in
+a
+programming
+environment,
+the
+<del class="diff-old">entire
+</del>
+<ins class="diff-chg">entirety
+of
+the
+following
+</ins>
+API
+<em class="rfc2119" title="must">
+must
+</em>
+be
+implemented.
+</p>
+<div id="jsonldprocessor" class="section">
+<h3>
+<span class="secno">
+5.1
+</span>
+<del class="diff-old">JSONLDProcessor
+</del>
+<ins class="diff-chg">JsonLdProcessor
+</ins>
+</h3>
+<pre class="idl">
+<del class="diff-old">]
+interface  {
+</del>
+<span class="idlInterface" id="idl-def-JsonLdProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+<ins class="diff-chg">interface <span class="idlInterfaceID">JsonLdProcessor</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-expand-object-object-input-object-context">expand</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-compact-object-object-input-object-context">compact</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>, <span class="idlRaises"><a>ProcessingError</a></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-frame-object-object-input-object-frame-object-options">frame</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">frame</span></span>, <span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">options</span></span>) raises (<span class="idlRaises"><a>InvalidFrame</a></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-normalize-object-object-input-object-context">normalize</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span><span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-triples-object-object-input-JsonLdTripleCallback-tripleCallback-object-context">triples</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdTripleCallback" class="idlType"><code>JsonLdTripleCallback</code></a></span> <span class="idlParamName">tripleCallback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span>
+};</span>
+</pre>
+<div id="methods" class="section">
+<h4>
+<span class="secno">
+5.1.1
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JsonLdProcessor-compact-object-object-input-object-context">
+<code>
+compact
+</code>
+</dt>
+<dd>
+<a href="#compaction">
+Compacts
+</a>
+the
+given
+<code>
+input
+</code>
+according
+to
+the
+steps
+in
+the
+<a href="#compaction-algorithm">
+Compaction
+Algorithm
+</a>.
+The
+<code>
+input
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+copied,
+compacted
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+compaction
+fails,
+<del class="diff-old">null
+</del>
+<ins class="diff-chg">an
+appropirate
+exception
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">returned.
+</del>
+<ins class="diff-chg">thrown.
+</ins>
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+input
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+to
+perform
+compaction
+on.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+context
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<del class="diff-old">✘
+</del>
+<td class="prmNullTrue">
+<ins class="diff-chg">✔
+</ins>
+</td>
+<del class="diff-old">✘
+</del>
+<td class="prmOptTrue">
+<ins class="diff-chg">✔
+</ins>
+</td>
+<td class="prmDesc">
+The
+base
+context
+to
+use
+when
+compacting
+the
+<code>
+input
+</code>.
+</td>
+</tr>
+</table>
+<table class="exceptions">
+<tr>
+<del class="diff-old">callback
+</del>
+<th>
+<ins class="diff-chg">Exception
+</ins></th><th><ins class="diff-chg">
+Description
+</ins></th></tr><tr><td class="excName"><a><ins class="diff-chg">
+InvalidContext
+</ins></a>
+</td>
+<td class="excDesc">
+<table class="exceptionCodes">
+<tr>
+<td class="excCodeName">
+<code>
+<ins class="diff-new">INVALID_SYNTAX
+</ins></code>
+</td>
+<td class="excCodeDesc">
+<ins class="diff-new">A
+general
+syntax
+error
+was
+detected
+in
+the
+</ins>
+<code>
+<del class="diff-old">JSONLDProcessorCallback
+</del>
+<ins class="diff-chg">@context
+</ins></code>.<ins class="diff-chg">
+For
+example,
+if
+a
+</ins><code><ins class="diff-chg">
+@coerce
+</ins>
+</code>
+<ins class="diff-new">key
+maps
+to
+anything
+other
+than
+a
+string
+or
+an
+array
+of
+strings,
+this
+exception
+would
+be
+raised.
+</ins></td>
+</tr>
+<tr>
+<td class="excCodeName">
+<code>
+<ins class="diff-new">MULTIPLE_DATATYPES
+</ins>
+</code>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="excCodeDesc">
+<ins class="diff-chg">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.
+</ins>
+</td>
+<del class="diff-old">✔
+</del>
+</tr>
+</table>
+</td>
+<del class="diff-old">A
+callback
+that
+is
+called
+whenever
+</del>
+</tr>
+<tr>
+<td class="excName">
+<a>
+<ins class="diff-chg">ProcessingError
+</ins></a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code><ins class="diff-chg">
+LOSSY_COMPACTION
+</ins></code></td><td class="excCodeDesc"><ins class="diff-chg">
+The
+compaction
+would
+lead
+to
+a
+loss
+of
+information,
+such
+as
+</ins>
+a
+<del class="diff-old">processing
+error
+occurs
+on
+the
+given
+</del>
+<code>
+<del class="diff-old">input
+.
+</del>
+<ins class="diff-chg">@language
+</ins></code><ins class="diff-chg">
+value.
+</ins></td></tr><tr><td class="excCodeName"><code><ins class="diff-chg">
+CONFLICTING_DATATYPES
+</ins></code></td><td class="excCodeDesc"><ins class="diff-chg">
+The
+target
+datatype
+specified
+in
+the
+coercion
+rule
+and
+the
+datatype
+for
+the
+typed
+literal
+do
+not
+match.
+</ins>
+</td>
+</tr>
+</table>
+</td>
+<del class="diff-old">No
+exceptions.
+</del>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+object
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JsonLdProcessor-expand-object-object-input-object-context">
+<code>
+expand
+</code>
+</dt>
+<dd>
+<a href="#expansion">
+Expands
+</a>
+the
+given
+<code>
+input
+</code>
+according
+to
+the
+steps
+in
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>.
+The
+<code>
+input
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+copied,
+expanded
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+expansion
+fails,
+<del class="diff-old">null
+</del>
+<ins class="diff-chg">an
+appropriate
+exception
+</ins>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+<del class="diff-old">returned.
+How
+do
+we
+generate
+warning
+messages
+during
+this
+process?
+For
+example,
+what
+happens
+when
+a
+key
+that
+doesn't
+have
+a
+mapping
+is
+discovered?
+</del>
+<ins class="diff-chg">thrown.
+</ins>
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+input
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+to
+copy
+and
+perform
+the
+expansion
+upon.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">callback
+</del>
+<ins class="diff-chg">context
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">JSONLDProcessorCallback
+</del>
+<a>
+<ins class="diff-chg">object
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptTrue">
+✔
+</td>
+<td class="prmDesc">
+<ins class="diff-new">An
+external
+context
+to
+use
+additionally
+to
+the
+context
+embedded
+in
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+when
+expanding
+the
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr></table><table class="exceptions"><tr><th><ins class="diff-new">
+Exception
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="excName"><a><ins class="diff-new">
+InvalidContext
+</ins></a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code><ins class="diff-new">
+INVALID_SYNTAX
+</ins></code></td><td class="excCodeDesc">
+A
+<del class="diff-old">callback
+that
+is
+called
+whenever
+a
+processing
+</del>
+<ins class="diff-chg">general
+syntax
+</ins>
+error
+<del class="diff-old">occurs
+on
+</del>
+<ins class="diff-chg">was
+detected
+in
+</ins>
+the
+<code>
+<del class="diff-old">input
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>.
+<ins class="diff-new">For
+example,
+if
+a
+</ins><code><ins class="diff-new">
+@coerce
+</ins></code><ins class="diff-new">
+key
+maps
+to
+anything
+other
+than
+a
+string
+or
+an
+array
+of
+strings,
+this
+exception
+would
+be
+raised.
+</ins></td></tr><tr><td class="excCodeName"><code><ins class="diff-new">
+MULTIPLE_DATATYPES
+</ins></code></td><td class="excCodeDesc"><ins class="diff-new">
+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.
+</ins>
+</td>
+</tr>
+</table>
+</td>
+<del class="diff-old">No
+exceptions.
+</del>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+object
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JsonLdProcessor-frame-object-object-input-object-frame-object-options">
+<code>
+frame
+</code>
+</dt>
+<dd>
+<a href="#framing">
+Frames
+</a>
+the
+given
+<code>
+input
+</code>
+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.
+<del class="diff-old">Exceptions
+</del>
+<ins class="diff-chg">If
+there
+</ins>
+are
+<ins class="diff-new">no
+matches
+for
+the
+frame,
+</ins><code><ins class="diff-new">
+null
+</ins></code><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+returned.
+Exceptions
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+</ins>
+thrown
+if
+there
+are
+errors.
+<del class="diff-old">Define
+what
+the
+exceptions
+are.
+We
+need
+to
+specify
+whether
+or
+not
+we
+want
+exceptions
+thrown,
+or
+errors
+returned
+to
+the
+error
+callback?
+</del>
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+input
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+to
+perform
+framing
+on.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+frame
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+frame
+to
+use
+when
+re-arranging
+the
+data.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+options
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+A
+set
+of
+options
+that
+will
+affect
+the
+framing
+algorithm.
+</td>
+</tr>
+</table>
+<table class="exceptions">
+<tr>
+<del class="diff-old">callback
+</del>
+<th>
+<ins class="diff-chg">Exception
+</ins></th>
+<th>
+<ins class="diff-chg">Description
+</ins></th>
+</tr>
+<tr>
+<del class="diff-old">JSONLDProcessorCallback
+</del>
+<td class="excName">
+<a>
+<ins class="diff-new">InvalidFrame
+</ins>
+</a>
+</td>
+<td class="excDesc">
+<table class="exceptionCodes">
+<tr>
+<td class="excCodeName">
+<code>
+<ins class="diff-new">INVALID_SYNTAX
+</ins>
+</code>
+</td>
+<del class="diff-old">✔
+</del>
+<td class="excCodeDesc">
+<ins class="diff-chg">A
+frame
+must
+be
+either
+an
+object
+or
+an
+array
+of
+objects,
+if
+the
+frame
+is
+neither
+of
+these
+types,
+this
+exception
+is
+thrown.
+</ins>
+</td>
+<del class="diff-old">✔
+</del>
+</tr>
+<tr>
+<td class="excCodeName">
+<code>
+<ins class="diff-chg">MULTIPLE_EMBEDS
+</ins></code>
+</td>
+<td class="excCodeDesc">
+A
+<del class="diff-old">callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+</del>
+<ins class="diff-chg">subject
+IRI
+was
+specified
+in
+more
+than
+one
+place
+in
+</ins>
+the
+<del class="diff-old">given
+</del>
+input
+<del class="diff-old">.
+</del>
+<ins class="diff-chg">frame.
+More
+than
+one
+embed
+of
+a
+given
+subject
+IRI
+is
+not
+allowed,
+and
+if
+requested,
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em><ins class="diff-chg">
+result
+in
+this
+exception.
+</ins>
+</td>
+</tr>
+</table>
+</td>
+<del class="diff-old">No
+exceptions.
+</del>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+object
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JsonLdProcessor-normalize-object-object-input-object-context">
+<code>
+normalize
+</code>
+</dt>
+<dd>
+<a href="#normalization">
+Normalizes
+</a>
+the
+given
+<code>
+input
+</code>
+according
+to
+the
+steps
+in
+the
+<a href="#normalization-algorithm">
+Normalization
+Algorithm
+</a>.
+The
+<code>
+input
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+copied,
+normalized
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+compaction
+fails,
+<code>
+null
+</code>
+<em class="rfc2119" title="must">
+must
+</em>
+be
+returned.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+input
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+to
+perform
+normalization
+upon.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">callback
+</del>
+<ins class="diff-chg">context
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">JSONLDProcessorCallback
+</del>
+<a>
+<ins class="diff-chg">object
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptTrue">
+✔
+</td>
+<td class="prmDesc">
+<ins class="diff-new">An
+external
+context
+to
+use
+additionally
+to
+the
+context
+embedded
+in
+</ins><code><ins class="diff-new">
+input
+</ins></code><ins class="diff-new">
+when
+expanding
+the
+</ins><code><ins class="diff-new">
+input
+</ins></code>.</td></tr></table><table class="exceptions"><tr><th><ins class="diff-new">
+Exception
+</ins></th><th><ins class="diff-new">
+Description
+</ins></th></tr><tr><td class="excName"><a><ins class="diff-new">
+InvalidContext
+</ins></a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code><ins class="diff-new">
+INVALID_SYNTAX
+</ins></code></td><td class="excCodeDesc">
+A
+<del class="diff-old">callback
+that
+</del>
+<ins class="diff-chg">general
+syntax
+error
+was
+detected
+in
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code>.<ins class="diff-chg">
+For
+example,
+if
+a
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+key
+maps
+to
+anything
+other
+than
+a
+string
+or
+an
+array
+of
+strings,
+this
+exception
+would
+be
+raised.
+</ins></td></tr><tr><td class="excCodeName"><code><ins class="diff-chg">
+MULTIPLE_DATATYPES
+</ins></code></td><td class="excCodeDesc"><ins class="diff-chg">
+There
+</ins>
+is
+<del class="diff-old">called
+whenever
+</del>
+<ins class="diff-chg">more
+than
+one
+target
+datatype
+specified
+for
+</ins>
+a
+<del class="diff-old">processing
+error
+occurs
+on
+</del>
+<ins class="diff-chg">single
+property
+in
+</ins>
+the
+<del class="diff-old">given
+JSON-LD
+string.
+</del>
+<ins class="diff-chg">list
+of
+coercion
+rules.
+This
+means
+that
+the
+processor
+does
+not
+know
+what
+the
+developer
+intended
+for
+the
+target
+datatype
+for
+a
+property.
+</ins>
+</td>
+</tr>
+</table>
+</td>
+<del class="diff-old">No
+exceptions.
+</del>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+object
+</a>
+</code>
+</div>
+</dd>
+<dt id="widl-JsonLdProcessor-triples-object-object-input-JsonLdTripleCallback-tripleCallback-object-context">
+<code>
+triples
+</code>
+</dt>
+<dd>
+Processes
+the
+<code>
+input
+</code>
+according
+to
+the
+<a href="#rdf-conversion-algorithm">
+RDF
+Conversion
+Algorithm
+</a>,
+calling
+the
+provided
+<code>
+tripleCallback
+</code>
+for
+each
+triple
+generated.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+input
+</td>
+<td class="prmType">
+<code>
+<a>
+object
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+JSON-LD
+object
+to
+process
+when
+outputting
+triples.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+tripleCallback
+</td>
+<td class="prmType">
+<code>
+<a href="#idl-def-JsonLdTripleCallback" class="idlType">
+<code>
+<del class="diff-old">JSONLDTripleCallback
+</del>
+<ins class="diff-chg">JsonLdTripleCallback
+</ins>
+</code>
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+the
+given
+<code>
+input
+</code>.
+<div class="issue">
+This
+callback
+should
+be
+aligned
+with
+the
+RDF
+API.
+</div>
+</td>
+</tr>
+<tr>
+<td class="prmName">
+<del class="diff-old">parserCallback
+</del>
+<ins class="diff-chg">context
+</ins>
+</td>
+<td class="prmType">
+<code>
+<del class="diff-old">JSONLDProcessorCallback
+</del>
+<a>
+<ins class="diff-chg">object
+</ins>
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptTrue">
+✔
+</td>
+<td class="prmDesc">
+<del class="diff-old">A
+callback
+that
+is
+called
+whenever
+a
+processing
+error
+occurs
+on
+</del>
+<ins class="diff-chg">An
+external
+context
+to
+use
+additionally
+to
+the
+context
+embedded
+in
+</ins><code><ins class="diff-chg">
+input
+</ins></code><ins class="diff-chg">
+when
+expanding
+</ins>
+the
+<del class="diff-old">given
+</del>
+<code>
+input
+</code>.
+</td>
+</tr>
+</table>
+<table class="exceptions">
+<del class="diff-old">No
+exceptions.
+</del>
+<tr>
+<th>
+<ins class="diff-chg">Exception
+</ins></th>
+<th>
+<ins class="diff-chg">Description
+</ins></th>
+<del class="diff-old">Return
+type:
+</del>
+</tr>
+<tr>
+<td class="excName">
+<a>
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">InvalidContext
+</ins>
+</a>
+<del class="diff-old">5.2
+JSONLDProcessorCallback
+The
+JSONLDProcessorCallback
+is
+called
+whenever
+a
+processing
+error
+occurs
+while
+processing
+the
+JSON-LD
+input
+.
+]
+interface  {
+};
+</del>
+</td>
+<td class="excDesc">
+<del class="diff-old">5.2.1
+Methods
+</del>
+<table class="exceptionCodes">
+<tr>
+<td class="excCodeName">
+<code>
+<del class="diff-old">error
+</del>
+<ins class="diff-chg">INVALID_SYNTAX
+</ins>
+</code>
+</td>
+<del class="diff-old">This
+callback
+is
+invoked
+whenever
+an
+</del>
+<td class="excCodeDesc">
+<ins class="diff-chg">A
+general
+syntax
+</ins>
+error
+<del class="diff-old">occurs
+during
+processing.
+Parameter
+Type
+Nullable
+Optional
+Description
+</del>
+<ins class="diff-chg">was
+detected
+in
+the
+</ins><code><ins class="diff-chg">
+@context
+</ins></code>.<ins class="diff-chg">
+For
+example,
+if
+a
+</ins><code><ins class="diff-chg">
+@coerce
+</ins></code><ins class="diff-chg">
+key
+maps
+to
+anything
+other
+than
+a
+string
+or
+an
+array
+of
+strings,
+this
+exception
+would
+be
+raised.
+</ins></td>
+</tr>
+<tr>
+<del class="diff-old">error
+</del>
+<td class="excCodeName">
+<code>
+<del class="diff-old">DOMString
+</del>
+<ins class="diff-chg">MULTIPLE_DATATYPES
+</ins>
+</code>
+</td>
+<del class="diff-old">✘
+✘
+A
+descriptive
+error
+string
+returned
+by
+</del>
+<td class="excCodeDesc">
+<ins class="diff-chg">There
+is
+more
+than
+one
+target
+datatype
+specified
+for
+a
+single
+property
+in
+</ins>
+the
+<del class="diff-old">processor.
+</del>
+<ins class="diff-chg">list
+of
+coercion
+rules.
+This
+means
+that
+the
+processor
+does
+not
+know
+what
+the
+developer
+intended
+for
+the
+target
+datatype
+for
+a
+property.
+</ins>
+</td>
+</tr>
+</table>
+</td>
+<del class="diff-old">No
+exceptions.
+</del>
+</tr>
+</table>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+<del class="diff-old">void
+</del>
+<ins class="diff-chg">object
+</ins>
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div id="jsonldtriplecallback" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">5.3
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+<del class="diff-old">JSONLDTripleCallback
+</del>
+<ins class="diff-chg">JsonLdTripleCallback
+</ins>
+</h3>
+<p>
+The
+<del class="diff-old">JSONLDTripleCallback
+</del>
+<ins class="diff-chg">JsonLdTripleCallback
+</ins>
+is
+called
+whenever
+the
+processor
+generates
+a
+triple
+during
+the
+<code>
+triple()
+</code>
+call.
+</p>
+<pre class="idl">
+<del class="diff-old">]
+interface  {
+</del>
+<span class="idlInterface" id="idl-def-JsonLdTripleCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+<ins class="diff-chg">interface <span class="idlInterfaceID">JsonLdTripleCallback</span> {
+</ins><span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">triple</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">subject</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">objectType</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">object</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">datatype</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">language</span></span>);</span>
+};</span>
+</pre>
+<div id="methods-1" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">5.3.1
+</del>
+<ins class="diff-chg">5.2.1
+</ins>
+</span>
+Methods
+</h4>
+<dl class="methods">
+<dt id="widl-JsonLdTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">
+<code>
+triple
+</code>
+</dt>
+<dd>
+This
+callback
+is
+invoked
+whenever
+a
+triple
+is
+generated
+by
+the
+processor.
+<table class="parameters">
+<tr>
+<th>
+Parameter
+</th>
+<th>
+Type
+</th>
+<th>
+Nullable
+</th>
+<th>
+Optional
+</th>
+<th>
+Description
+</th>
+</tr>
+<tr>
+<td class="prmName">
+subject
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+subject
+IRI
+that
+is
+associated
+with
+the
+triple.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+property
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+property
+IRI
+that
+is
+associated
+with
+the
+triple.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+objectType
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+type
+of
+object
+that
+is
+associated
+with
+the
+triple.
+Valid
+values
+are
+<code>
+IRI
+</code>
+and
+<code>
+literal
+</code>.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+object
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullFalse">
+✘
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+object
+value
+associated
+with
+the
+subject
+and
+the
+property.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+datatype
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+datatype
+associated
+with
+the
+object.
+</td>
+</tr>
+<tr>
+<td class="prmName">
+language
+</td>
+<td class="prmType">
+<code>
+<a>
+DOMString
+</a>
+</code>
+</td>
+<td class="prmNullTrue">
+✔
+</td>
+<td class="prmOptFalse">
+✘
+</td>
+<td class="prmDesc">
+The
+language
+associated
+with
+the
+object
+in
+BCP47
+format.
+</td>
+</tr>
+</table>
+<div>
+<em>
+No
+exceptions.
+</em>
+</div>
+<div>
+<em>
+Return
+type:
+</em>
+<code>
+<a>
+void
+</a>
+</code>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+</div>
+<div id="algorithms" class="section">
+<h2>
+<span class="secno">
+6.
+</span>
+Algorithms
+</h2>
+<p>
+All
+algorithms
+described
+in
+this
+section
+are
+intended
+to
+operate
+on
+language-native
+data
+structures.
+That
+is,
+the
+serialization
+to
+a
+text-based
+JSON
+document
+isn't
+required
+as
+input
+or
+output
+to
+any
+of
+these
+algorithms
+and
+language-native
+data
+structures
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+applicable.
+</p>
+<div id="syntax-tokens-and-keywords" class="section">
+<h3>
+<span class="secno">
+6.1
+</span>
+Syntax
+Tokens
+and
+Keywords
+</h3>
+<p>
+JSON-LD
+specifies
+a
+number
+of
+syntax
+tokens
+and
+keywords
+that
+are
+using
+in
+all
+algorithms
+described
+in
+this
+section:
+</p>
+<dl>
+<dt>
+<code>
+@context
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</dd>
+<dt>
+<code>
+@base
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+base
+IRI
+for
+all
+object
+IRIs
+affected
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<code>
+@vocab
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+base
+IRI
+for
+all
+property
+IRIs
+affected
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<code>
+@coerce
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+type
+coercion
+rules.
+</dd>
+<dt>
+<code>
+@literal
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+a
+literal
+value.
+</dd>
+<dt>
+<code>
+@iri
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+an
+IRI
+value.
+</dd>
+<dt>
+<code>
+@language
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+language
+for
+a
+literal.
+</dd>
+<dt>
+<code>
+@datatype
+</code>
+</dt>
+<dd>
+Used
+to
+specify
+the
+datatype
+for
+a
+literal.
+</dd>
+<dt>
+<code>:
+</code>
+</dt>
+<dd>
+The
+separator
+for
+<del class="diff-old">CURIE
+s
+when
+used
+in
+</del>
+JSON
+keys
+<del class="diff-old">or
+JSON
+values.
+</del>
+<ins class="diff-chg">and
+values
+that
+use
+the
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+mechanism.
+</ins>
+</dd>
+<dt>
+<code>
+@subject
+</code>
+</dt>
+<dd>
+Sets
+the
+active
+subjects.
+</dd>
+<dt>
+<code>
+@type
+</code>
+</dt>
+<dd>
+Used
+to
+set
+the
+type
+of
+the
+active
+subjects.
+</dd>
+</dl>
+</div>
+<div id="algorithm-terms" class="section">
+<h3>
+<span class="secno">
+6.2
+</span>
+Algorithm
+Terms
+</h3>
+<dl>
+<dt>
+<dfn title="initial_context" id="dfn-initial_context">
+initial
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+specified
+to
+the
+algorithm
+before
+processing
+begins.
+</dd>
+<dt>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+</dt>
+<dd>
+the
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+used
+to
+resolve
+<del class="diff-old">CURIE
+</del>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+<ins class="diff-chg">prefix
+</ins></a><ins class="diff-chg">
+es
+and
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins>
+</a>
+s
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+context
+contained
+within
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</dd>
+<dt>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+that
+is
+specified
+within
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>,
+specified
+via
+the
+<code>
+@context
+</code>
+keyword.
+</dd>
+<dt>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+</dt>
+<dd>
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>,
+which
+includes
+the
+<a class="tref" title="active__context">
+active
+context
+</a>,
+<a class="tref" title="current_subject">
+current
+subject
+</a>,
+and
+<a class="tref" title="current_property">
+current
+property
+</a>.
+The
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+is
+managed
+as
+a
+stack
+with
+elements
+from
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copied
+into
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+when
+entering
+a
+new
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+</dd>
+<dt>
+<dfn title="JSON-LD_input" id="dfn-json-ld_input">
+JSON-LD
+input
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+provided
+as
+input
+to
+the
+algorithm.
+</dd>
+<dt>
+<dfn title="JSON-LD_output" id="dfn-json-ld_output">
+JSON-LD
+output
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+produced
+as
+output
+by
+the
+algorithm.
+</dd>
+</dl>
+</div>
+<div id="context-1" class="section">
+<h3 id="context">
+<span class="secno">
+6.3
+</span>
+Context
+</h3>
+<p>
+Processing
+of
+JSON-LD
+data
+structure
+is
+managed
+recursively.
+During
+processing,
+each
+rule
+is
+applied
+using
+information
+provided
+by
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+Processing
+begins
+by
+pushing
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+onto
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+stack
+and
+initializing
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+with
+the
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+initial
+context
+</a>.
+If
+a
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+encountered,
+information
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+merged
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</p>
+<p>
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+used
+for
+expanding
+keys
+and
+values
+of
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+(or
+elements
+of
+a
+list
+(see
+<span a="#list-processing">
+List
+Processing
+</span>
+)).
+</p>
+<p>
+A
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+is
+identified
+within
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+having
+a
+key
+of
+<code>
+@context
+</code>
+with
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+or
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+value.
+When
+processing
+a
+<a class="tref" title="local__context">
+local
+context
+</a>,
+special
+processing
+rules
+apply:
+</p>
+<ol class="algorithm">
+<li>
+Create
+a
+new,
+empty
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</li>
+<li>
+If
+the
+value
+is
+a
+simple
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+lexical
+form
+of
+IRI
+and
+used
+to
+initialize
+a
+new
+JSON
+document
+which
+replaces
+the
+value
+for
+subsequent
+processing.
+</li>
+<li>
+If
+the
+value
+is
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+has
+a
+<code>
+@base
+</code>
+key,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+with
+the
+lexical
+form
+of
+an
+absolute
+IRI.
+Add
+the
+base
+mapping
+to
+the
+<a class="tref" title="local__context">
+local
+context
+</a>.
+<p class="issue">
+Turtle
+allows
+@base
+to
+be
+relative.
+If
+we
+did
+this,
+we
+would
+have
+to
+add
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>.
+</p>
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+has
+a
+<code>
+@vocab
+</code>
+key,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+simple
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+with
+the
+lexical
+form
+of
+an
+absolute
+IRI.
+Add
+the
+vocabulary
+mapping
+to
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+after
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+associated
+value.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+has
+a
+<code>
+@coerce
+</code>
+key,
+it
+<em class="rfc2119" title="must">
+must
+</em>
+have
+a
+value
+of
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+Add
+the
+<code>
+@coerce
+</code>
+mapping
+to
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+associated
+value(s).
+</li>
+<li>
+Otherwise,
+the
+key
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+lexical
+form
+of
+<cite>
+<a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">
+NCName
+</a>
+</cite>
+and
+<em class="rfc2119" title="must">
+must
+</em>
+have
+the
+value
+of
+a
+simple
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+with
+the
+lexical
+form
+of
+IRI.
+Merge
+the
+key-value
+pair
+into
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Merge
+the
+of
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping
+as
+described
+<a href="#coerce">
+below
+</a>.
+</li>
+<li>
+Merge
+all
+entries
+other
+than
+the
+<code>
+@coerce
+</code>
+mapping
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+to
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+overwriting
+any
+duplicate
+values.
+</li>
+</ol>
+<div id="coerce" class="section">
+<h4>
+<span class="secno">
+6.3.1
+</span>
+Coerce
+</h4>
+<p>
+Map
+each
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping
+into
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping,
+overwriting
+any
+duplicate
+values
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+'s
+<code>
+@coerce
+</code>
+mapping.
+The
+<code>
+@coerce
+</code>
+mapping
+has
+either
+a
+single
+<del class="diff-old">CURIE
+</del>
+<code>
+<ins class="diff-chg">prefix:term
+</ins></code><ins class="diff-chg">
+value,
+a
+single
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins>
+</a>
+<ins class="diff-new">value
+</ins>
+or
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+of
+<del class="diff-old">CURIEs.
+</del>
+<code>
+<ins class="diff-chg">prefix:term
+</ins></code><ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+values.
+</ins>
+When
+merging
+with
+an
+existing
+mapping
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+map
+all
+<del class="diff-old">CURIE
+</del>
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+<ins class="diff-chg">prefix
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a>
+values
+to
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+form
+and
+replace
+with
+the
+union
+of
+the
+value
+from
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+and
+the
+value
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+If
+the
+result
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+with
+a
+single
+<del class="diff-old">CURIE,
+</del>
+<ins class="diff-chg">value,
+</ins>
+the
+processor
+<em class="rfc2119" title="may">
+may
+</em>
+represent
+this
+as
+a
+string
+value.
+</p>
+</div>
+<div id="initial-context" class="section">
+<h4>
+<span class="secno">
+6.3.2
+</span>
+Initial
+Context
+</h4>
+<p>
+The
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+initial
+context
+</a>
+is
+initialized
+as
+follows:
+</p>
+<ul>
+<li>
+<code>
+@base
+</code>
+is
+set
+using
+<cite>
+<href="http: www.ietf.org="" rfc="" rfc2396.txt"="">
+section
+5.1
+Establishing
+a
+Base
+URI
+</href="http:>
+</cite>
+of
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
+RFC3986
+</a>
+</cite>
+].
+Processors
+<em class="rfc2119" title="may">
+may
+</em>
+provide
+a
+means
+of
+setting
+the
+base
+IRI
+programatically.
+</li>
+<li>
+<code>
+@coerce
+</code>
+is
+set
+with
+a
+single
+mapping
+from
+<code>
+@iri
+</code>
+to
+<code>
+@type
+</code>.
+</li>
+</ul>
+    <pre class="example">
+{
+    "@base": <span class="diff">document-location</span>,
+    "@context": {
+      "@iri": "@type"
+    }
+}
+</pre>
+</div>
+</div>
+<div id="iri-expansion" class="section">
+<h3>
+<span class="secno">
+6.4
+</span>
+IRI
+Expansion
+</h3>
+<p>
+Keys
+and
+some
+values
+are
+evaluated
+to
+produce
+an
+IRI.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+a
+value
+representing
+an
+IRI
+into
+an
+actual
+IRI.
+</p>
+<p>
+IRIs
+may
+be
+represented
+as
+an
+<del class="diff-old">explicit
+string,
+or
+as
+</del>
+<ins class="diff-chg">absolute
+IRI,
+</ins>
+a
+<del class="diff-old">CURIE
+</del>
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<ins class="diff-chg">term
+</ins>
+</a>,
+<ins class="diff-new">a
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-new">
+prefix
+</ins></a>:<a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-new">
+term
+</ins></a><ins class="diff-new">
+construct,
+or
+</ins>
+as
+a
+value
+relative
+to
+<code>
+@base
+</code>
+or
+<code>
+@vocab
+</code>.
+</p>
+<p>
+The
+algorithm
+for
+generating
+an
+IRI
+is:
+</p>
+<ol class="algorithm">
+<li>
+Split
+the
+value
+into
+a
+<em>
+prefix
+</em>
+and
+<em>
+suffix
+</em>
+from
+the
+first
+occurrence
+of
+':'.
+</li>
+<li>
+If
+the
+prefix
+is
+a
+'_'
+(underscore),
+the
+IRI
+is
+unchanged.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+contains
+a
+mapping
+for
+<em>
+prefix
+</em>,
+generate
+an
+IRI
+by
+prepending
+the
+mapped
+prefix
+to
+the
+(possibly
+empty)
+suffix
+using
+textual
+concatenation.
+Note
+that
+an
+empty
+suffix
+and
+no
+suffix
+(meaning
+the
+value
+contains
+no
+':'
+string
+at
+all)
+are
+treated
+equivalently.
+</li>
+<li>
+If
+the
+IRI
+being
+processed
+is
+for
+a
+property
+(i.e.,
+a
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">key's
+</ins>
+value
+in
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>,
+or
+a
+value
+in
+a
+<code>
+@coerce
+</code>
+mapping)
+and
+the
+active
+context
+has
+a
+<code>
+@vocab
+</code>
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+textual
+concatenation.
+</li>
+<li>
+If
+the
+IRI
+being
+processed
+is
+for
+a
+subject
+or
+object
+(i.e.,
+not
+a
+property)
+and
+the
+active
+context
+has
+a
+<code>
+@base
+</code>
+mapping,
+join
+the
+mapped
+value
+to
+the
+suffix
+using
+the
+method
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RFC3986">
+RFC3986
+</a>
+</cite>
+].
+</li>
+<li>
+Otherwise,
+use
+the
+value
+directly
+as
+an
+IRI.
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="iri-compaction" class="section">
+<h3>
+<span class="secno">
+6.5
+</span>
+IRI
+Compaction
+</h3>
+<p>
+Some
+keys
+and
+values
+are
+expressed
+using
+IRIs.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+an
+IRI
+to
+a
+compact
+IRI
+using
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+prefix
+</a>
+es
+specified
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>.
+</p>
+<p>
+The
+algorithm
+for
+generating
+a
+compacted
+IRI
+is:
+</p>
+<ol class="algorithm">
+<li>
+Search
+every
+key-value
+pair
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+for
+a
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+that
+is
+a
+complete
+match
+against
+the
+IRI.
+If
+a
+complete
+match
+is
+found,
+the
+resulting
+compacted
+IRI
+is
+the
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+associated
+with
+the
+IRI
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</li>
+<li>
+If
+a
+complete
+match
+is
+not
+found,
+search
+for
+a
+partial
+match
+from
+the
+beginning
+of
+the
+IRI.
+For
+all
+matches
+that
+are
+found,
+the
+resulting
+compacted
+IRI
+is
+the
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+prefix
+</a>
+associated
+with
+the
+partially
+matched
+IRI
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+concatenated
+with
+a
+colon
+(:)
+character
+and
+the
+unmatched
+part
+of
+the
+string.
+If
+there
+is
+more
+than
+one
+compacted
+IRI
+produced,
+the
+final
+value
+is
+the
+<ins class="diff-new">shortest
+and
+</ins>
+lexicographically
+least
+value
+of
+the
+entire
+set
+of
+compacted
+IRIs.
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="value-expansion" class="section">
+<h3>
+<span class="secno">
+6.6
+</span>
+Value
+Expansion
+</h3>
+<p>
+Some
+values
+in
+JSON-LD
+can
+be
+expressed
+in
+a
+compact
+form.
+These
+values
+are
+required
+to
+be
+expanded
+at
+times
+when
+processing
+JSON-LD
+documents.
+</p>
+<p>
+The
+algorithm
+for
+expanding
+a
+value
+is:
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+key
+that
+is
+associated
+with
+the
+value
+has
+an
+associated
+coercion
+entry
+in
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>,
+the
+resulting
+expansion
+is
+an
+object
+populated
+according
+to
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+coercion
+target
+is
+<code>
+@iri
+</code>,
+expand
+the
+value
+by
+adding
+a
+new
+key-value
+pair
+where
+the
+key
+is
+<code>
+@iri
+</code>
+and
+the
+value
+is
+the
+expanded
+IRI
+according
+to
+the
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+rules.
+</li>
+<li>
+If
+the
+coercion
+target
+is
+a
+typed
+literal,
+expand
+the
+value
+by
+adding
+two
+new
+key-value
+pairs.
+The
+first
+key-value
+pair
+will
+be
+<code>
+@literal
+</code>
+and
+the
+unexpanded
+value.
+The
+second
+key-value
+pair
+will
+be
+<code>
+@datatype
+</code>
+and
+the
+associated
+coercion
+datatype
+expanded
+according
+to
+the
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+rules.
+</li>
+</ol>
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="value-compaction" class="section">
+<h3>
+<span class="secno">
+6.7
+</span>
+Value
+Compaction
+</h3>
+<p>
+Some
+values,
+such
+as
+IRIs
+and
+typed
+literals,
+may
+be
+expressed
+in
+an
+expanded
+form
+in
+JSON-LD.
+These
+values
+are
+required
+to
+be
+compacted
+at
+times
+when
+processing
+JSON-LD
+documents.
+</p>
+<p>
+The
+algorithm
+for
+compacting
+a
+value
+is:
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+contains
+a
+coercion
+target
+for
+the
+key
+that
+is
+associated
+with
+the
+value,
+compact
+the
+value
+using
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+coercion
+target
+is
+an
+<code>
+@iri
+</code>,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+<code>
+@iri
+</code>
+key,
+processed
+according
+to
+the
+<a href="#iri-compaction">
+IRI
+Compaction
+</a>
+steps.
+</li>
+<li>
+If
+the
+coercion
+target
+is
+a
+typed
+literal,
+the
+compacted
+value
+is
+the
+value
+associated
+with
+the
+<code>
+@literal
+</code>
+key.
+</li>
+<li>
+Otherwise,
+the
+value
+is
+not
+modified.
+</li>
+</ol>
+</li>
+</ol>
+<p>
+</p>
+</div>
+<div id="expansion-1" class="section">
+<h3>
+<span class="secno">
+6.8
+</span>
+Expansion
+</h3>
+<p class="issue">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</p>
+<p>
+As
+stated
+previously,
+expansion
+is
+the
+process
+of
+taking
+a
+JSON-LD
+input
+and
+expanding
+all
+IRIs
+and
+typed
+literals
+to
+their
+fully-expanded
+form.
+The
+output
+will
+not
+contain
+a
+single
+context
+declaration
+and
+will
+have
+all
+IRIs
+and
+typed
+literals
+fully
+expanded.
+</p>
+<div id="expansion-algorithm" class="section">
+<h4>
+<span class="secno">
+6.8.1
+</span>
+Expansion
+Algorithm
+</h4>
+<ol class="algorithm">
+<li>
+If
+the
+top-level
+item
+in
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+process
+each
+item
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+recursively
+using
+this
+algorithm.
+</li>
+<li>
+If
+the
+top-level
+item
+in
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+is
+an
+object,
+update
+the
+<a class="tref internalDFN" title="local_context" href="#dfn-local_context">
+local
+context
+</a>
+according
+to
+the
+steps
+outlined
+in
+the
+<a href="#context">
+context
+</a>
+section.
+Process
+each
+key,
+expanding
+the
+key
+according
+to
+the
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+rules.
+</li>
+<ol class="algorithm">
+<li>
+Process
+each
+value
+associated
+with
+each
+<del class="diff-old">key
+</del>
+<ins class="diff-chg">key:
+</ins>
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+process
+each
+item
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+recursively
+using
+this
+algorithm.
+</li>
+<li>
+If
+the
+value
+is
+an
+object,
+process
+the
+object
+recursively
+using
+this
+algorithm.
+</li>
+<li>
+Otherwise,
+check
+to
+see
+the
+associated
+key
+has
+an
+associated
+coercion
+rule.
+If
+the
+value
+should
+be
+coerced,
+expand
+the
+value
+according
+to
+the
+<a href="#value-expansion">
+Value
+Expansion
+</a>
+rules.
+If
+the
+value
+does
+not
+need
+to
+be
+coerced,
+leave
+the
+value
+as-is.
+</li>
+</ol>
+</li>
+<li>
+Remove
+the
+context
+from
+the
+<del class="diff-old">object
+</del>
+<ins class="diff-chg">object.
+</ins>
+</li>
+</ol>
+</ol>
+</div>
+</div>
+<div id="compaction-1" class="section">
+<h3>
+<span class="secno">
+6.9
+</span>
+Compaction
+</h3>
+<p class="issue">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</p>
+<p>
+As
+stated
+previously,
+compaction
+is
+the
+process
+of
+taking
+a
+JSON-LD
+input
+and
+compacting
+all
+IRIs
+using
+a
+given
+context.
+The
+output
+will
+contain
+a
+single
+top-level
+context
+declaration
+and
+will
+only
+use
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">
+prefix
+</a>
+es
+and
+will
+ensure
+that
+all
+typed
+literals
+are
+fully
+compacted.
+</p>
+<div id="compaction-algorithm" class="section">
+<h4>
+<span class="secno">
+6.9.1
+</span>
+Compaction
+Algorithm
+</h4>
+<ol class="algorithm">
+<li>
+Perform
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>
+on
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>.
+<ins class="diff-new">This
+removes
+any
+existing
+context
+to
+allow
+the
+given
+context
+to
+be
+cleanly
+applied.
+</ins></li><li><ins class="diff-new">
+Set
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-new">
+active
+context
+</ins></a><ins class="diff-new">
+to
+the
+given
+context.
+</ins>
+</li>
+<li>
+If
+the
+top-level
+item
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+process
+each
+item
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+recursively,
+starting
+at
+this
+step.
+</li>
+<li>
+If
+the
+top-level
+item
+is
+an
+object,
+compress
+each
+key
+using
+the
+steps
+defined
+in
+<a href="#iri-compaction">
+IRI
+Compaction
+</a>
+and
+compress
+each
+value
+using
+the
+steps
+defined
+in
+<a href="#value-compaction">
+Value
+Compaction
+</a>.
+</li>
+</ol>
+</div>
+</div>
+<div id="framing-1" class="section">
+<h3>
+<span class="secno">
+6.10
+</span>
+Framing
+</h3>
+<p class="issue">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</p>
+<p>
+A
+JSON-LD
+document
+is
+a
+representation
+of
+a
+directed
+graph.
+A
+single
+directed
+graph
+can
+have
+many
+different
+serializations,
+each
+expressing
+exactly
+the
+same
+information.
+Developers
+typically
+don't
+work
+directly
+with
+graphs,
+but
+rather,
+prefer
+trees
+when
+dealing
+with
+JSON.
+While
+mapping
+a
+graph
+to
+a
+tree
+can
+be
+done,
+the
+layout
+of
+the
+end
+result
+must
+be
+specified
+in
+advance.
+This
+section
+defines
+an
+algorithm
+for
+mapping
+a
+graph
+to
+a
+tree
+given
+a
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>.
+</p>
+<div id="framing-algorithm-terms" class="section">
+<h4>
+<span class="secno">
+6.10.1
+</span>
+Framing
+Algorithm
+Terms
+</h4>
+<dl>
+<dt>
+<dfn title="input_frame" id="dfn-input_frame">
+input
+frame
+</dfn>
+</dt>
+<dd>
+the
+initial
+<a class="tref internalDFN" title="frame" href="#dfn-frame">
+frame
+</a>
+provided
+to
+the
+framing
+algorithm.
+</dd>
+<dt>
+<dfn title="framing_context" id="dfn-framing_context">
+framing
+context
+</dfn>
+</dt>
+<dd>
+a
+context
+containing
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>,
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+and
+the
+<a class="tref" title="omit_default_flag">
+omit
+default
+flag
+</a>.
+</dd>
+<dt>
+<dfn title="object_embed_flag" id="dfn-object_embed_flag">
+object
+embed
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+objects
+should
+be
+directly
+embedded
+in
+the
+output,
+instead
+of
+being
+referred
+to
+by
+their
+IRI.
+</dd>
+<dt>
+<dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+for
+properties
+to
+be
+included
+in
+the
+output,
+they
+must
+be
+explicitly
+declared
+in
+the
+<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
+framing
+context
+</a>.
+</dd>
+<dt>
+<dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</dfn>
+</dt>
+<dd>
+a
+flag
+specifying
+that
+properties
+that
+are
+missing
+from
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+should
+be
+omitted
+from
+the
+output.
+</dd>
+<dt>
+<dfn title="match_limit" id="dfn-match_limit">
+match
+limit
+</dfn>
+</dt>
+<dd>
+A
+value
+specifying
+the
+maximum
+number
+of
+matches
+to
+accept
+when
+building
+arrays
+of
+values
+during
+the
+framing
+algorithm.
+A
+value
+of
+-1
+specifies
+that
+there
+is
+no
+match
+limit.
+</dd>
+<dt>
+<dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">
+map
+of
+embedded
+subjects
+</dfn>
+</dt>
+<dd>
+A
+map
+that
+tracks
+if
+a
+subject
+has
+been
+embedded
+in
+the
+output
+of
+the
+<a href="#framing-algorithm">
+Framing
+Algorithm
+</a>.
+</dd>
+</dl>
+</div>
+<div id="framing-algorithm" class="section">
+<h4>
+<span class="secno">
+6.10.2
+</span>
+Framing
+Algorithm
+</h4>
+<p>
+The
+framing
+algorithm
+takes
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+that
+has
+been
+normalized
+according
+to
+the
+<a href="#normalization-algorithm">
+Normalization
+Algorithm
+</a>
+(
+<strong>
+normalized
+input
+</strong>
+),
+an
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
+input
+frame
+</a>
+that
+has
+been
+expanded
+according
+to
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>
+(
+<strong>
+expanded
+frame
+</strong>
+),
+and
+a
+number
+of
+options
+and
+produces
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+The
+following
+series
+of
+steps
+is
+the
+recursive
+portion
+of
+the
+framing
+algorithm:
+</p>
+<ol class="algorithm">
+<li>
+Initialize
+the
+<a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">
+framing
+context
+</a>
+by
+setting
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>,
+clearing
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>,
+and
+clearing
+the
+<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</a>.
+Override
+these
+values
+based
+on
+input
+options
+provided
+to
+the
+algorithm
+by
+the
+application.
+</li>
+<li>
+Generate
+a
+<dfn title="list_of_frames" id="dfn-list_of_frames">
+list
+of
+frames
+</dfn>
+by
+processing
+the
+<strong>
+expanded
+frame
+</strong>:
+<ol class="algorithm">
+<li>
+If
+the
+<strong>
+expanded
+frame
+</strong>
+is
+not
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+set
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+to
+1,
+place
+the
+<strong>
+expanded
+frame
+</strong>
+into
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>,
+and
+set
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+to
+<code>
+null
+</code>.
+</li>
+<li>
+If
+the
+<strong>
+expanded
+frame
+</strong>
+is
+an
+empty
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+place
+an
+empty
+object
+into
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>,
+set
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+to
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+and
+set
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+to
+-1.
+</li>
+<li>
+If
+the
+<strong>
+expanded
+frame
+</strong>
+is
+a
+non-empty
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+add
+each
+item
+in
+the
+<strong>
+expanded
+frame
+</strong>
+into
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>,
+set
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+to
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+and
+set
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+to
+-1.
+</li>
+</ol>
+</li>
+<li>
+Create
+a
+<dfn title="match_array" id="dfn-match_array">
+match
+array
+</dfn>
+for
+each
+<strong>
+expanded
+frame
+</strong>
+in
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>
+halting
+when
+either
+the
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+is
+zero
+or
+the
+end
+of
+the
+<a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">
+list
+of
+frames
+</a>
+is
+reached.
+If
+an
+<strong>
+expanded
+frame
+</strong>
+is
+not
+an
+object,
+the
+processor
+<em class="rfc2119" title="must">
+must
+</em>
+throw
+a
+<code>
+Invalid
+Frame
+Format
+</code>
+exception.
+Add
+each
+matching
+item
+from
+the
+<strong>
+normalized
+input
+</strong>
+to
+the
+<a class="tref" title="matches_array">
+matches
+array
+</a>
+and
+decrement
+the
+<a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">
+match
+limit
+</a>
+by
+1
+if:
+<ol class="algorithm">
+<li>
+The
+<strong>
+expanded
+frame
+</strong>
+has
+an
+<code>
+rdf:type
+</code>
+that
+exists
+in
+the
+item's
+list
+of
+<code>
+rdf:type
+</code>
+s.
+Note:
+the
+<code>
+rdf:type
+</code>
+can
+be
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+but
+only
+one
+value
+needs
+to
+be
+in
+common
+between
+the
+item
+and
+the
+<strong>
+expanded
+frame
+</strong>
+for
+a
+match.
+</li>
+<li>
+The
+<strong>
+expanded
+frame
+</strong>
+does
+not
+have
+an
+<code>
+rdf:type
+</code>
+property,
+but
+every
+property
+in
+the
+<strong>
+expanded
+frame
+</strong>
+exists
+in
+the
+item.
+</li>
+</ol>
+</li>
+<li>
+Process
+each
+item
+in
+the
+<a class="tref internalDFN" title="match_array" href="#dfn-match_array">
+match
+array
+</a>
+with
+its
+associated
+<dfn title="match_frame" id="dfn-match_frame">
+match
+frame
+</dfn>:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+contains
+an
+<code>
+@embed
+</code>
+keyword,
+set
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+to
+its
+value.
+If
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+contains
+an
+<code>
+@explicit
+</code>
+keyword,
+set
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+to
+its
+value.
+Note:
+if
+the
+keyword
+exists,
+but
+the
+value
+is
+neither
+<code>
+true
+</code>
+or
+<code>
+false
+</code>,
+set
+the
+associated
+flag
+to
+<code>
+true
+</code>.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+is
+cleared
+and
+the
+item
+has
+the
+<code>
+@subject
+</code>
+property,
+replace
+the
+item
+with
+the
+value
+of
+the
+<code>
+@subject
+</code>
+property.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+is
+set
+and
+the
+item
+has
+the
+<code>
+@subject
+</code>
+property,
+and
+its
+IRI
+is
+in
+the
+<a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">
+map
+of
+embedded
+subjects
+</a>,
+throw
+a
+<code>
+Duplicate
+Embed
+</code>
+exception.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">
+object
+embed
+flag
+</a>
+is
+set
+and
+the
+item
+has
+the
+<code>
+@subject
+</code>
+property
+and
+its
+IRI
+is
+not
+in
+the
+<a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">
+map
+of
+embedded
+subjects
+</a>:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">
+explicit
+inclusion
+flag
+</a>
+is
+set,
+then
+delete
+any
+key
+from
+the
+item
+that
+does
+not
+exist
+in
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>,
+except
+<code>
+@subject
+</code>.
+</li>
+<li>
+For
+each
+key
+in
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>,
+except
+for
+keywords
+and
+<code>
+rdf:type
+</code>:
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+in
+the
+item,
+then
+build
+a
+new
+<dfn title="recursion_input_list" id="dfn-recursion_input_list">
+recursion
+input
+list
+</dfn>
+using
+the
+object
+or
+objects
+associated
+with
+the
+key.
+If
+any
+object
+contains
+an
+<code>
+@iri
+</code>
+value
+that
+exists
+in
+the
+<a class="tref" title="normalized_input">
+normalized
+input
+</a>,
+replace
+the
+object
+in
+the
+<a class="tref" title="recusion_input_list">
+recusion
+input
+list
+</a>
+with
+a
+new
+object
+containing
+the
+<code>
+@subject
+</code>
+key
+where
+the
+value
+is
+the
+value
+of
+the
+<code>
+@iri
+</code>,
+and
+all
+of
+the
+other
+key-value
+pairs
+for
+that
+subject.
+Set
+the
+<dfn title="recursion_match_frame" id="dfn-recursion_match_frame">
+recursion
+match
+frame
+</dfn>
+to
+the
+value
+associated
+with
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+'s
+key.
+Replace
+the
+value
+associated
+with
+the
+key
+by
+recursively
+calling
+this
+algorithm
+using
+<a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">
+recursion
+input
+list
+</a>,
+<a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">
+recursion
+match
+frame
+</a>
+as
+input.
+</li>
+<li>
+If
+the
+key
+is
+not
+in
+the
+item,
+add
+the
+key
+to
+the
+item
+and
+set
+the
+associated
+value
+to
+an
+empty
+array
+if
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+key's
+value
+is
+an
+array
+or
+<code>
+null
+</code>
+otherwise.
+</li>
+<li>
+If
+value
+associated
+with
+the
+item's
+key
+is
+<code>
+null
+</code>,
+process
+the
+<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</a>:
+<ol class="algorithm">
+<li>
+If
+the
+value
+associated
+with
+the
+key
+in
+the
+<a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">
+match
+frame
+</a>
+is
+an
+array,
+use
+the
+first
+frame
+from
+the
+array
+as
+the
+<dfn title="property_frame" id="dfn-property_frame">
+property
+frame
+</dfn>,
+otherwise
+set
+the
+<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
+property
+frame
+</a>
+to
+an
+empty
+object.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
+property
+frame
+</a>
+contains
+an
+<code>
+@omitDefault
+</code>
+keyword,
+set
+the
+<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</a>
+to
+its
+value.
+Note:
+if
+the
+keyword
+exists,
+but
+the
+value
+is
+neither
+<code>
+true
+</code>
+or
+<code>
+false
+</code>,
+set
+the
+associated
+flag
+to
+<code>
+true
+</code>.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">
+omit
+missing
+properties
+flag
+</a>
+is
+set,
+delete
+the
+key
+in
+the
+item.
+Otherwise,
+if
+the
+<code>
+@default
+</code>
+keyword
+is
+set
+in
+the
+<a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">
+property
+frame
+</a>
+set
+the
+item's
+value
+to
+the
+value
+of
+<code>
+@default
+</code>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+is
+<code>
+null
+</code>
+set
+it
+to
+the
+item,
+otherwise,
+append
+the
+item
+to
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Return
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+</li>
+</ol>
+The
+final,
+non-recursive
+step
+of
+the
+framing
+algorithm
+requires
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>
+to
+be
+compacted
+according
+to
+the
+<a href="#compaction-algorithm">
+Compaction
+Algorithm
+</a>
+by
+using
+the
+context
+provided
+in
+the
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">
+input
+frame
+</a>.
+The
+resulting
+value
+is
+the
+final
+output
+of
+the
+compaction
+algorithm
+and
+is
+what
+should
+be
+returned
+to
+the
+application.
+</div>
+</div>
+<div id="normalization-1" class="section">
+<h3>
+<span class="secno">
+6.11
+</span>
+Normalization
+</h3>
+<p class="issue">
+This
+algorithm
+is
+a
+work
+in
+progress,
+do
+not
+implement
+it.
+</p>
+<p>
+Normalization
+is
+the
+process
+of
+taking
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+and
+performing
+a
+deterministic
+transformation
+on
+that
+input
+that
+results
+in
+all
+aspects
+of
+the
+graph
+being
+fully
+expanded
+and
+named
+in
+the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">
+JSON-LD
+output
+</a>.
+The
+normalized
+output
+is
+generated
+in
+such
+a
+way
+that
+any
+conforming
+JSON-LD
+processor
+will
+generate
+identical
+output
+given
+the
+same
+input.
+The
+problem
+is
+a
+fairly
+difficult
+technical
+problem
+to
+solve
+because
+it
+requires
+a
+directed
+graph
+to
+be
+ordered
+into
+a
+set
+of
+nodes
+and
+edges
+in
+a
+deterministic
+way.
+This
+is
+easy
+to
+do
+when
+all
+of
+the
+nodes
+have
+unique
+names,
+but
+very
+difficult
+to
+do
+when
+some
+of
+the
+nodes
+are
+not
+labeled.
+</p>
+<p>
+In
+time,
+there
+may
+be
+more
+than
+one
+normalization
+algorithm
+that
+will
+need
+to
+be
+identified.
+For
+identification
+purposes,
+this
+algorithm
+is
+named
+<abbr title="Universal Graph Normalization Algorithm 2011">
+UGNA2011
+</abbr>.
+</p>
+<div id="normalization-algorithm-terms" class="section">
+<h4>
+<span class="secno">
+6.11.1
+</span>
+Normalization
+Algorithm
+Terms
+</h4>
+<dl>
+<dt>
+<dfn title="label" id="dfn-label">
+label
+</dfn>
+</dt>
+<dd>
+The
+subject
+IRI
+associated
+with
+a
+graph
+node.
+The
+subject
+IRI
+is
+expressed
+using
+a
+key-value
+pair
+in
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+where
+the
+key
+is
+<code>
+@subject
+</code>
+and
+the
+value
+is
+a
+string
+that
+is
+an
+IRI
+or
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+containing
+the
+key
+<code>
+@iri
+</code>
+and
+a
+value
+that
+is
+a
+string
+that
+is
+an
+IRI.
+</dd>
+<dt>
+<dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">
+list
+of
+expanded
+nodes
+</dfn>
+</dt>
+<dd>
+A
+list
+of
+all
+nodes
+in
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+graph
+containing
+no
+embedded
+objects
+and
+having
+all
+keys
+and
+values
+expanded
+according
+to
+the
+steps
+in
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>.
+</dd>
+<dt>
+<dfn title="alpha" id="dfn-alpha">
+alpha
+</dfn>
+and
+<dfn title="beta" id="dfn-beta">
+beta
+</dfn>
+values
+</dt>
+<dd>
+The
+words
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+and
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+refer
+to
+the
+first
+and
+second
+nodes
+or
+values
+being
+examined
+in
+an
+algorithm.
+The
+names
+are
+merely
+used
+to
+refer
+to
+each
+input
+value
+to
+a
+comparison
+algorithm.
+</dd>
+<dt>
+<dfn title="renaming_counter" id="dfn-renaming_counter">
+renaming
+counter
+</dfn>
+</dt>
+<dd>
+A
+counter
+that
+is
+used
+during
+the
+<a href="#node-relabeling-algorithm">
+Node
+Relabeling
+Algorithm
+</a>.
+The
+counter
+typically
+starts
+at
+one
+(1)
+and
+counts
+up
+for
+every
+node
+that
+is
+relabeled.
+There
+will
+be
+two
+such
+renaming
+counters
+in
+an
+implementation
+of
+the
+normalization
+algorithm.
+The
+first
+is
+the
+<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
+labeling
+counter
+</a>
+and
+the
+second
+is
+the
+<a class="tref" title="deterministic_labeling_counter">
+deterministic
+labeling
+counter
+</a>.
+</dd>
+<dt>
+<dfn title="serialization_label" id="dfn-serialization_label">
+serialization
+label
+</dfn>
+</dt>
+<dd>
+An
+identifier
+that
+is
+created
+to
+aid
+in
+the
+normalization
+process
+in
+the
+<a href="#deep-comparison-algorithm">
+Deep
+Comparison
+Algorithm
+</a>.
+The
+value
+typically
+takes
+the
+form
+of
+<code>
+s
+<NUMBER>
+</code>
+or
+<code>
+c
+<NUMBER>
+</code>.
+</dd>
+</dl>
+</div>
+<div id="normalization-state" class="section">
+<h4>
+<span class="secno">
+6.11.2
+</span>
+Normalization
+State
+</h4>
+<p>
+When
+performing
+the
+steps
+required
+by
+the
+normalization
+algorithm,
+it
+is
+helpful
+to
+track
+the
+many
+pieces
+of
+information
+in
+a
+data
+structure
+called
+the
+<dfn title="normalization_state" id="dfn-normalization_state">
+normalization
+state
+</dfn>.
+Many
+of
+these
+pieces
+simply
+provide
+indexes
+into
+the
+graph.
+The
+information
+contained
+in
+the
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
+normalization
+state
+</a>
+is
+described
+below.
+</p>
+<dl>
+<dt>
+<dfn title="node_state" id="dfn-node_state">
+node
+state
+</dfn>
+</dt>
+<dd>
+Each
+node
+in
+the
+graph
+will
+be
+assigned
+a
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>.
+This
+state
+contains
+the
+information
+necessary
+to
+deterministically
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+all
+nodes
+in
+the
+graph.
+A
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>
+includes:
+<dl>
+<dt>
+<dfn title="node_reference" id="dfn-node_reference">
+node
+reference
+</dfn>
+</dt>
+<dd>
+A
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+is
+a
+reference
+to
+a
+node
+in
+the
+graph.
+For
+a
+given
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>,
+its
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+refers
+to
+the
+node
+that
+the
+state
+is
+for.
+When
+a
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>
+is
+created,
+its
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+should
+be
+to
+the
+node
+it
+is
+created
+for.
+</dd>
+<dt>
+<dfn title="outgoing_list" id="dfn-outgoing_list">
+outgoing
+list
+</dfn>
+</dt>
+<dd>
+Lists
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+s
+for
+all
+nodes
+that
+are
+properties
+of
+the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>.
+This
+list
+should
+be
+initialized
+by
+iterating
+over
+every
+object
+associated
+with
+a
+property
+in
+the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+adding
+its
+label
+if
+it
+is
+another
+node.
+</dd>
+<dt>
+<dfn title="incoming_list" id="dfn-incoming_list">
+incoming
+list
+</dfn>
+</dt>
+<dd>
+Lists
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+s
+for
+all
+nodes
+in
+the
+graph
+for
+which
+the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+is
+a
+property.
+This
+list
+is
+initialized
+to
+an
+empty
+list.
+</dd>
+<dt>
+<dfn title="outgoing_serialization_map" id="dfn-outgoing_serialization_map">
+outgoing
+serialization
+map
+</dfn>
+</dt>
+<dd>
+Maps
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+s
+to
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+s.
+This
+map
+is
+initialized
+to
+an
+empty
+map.
+When
+this
+map
+is
+populated,
+it
+will
+be
+filled
+with
+keys
+that
+are
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+s
+of
+every
+node
+in
+the
+graph
+with
+a
+label
+that
+begins
+with
+<code>
+_:
+</code>
+and
+that
+has
+a
+path,
+via
+properties,
+that
+starts
+with
+the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>.
+</dd>
+<dt>
+<dfn title="outgoing_serialization" id="dfn-outgoing_serialization">
+outgoing
+serialization
+</dfn>
+</dt>
+<dd>
+A
+string
+that
+can
+be
+lexicographically
+compared
+to
+the
+<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
+outgoing
+serialization
+</a>
+s
+of
+other
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>
+s.
+It
+is
+a
+representation
+of
+the
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+outgoing
+serialization
+map
+</a>
+and
+other
+related
+information.
+This
+string
+is
+initialized
+to
+an
+empty
+string.
+</dd>
+<dt>
+<dfn title="incoming_serialization_map" id="dfn-incoming_serialization_map">
+incoming
+serialization
+map
+</dfn>
+</dt>
+<dd>
+Maps
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+s
+to
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+s.
+This
+map
+is
+initialized
+to
+an
+empty
+map.
+When
+this
+map
+is
+populated,
+it
+will
+be
+filled
+with
+keys
+that
+are
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+s
+of
+every
+node
+in
+the
+graph
+with
+a
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+that
+begins
+with
+<code>
+_:
+</code>
+and
+that
+has
+a
+path,
+via
+properties,
+that
+ends
+with
+the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>.
+</dd>
+<dt>
+<dfn title="incoming_serialization" id="dfn-incoming_serialization">
+incoming
+serialization
+</dfn>
+</dt>
+<dd>
+A
+string
+that
+can
+be
+lexicographically
+compared
+to
+the
+<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
+outgoing
+serialization
+</a>
+s
+of
+other
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>
+s.
+It
+is
+a
+representation
+of
+the
+<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
+incoming
+serialization
+map
+</a>
+and
+other
+related
+information.
+This
+string
+is
+initialized
+to
+an
+empty
+string.
+</dd>
+</dl>
+</dd>
+<dt>
+<dfn title="node_state_map" id="dfn-node_state_map">
+node
+state
+map
+</dfn>
+</dt>
+<dd>
+A
+mapping
+from
+a
+node's
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+to
+a
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>.
+It
+is
+initialized
+to
+an
+empty
+map.
+</dd>
+<dt>
+<dfn title="labeling_prefix" id="dfn-labeling_prefix">
+labeling
+prefix
+</dfn>
+</dt>
+<dd>
+The
+labeling
+prefix
+is
+a
+string
+that
+is
+used
+as
+the
+beginning
+of
+a
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>.
+It
+should
+be
+initialized
+to
+a
+random
+base
+string
+that
+starts
+with
+the
+characters
+<code>
+_:
+</code>,
+is
+not
+used
+by
+any
+other
+node's
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+in
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>,
+and
+does
+not
+start
+with
+the
+characters
+<code>
+_:c14n
+</code>.
+The
+prefix
+has
+two
+uses.
+First
+it
+is
+used
+to
+temporarily
+name
+nodes
+during
+the
+normalization
+algorithm
+in
+a
+way
+that
+doesn't
+collide
+with
+the
+names
+that
+already
+exist
+as
+well
+as
+the
+names
+that
+will
+be
+generated
+by
+the
+normalization
+algorithm.
+Second,
+it
+will
+eventually
+be
+set
+to
+<code>
+_:c14n
+</code>
+to
+generate
+the
+final,
+deterministic
+labels
+for
+nodes
+in
+the
+graph.
+This
+prefix
+will
+be
+concatenated
+with
+the
+<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
+labeling
+counter
+</a>
+to
+produce
+a
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>.
+For
+example,
+<code>
+_:j8r3k
+</code>
+is
+a
+proper
+initial
+value
+for
+the
+<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
+labeling
+prefix
+</a>.
+</dd>
+<dt>
+<dfn title="labeling_counter" id="dfn-labeling_counter">
+labeling
+counter
+</dfn>
+</dt>
+<dd>
+A
+counter
+that
+is
+used
+to
+label
+nodes.
+It
+is
+appended
+to
+the
+<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
+labeling
+prefix
+</a>
+to
+create
+a
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>.
+It
+is
+initialized
+to
+<code>
+1
+</code>.
+</dd>
+<dt>
+<dfn title="map_of_flattened_nodes" id="dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</dfn>
+</dt>
+<dd>
+A
+map
+containing
+a
+representation
+of
+all
+nodes
+in
+the
+graph
+where
+the
+key
+is
+a
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+and
+the
+value
+is
+a
+single
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+that
+has
+no
+nested
+sub-objects
+and
+has
+had
+all
+properties
+for
+the
+same
+node
+merged
+into
+a
+single
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+</dd>
+</dl>
+</div>
+<div id="normalization-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.3
+</span>
+Normalization
+Algorithm
+</h4>
+<p>
+The
+normalization
+algorithm
+expands
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>,
+flattens
+the
+data
+structure,
+and
+creates
+an
+initial
+set
+of
+names
+for
+all
+nodes
+in
+the
+graph.
+The
+flattened
+data
+structure
+is
+then
+processed
+by
+a
+node
+labeling
+algorithm
+in
+order
+to
+get
+a
+fully
+expanded
+and
+named
+list
+of
+nodes
+which
+is
+then
+sorted.
+The
+result
+is
+a
+deterministically
+named
+and
+ordered
+list
+of
+graph
+nodes.
+</p>
+<ol class="algorithm">
+<li>
+Expand
+the
+<a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">
+JSON-LD
+input
+</a>
+according
+to
+the
+steps
+in
+the
+<a href="#expansion-algorithm">
+Expansion
+Algorithm
+</a>
+and
+store
+the
+result
+as
+the
+<strong>
+expanded
+input
+</strong>.
+</li>
+<li>
+Create
+a
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
+normalization
+state
+</a>.
+</li>
+<li>
+Initialize
+the
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</a>
+by
+recursively
+processing
+every
+<dfn title="expanded_node" id="dfn-expanded_node">
+expanded
+node
+</dfn>
+in
+the
+<strong>
+expanded
+input
+</strong>
+in
+depth-first
+order:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>
+is
+an
+unlabeled
+node,
+add
+a
+new
+key-value
+pair
+to
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>
+where
+the
+key
+is
+<code>
+@subject
+</code>
+and
+the
+value
+is
+the
+concatenation
+of
+the
+<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
+labeling
+prefix
+</a>
+and
+the
+string
+value
+of
+the
+<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
+labeling
+counter
+</a>.
+Increment
+the
+<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
+labeling
+counter
+</a>.
+</li>
+<li>
+Add
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>
+to
+the
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</a>:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>
+'s
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+is
+already
+in
+the
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</a>
+merge
+all
+properties
+from
+the
+entry
+in
+the
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</a>
+into
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>.
+</li>
+<li>
+Go
+through
+every
+property
+associated
+with
+an
+array
+in
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>
+and
+remove
+any
+duplicate
+IRI
+entries
+from
+the
+array.
+If
+the
+resulting
+array
+only
+has
+one
+IRI
+entry,
+change
+it
+from
+an
+array
+to
+an
+object.
+</li>
+<li>
+Set
+the
+entry
+for
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>
+'s
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+in
+the
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</a>
+to
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>.
+</li>
+</ol>
+</li>
+<li>
+After
+exiting
+the
+recursive
+step,
+replace
+the
+reference
+to
+the
+<a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">
+expanded
+node
+</a>
+with
+an
+object
+containing
+a
+single
+key-value
+pair
+where
+the
+key
+is
+<code>
+@iri
+</code>
+and
+the
+value
+is
+the
+value
+of
+the
+<code>
+@subject
+</code>
+key
+in
+the
+node.
+</li>
+</ol>
+</li>
+<li>
+For
+every
+entry
+in
+the
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</a>,
+insert
+a
+key-value
+pair
+into
+the
+<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
+node
+state
+map
+</a>
+where
+the
+key
+is
+the
+key
+from
+the
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</a>
+and
+the
+value
+is
+a
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>
+where
+its
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+refers
+to
+the
+value
+from
+the
+<a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">
+map
+of
+flattened
+nodes
+</a>.
+</li>
+<li>
+Populate
+the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+list
+</a>
+for
+each
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>
+by
+iterating
+over
+every
+node
+in
+the
+graph
+and
+adding
+its
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+to
+the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+list
+</a>
+associated
+with
+each
+node
+found
+in
+its
+properties.
+</li>
+<li>
+For
+every
+entry
+in
+the
+<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
+node
+state
+map
+</a>
+that
+has
+a
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+that
+begins
+with
+<code>
+_:c14n
+</code>,
+relabel
+the
+node
+using
+the
+<a href="#node-relabeling-algorithm">
+Node
+Relabeling
+Algorithm
+</a>.
+</li>
+<li>
+Label
+all
+of
+the
+nodes
+that
+contain
+a
+<code>
+@subject
+</code>
+key
+associated
+with
+a
+value
+starting
+with
+<code>
+_:
+</code>
+according
+to
+the
+steps
+in
+the
+<a href="#deterministic-labeling-algorithm">
+Deterministic
+Labeling
+Algorithm
+</a>.
+</li>
+</ol>
+</div>
+<div id="node-relabeling-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.4
+</span>
+Node
+Relabeling
+Algorithm
+</h4>
+<p>
+This
+algorithm
+renames
+a
+node
+by
+generating
+a
+unique
+<dfn title="new_label" id="dfn-new_label">
+new
+label
+</dfn>
+and
+updating
+all
+references
+to
+that
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+in
+the
+<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
+node
+state
+map
+</a>.
+The
+<dfn title="old_label" id="dfn-old_label">
+old
+label
+</dfn>
+and
+the
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
+normalization
+state
+</a>
+must
+be
+given
+as
+an
+input
+to
+the
+algorithm.
+The
+<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
+old
+label
+</a>
+is
+the
+current
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+of
+the
+node
+that
+is
+to
+be
+relabeled.
+</p>
+<p>
+The
+node
+relabeling
+algorithm
+is
+as
+follows:
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
+labeling
+prefix
+</a>
+is
+<code>
+_:c14n
+</code>
+and
+the
+<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
+old
+label
+</a>
+begins
+with
+<code>
+_:c14n
+</code>
+then
+return
+as
+the
+node
+has
+already
+been
+renamed.
+</li>
+<li>
+Generate
+the
+<dfn title="new_label" id="dfn-new_label-1">
+new
+label
+</dfn>
+by
+concatenating
+the
+<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
+labeling
+prefix
+</a>
+with
+the
+string
+value
+of
+the
+<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
+labeling
+counter
+</a>.
+Increment
+the
+<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
+labeling
+counter
+</a>.
+</li>
+<li>
+For
+the
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>
+associated
+with
+the
+<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
+old
+label
+</a>,
+update
+every
+node
+in
+the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+list
+</a>
+by
+changing
+all
+the
+properties
+that
+reference
+the
+<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
+old
+label
+</a>
+to
+the
+<a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">
+new
+label
+</a>.
+</li>
+<li>
+Change
+the
+<a class="tref internalDFN" title="old_label" href="#dfn-old_label">
+old
+label
+</a>
+key
+in
+the
+<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
+node
+state
+map
+</a>
+to
+the
+<a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">
+new
+label
+</a>
+and
+set
+the
+associated
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+'s
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+to
+the
+<a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">
+new
+label
+</a>.
+</li>
+</ol>
+</div>
+<div id="deterministic-labeling-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.5
+</span>
+Deterministic
+Labeling
+Algorithm
+</h4>
+<p>
+The
+deterministic
+labeling
+algorithm
+takes
+the
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">
+normalization
+state
+</a>
+and
+produces
+a
+<dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes">
+list
+of
+finished
+nodes
+</dfn>
+that
+is
+sorted
+and
+contains
+deterministically
+named
+and
+expanded
+nodes
+from
+the
+graph.
+</p>
+<ol class="algorithm">
+<li>
+Set
+the
+<a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">
+labeling
+prefix
+</a>
+to
+<code>
+_:c14n
+</code>,
+the
+<a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">
+labeling
+counter
+</a>
+to
+<code>
+1
+</code>,
+the
+<dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes-1">
+list
+of
+finished
+nodes
+</dfn>
+to
+an
+empty
+array,
+and
+create
+an
+empty
+array,
+the
+<dfn title="list_of_unfinished_nodes" id="dfn-list_of_unfinished_nodes">
+list
+of
+unfinished
+nodes
+</dfn>.
+</li>
+<li>
+For
+each
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+in
+the
+<a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">
+node
+state
+map
+</a>:
+<ol class="algorithm">
+<li>
+If
+the
+node's
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+does
+not
+start
+with
+<code>
+_:
+</code>
+then
+put
+the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+in
+the
+<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
+list
+of
+finished
+nodes
+</a>.
+</li>
+<li>
+If
+the
+node's
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+does
+start
+with
+<code>
+_:
+</code>
+then
+put
+the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>
+in
+the
+<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
+list
+of
+unfinished
+nodes
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Append
+to
+the
+<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
+list
+of
+finished
+nodes
+</a>
+by
+processing
+the
+remainder
+of
+the
+<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
+list
+of
+unfinished
+nodes
+</a>
+until
+it
+is
+empty:
+<ol class="algorithm">
+<li>
+Sort
+the
+<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
+list
+of
+unfinished
+nodes
+</a>
+in
+descending
+order
+according
+to
+the
+<a href="#deep-comparison-algorithm">
+Deep
+Comparison
+Algorithm
+</a>
+to
+determine
+the
+sort
+order.
+</li>
+<li>
+Create
+a
+<dfn title="list_of_labels" id="dfn-list_of_labels">
+list
+of
+labels
+</dfn>
+and
+initialize
+it
+to
+an
+empty
+array.
+</li>
+<li>
+For
+the
+first
+node
+from
+the
+<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
+list
+of
+unfinished
+nodes
+</a>:
+<ol class="algorithm">
+<li>
+Add
+its
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+to
+the
+<a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">
+list
+of
+labels
+</a>.
+</li>
+<li>
+For
+each
+key-value
+pair
+from
+its
+associated
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+outgoing
+serialization
+map
+</a>,
+add
+the
+key
+to
+a
+list
+and
+then
+sort
+the
+list
+according
+to
+the
+lexicographical
+order
+of
+the
+keys'
+associated
+values.
+Append
+the
+list
+to
+the
+<a class="tref" title="list_of_nodes_to_label">
+list
+of
+nodes
+to
+label
+</a>.
+</li>
+<li>
+For
+each
+key-value
+pair
+from
+its
+associated
+<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
+incoming
+serialization
+map
+</a>,
+add
+the
+key
+to
+a
+list
+and
+then
+sort
+the
+list
+according
+to
+the
+lexicographical
+order
+of
+the
+keys'
+associated
+values.
+Append
+the
+list
+to
+the
+<a class="tref" title="list_of_nodes_to_label">
+list
+of
+nodes
+to
+label
+</a>.
+</li>
+</ol>
+</li>
+<li>
+For
+each
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+in
+the
+<a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">
+list
+of
+labels
+</a>,
+relabel
+the
+associated
+node
+according
+to
+the
+<a href="#node-relabeling-algorithm">
+Node
+Relabeling
+Algorithm
+</a>.
+If
+any
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+outgoing
+serialization
+map
+</a>
+contains
+a
+key
+that
+matches
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>,
+clear
+the
+map
+and
+set
+the
+associated
+<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
+outgoing
+serialization
+</a>
+to
+an
+empty
+string.
+If
+any
+<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
+incoming
+serialization
+map
+</a>
+contains
+a
+key
+that
+matches
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>,
+clear
+the
+map
+and
+set
+the
+associated
+<a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">
+incoming
+serialization
+</a>
+to
+an
+empty
+string.
+</li>
+<li>
+Remove
+each
+node
+with
+a
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+that
+starts
+with
+<code>
+_:c14n
+</code>
+from
+the
+<a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">
+list
+of
+unfinished
+nodes
+</a>
+and
+add
+it
+to
+the
+<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
+list
+of
+finished
+nodes
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Sort
+the
+<a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">
+list
+of
+finished
+nodes
+</a>
+in
+descending
+order
+according
+to
+the
+<a href="#deep-comparison-algorithm">
+Deep
+Comparison
+Algorithm
+</a>
+to
+determine
+the
+sort
+order.
+</li>
+</ol>
+</div>
+<div id="shallow-comparison-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.6
+</span>
+Shallow
+Comparison
+Algorithm
+</h4>
+<p>
+The
+shallow
+comparison
+algorithm
+takes
+two
+unlabeled
+nodes,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+and
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>,
+as
+input
+and
+determines
+which
+one
+should
+come
+first
+in
+a
+sorted
+list.
+The
+following
+algorithm
+determines
+the
+steps
+that
+are
+executed
+in
+order
+to
+determine
+the
+node
+that
+should
+come
+first
+in
+a
+list:
+</p>
+<ol class="algorithm">
+<li>
+Compare
+the
+total
+number
+of
+node
+properties.
+The
+node
+with
+fewer
+properties
+is
+first.
+</li>
+<li>
+Lexicographically
+sort
+the
+property
+IRIs
+for
+each
+node
+and
+compare
+the
+sorted
+lists.
+If
+an
+IRI
+is
+found
+to
+be
+lexicographically
+smaller,
+the
+node
+containing
+that
+IRI
+is
+first.
+</li>
+<li>
+Compare
+the
+<del class="diff-old">property
+</del>
+values
+<ins class="diff-new">of
+each
+property
+</ins>
+against
+one
+another:
+<ol class="algorithm">
+<li>
+<ins class="diff-new">The
+node
+associated
+with
+fewer
+property
+values
+is
+first.
+</ins></li><li>
+Create
+an
+<dfn title="alpha_list" id="dfn-alpha_list">
+alpha
+list
+</dfn>
+by
+adding
+all
+values
+associated
+with
+the
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+property
+that
+<del class="diff-old">is
+not
+an
+unlabeled
+node.
+Track
+the
+number
+of
+unlabeled
+nodes
+</del>
+<ins class="diff-chg">are
+</ins>
+not
+<del class="diff-old">added
+to
+the
+list
+using
+an
+alpha
+</del>
+unlabeled
+<del class="diff-old">counter
+.
+</del>
+<ins class="diff-chg">nodes.
+</ins>
+</li>
+<li>
+Create
+a
+<dfn title="beta_list" id="dfn-beta_list">
+beta
+list
+</dfn>
+by
+adding
+all
+values
+associated
+with
+the
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+property
+that
+is
+not
+an
+unlabeled
+node.
+<del class="diff-old">Track
+the
+number
+of
+unlabeled
+nodes
+not
+added
+to
+the
+list
+using
+an
+beta
+unlabeled
+counter
+.
+</del>
+</li>
+<li>
+Compare
+the
+length
+of
+<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
+alpha
+list
+</a>
+and
+<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
+beta
+list
+</a>.
+The
+node
+associated
+with
+the
+list
+containing
+the
+<del class="diff-old">lesser
+</del>
+<ins class="diff-chg">fewer
+</ins>
+number
+of
+items
+is
+first.
+</li>
+<li>
+<del class="diff-old">Compare
+the
+alpha
+unlabeled
+counter
+to
+the
+beta
+unlabeled
+counter
+,
+the
+node
+associated
+with
+the
+lesser
+value
+is
+first.
+</del>
+Sort
+<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
+alpha
+list
+</a>
+and
+<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
+beta
+list
+</a>
+according
+to
+the
+<a href="#object-comparison-algorithm">
+Object
+Comparison
+Algorithm
+<del class="diff-old">as
+the
+sorting
+comparator.
+</del>
+</a>.
+For
+each
+offset
+into
+the
+<a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">
+alpha
+list
+</a>,
+compare
+the
+item
+at
+the
+offset
+against
+the
+item
+at
+the
+same
+offset
+in
+the
+<a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">
+beta
+list
+</a>
+according
+to
+the
+<a href="#object-comparison-algorithm">
+Object
+Comparison
+Algorithm
+</a>.
+The
+node
+associated
+with
+the
+lesser
+item
+is
+first.
+</li>
+</ol>
+</li>
+<li>
+Process
+the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+list
+</a>
+s
+associated
+with
+each
+node
+to
+determine
+order:
+<ol class="algorithm">
+<li>
+The
+node
+with
+the
+shortest
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+list
+</a>
+is
+first.
+</li>
+<li>
+Sort
+the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+list
+</a>
+s
+according
+to
+incoming
+property
+and
+then
+incoming
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>.
+</li>
+<li>
+The
+node
+associated
+with
+the
+<del class="diff-old">least
+</del>
+<ins class="diff-chg">fewest
+</ins>
+number
+of
+incoming
+<del class="diff-old">unlabeled
+</del>
+nodes
+is
+first.
+</li>
+<li>
+For
+each
+offset
+into
+the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+list
+</a>
+s,
+compare
+the
+associated
+properties
+and
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+<del class="diff-old">s.
+</del>
+<ins class="diff-chg">s:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+The
+node
+associated
+with
+a
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+that
+does
+not
+begin
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code><ins class="diff-chg">
+is
+first.
+</ins></li><li><ins class="diff-chg">
+If
+the
+nodes'
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+do
+not
+begin
+with
+</ins><code><ins class="diff-chg">
+_:
+</ins></code>,<ins class="diff-chg">
+then
+the
+node
+associated
+with
+the
+lexicographically
+lesser
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+is
+first.
+</ins></li><li>
+The
+node
+associated
+with
+the
+lexicographically
+lesser
+associated
+property
+is
+first.
+</li>
+<li>
+<ins class="diff-new">The
+node
+with
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+that
+does
+not
+begin
+with
+</ins><code><ins class="diff-new">
+_:c14n
+</ins></code><ins class="diff-new">
+is
+first.
+</ins></li><li>
+The
+node
+<del class="diff-old">associated
+</del>
+with
+the
+lexicographically
+lesser
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+is
+first.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+Otherwise,
+the
+nodes
+are
+equivalent.
+</li>
+</ol>
+</div>
+<div id="object-comparison-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.7
+</span>
+Object
+Comparison
+Algorithm
+</h4>
+<p>
+The
+object
+comparison
+algorithm
+is
+designed
+to
+compare
+two
+graph
+node
+property
+values,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+and
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>,
+against
+the
+other.
+The
+algorithm
+is
+useful
+when
+sorting
+two
+lists
+of
+graph
+node
+properties.
+</p>
+<ol class="algorithm">
+<li>
+If
+one
+of
+the
+values
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+and
+the
+other
+is
+not,
+the
+value
+that
+is
+a
+string
+is
+first.
+</li>
+<li>
+If
+both
+values
+are
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+s,
+the
+lexicographically
+lesser
+string
+is
+first.
+</li>
+<li>
+If
+one
+of
+the
+values
+is
+a
+literal
+and
+the
+other
+is
+not,
+the
+value
+that
+is
+a
+literal
+is
+first.
+</li>
+<li>
+If
+both
+values
+are
+<del class="diff-old">literals
+</del>
+<ins class="diff-chg">literals:
+</ins>
+<ol class="algorithm">
+<li>
+The
+lexicographically
+lesser
+string
+associated
+with
+<code>
+@literal
+</code>
+is
+first.
+</li>
+<li>
+The
+lexicographically
+lesser
+string
+associated
+with
+<code>
+@datatype
+</code>
+is
+first.
+</li>
+<li>
+The
+lexicographically
+lesser
+string
+associated
+with
+<code>
+@language
+</code>
+is
+first.
+</li>
+</ol>
+</li>
+<li>
+If
+both
+values
+are
+expanded
+IRIs,
+the
+lexicographically
+lesser
+string
+associated
+with
+<code>
+@iri
+</code>
+is
+first.
+</li>
+<li>
+Otherwise,
+the
+two
+values
+are
+equivalent.
+</li>
+</ol>
+</div>
+<div id="deep-comparison-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.8
+</span>
+Deep
+Comparison
+Algorithm
+</h4>
+<p>
+The
+deep
+comparison
+algorithm
+is
+used
+to
+compare
+the
+difference
+between
+two
+nodes,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+and
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>.
+A
+deep
+comparison
+takes
+the
+incoming
+and
+outgoing
+node
+edges
+in
+a
+graph
+into
+account
+if
+the
+number
+of
+properties
+and
+value
+of
+those
+properties
+are
+identical.
+The
+algorithm
+is
+helpful
+when
+sorting
+a
+list
+of
+nodes
+and
+will
+return
+whichever
+node
+should
+be
+placed
+first
+in
+a
+list
+if
+the
+two
+nodes
+are
+not
+truly
+equivalent.
+</p>
+<p>
+When
+performing
+the
+steps
+required
+by
+the
+deep
+comparison
+algorithm,
+it
+is
+helpful
+to
+track
+state
+information
+about
+mappings.
+The
+information
+contained
+in
+a
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+mapping
+state
+</a>
+is
+described
+below.
+</p>
+<dl class="algorithm">
+<dt>
+<dfn title="mapping_state" id="dfn-mapping_state">
+mapping
+state
+</dfn>
+</dt>
+<dd>
+<dl>
+<dt>
+<dfn title="mapping_counter" id="dfn-mapping_counter">
+mapping
+counter
+</dfn>
+</dt>
+<dd>
+Keeps
+track
+of
+the
+number
+of
+nodes
+that
+have
+been
+mapped
+to
+<a class="tref" title="serialization_labels">
+serialization
+labels
+</a>.
+It
+is
+initialized
+to
+<code>
+1
+</code>.
+</dd>
+<dt>
+<dfn title="processed_labels_map" id="dfn-processed_labels_map">
+processed
+labels
+map
+</dfn>
+</dt>
+<dd>
+Keeps
+track
+of
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+s
+of
+nodes
+that
+have
+already
+been
+assigned
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+s.
+It
+is
+initialized
+to
+an
+empty
+map.
+</dd>
+<dt>
+<dfn title="serialized_labels_map" id="dfn-serialized_labels_map">
+serialized
+labels
+map
+</dfn>
+</dt>
+<dd>
+Maps
+a
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+to
+its
+associated
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>.
+It
+is
+initialized
+to
+an
+empty
+map.
+</dd>
+<dt>
+<dfn title="adjacent_info_map" id="dfn-adjacent_info_map">
+adjacent
+info
+map
+</dfn>
+</dt>
+<dd>
+Maps
+a
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+to
+the
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+associated
+with
+it,
+the
+list
+of
+sorted
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+s
+for
+adjacent
+nodes,
+and
+the
+map
+of
+adjacent
+node
+<a class="tref" title="serialiation_label">
+serialiation
+label
+</a>
+s
+to
+their
+associated
+node
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+s.
+It
+is
+initialized
+to
+an
+empty
+map.
+</dd>
+<dt>
+<dfn title="key_stack" id="dfn-key_stack">
+key
+stack
+</dfn>
+</dt>
+<dd>
+A
+stack
+where
+each
+element
+contains
+an
+array
+of
+adjacent
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+s
+and
+an
+index
+into
+that
+array.
+It
+is
+initialized
+to
+a
+stack
+containing
+a
+single
+element
+where
+its
+array
+contains
+a
+single
+string
+element
+<code>
+s1
+</code>
+and
+its
+index
+is
+set
+to
+<code>
+0
+</code>.
+</dd>
+<dt>
+<dfn title="serialized_keys" id="dfn-serialized_keys">
+serialized
+keys
+</dfn>
+</dt>
+<dd>
+Keeps
+track
+of
+which
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+s
+have
+already
+been
+written
+at
+least
+once
+to
+the
+<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
+serialization
+string
+</a>.
+It
+is
+initialized
+to
+an
+empty
+map.
+</dd>
+<dt>
+<dfn title="serialization_string" id="dfn-serialization_string">
+serialization
+string
+</dfn>
+</dt>
+<dd>
+A
+string
+that
+is
+incrementally
+updated
+as
+a
+serialization
+is
+built.
+It
+is
+initialized
+to
+an
+empty
+string.
+</dd>
+</dl>
+</dd>
+</dl>
+<p>
+The
+deep
+comparison
+algorithm
+is
+as
+follows:
+</p>
+<ol class="algorithm">
+<li>
+Perform
+a
+comparison
+between
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+and
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+according
+to
+the
+<a href="#shallow-comparison-algorithm">
+Shallow
+Comparison
+Algorithm
+</a>.
+If
+the
+result
+does
+not
+show
+that
+the
+two
+nodes
+are
+equivalent,
+return
+the
+result.
+</li>
+<li>
+Compare
+incoming
+and
+outgoing
+edges
+for
+each
+node,
+updating
+their
+associated
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>
+as
+each
+node
+is
+processed:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+outgoing
+serialization
+map
+</a>
+for
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+is
+empty,
+generate
+the
+serialization
+according
+to
+the
+<a href="#node-serialization-algorithm">
+Node
+Serialization
+Algorithm
+</a>.
+Provide
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+'s
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>,
+a
+new
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+mapping
+state
+</a>,
+<code>
+outgoing
+direction
+</code>
+to
+the
+algorithm
+as
+inputs.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+outgoing
+serialization
+map
+</a>
+for
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+is
+empty,
+generate
+the
+serialization
+according
+to
+the
+<a href="#node-serialization-algorithm">
+Node
+Serialization
+Algorithm
+</a>.
+Provide
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+'s
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>,
+a
+new
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+mapping
+state
+</a>,
+and
+<code>
+outgoing
+direction
+</code>
+to
+the
+algorithm
+as
+inputs.
+</li>
+<li>
+If
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+'s
+<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
+outgoing
+serialization
+</a>
+is
+lexicographically
+less
+than
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+'s,
+then
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+is
+first.
+If
+it
+is
+greater,
+then
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+is
+first.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
+incoming
+serialization
+map
+</a>
+for
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+is
+empty,
+generate
+the
+serialization
+according
+to
+the
+<a href="#node-serialization-algorithm">
+Node
+Serialization
+Algorithm
+</a>.
+Provide
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+'s
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>,
+a
+new
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+mapping
+state
+</a>
+with
+its
+<a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">
+serialized
+labels
+map
+</a>
+set
+to
+a
+copy
+of
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+'s
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+outgoing
+serialization
+map
+</a>,
+and
+<code>
+incoming
+direction
+</code>
+to
+the
+algorithm
+as
+inputs.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">
+incoming
+serialization
+map
+</a>
+for
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+is
+empty,
+generate
+the
+serialization
+according
+to
+the
+<a href="#node-serialization-algorithm">
+Node
+Serialization
+Algorithm
+</a>.
+Provide
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+'s
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>,
+a
+new
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+mapping
+state
+</a>
+with
+its
+<a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">
+serialized
+labels
+map
+</a>
+set
+to
+a
+copy
+of
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+'s
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+outgoing
+serialization
+map
+</a>,
+and
+<code>
+incoming
+direction
+</code>
+to
+the
+algorithm
+as
+inputs.
+</li>
+<li>
+If
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+'s
+<a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">
+incoming
+serialization
+</a>
+is
+lexicographically
+less
+than
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+'s,
+then
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">
+alpha
+</a>
+is
+first.
+If
+it
+is
+greater,
+then
+<a class="tref internalDFN" title="beta" href="#dfn-beta">
+beta
+</a>
+is
+first.
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="node-serialization-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.9
+</span>
+Node
+Serialization
+Algorithm
+</h4>
+<p>
+The
+node
+serialization
+algorithm
+takes
+a
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+node
+state
+</a>,
+a
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+mapping
+state
+</a>,
+and
+a
+<dfn title="direction" id="dfn-direction">
+direction
+</dfn>
+(either
+<code>
+outgoing
+direction
+</code>
+or
+<code>
+incoming
+direction
+</code>
+)
+as
+inputs
+and
+generates
+a
+deterministic
+serialization
+for
+the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+node
+reference
+</a>.
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+exists
+in
+the
+<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">
+processed
+labels
+map
+</a>,
+terminate
+the
+algorithm
+as
+the
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+has
+already
+been
+created.
+</li>
+<li>
+Set
+the
+value
+associated
+with
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+in
+the
+<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">
+processed
+labels
+map
+</a>
+to
+<code>
+true
+</code>.
+</li>
+<li>
+Generate
+the
+next
+<dfn title="serialization_label" id="dfn-serialization_label-1">
+serialization
+label
+</dfn>
+for
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+according
+to
+the
+<a href="#serialization-label-generation-algorithm">
+Serialization
+Label
+Generation
+Algorithm
+</a>.
+</li>
+<li>
+Create
+an
+empty
+<ins class="diff-new">map
+called
+the
+</ins><dfn title="adjacent_serialized_labels_map" id="dfn-adjacent_serialized_labels_map"><ins class="diff-new">
+adjacent
+serialized
+labels
+map
+</ins></dfn><ins class="diff-new">
+that
+will
+store
+mappings
+from
+</ins><a class="tref" title="serialized_label"><ins class="diff-new">
+serialized
+label
+</ins></a><ins class="diff-new">
+s
+to
+adjacent
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a><ins class="diff-new">
+s.
+</ins></li><li><ins class="diff-new">
+Create
+an
+empty
+</ins>
+array
+called
+the
+<del class="diff-old">list
+of
+</del>
+<dfn title="adjacent_unserialized_labels_list" id="dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+</ins>
+unserialized
+labels
+<del class="diff-old">.
+</del>
+<ins class="diff-chg">list
+</ins></dfn><ins class="diff-chg">
+that
+will
+store
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+s
+of
+adjacent
+nodes
+that
+haven't
+been
+assigned
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a><ins class="diff-chg">
+s
+yet.
+</ins>
+</li>
+<li>
+For
+every
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+in
+a
+list,
+where
+the
+list
+the
+<a class="tref internalDFN" title="outgoing_list" href="#dfn-outgoing_list">
+outgoing
+list
+</a>
+if
+the
+<a class="tref internalDFN" title="direction" href="#dfn-direction">
+direction
+</a>
+is
+<code>
+outgoing
+direction
+</code>
+and
+the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+list
+</a>
+otherwise,
+if
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+starts
+with
+<code>
+_:
+</code>,
+it
+is
+the
+<dfn title="target_node_label" id="dfn-target_node_label">
+target
+node
+label
+</dfn>:
+<ol class="algorithm">
+<li>
+Look
+up
+the
+<a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">
+target
+node
+label
+</a>
+in
+the
+<a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">
+processed
+labels
+map
+</a>
+and
+if
+a
+mapping
+exists,
+update
+the
+<a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">
+<ins class="diff-chg">adjacent
+</ins>
+serialized
+labels
+map
+</a>
+where
+the
+key
+is
+the
+value
+in
+the
+<a class="tref" title="serialization_map">
+serialization
+map
+</a>
+and
+the
+value
+is
+the
+<a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">
+target
+node
+label
+</a>.
+</li>
+<li>
+Otherwise,
+add
+the
+<a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">
+target
+node
+label
+</a>
+to
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+</ins>
+unserialized
+labels
+<ins class="diff-new">list
+</ins>
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Set
+the
+<dfn title="maximum_serialization_combinations" id="dfn-maximum_serialization_combinations">
+maximum
+serialization
+combinations
+</dfn>
+to
+<code>
+1
+</code>
+or
+the
+length
+of
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+</ins>
+unserialized
+labels
+<ins class="diff-new">list
+</ins>
+</a>,
+whichever
+is
+greater.
+</li>
+<li>
+While
+the
+<a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">
+maximum
+serialization
+combinations
+</a>
+is
+greater
+than
+<code>
+0
+</code>,
+perform
+the
+<a href="#combinatorial-serialization-algorithm">
+Combinatorial
+Serialization
+Algorithm
+</a>
+<ins class="diff-new">passing
+the
+</ins><a class="tref internalDFN" title="node_state" href="#dfn-node_state"><ins class="diff-new">
+node
+state
+</ins></a>,<ins class="diff-new">
+the
+</ins><a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state"><ins class="diff-new">
+mapping
+state
+</ins></a><ins class="diff-new">
+for
+the
+first
+iteration
+</ins>
+and
+<del class="diff-old">decrement
+</del>
+<ins class="diff-chg">a
+copy
+of
+it
+for
+each
+subsequent
+iteration,
+the
+generated
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="direction" href="#dfn-direction"><ins class="diff-chg">
+direction
+</ins></a>,<ins class="diff-chg">
+the
+</ins><a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map"><ins class="diff-chg">
+adjacent
+serialized
+labels
+map
+</ins></a>,<ins class="diff-chg">
+and
+the
+</ins><a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list"><ins class="diff-chg">
+adjacent
+unserialized
+labels
+list
+</ins></a>.<ins class="diff-chg">
+Decrement
+</ins>
+the
+<a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">
+maximum
+serialization
+combinations
+</a>
+by
+<code>
+1
+</code>
+for
+each
+iteration.
+</li>
+</ol>
+</div>
+<div id="serialization-label-generation-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.10
+</span>
+Serialization
+Label
+Generation
+Algorithm
+</h4>
+<p>
+The
+algorithm
+generates
+a
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+given
+a
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+and
+a
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+mapping
+<del class="diff-old">count
+</del>
+<ins class="diff-chg">state
+</ins></a><ins class="diff-chg">
+and
+returns
+the
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins>
+</a>.
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+<ins class="diff-new">is
+already
+in
+the
+</ins><a class="tref" title="serialization_labels_map"><ins class="diff-new">
+serialization
+labels
+map
+</ins></a>,<ins class="diff-new">
+return
+its
+associated
+value.
+</ins></li><li><ins class="diff-new">
+If
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-new">
+label
+</ins></a>
+starts
+with
+the
+string
+<code>
+_:c14n
+</code>,
+the
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+is
+the
+letter
+<code>
+c
+</code>
+followed
+by
+the
+number
+that
+follows
+<code>
+_:c14n
+</code>
+in
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>.
+</li>
+<li>
+Otherwise,
+the
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>
+is
+the
+letter
+<code>
+s
+</code>
+followed
+by
+the
+string
+value
+of
+<a class="tref" title="mapping_count">
+mapping
+count
+</a>.
+Increment
+the
+<a class="tref" title="mapping_count">
+mapping
+count
+</a>
+by
+<code>
+1
+<del class="diff-old">ensuring
+that
+</del>
+</code>.
+</li>
+<li>
+<ins class="diff-chg">Create
+a
+new
+key-value
+pair
+in
+the
+</ins><a class="tref" title="serialization_labels_map"><ins class="diff-chg">
+serialization
+labels
+map
+</ins></a><ins class="diff-chg">
+where
+the
+key
+is
+the
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+and
+</ins>
+the
+value
+<del class="diff-old">persists
+across
+multiple
+invocations
+of
+this
+algorithm.
+</del>
+<ins class="diff-chg">is
+the
+generated
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a>.
+</li>
+</ol>
+</div>
+<div id="combinatorial-serialization-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.11
+</span>
+Combinatorial
+Serialization
+Algorithm
+</h4>
+<p>
+<del class="diff-old">SerializeCombos()
+</del>
+<ins class="diff-chg">The
+combinatorial
+serialization
+algorithm
+</ins>
+takes
+a
+<del class="diff-old">label
+</del>
+<a class="tref internalDFN" title="node_state" href="#dfn-node_state">
+<ins class="diff-chg">node
+state
+</ins>
+</a>,
+a
+<del class="diff-old">serialization
+map
+</del>
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+<ins class="diff-chg">mapping
+state
+</ins>
+</a>,
+a
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">
+serialization
+label
+</a>,
+a
+<del class="diff-old">processed
+labels
+map
+,
+a
+serialization
+map
+</del>
+<a class="tref internalDFN" title="direction" href="#dfn-direction">
+<ins class="diff-chg">direction
+</ins>
+</a>,
+a
+<a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">
+<ins class="diff-chg">adjacent
+</ins>
+serialized
+labels
+map
+</a>,
+and
+a
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+</ins>
+unserialized
+labels
+<ins class="diff-new">list
+</ins>
+</a>
+as
+inputs
+and
+generates
+<del class="diff-old">deterministic
+serializations
+for
+all
+possible
+combinations
+</del>
+<ins class="diff-chg">the
+lexicographically
+least
+serialization
+</ins>
+of
+<del class="diff-old">graphs.
+</del>
+<ins class="diff-chg">nodes
+relating
+to
+the
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a>.
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+</ins>
+unserialized
+labels
+<ins class="diff-new">list
+</ins>
+</a>
+is
+not
+empty:
+<ol class="algorithm">
+<li>
+Copy
+the
+<del class="diff-old">serialization
+</del>
+<a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">
+<ins class="diff-chg">adjacent
+serialized
+labels
+</ins>
+map
+</a>
+to
+the
+<del class="diff-old">serialization
+</del>
+<dfn title="adjacent_serialized_labels_map_copy" id="dfn-adjacent_serialized_labels_map_copy">
+<ins class="diff-chg">adjacent
+serialized
+labels
+</ins>
+map
+copy
+</dfn>.
+</li>
+<li>
+Remove
+the
+first
+<a class="tref" title="unserialized_label">
+unserialized
+label
+</a>
+from
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+</ins>
+unserialized
+labels
+<ins class="diff-new">list
+</ins>
+</a>
+and
+create
+a
+new
+<dfn title="new_serialization_label" id="dfn-new_serialization_label">
+new
+serialization
+label
+</dfn>
+according
+to
+the
+<a href="#serialization-label-generation-algorithm">
+Serialization
+Label
+Generation
+Algorithm
+<del class="diff-old">passing
+the
+unserialized
+label
+and
+the
+mapping
+counter
+as
+parameters.
+</del>
+</a>.
+</li>
+<li>
+Create
+a
+new
+key-value
+mapping
+in
+the
+<del class="diff-old">serialization
+</del>
+<a class="tref internalDFN" title="adjacent_serialized_labels_map_copy" href="#dfn-adjacent_serialized_labels_map_copy">
+<ins class="diff-chg">adjacent
+serialized
+labels
+</ins>
+map
+copy
+</a>
+where
+the
+key
+is
+the
+<a class="tref internalDFN" title="new_serialization_label" href="#dfn-new_serialization_label">
+new
+serialization
+label
+</a>
+and
+the
+value
+is
+the
+<a class="tref" title="unserialized_label">
+unserialized
+label
+</a>.
+</li>
+<li>
+Set
+the
+<dfn title="maximum_serialization_rotations" id="dfn-maximum_serialization_rotations">
+maximum
+serialization
+rotations
+</dfn>
+to
+<code>
+1
+</code>
+or
+the
+length
+of
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+</ins>
+unserialized
+labels
+<ins class="diff-new">list
+</ins>
+</a>,
+whichever
+is
+greater.
+</li>
+<li>
+While
+the
+<a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">
+maximum
+serialization
+rotations
+</a>
+is
+greater
+than
+<code>
+0
+</code>:
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+this
+is
+the
+first
+iteration
+in
+the
+loop,
+</del>
+<ins class="diff-chg">Recursively
+</ins>
+perform
+the
+<a href="#combinatorial-serialization-algorithm">
+Combinatorial
+Serialization
+Algorithm
+</a>
+passing
+<del class="diff-old">in
+the
+label
+,
+</del>
+the
+<del class="diff-old">serialization
+map
+copy
+,
+</del>
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+<ins class="diff-chg">mapping
+state
+</ins></a><ins class="diff-chg">
+for
+</ins>
+the
+<del class="diff-old">serialization
+label
+,
+</del>
+<ins class="diff-chg">first
+iteration
+of
+</ins>
+the
+<del class="diff-old">processed
+labels
+map
+,
+serialized
+labels
+map
+,
+</del>
+<ins class="diff-chg">loop,
+</ins>
+and
+<del class="diff-old">the
+list
+</del>
+<ins class="diff-chg">a
+copy
+</ins>
+of
+<del class="diff-old">unserialized
+labels
+.
+</del>
+<ins class="diff-chg">it
+for
+each
+subsequent
+iteration.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+this
+is
+not
+</del>
+<ins class="diff-chg">Rotate
+</ins>
+the
+<del class="diff-old">first
+iteration
+</del>
+<ins class="diff-chg">elements
+</ins>
+in
+the
+<del class="diff-old">loop,
+perform
+the
+Combinatorial
+Serialization
+Algorithm
+</del>
+<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+unserialized
+labels
+list
+</ins>
+</a>
+<del class="diff-old">passing
+in
+</del>
+<ins class="diff-chg">by
+shifting
+each
+of
+them
+once
+to
+</ins>
+the
+<del class="diff-old">label
+,
+</del>
+<ins class="diff-chg">right,
+moving
+</ins>
+the
+<del class="diff-old">serialization
+map
+copy
+,
+</del>
+<ins class="diff-chg">element
+at
+</ins>
+the
+<del class="diff-old">serialization
+label
+,
+and
+temporary
+copies
+</del>
+<ins class="diff-chg">end
+</ins>
+of
+the
+<del class="diff-old">processed
+labels
+map
+,
+serialized
+labels
+map
+,
+and
+the
+</del>
+list
+<ins class="diff-new">to
+the
+beginning
+</ins>
+of
+<del class="diff-old">unserialized
+labels
+.
+</del>
+<ins class="diff-chg">the
+list.
+</ins>
+</li>
+<li>
+Decrement
+the
+<a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">
+maximum
+serialization
+rotations
+</a>
+by
+<code>
+1
+</code>
+for
+each
+iteration.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+If
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">
+<ins class="diff-chg">adjacent
+</ins>
+unserialized
+labels
+<ins class="diff-new">list
+</ins>
+</a>
+is
+empty:
+<ol class="algorithm">
+<li>
+<del class="diff-old">???Save
+an
+entry
+mapping
+</del>
+<ins class="diff-chg">Create
+a
+</ins><dfn title="list_of_keys" id="dfn-list_of_keys"><ins class="diff-chg">
+list
+of
+keys
+</ins></dfn>
+from
+the
+<del class="diff-old">bnode's
+serialization
+name
+</del>
+<ins class="diff-chg">keys
+in
+the
+</ins><a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map"><ins class="diff-chg">
+adjacent
+serialized
+labels
+map
+</ins></a><ins class="diff-chg">
+and
+sort
+it
+lexicographically.
+</ins></li><li><ins class="diff-chg">
+Add
+a
+key-value
+pair
+</ins>
+to
+the
+<del class="diff-old">reverse
+mapping
+(mapped)
+</del>
+<a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">
+<ins class="diff-chg">adjacent
+info
+map
+</ins></a><ins class="diff-chg">
+where
+the
+key
+is
+the
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins></a>
+and
+<del class="diff-old">its
+sorted
+</del>
+<ins class="diff-chg">the
+value
+is
+an
+object
+containing
+the
+</ins><a class="tref internalDFN" title="node_reference" href="#dfn-node_reference"><ins class="diff-chg">
+node
+reference
+</ins></a><ins class="diff-chg">
+'s
+label,
+the
+</ins><a class="tref internalDFN" title="list_of_keys" href="#dfn-list_of_keys"><ins class="diff-chg">
+list
+of
+</ins>
+keys
+<del class="diff-old">then
+do
+SerializeMapping:
+</del>
+</a>
+<ins class="diff-chg">and
+the
+</ins><a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map"><ins class="diff-chg">
+adjacent
+serialized
+labels
+map
+</ins></a>.</li>
+<li>
+<del class="diff-old">???If
+</del>
+<ins class="diff-chg">Update
+</ins>
+the
+<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
+serialization
+<ins class="diff-new">string
+</ins></a><ins class="diff-new">
+according
+to
+the
+</ins><a href="#mapping-serialization-algorithm"><ins class="diff-new">
+Mapping
+Serialization
+Algorithm
+</ins></a>.</li><li><ins class="diff-new">
+If
+the
+</ins><a class="tref internalDFN" title="direction" href="#dfn-direction"><ins class="diff-new">
+direction
+</ins></a>
+is
+<del class="diff-old">lexicographically
+less
+than
+</del>
+<code>
+<ins class="diff-chg">outgoing
+direction
+</ins></code><ins class="diff-chg">
+then
+</ins><dfn title="directed_serialization" id="dfn-directed_serialization"><ins class="diff-chg">
+directed
+serialization
+</ins></dfn><ins class="diff-chg">
+refers
+to
+</ins>
+the
+<del class="diff-old">current
+</del>
+<a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">
+<ins class="diff-chg">outgoing
+</ins>
+serialization
+<del class="diff-old">or
+</del>
+</a>
+<ins class="diff-chg">and
+</ins>
+the
+<del class="diff-old">current
+</del>
+<dfn title="directed_serialization_map" id="dfn-directed_serialization_map">
+<ins class="diff-chg">directed
+</ins>
+serialization
+<del class="diff-old">is
+null,
+then
+iterate
+over
+</del>
+<ins class="diff-chg">map
+</ins></dfn><ins class="diff-chg">
+refers
+to
+</ins>
+the
+<del class="diff-old">sorted
+keys,
+get
+</del>
+<a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">
+<ins class="diff-chg">outgoing
+serialization
+map
+</ins></a>,<ins class="diff-chg">
+otherwise
+it
+refers
+to
+</ins>
+the
+<del class="diff-old">reverse-mapped
+adjacent
+bnode
+</del>
+<a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">
+<ins class="diff-chg">incoming
+serialization
+</ins></a>
+and
+<del class="diff-old">recursively
+call
+SerializeNode
+on
+</del>
+<ins class="diff-chg">the
+</ins><a class="tref internalDFN" title="directed_serialization_map" href="#dfn-directed_serialization_map"><ins class="diff-chg">
+directed
+serialization
+map
+</ins></a><ins class="diff-chg">
+refers
+to
+the
+</ins><a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map"><ins class="diff-chg">
+incoming
+serialization
+map
+</ins></a>.<ins class="diff-chg">
+Compare
+the
+</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
+serialization
+string
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization"><ins class="diff-chg">
+directed
+serialization
+</ins></a><ins class="diff-chg">
+according
+to
+the
+</ins><a href="#mapping-serialization-algorithm"><ins class="diff-chg">
+Serialization
+Comparison
+Algorithm
+</ins></a>.<ins class="diff-chg">
+If
+the
+</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
+serialization
+string
+</ins></a><ins class="diff-chg">
+is
+less
+than
+or
+equal
+to
+the
+</ins><a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization"><ins class="diff-chg">
+directed
+serialization
+</ins></a>:<ol class="algorithm"><li><ins class="diff-chg">
+For
+</ins>
+each
+<del class="diff-old">iteration.
+</del>
+<ins class="diff-chg">value
+in
+the
+</ins><a class="tref internalDFN" title="list_of_keys" href="#dfn-list_of_keys"><ins class="diff-chg">
+list
+of
+keys
+</ins></a>,<ins class="diff-chg">
+run
+the
+</ins><a href="#node-serialization-algorithm"><ins class="diff-chg">
+Node
+Serialization
+Algorithm
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">???Do
+SerializeMapping
+then
+if
+</del>
+<ins class="diff-chg">Update
+</ins>
+the
+<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
+serialization
+<ins class="diff-new">string
+</ins></a><ins class="diff-new">
+according
+to
+the
+</ins><a href="#mapping-serialization-algorithm"><ins class="diff-new">
+Mapping
+Serialization
+Algorithm
+</ins></a>.</li><li><ins class="diff-new">
+Compare
+the
+</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-new">
+serialization
+string
+</ins></a><ins class="diff-new">
+to
+the
+</ins><a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization"><ins class="diff-new">
+directed
+serialization
+</ins></a><ins class="diff-new">
+again
+and
+if
+it
+</ins>
+is
+<del class="diff-old">lexicographically
+</del>
+less
+than
+<ins class="diff-new">or
+equal
+and
+</ins>
+the
+<del class="diff-old">current
+</del>
+<ins class="diff-chg">length
+of
+the
+</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
+serialization
+<ins class="diff-new">string
+</ins></a><ins class="diff-new">
+is
+greater
+than
+</ins>
+or
+<ins class="diff-new">equal
+to
+</ins>
+the
+<del class="diff-old">current
+</del>
+<ins class="diff-chg">length
+of
+the
+</ins><a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization"><ins class="diff-chg">
+directed
+</ins>
+serialization
+<del class="diff-old">is
+null,
+</del>
+</a>,
+then
+set
+<del class="diff-old">it
+as
+</del>
+the
+<del class="diff-old">least
+</del>
+<a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">
+<ins class="diff-chg">directed
+</ins>
+serialization
+<del class="diff-old">for
+</del>
+</a>
+<ins class="diff-chg">to
+</ins>
+the
+<del class="diff-old">bnode
+in
+</del>
+<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
+<ins class="diff-chg">serialization
+string
+</ins></a><ins class="diff-chg">
+and
+set
+</ins>
+the
+<del class="diff-old">given
+edge
+direction
+('property'
+or
+'reference').
+</del>
+<a class="tref internalDFN" title="directed_serialization_map" href="#dfn-directed_serialization_map">
+<ins class="diff-chg">directed
+serialization
+map
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map"><ins class="diff-chg">
+serialized
+labels
+map
+</ins></a>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="serialization-comparison-algorithm" class="section">
+<h4>
+<span class="secno">
+6.11.12
+</span>
+<del class="diff-old">Mapping
+</del>
+Serialization
+<ins class="diff-new">Comparison
+</ins>
+Algorithm
+</h4>
+<p>
+<del class="diff-old">map
+of
+all
+labels
+,
+map
+</del>
+<ins class="diff-chg">The
+serialization
+comparison
+algorithm
+takes
+two
+serializations,
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+and
+returns
+either
+which
+</ins>
+of
+<del class="diff-old">all
+properties
+,
+key
+stack
+,
+</del>
+<ins class="diff-chg">the
+two
+is
+less
+than
+the
+other
+or
+that
+they
+are
+equal.
+</ins></p><ol class="algorithm"><li><ins class="diff-chg">
+Whichever
+</ins>
+serialization
+<ins class="diff-new">is
+an
+empty
+</ins>
+string
+<ins class="diff-chg">is
+greater.
+If
+they
+are
+both
+empty
+strings,
+they
+are
+equal.
+</ins></li><li><ins class="diff-chg">
+Return
+the
+result
+of
+a
+lexicographical
+comparison
+of
+</ins><a class="tref internalDFN" title="alpha" href="#dfn-alpha"><ins class="diff-chg">
+alpha
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="beta" href="#dfn-beta"><ins class="diff-chg">
+beta
+</ins></a><ins class="diff-chg">
+up
+to
+the
+number
+of
+characters
+in
+the
+shortest
+of
+the
+two
+serializations.
+</ins></li></ol></div><div id="mapping-serialization-algorithm" class="section"><h4>
+<span class="secno">
+<ins class="diff-chg">6.11.13
+</ins></span><ins class="diff-chg">
+Mapping
+Serialization
+Algorithm
+</ins></h4>
+<p>
+<del class="diff-old">SerializeMapping(mapping):
+(This
+function
+</del>
+<ins class="diff-chg">The
+mapping
+serialization
+algorithm
+</ins>
+incrementally
+updates
+the
+<del class="diff-old">relation
+</del>
+<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
+serialization
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">string
+</ins></a><ins class="diff-chg">
+in
+</ins>
+a
+<del class="diff-old">mapping)
+</del>
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">
+<ins class="diff-chg">mapping
+state
+</ins></a>.
+</p>
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">serialization
+keys
+</del>
+<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">
+<ins class="diff-chg">key
+</ins>
+stack
+</a>
+is
+not
+<del class="diff-old">empty
+</del>
+<ins class="diff-chg">empty:
+</ins>
+<ol class="algorithm">
+<li>
+Pop
+the
+<del class="diff-old">list
+of
+</del>
+<dfn title="serialization_key_info" id="dfn-serialization_key_info">
+serialization
+<del class="diff-old">keys
+</del>
+<ins class="diff-chg">key
+info
+</ins>
+</dfn>
+off
+of
+the
+<del class="diff-old">serialization
+keys
+</del>
+<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">
+<ins class="diff-chg">key
+</ins>
+stack
+</a>.
+</li>
+<li>
+For
+each
+<dfn title="serialization_key" id="dfn-serialization_key">
+serialization
+key
+</dfn>
+in
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">
+serialization
+<del class="diff-old">keys
+</del>
+<ins class="diff-chg">key
+info
+</ins></a><ins class="diff-chg">
+array,
+starting
+at
+the
+</ins><dfn title="serialization_key_index" id="dfn-serialization_key_index"><ins class="diff-chg">
+serialization
+key
+index
+</ins></dfn><ins class="diff-chg">
+from
+the
+</ins><a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info"><ins class="diff-chg">
+serialization
+key
+info
+</ins>
+</a>:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+serialization
+key
+</a>
+is
+not
+in
+the
+<del class="diff-old">???list
+of
+</del>
+<a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">
+adjacent
+<del class="diff-old">nodes???,
+</del>
+<ins class="diff-chg">info
+map
+</ins></a>,
+push
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">
+serialization
+<del class="diff-old">keys
+</del>
+<ins class="diff-chg">key
+info
+</ins>
+</a>
+onto
+the
+<del class="diff-old">serialization
+keys
+</del>
+<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">
+<ins class="diff-chg">key
+</ins>
+stack
+</a>
+and
+exit
+from
+this
+loop.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+serialization
+key
+</a>
+is
+a
+key
+in
+<del class="diff-old">the
+completed
+serialization
+key
+map
+</del>
+<a class="tref internalDFN" title="serialized_keys" href="#dfn-serialized_keys">
+<ins class="diff-chg">serialized
+keys
+</ins>
+</a>,
+a
+cycle
+has
+been
+detected.
+Append
+the
+concatenation
+of
+the
+<code>
+_
+</code>
+character
+and
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+serialization
+key
+</a>
+to
+the
+<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">
+serialization
+string
+</a>.
+</li>
+<li>
+Otherwise,
+serialize
+all
+outgoing
+and
+incoming
+edges
+in
+the
+<del class="diff-old">graph
+</del>
+<ins class="diff-chg">related
+node
+</ins>
+by
+performing
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+Mark
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+serialization
+key
+</a>
+as
+<del class="diff-old">being
+</del>
+<ins class="diff-chg">having
+been
+</ins>
+processed
+by
+adding
+a
+new
+key-value
+pair
+to
+<del class="diff-old">the
+completed
+serialization
+key
+map
+</del>
+<a class="tref internalDFN" title="serialized_keys" href="#dfn-serialized_keys">
+<ins class="diff-chg">serialized
+keys
+</ins>
+</a>
+where
+the
+key
+is
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+serialization
+key
+</a>
+and
+the
+value
+is
+<code>
+true
+</code>.
+</li>
+<li>
+Set
+the
+<dfn title="serialization_fragment" id="dfn-serialization_fragment">
+serialization
+fragment
+</dfn>
+to
+the
+value
+of
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+serialization
+key
+</a>.
+</li>
+<li>
+Set
+the
+<del class="diff-old">list
+of
+</del>
+<a class="tref" title="adjacent_info">
+adjacent
+<del class="diff-old">node
+keys
+</del>
+<ins class="diff-chg">info
+</ins>
+</a>
+<del class="diff-old">by
+using
+</del>
+<ins class="diff-chg">to
+the
+value
+of
+</ins>
+the
+<a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">
+serialization
+key
+</a>
+<del class="diff-old">to
+look
+up
+the
+list
+</del>
+in
+the
+<a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">
+adjacent
+<del class="diff-old">node
+keys
+</del>
+<ins class="diff-chg">info
+</ins>
+map
+</a>.
+</li>
+<li>
+Set
+the
+<a class="tref" title="adjacent_node_label">
+adjacent
+node
+label
+</a>
+<del class="diff-old">???somehow???.
+</del>
+<ins class="diff-chg">to
+the
+node
+</ins><a class="tref internalDFN" title="label" href="#dfn-label"><ins class="diff-chg">
+label
+</ins></a><ins class="diff-chg">
+from
+the
+</ins><a class="tref" title="adjacent_info"><ins class="diff-chg">
+adjacent
+info
+</ins></a>.
+</li>
+<li>
+If
+a
+mapping
+for
+the
+<a class="tref" title="adjacent_node_label">
+adjacent
+node
+label
+</a>
+exists
+in
+the
+<a class="tref" title="map_of_all_labels">
+map
+of
+all
+labels
+</a>:
+<ol class="algorithm">
+<li>
+Append
+the
+result
+of
+the
+<a href="">
+Label
+Serialization
+Algorithm
+</a>
+to
+the
+<a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment">
+serialization
+fragment
+</a>.
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">Append
+all
+of
+the
+keys
+in
+the
+</ins><a class="tref" title="adjacent_info"><ins class="diff-chg">
+adjacent
+info
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment"><ins class="diff-chg">
+serialization
+fragment
+</ins></a>.</li><li><ins class="diff-chg">
+Append
+the
+</ins><a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment"><ins class="diff-chg">
+serialization
+fragment
+</ins></a><ins class="diff-chg">
+to
+the
+</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
+serialization
+string
+</ins></a>.</li><li><ins class="diff-chg">
+Push
+a
+new
+key
+info
+object
+containing
+the
+keys
+from
+the
+</ins><a class="tref" title="adjacent_info"><ins class="diff-chg">
+adjacent
+info
+</ins></a><ins class="diff-chg">
+and
+an
+index
+of
+</ins><code><ins class="diff-chg">
+0
+</ins></code><ins class="diff-chg">
+onto
+the
+</ins><a class="tref internalDFN" title="key_stack" href="#dfn-key_stack"><ins class="diff-chg">
+key
+stack
+</ins></a>.</li><li><ins class="diff-chg">
+Recursively
+update
+the
+</ins><a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string"><ins class="diff-chg">
+serialization
+string
+</ins></a><ins class="diff-chg">
+according
+to
+the
+</ins><a href="#mapping-serialization-algorithm"><ins class="diff-chg">
+Mapping
+Serialization
+Algorithm
+</ins></a>.</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+<div id="label-serialization-algorithm" class="section">
+<h4>
+<span class="secno">
+<del class="diff-old">6.11.13
+</del>
+<ins class="diff-chg">6.11.14
+</ins>
+</span>
+Label
+Serialization
+Algorithm
+</h4>
+<p>
+<del class="diff-old">map
+of
+properties
+,
+</del>
+<ins class="diff-chg">The
+</ins>
+label
+serialization
+<del class="diff-old">,
+label
+,
+incoming
+map
+,
+adjacent
+</del>
+<ins class="diff-chg">algorithm
+serializes
+information
+about
+a
+</ins>
+node
+<del class="diff-old">labels
+,
+key
+stack
+</del>
+<ins class="diff-chg">that
+has
+been
+assigned
+a
+particular
+</ins><a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1"><ins class="diff-chg">
+serialization
+label
+</ins>
+</a>.
+</p>
+<ol class="algorithm">
+<li>
+Initialize
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>
+to
+an
+empty
+string.
+</li>
+<li>
+Append
+the
+<code>
+[
+</code>
+character
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+<li>
+Append
+all
+properties
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>
+by
+processing
+each
+key-value
+pair
+in
+the
+<del class="diff-old">map
+of
+properties
+</del>
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">
+<ins class="diff-chg">node
+reference
+</ins>
+</a>,
+excluding
+the
+<code>
+@subject
+</code>
+<del class="diff-old">property
+???do
+the
+map
+</del>
+<ins class="diff-chg">property.
+The
+</ins>
+keys
+<del class="diff-old">need
+to
+</del>
+<ins class="diff-chg">should
+</ins>
+be
+<del class="diff-old">sorted???:
+</del>
+<ins class="diff-chg">processed
+in
+lexicographical
+order
+and
+their
+associated
+values
+should
+be
+processed
+in
+the
+order
+produced
+by
+the
+</ins><a href="#object-comparison-algorithm"><ins class="diff-chg">
+Object
+Comparison
+Algorithm
+</ins></a>:
+<ol class="algorithm">
+<li>
+Build
+a
+string
+using
+the
+pattern
+<code>
+<
+</code>
+<strong>
+KEY
+</strong>
+<code>
+>
+</code>
+where
+<strong>
+KEY
+</strong>
+is
+the
+current
+key.
+Append
+string
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+<li>
+The
+value
+may
+be
+a
+single
+object
+or
+an
+array
+of
+objects.
+Process
+all
+of
+the
+objects
+that
+are
+associated
+with
+the
+key,
+building
+an
+<dfn title="object_string" id="dfn-object_string">
+object
+string
+</dfn>
+for
+each
+item:
+<ol class="algorithm">
+<li>
+If
+the
+object
+contains
+an
+<code>
+@iri
+</code>
+key
+with
+a
+value
+that
+starts
+with
+<code>
+_:
+</code>,
+set
+the
+<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
+object
+string
+</a>
+to
+the
+value
+<code>
+_:
+</code>.
+If
+the
+value
+does
+not
+start
+with
+<code>
+_:
+</code>,
+build
+the
+<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
+object
+string
+</a>
+using
+the
+pattern
+<code>
+<
+</code>
+<strong>
+IRI
+</strong>
+<code>
+>
+</code>
+where
+<strong>
+IRI
+</strong>
+is
+the
+value
+associated
+with
+the
+<code>
+@iri
+</code>
+key.
+</li>
+<li>
+If
+the
+object
+contains
+a
+<code>
+@literal
+</code>
+key
+and
+a
+<code>
+@datatype
+</code>
+key,
+build
+the
+<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
+object
+string
+</a>
+using
+the
+pattern
+<code>
+"
+</code>
+<strong>
+LITERAL
+</strong>
+<code>
+"^^
+<
+</code>
+<strong>
+DATATYPE
+</strong>
+<code>
+>
+</code>
+where
+<strong>
+LITERAL
+</strong>
+is
+the
+value
+associated
+with
+the
+<code>
+@literal
+</code>
+key
+and
+<strong>
+DATATYPE
+</strong>
+is
+the
+value
+associated
+with
+the
+<code>
+@datatype
+</code>
+key.
+</li>
+<li>
+If
+the
+object
+contains
+a
+<code>
+@literal
+</code>
+key
+and
+a
+<code>
+@language
+</code>
+key,
+build
+the
+<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
+object
+string
+</a>
+using
+the
+pattern
+<code>
+"
+</code>
+<strong>
+LITERAL
+</strong>
+<code>
+"@
+</code>
+<strong>
+LANGUAGE
+</strong>
+where
+<strong>
+LITERAL
+</strong>
+is
+the
+value
+associated
+with
+the
+<code>
+@literal
+</code>
+key
+and
+<strong>
+LANGUAGE
+</strong>
+is
+the
+value
+associated
+with
+the
+<code>
+@language
+</code>
+key.
+</li>
+<li>
+Otherwise,
+the
+value
+is
+a
+string.
+Build
+the
+<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
+object
+string
+</a>
+using
+the
+pattern
+<code>
+"
+</code>
+<strong>
+LITERAL
+</strong>
+<code>
+"
+</code>
+where
+<strong>
+LITERAL
+</strong>
+is
+the
+value
+associated
+with
+the
+current
+key.
+</li>
+<li>
+If
+this
+is
+the
+second
+iteration
+of
+the
+loop,
+append
+a
+<code>
+|
+</code>
+separator
+character
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+<li>
+Append
+the
+<a class="tref internalDFN" title="object_string" href="#dfn-object_string">
+object
+string
+</a>
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+<li>
+Append
+the
+<code>
+]
+</code>
+character
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+<li>
+Append
+the
+<code>
+[
+</code>
+character
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+<li>
+Append
+all
+incoming
+references
+for
+the
+current
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>
+by
+processing
+all
+of
+the
+items
+associated
+with
+the
+<del class="diff-old">label
+in
+the
+</del>
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">
+incoming
+<del class="diff-old">map
+</del>
+<ins class="diff-chg">list
+</ins>
+</a>:
+<ol class="algorithm">
+<li>
+Build
+a
+<dfn title="reference_string" id="dfn-reference_string">
+reference
+string
+</dfn>
+using
+the
+pattern
+<code>
+<
+</code>
+<strong>
+PROPERTY
+</strong>
+<code>
+>
+</code>
+<code>
+<
+</code>
+<strong>
+REFERER
+</strong>
+<code>
+>
+</code>
+where
+<strong>
+PROPERTY
+</strong>
+is
+the
+property
+associated
+with
+the
+incoming
+reference
+and
+<strong>
+REFERER
+</strong>
+is
+either
+the
+subject
+of
+the
+node
+referring
+to
+the
+<a class="tref internalDFN" title="label" href="#dfn-label">
+label
+</a>
+in
+the
+incoming
+reference
+or
+<code>
+_:
+</code>
+if
+<strong>
+REFERER
+</strong>
+begins
+with
+<code>
+_:
+</code>.
+</li>
+<li>
+If
+this
+is
+the
+second
+iteration
+of
+the
+loop,
+append
+a
+<code>
+|
+</code>
+separator
+character
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+<li>
+Append
+the
+<a class="tref internalDFN" title="reference_string" href="#dfn-reference_string">
+reference
+string
+</a>
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Append
+the
+<code>
+]
+</code>
+character
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+<li>
+Append
+all
+<a class="tref" title="adjacent_node_labels">
+adjacent
+node
+labels
+</a>
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>
+by
+concatenating
+the
+string
+value
+for
+all
+of
+them,
+one
+after
+the
+other,
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+<li>
+Push
+the
+<a class="tref" title="adjacent_node_labels">
+adjacent
+node
+labels
+</a>
+onto
+the
+<a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">
+key
+stack
+</a>
+and
+append
+the
+result
+of
+the
+<a href="#mapping-serialization-algorithm">
+Mapping
+Serialization
+Algorithm
+</a>
+to
+the
+<a class="tref" title="label_serialization">
+label
+serialization
+</a>.
+</li>
+</ol>
+</div>
+</div>
+<div id="data-round-tripping" class="section">
+<h3>
+<span class="secno">
+6.12
+</span>
+Data
+Round
+Tripping
+</h3>
+<p>
+When
+normalizing
+<strong>
+xsd:double
+</strong>
+values,
+implementers
+<em class="rfc2119" title="must">
+must
+</em>
+ensure
+that
+the
+normalized
+value
+is
+a
+string.
+In
+order
+to
+generate
+the
+string
+from
+a
+<strong>
+double
+</strong>
+value,
+output
+equivalent
+to
+the
+<code>
+printf("%1.6e",
+value)
+</code>
+function
+in
+C
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+<strong>
+"%1.6e"
+</strong>
+is
+the
+string
+formatter
+and
+<strong>
+value
+</strong>
+is
+the
+value
+to
+be
+converted.
+</p>
+<p>
+To
+convert
+the
+a
+double
+value
+in
+JavaScript,
+implementers
+can
+use
+the
+following
+snippet
+of
+code:
+</p>
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/,
+'$10$2')
+</pre>
+<p class="note">
+When
+data
+needs
+to
+be
+normalized,
+JSON-LD
+authors
+should
+not
+use
+values
+that
+are
+going
+to
+undergo
+automatic
+conversion.
+This
+is
+due
+to
+the
+lossy
+nature
+of
+<strong>
+xsd:double
+</strong>
+values.
+</p>
+<p class="note">
+<ins class="diff-new">Some
+JSON
+serializers,
+such
+as
+PHP's
+native
+implementation,
+backslash-escapes
+the
+forward
+slash
+character.
+For
+example,
+the
+value
+</ins><code><ins class="diff-new">
+http://example.com/
+</ins></code><ins class="diff-new">
+would
+be
+serialized
+as
+</ins><code><ins class="diff-new">
+http:\/\/example.com\/
+</ins></code><ins class="diff-new">
+in
+some
+versions
+of
+PHP.
+This
+is
+problematic
+when
+generating
+a
+byte
+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
+</ins><em class="rfc2119" title="must not"><ins class="diff-new">
+must
+not
+</ins></em><ins class="diff-new">
+backslash-escape
+forward
+slashes.
+</ins></p>
+<p class="issue">
+Round-tripping
+data
+can
+be
+problematic
+if
+we
+mix
+and
+match
+@coerce
+rules
+with
+JSON-native
+datatypes,
+like
+integers.
+Consider
+the
+following
+code
+example:
+</p>
+<pre class="example">
+<del class="diff-old">var myObj = { "@context" : { 
+</del>
+<ins class="diff-chg">var myObj = { "@context" : {
+</ins>
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+// Convert the normalized object back to a JavaScript object
+var
+myObj2
+=
+jsonld.parse(jsonldText);
+</pre>
+<p class="issue">
+At
+this
+point,
+myObj2
+and
+myObj
+will
+have
+different
+values
+for
+the
+"number"
+value.
+myObj
+will
+be
+the
+number
+42,
+while
+myObj2
+will
+be
+the
+string
+"42".
+This
+type
+of
+data
+round-tripping
+error
+can
+bite
+developers.
+We
+are
+currently
+wondering
+if
+having
+a
+"coerce
+validation"
+phase
+in
+the
+parsing/normalization
+phases
+would
+be
+a
+good
+idea.
+It
+would
+prevent
+data
+round-tripping
+issues
+like
+the
+one
+mentioned
+above.
+</p>
+</div>
+<div id="rdf-conversion" class="section">
+<h3>
+<span class="secno">
+6.13
+</span>
+RDF
+Conversion
+</h3>
+<p>
+A
+JSON-LD
+document
+<em class="rfc2119" title="may">
+may
+</em>
+be
+converted
+to
+any
+other
+RDF-compatible
+document
+format
+using
+the
+algorithm
+specified
+in
+this
+section.
+</p>
+<p>
+The
+JSON-LD
+Processing
+Model
+describes
+processing
+rules
+for
+extracting
+RDF
+from
+a
+JSON-LD
+document.
+Note
+that
+many
+uses
+of
+JSON-LD
+may
+not
+require
+generation
+of
+RDF.
+</p>
+<p>
+The
+processing
+algorithm
+described
+in
+this
+section
+is
+provided
+in
+order
+to
+demonstrate
+how
+one
+might
+implement
+a
+JSON-LD
+to
+RDF
+processor.
+Conformant
+implementations
+are
+only
+required
+to
+produce
+the
+same
+type
+and
+number
+of
+triples
+during
+the
+output
+process
+and
+are
+not
+required
+to
+implement
+the
+algorithm
+exactly
+as
+described.
+</p>
+<p class="issue">
+The
+RDF
+Conversion
+Algorithm
+is
+a
+work
+in
+progress.
+</p>
+<div class="informative section" id="overview">
+<h4>
+<span class="secno">
+6.13.1
+</span>
+Overview
+</h4>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+JSON-LD
+is
+intended
+to
+have
+an
+easy
+to
+parse
+grammar
+that
+closely
+models
+existing
+practice
+in
+using
+JSON
+for
+describing
+object
+representations.
+This
+allows
+the
+use
+of
+existing
+libraries
+for
+parsing
+JSON
+in
+a
+document-oriented
+fashion,
+or
+can
+allow
+for
+stream-based
+parsing
+similar
+to
+SAX.
+</p>
+<p>
+As
+with
+other
+grammars
+used
+for
+describing
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">
+Linked
+Data
+</a>,
+a
+key
+concept
+is
+that
+of
+a
+<em>
+resource
+</em>.
+Resources
+may
+be
+of
+three
+basic
+types:
+<em>
+IRI
+</em>
+s,
+for
+describing
+externally
+named
+entities,
+<em>
+BNodes
+</em>,
+resources
+for
+which
+an
+external
+name
+does
+not
+exist,
+or
+is
+not
+known,
+and
+Literals,
+which
+describe
+terminal
+entities
+such
+as
+strings,
+dates
+and
+other
+representations
+having
+a
+lexical
+representation
+possibly
+including
+an
+explicit
+language
+or
+datatype.
+</p>
+<p>
+Data
+described
+with
+JSON-LD
+may
+be
+considered
+to
+be
+the
+representation
+of
+a
+graph
+made
+up
+of
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">
+subject
+</a>
+and
+<a class="tref internalDFN" title="object" href="#dfn-object">
+object
+</a>
+resources
+related
+via
+a
+<a class="tref internalDFN" title="property" href="#dfn-property">
+property
+</a>
+resource.
+However,
+specific
+implementations
+may
+choose
+to
+operate
+on
+the
+document
+as
+a
+normal
+JSON
+description
+of
+objects
+having
+attributes.
+</p>
+</div>
+<div id="rdf-conversion-algorithm-terms" class="section">
+<h4>
+<span class="secno">
+6.13.2
+</span>
+RDF
+Conversion
+Algorithm
+Terms
+</h4>
+<dl>
+<dt>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+</dt>
+<dd>
+the
+destination
+graph
+for
+all
+triples
+generated
+by
+JSON-LD
+markup.
+</dd>
+</dl>
+</div>
+<div id="rdf-conversion-algorithm" class="section">
+<h4>
+<span class="secno">
+6.13.3
+</span>
+RDF
+Conversion
+Algorithm
+</h4>
+<p>
+The
+algorithm
+below
+is
+designed
+for
+in-memory
+implementations
+with
+random
+access
+to
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+elements.
+</p>
+<p>
+A
+conforming
+JSON-LD
+processor
+implementing
+RDF
+conversion
+<em class="rfc2119" title="must">
+must
+</em>
+implement
+a
+processing
+algorithm
+that
+results
+in
+the
+same
+<a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">
+default
+graph
+</a>
+that
+the
+following
+algorithm
+generates:
+</p>
+<ol class="algorithm">
+<li id="processing-step-default-context">
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+with
+with
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+set
+to
+the
+<a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">
+initial
+context
+</a>
+and
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+initialized
+to
+NULL.
+</li>
+<li id="processing-step-associative">
+If
+a
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+is
+detected,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+has
+a
+<code>
+@context
+</code>
+key,
+process
+the
+local
+context
+as
+described
+in
+<a href="#context">
+Context
+</a>.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+by
+mapping
+the
+keys
+from
+the
+current
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+using
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+to
+new
+keys
+using
+the
+associated
+value
+from
+the
+current
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+Repeat
+the
+mapping
+until
+no
+entry
+is
+found
+within
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+for
+the
+key.
+Use
+the
+new
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+in
+subsequent
+steps.
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+has
+an
+<code>
+@iri
+</code>
+key,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+associated
+value.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+<p class="issue">
+<code>
+@iri
+</code>
+really
+just
+behaves
+the
+same
+as
+<code>
+@subject
+</code>,
+consider
+consolidating
+them.
+</p>
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+has
+a
+<code>
+@literal
+</code>
+key,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+literal
+value
+as
+follows:
+<ol class="algorithm">
+<li>
+as
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+if
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+contains
+a
+<code>
+@datatype
+</code>
+key
+after
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+specified
+<code>
+@datatype
+</code>.
+</li>
+<li>
+otherwise,
+as
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>.
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+contains
+a
+<code>
+@language
+</code>
+key,
+use
+it's
+value
+to
+set
+the
+language
+of
+the
+plain
+literal.
+</li>
+<li>
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+</ol>
+</li>
+<li id="processing-step-subject">
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+has
+a
+<code>
+@subject
+</code>
+key:
+<ol class="algorithm">
+<li>
+If
+the
+value
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+result
+of
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+using
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>,
+set
+the
+<a class="tref" title="active__subject">
+active
+subject
+</a>
+to
+the
+result
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+does
+not
+have
+a
+<code>
+@subject
+</code>
+key,
+set
+the
+<a class="tref" title="active__object">
+active
+object
+</a>
+to
+newly
+generated
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier">
+blank
+node
+identifier
+</dfn>.
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+Set
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+to
+the
+<a class="tref" title="active__object">
+active
+object
+</a>.
+</li>
+<li>
+For
+each
+key
+in
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+that
+has
+not
+already
+been
+processed,
+perform
+the
+following
+steps:
+<ol class="algorithm">
+<li>
+If
+the
+key
+is
+<code>
+@type
+</code>,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+<code>
+rdf:type
+</code>.
+</li>
+<li>
+Otherwise,
+set
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+to
+the
+result
+of
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+key.
+</li>
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>
+and
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+Return
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+the
+calling
+location.
+</li>
+</ol>
+</li>
+<li>
+If
+a
+regular
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+is
+detected,
+process
+each
+value
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+by
+doing
+the
+following
+returning
+the
+result
+of
+processing
+the
+last
+value
+in
+the
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>:
+<ol class="algorithm">
+<li>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+using
+copies
+of
+the
+<a class="tref" title="active__context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>
+then
+proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li>
+If
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>
+is
+detected:
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+the
+target
+of
+a
+<code>
+@iri
+</code>
+coercion,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+performing
+<a href="#iri-expansion">
+IRI
+Expansion
+</a>
+on
+the
+string.
+</li>
+<li>
+Otherwise,
+if
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+the
+target
+of
+coercion,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+by
+creating
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+using
+the
+string
+and
+the
+coercion
+key
+as
+the
+datatype
+IRI.
+</li>
+<li>
+Otherwise,
+set
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>
+to
+a
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">
+plain
+literal
+</a>
+value
+created
+from
+the
+string.
+</li>
+</ol>
+Generate
+a
+triple
+representing
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+<a class="tref internalDFN" title="active_object" href="#dfn-active_object">
+active
+object
+</a>.
+</li>
+<li>
+If
+a
+<a class="tref internalDFN" title="number" href="#dfn-number">
+number
+</a>
+is
+detected,
+generate
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+using
+a
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+either
+<code>
+xsd:integer
+</code>
+or
+<code>
+xsd:double
+</code>,
+depending
+on
+if
+the
+value
+contains
+a
+fractional
+and/or
+an
+exponential
+component.
+Generate
+a
+triple
+using
+the
+<a class="tref" title="active__subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+the
+generated
+typed
+literal.
+</li>
+<li>
+Otherwise,
+if
+<strong>
+true
+</strong>
+or
+<strong>
+false
+</strong>
+is
+detected,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+a
+<a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">
+typed
+literal
+</a>
+value
+created
+from
+the
+string
+representation
+of
+the
+value
+with
+datatype
+set
+to
+<code>
+xsd:boolean
+</code>.
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="appendix section" id="experimental-concepts">
+<h2>
+<span class="secno">
+<del class="diff-old">7.
+</del>
+<ins class="diff-chg">A.
+</ins>
+</span>
+Experimental
+Concepts
+</h2>
+<p class="issue">
+There
+are
+a
+few
+advanced
+concepts
+where
+it
+is
+not
+clear
+whether
+or
+not
+the
+JSON-LD
+specification
+is
+going
+to
+support
+the
+complexity
+necessary
+to
+support
+each
+concept.
+The
+entire
+section
+on
+Advanced
+Concepts
+should
+be
+considered
+as
+discussion
+points;
+it
+is
+merely
+a
+list
+of
+possibilities
+where
+all
+of
+the
+benefits
+and
+drawbacks
+have
+not
+been
+explored.
+</p>
+<div id="disjoint-graphs" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">7.1
+</del>
+<ins class="diff-chg">A.1
+</ins>
+</span>
+Disjoint
+Graphs
+</h3>
+<p>
+When
+serializing
+an
+RDF
+graph
+that
+contains
+two
+or
+more
+sections
+of
+the
+graph
+which
+are
+entirely
+disjoint,
+one
+must
+use
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+to
+express
+the
+graph
+as
+two
+graphs.
+This
+may
+not
+be
+acceptable
+to
+some
+authors,
+who
+would
+rather
+express
+the
+information
+as
+one
+graph.
+Since,
+by
+definition,
+disjoint
+graphs
+require
+there
+to
+be
+two
+top-level
+objects,
+JSON-LD
+utilizes
+a
+mechanism
+that
+allows
+disjoint
+graphs
+to
+be
+expressed
+using
+a
+single
+graph.
+</p>
+<p>
+Assume
+the
+following
+RDF
+graph:
+</p>
+<pre class="example">
+<del class="diff-old">&lt;http://example.org/people#john&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/people#john&gt;
+</ins>
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+<del class="diff-old">&lt;http://example.org/people#jane&gt; 
+</del>
+<ins class="diff-chg">&lt;http://example.org/people#jane&gt;
+</ins>
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+&lt;http://xmlns.com/foaf/0.1/Person&gt;
+.
+</pre>
+<p>
+Since
+the
+two
+subjects
+are
+entirely
+disjoint
+with
+one
+another,
+it
+is
+impossible
+to
+express
+the
+RDF
+graph
+above
+using
+a
+single
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+</p>
+<p>
+In
+JSON-LD,
+one
+can
+use
+the
+subject
+to
+express
+disjoint
+graphs
+as
+a
+single
+graph:
+</p>
+<pre class="example">
+{
+  "@context": {
+    "Person": "http://xmlns.com/foaf/0.1/Person"
+  },
+<del class="diff-old">  "@subject": 
+</del>
+<ins class="diff-chg">  "@subject":
+</ins>
+  [
+    {
+      "@subject": "http://example.org/people#john",
+      "@type": "Person"
+    },
+    {
+      "@subject": "http://example.org/people#jane",
+      "@type": "Person"
+    }
+  ]
+}
+</pre>
+<p>
+A
+disjoint
+graph
+could
+also
+be
+expressed
+like
+so:
+</p>
+<pre class="example">
+[
+  {
+    "@subject": "http://example.org/people#john",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  },
+  {
+    "@subject": "http://example.org/people#jane",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  }
+]
+</pre>
+<p class="note">
+<ins class="diff-new">Warning:
+Using
+this
+serialisation
+format
+it
+is
+impossible
+to
+include
+</ins><code><ins class="diff-new">
+@context
+</ins></code><ins class="diff-new">
+given
+that
+the
+document's
+data
+structure
+is
+an
+array
+and
+not
+an
+object.
+</ins></p>
+</div>
+<div id="lists" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">7.2
+</del>
+<ins class="diff-chg">A.2
+</ins>
+</span>
+Lists
+</h3>
+<p>
+Because
+graphs
+do
+not
+describe
+ordering
+for
+links
+between
+nodes,
+<ins class="diff-new">in
+contrast
+to
+plain
+JSON,
+</ins>
+multi-valued
+properties
+in
+<del class="diff-old">JSON
+</del>
+<ins class="diff-chg">JSON-LD
+</ins>
+do
+not
+provide
+an
+ordering
+of
+the
+listed
+objects.
+For
+example,
+consider
+the
+following
+simple
+document:
+</p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}
+</pre>
+<p>
+This
+results
+in
+three
+triples
+being
+generated,
+each
+relating
+the
+subject
+to
+an
+individual
+object,
+with
+no
+inherent
+order.
+</p>
+<p>
+To
+<del class="diff-old">address
+this
+issue,
+</del>
+<ins class="diff-chg">preserve
+the
+order
+of
+the
+objects,
+</ins>
+RDF-based
+languages,
+such
+as
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-TURTLE">
+TURTLE
+</a>
+</cite>
+]
+use
+the
+concept
+of
+an
+<code>
+rdf:List
+</code>
+(as
+described
+in
+[
+<cite>
+<a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">
+RDF-SCHEMA
+</a>
+</cite>
+]).
+This
+uses
+a
+sequence
+of
+unlabeled
+nodes
+with
+properties
+describing
+a
+value,
+a
+null-terminated
+next
+property.
+Without
+specific
+syntactical
+support,
+this
+could
+be
+represented
+in
+JSON-LD
+as
+follows:
+</p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">{</span>,
+    <span class="diff">"@first": "joe"</span>,
+    <span class="diff">"@rest": {</span>
+      <span class="diff">"@first": "bob"</span>,
+      <span class="diff">"@rest": {</span>
+        <span class="diff">"@first": "jaybee"</span>,
+        <span class="diff">"@rest": "@nil"</span>
+        <span class="diff">}</span>
+      <span class="diff">}</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+}
+</pre>
+<p>
+As
+this
+notation
+is
+rather
+unwieldy
+and
+the
+notion
+of
+ordered
+collections
+is
+rather
+important
+in
+data
+modeling,
+it
+is
+useful
+to
+have
+specific
+language
+support.
+In
+JSON-LD,
+a
+list
+may
+be
+represented
+using
+the
+<code>
+@list
+</code>
+keyword
+as
+follows:
+</p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
+...
+}
+</pre>
+<p>
+This
+describes
+the
+use
+of
+this
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+as
+being
+ordered,
+and
+order
+is
+maintained
+through
+normalization
+and
+RDF
+conversion.
+If
+every
+use
+of
+a
+given
+multi-valued
+property
+is
+a
+list,
+this
+may
+be
+abbreviated
+by
+adding
+an
+<code>
+@coerce
+</code>
+term:
+</p>
+  <pre class="example">
+{
+  <span class="diff">"@context": {</span>
+    ...
+<del class="diff-old">    
+</del>
+    <span class="diff">"@coerce": {</span>
+      <span class="diff">"@list": ["foaf:nick"]</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}
+</pre>
+<p class="issue">
+<ins class="diff-new">There
+is
+an
+ongoing
+discussion
+about
+this
+issue.
+One
+of
+the
+</ins><a href="https://github.com/json-ld/json-ld.org/issues/12"><ins class="diff-new">
+proposed
+solutions
+</ins></a><ins class="diff-new">
+is
+allowing
+to
+change
+the
+default
+behaviour
+so
+that
+arrays
+are
+considered
+as
+ordered
+lists
+by
+default.
+</ins></p>
+<div id="expansion-2" class="section">
+<h4 id="list-expansion">
+<span class="secno">
+<del class="diff-old">7.2.1
+</del>
+<ins class="diff-chg">A.2.1
+</ins>
+</span>
+Expansion
+</h4>
+<p class="issue">
+TBD.
+</p>
+</div>
+<div id="normalization-2" class="section">
+<h4 id="list-normalization">
+<span class="secno">
+<del class="diff-old">7.2.2
+</del>
+<ins class="diff-chg">A.2.2
+</ins>
+</span>
+Normalization
+</h4>
+<p class="issue">
+TBD.
+</p>
+</div>
+<div id="rdf-conversion-1" class="section">
+<h4 id="list-rdf">
+<span class="secno">
+<del class="diff-old">7.2.3
+</del>
+<ins class="diff-chg">A.2.3
+</ins>
+</span>
+RDF
+Conversion
+</h4>
+<p>
+To
+support
+RDF
+Conversion
+of
+lists,
+<a href="#rdf-conversion-algorithm">
+RDF
+Conversion
+Algorithm
+</a>
+is
+updated
+as
+follows:
+</p>
+<ol class="algorithm update">
+<li>
+<span class="list-number">
+2.4a.
+</span>
+If
+the
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">
+JSON
+object
+</a>
+has
+a
+<code>
+@list
+</code>
+key
+and
+the
+value
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>
+process
+the
+value
+as
+a
+list
+starting
+at
+<a href="#processing-step-list">
+Step
+3a
+</a>.
+</li>
+<li>
+<span class="list-number">
+2.7.3.
+</span>
+Create
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copies
+of
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+<ol class="algorithm">
+<li>
+If
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+is
+the
+target
+of
+a
+<code>
+@list
+</code>
+coercion,
+and
+the
+value
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+</a>,
+process
+the
+value
+as
+a
+list
+starting
+at
+<a href="#processing-step-list">
+Step
+3a
+</a>.
+</li>
+<li>
+Otherwise,
+process
+the
+value
+starting
+at
+<a href="#processing-step-associative">
+Step
+2
+</a>.
+</li>
+<li>
+Proceed
+using
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</li>
+</ol>
+</li>
+<li id="processing-step-list">
+<span class="list-number">
+3a.
+</span>
+Generate
+an
+RDF
+List
+by
+linking
+each
+element
+of
+the
+list
+using
+<code>
+rdf:first
+</code>
+and
+<code>
+rdf:next
+</code>,
+terminating
+the
+list
+with
+<code>
+rdf:nil
+</code>
+using
+the
+following
+sequence:
+<ol class="algorithm">
+<li>
+If
+the
+list
+has
+no
+element,
+generate
+a
+triple
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Otherwise,
+generate
+a
+triple
+using
+using
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>
+and
+a
+newly
+generated
+BNode
+identified
+as
+<em>
+first
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">
+blank
+node
+identifier
+</dfn>
+</em>.
+</li>
+<li>
+For
+each
+element
+other
+than
+the
+last
+element
+in
+the
+list:
+<ol class="algorithm">
+<li>
+Create
+a
+processor
+state
+using
+the
+active
+context,
+<em>
+first
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">
+blank
+node
+identifier
+</dfn>
+</em>
+as
+the
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+and
+<code>
+rdf:first
+</code>
+as
+the
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+</li>
+<li>
+Unless
+this
+is
+the
+last
+element
+in
+the
+list,
+generate
+a
+new
+BNode
+identified
+as
+<em>
+rest
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">
+blank
+node
+identifier
+</dfn>
+</em>,
+otherwise
+use
+<code>
+rdf:nil
+</code>.
+</li>
+<li>
+Generate
+a
+new
+triple
+using
+<em>
+first
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">
+blank
+node
+identifier
+</dfn>
+</em>,
+<code>
+rdf:rest
+</code>
+and
+<em>
+rest
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">
+blank
+node
+identifier
+</dfn>
+</em>.
+</li>
+<li>
+Set
+<em>
+first
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">
+blank
+node
+identifier
+</dfn>
+</em>
+to
+<em>
+rest
+<dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">
+blank
+node
+identifier
+</dfn>
+</em>.
+</li>
+</ol>
+</li>
+</ol>
+</li>
+</ol>
+</div>
+</div>
+</div>
+<div class="appendix section" id="markup-examples">
+<h2>
+<span class="secno">
+<del class="diff-old">A.
+</del>
+<ins class="diff-chg">B.
+</ins>
+</span>
+Markup
+Examples
+</h2>
+<p>
+The
+JSON-LD
+markup
+examples
+below
+demonstrate
+how
+JSON-LD
+can
+be
+used
+to
+express
+semantic
+data
+marked
+up
+in
+other
+languages
+such
+as
+RDFa,
+Microformats,
+and
+Microdata.
+These
+sections
+are
+merely
+provided
+as
+proof
+that
+JSON-LD
+is
+very
+flexible
+in
+what
+it
+can
+express
+across
+different
+Linked
+Data
+approaches.
+</p>
+<div id="rdfa" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">A.1
+</del>
+<ins class="diff-chg">B.1
+</ins>
+</span>
+RDFa
+</h3>
+<p>
+The
+following
+example
+describes
+three
+people
+with
+their
+respective
+names
+and
+homepages.
+</p>
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;
+</pre>
+<p>
+An
+example
+JSON-LD
+implementation
+is
+described
+below,
+however,
+there
+are
+other
+ways
+to
+mark-up
+this
+information
+such
+that
+the
+context
+is
+not
+repeated.
+</p>
+<pre class="example">
+{
+  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
+  "@subject": [
+   {
+     "@subject": "_:bnode1",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/bob/",
+     "foaf:name": "Bob"
+   },
+   {
+     "@subject": "_:bnode2",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/eve/",
+     "foaf:name": "Eve"
+   },
+   {
+     "@subject": "_:bnode3",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/manu/",
+     "foaf:name": "Manu"
+   }
+  ]
+}
+</pre>
+</div>
+<div id="microformats" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">A.2
+</del>
+<ins class="diff-chg">B.2
+</ins>
+</span>
+Microformats
+</h3>
+<p>
+The
+following
+example
+uses
+a
+simple
+Microformats
+hCard
+example
+to
+express
+how
+the
+Microformat
+is
+represented
+in
+JSON-LD.
+</p>
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;
+</pre>
+<p>
+The
+representation
+of
+the
+hCard
+expresses
+the
+Microformat
+terms
+in
+the
+context
+and
+uses
+them
+directly
+for
+the
+<code>
+url
+</code>
+and
+<code>
+fn
+</code>
+properties.
+Also
+note
+that
+the
+Microformat
+to
+JSON-LD
+processor
+has
+generated
+the
+proper
+URL
+type
+for
+<code>
+http://tantek.com
+</code>.
+</p>
+<pre class="example">
+{
+<del class="diff-old">  "@context": 
+</del>
+<ins class="diff-chg">  "@context":
+</ins>
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+<del class="diff-old">    "@coerce": { "xsd:anyURI": "url" }
+</del>
+<ins class="diff-chg">    "@coerce": { "@iri": "url" }
+</ins>
+  },
+  "@subject": "_:bnode1",
+  "@type": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}
+</pre>
+</div>
+<div id="microdata" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">A.3
+</del>
+<ins class="diff-chg">B.3
+</ins>
+</span>
+Microdata
+</h3>
+<p>
+The
+Microdata
+example
+below
+expresses
+book
+information
+as
+a
+Microdata
+Work
+item.
+</p>
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;
+</pre>
+<p>
+Note
+that
+the
+JSON-LD
+representation
+of
+the
+Microdata
+information
+stays
+true
+to
+the
+desires
+of
+the
+Microdata
+community
+to
+avoid
+contexts
+and
+instead
+refer
+to
+items
+by
+their
+full
+IRI.
+</p>
+<pre class="example">
+[
+  {
+    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "@type": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+<del class="diff-old">    "http://purl.org/vocab/frbr/core#realization": 
+</del>
+<ins class="diff-chg">    "http://purl.org/vocab/frbr/core#realization":
+</ins>
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]
+</pre>
+</div>
+</div>
+<div class="appendix section" id="mashing-up-vocabularies">
+<h2>
+<span class="secno">
+<del class="diff-old">A.4
+</del>
+<ins class="diff-chg">C.
+</ins>
+</span>
+Mashing
+Up
+Vocabularies
+</h2>
+<p>
+Developers
+would
+also
+benefit
+by
+allowing
+other
+vocabularies
+to
+be
+used
+automatically
+with
+their
+JSON
+API.
+There
+are
+over
+200
+<a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">
+<ins class="diff-new">Web
+</ins>
+Vocabulary
+</a>
+Documents
+that
+are
+available
+for
+use
+on
+the
+Web
+today.
+Some
+of
+these
+vocabularies
+are:
+</p>
+<ul>
+<li>
+RDF
+-
+for
+describing
+information
+about
+objects
+<ins class="diff-new">and
+concepts
+</ins>
+on
+the
+<del class="diff-old">semantic
+web.
+</del>
+<ins class="diff-chg">Web.
+</ins>
+</li>
+<li>
+RDFS
+-
+for
+expressing
+things
+like
+labels
+and
+comments.
+</li>
+<li>
+XSD
+-
+for
+specifying
+basic
+types
+like
+strings,
+integers,
+dates
+and
+times.
+</li>
+<li>
+Dublin
+Core
+-
+for
+describing
+creative
+works.
+</li>
+<li>
+FOAF
+-
+for
+describing
+social
+networks.
+</li>
+<li>
+Calendar
+-
+for
+specifying
+events.
+</li>
+<li>
+SIOC
+-
+for
+describing
+discussions
+on
+blogs
+and
+websites.
+</li>
+<li>
+CCrel
+-
+for
+describing
+Creative
+Commons
+and
+other
+types
+of
+licenses.
+</li>
+<li>
+GEO
+-
+for
+describing
+geographic
+location.
+</li>
+<li>
+VCard
+-
+for
+describing
+organizations
+and
+people.
+</li>
+<li>
+DOAP
+-
+for
+describing
+projects.
+</li>
+</ul>
+<p>
+You
+can
+use
+these
+vocabularies
+in
+combination,
+like
+so:
+</p>
+<pre class="example">
+{
+  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}
+</pre>
+<p>
+Developers
+can
+also
+specify
+their
+own
+Vocabulary
+documents
+by
+modifying
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+in-line
+using
+the
+<code>
+@context
+</code>
+keyword,
+like
+so:
+</p>
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "@type": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}
+</pre>
+<p>
+The
+<code>
+@context
+</code>
+keyword
+is
+used
+to
+change
+how
+the
+JSON-LD
+processor
+evaluates
+key-value
+pairs.
+In
+this
+case,
+it
+was
+used
+to
+map
+one
+string
+('myvocab')
+to
+another
+string,
+which
+is
+interpreted
+as
+a
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">
+IRI
+</a>.
+In
+the
+example
+above,
+the
+<code>
+myvocab
+</code>
+string
+is
+replaced
+with
+"
+<code>
+http://example.org/myvocab#
+</code>
+"
+when
+it
+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
+<del class="diff-old">short-hand
+for
+RDF,
+</del>
+<ins class="diff-chg">short-hand,
+</ins>
+called
+a
+<del class="diff-old">CURIE
+</del>
+<a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">
+<ins class="diff-chg">Web
+Vocabulary
+</ins></a><a class="tref internalDFN" title="prefix" href="#dfn-prefix-1"><ins class="diff-chg">
+prefix
+</ins>
+</a>,
+and
+provides
+developers
+an
+unambiguous
+way
+to
+map
+any
+JSON
+value
+to
+RDF.
+</p>
+<p>
+</p>
+</div>
+<div class="appendix section" id="iana-considerations">
+<h2>
+<span class="secno">
+<ins class="diff-new">D.
+</ins></span><ins class="diff-new">
+IANA
+Considerations
+</ins></h2><p><ins class="diff-new">
+This
+section
+is
+included
+merely
+for
+standards
+community
+review
+and
+will
+be
+submitted
+to
+the
+Internet
+Engineering
+Steering
+Group
+if
+this
+specification
+becomes
+a
+W3C
+Recommendation.
+</ins></p><dl><dt><ins class="diff-new">
+Type
+name:
+</ins></dt><dd><ins class="diff-new">
+application
+</ins></dd><dt><ins class="diff-new">
+Subtype
+name:
+</ins></dt><dd><ins class="diff-new">
+ld+json
+</ins></dd><dt><ins class="diff-new">
+Required
+parameters:
+</ins></dt><dd><ins class="diff-new">
+None
+</ins></dd><dt><ins class="diff-new">
+Optional
+parameters:
+</ins></dt><dd><dl><dt><code><ins class="diff-new">
+form
+</ins></code></dt><dd><ins class="diff-new">
+Determines
+the
+serialization
+form
+for
+the
+JSON-LD
+document.
+Valid
+values
+include;
+</ins><code><ins class="diff-new">
+compacted
+</ins></code>,<code><ins class="diff-new">
+expanded
+</ins></code>,<code><ins class="diff-new">
+framed
+</ins></code>,<ins class="diff-new">
+and
+</ins><code><ins class="diff-new">
+normalized
+</ins></code>.<ins class="diff-new">
+Other
+values
+are
+allowed,
+but
+must
+be
+pre-pended
+with
+a
+</ins><code><ins class="diff-new">
+x-
+</ins></code><ins class="diff-new">
+string
+until
+they
+are
+clearly
+defined
+by
+a
+stable
+specification.
+If
+no
+form
+is
+specified
+in
+an
+HTTP
+request
+header
+to
+a
+responding
+application,
+such
+as
+a
+Web
+server,
+the
+application
+</ins><em class="rfc2119" title="may"><ins class="diff-new">
+may
+</ins></em><ins class="diff-new">
+choose
+any
+form.
+If
+no
+form
+is
+specified
+for
+a
+receiving
+application,
+the
+form
+</ins><em class="rfc2119" title="must not"><ins class="diff-new">
+must
+not
+</ins></em><ins class="diff-new">
+be
+assumed
+to
+take
+any
+particular
+form.
+</ins></dd><div class="issue"><ins class="diff-new">
+It
+is
+currently
+</ins><a href="https://github.com/json-ld/json-ld.org/issues/14"><ins class="diff-new">
+being
+discussed
+to
+remove
+form=framed
+</ins></a><ins class="diff-new">
+from
+this
+specification
+as
+there
+are
+several
+issues
+with
+it.
+</ins></div></dl></dd><dt><ins class="diff-new">
+Encoding
+considerations:
+</ins></dt><dd><ins class="diff-new">
+The
+same
+as
+the
+</ins><code><ins class="diff-new">
+application/json
+</ins></code><ins class="diff-new">
+MIME
+media
+type.
+</ins></dd><dt><ins class="diff-new">
+Security
+considerations:
+</ins></dt><dd><ins class="diff-new">
+Since
+JSON-LD
+is
+intended
+to
+be
+a
+pure
+data
+exchange
+format
+for
+directed
+graphs,
+the
+serialization
+</ins><em class="rfc2119" title="should not"><ins class="diff-new">
+should
+not
+</ins></em><ins class="diff-new">
+be
+passed
+through
+a
+code
+execution
+mechanism
+such
+as
+JavaScript's
+</ins><code><ins class="diff-new">
+eval()
+</ins></code><ins class="diff-new">
+function.
+It
+is
+</ins><em class="rfc2119" title="recommended"><ins class="diff-new">
+recommended
+</ins></em><ins class="diff-new">
+that
+a
+conforming
+parser
+does
+not
+attempt
+to
+directly
+evaluate
+the
+JSON-LD
+serialization
+and
+instead
+purely
+parse
+the
+input
+into
+a
+language-native
+data
+structure.
+</ins></dd><dt><ins class="diff-new">
+Interoperability
+considerations:
+</ins></dt><dd><ins class="diff-new">
+Not
+Applicable
+</ins></dd><dt><ins class="diff-new">
+Published
+specification:
+</ins></dt><dd><ins class="diff-new">
+The
+</ins><a href="http://json-ld/spec/latest/"><ins class="diff-new">
+JSON-LD
+</ins></a><ins class="diff-new">
+specification.
+</ins></dd><dt><ins class="diff-new">
+Applications
+that
+use
+this
+media
+type:
+</ins></dt><dd><ins class="diff-new">
+Any
+programming
+environment
+that
+requires
+the
+exchange
+of
+directed
+graphs.
+Implementations
+of
+JSON-LD
+have
+been
+created
+for
+JavaScript,
+Python,
+Ruby,
+PHP
+and
+C++.
+</ins></dd><dt><ins class="diff-new">
+Additional
+information:
+</ins></dt><dd><dl><dt><ins class="diff-new">
+Magic
+number(s):
+</ins></dt><dd><ins class="diff-new">
+Not
+Applicable
+</ins></dd><dt><ins class="diff-new">
+File
+extension(s):
+</ins></dt><dd>.jsonld</dd><dt><ins class="diff-new">
+Macintosh
+file
+type
+code(s):
+</ins></dt><dd><ins class="diff-new">
+TEXT
+</ins></dd></dl></dd><dt><ins class="diff-new">
+Person
+&
+email
+address
+to
+contact
+for
+further
+information:
+</ins></dt><dd><ins class="diff-new">
+Manu
+Sporny
+</ins><msporny@digitalbazaar.com></dd><dt><ins class="diff-new">
+Intended
+usage:
+</ins></dt><dd><ins class="diff-new">
+Common
+</ins></dd><dt><ins class="diff-new">
+Restrictions
+on
+usage:
+</ins></dt><dd><ins class="diff-new">
+None
+</ins></dd><dt><ins class="diff-new">
+Author(s):
+</ins></dt><dd><ins class="diff-new">
+Manu
+Sporny,
+Gregg
+Kellogg,
+Dave
+Longley
+</ins></dd><dt><ins class="diff-new">
+Change
+controller:
+</ins></dt><dd><ins class="diff-new">
+W3C
+</ins></dd></dl></div>
+<div class="appendix section" id="acknowledgements">
+<h2>
+<span class="secno">
+<del class="diff-old">A.5
+</del>
+<ins class="diff-chg">E.
+</ins>
+</span>
+Acknowledgements
+</h2>
+<p>
+The
+editors
+would
+like
+to
+thank
+Mark
+Birbeck,
+who
+provided
+a
+great
+deal
+of
+the
+initial
+push
+behind
+the
+JSON-LD
+work
+via
+his
+work
+on
+RDFj,
+Dave
+Longley,
+Dave
+Lehn
+and
+Mike
+Johnson
+who
+reviewed,
+provided
+feedback,
+and
+performed
+several
+implementations
+of
+the
+specification,
+and
+Ian
+Davis,
+who
+created
+RDF/JSON.
+Thanks
+also
+to
+Nathan
+Rixham,
+Bradley
+P.
+Allen,
+Kingsley
+Idehen,
+Glenn
+McDonald,
+Alexandre
+Passant,
+Danny
+Ayers,
+Ted
+Thibodeau
+Jr.,
+Olivier
+Grisel,
+Niklas
+Lindström,
+Markus
+Lanthaler,
+and
+Richard
+Cyganiak
+for
+their
+input
+on
+the
+specification.
+Another
+huge
+thank
+you
+goes
+out
+to
+Dave
+Longley
+who
+designed
+many
+of
+the
+algorithms
+used
+in
+this
+specification,
+including
+the
+normalization
+algorithm
+which
+was
+a
+monumentally
+difficult
+design
+challenge.
+</p>
+</div>
+<div id="references" class="appendix section">
+<h2>
+<span class="secno">
+<del class="diff-old">B.
+</del>
+<ins class="diff-chg">F.
+</ins>
+</span>
+References
+</h2>
+<div id="normative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">B.1
+</del>
+<ins class="diff-chg">F.1
+</ins>
+</span>
+Normative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-BCP47">
+[BCP47]
+</dt>
+<dd>
+A.
+Phillips,
+M.
+Davis.
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+<cite>
+Tags
+for
+Identifying
+Languages
+</cite>
+</a>
+September
+2009.
+IETF
+Best
+Current
+Practice.
+URL:
+<a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">
+http://tools.ietf.org/rfc/bcp/bcp47.txt
+</a>
+</dd>
+<dt id="bib-RDF-CONCEPTS">
+[RDF-CONCEPTS]
+</dt>
+<dd>
+Graham
+Klyne;
+Jeremy
+J.
+Carroll.
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+<cite>
+Resource
+Description
+Framework
+(RDF):
+Concepts
+and
+Abstract
+Syntax.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">
+http://www.w3.org/TR/2004/REC-rdf-concepts-20040210
+</a>
+</dd>
+<dt id="bib-RFC3986">
+[RFC3986]
+</dt>
+<dd>
+T.
+Berners-Lee;
+R.
+Fielding;
+L.
+Masinter.
+<a href="http://www.ietf.org/rfc/rfc3986.txt">
+<cite>
+Uniform
+Resource
+Identifier
+(URI):
+Generic
+Syntax.
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3986.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3986.txt">
+http://www.ietf.org/rfc/rfc3986.txt
+</a>
+</dd>
+<dt id="bib-RFC3987">
+[RFC3987]
+</dt>
+<dd>
+M.
+Dürst;
+M.
+Suignard.
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+<cite>
+Internationalized
+Resource
+Identifiers
+(IRIs).
+</cite>
+</a>
+January
+2005.
+Internet
+RFC
+3987.
+URL:
+<a href="http://www.ietf.org/rfc/rfc3987.txt">
+http://www.ietf.org/rfc/rfc3987.txt
+</a>
+</dd>
+<dt id="bib-RFC4627">
+[RFC4627]
+</dt>
+<dd>
+D.
+Crockford.
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+<cite>
+The
+application/json
+Media
+Type
+for
+JavaScript
+Object
+Notation
+(JSON)
+</cite>
+</a>
+July
+2006.
+Internet
+RFC
+4627.
+URL:
+<a href="http://www.ietf.org/rfc/rfc4627.txt">
+http://www.ietf.org/rfc/rfc4627.txt
+</a>
+</dd>
+<dt id="bib-WEBIDL">
+[WEBIDL]
+</dt>
+<dd>
+Cameron
+McCormack.
+<a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">
+<cite>
+Web
+IDL.
+</cite>
+</a>
+19
+December
+2008.
+W3C
+Working
+Draft.
+(Work
+in
+progress.)
+URL:
+<a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">
+http://www.w3.org/TR/2008/WD-WebIDL-20081219
+</a>
+</dd>
+</dl>
+</div>
+<div id="informative-references" class="section">
+<h3>
+<span class="secno">
+<del class="diff-old">B.2
+</del>
+<ins class="diff-chg">F.2
+</ins>
+</span>
+Informative
+references
+</h3>
+<dl class="bibliography">
+<dt id="bib-ECMA-262">
+[ECMA-262]
+</dt>
+<dd>
+<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
+<cite>
+ECMAScript
+Language
+Specification,
+Third
+Edition.
+</cite>
+</a>
+December
+1999.
+URL:
+<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">
+http://www.ecma-international.org/publications/standards/Ecma-262.htm
+</a>
+</dd>
+<dt id="bib-MICRODATA">
+[MICRODATA]
+</dt>
+<dd>
+Ian
+Hickson;
+et
+al.
+<a href="http://www.w3.org/TR/microdata/">
+<cite>
+Microdata
+</cite>
+</a>
+04
+March
+2010.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/microdata/">
+http://www.w3.org/TR/microdata/
+</a>
+</dd>
+<dt id="bib-MICROFORMATS">
+[MICROFORMATS]
+</dt>
+<dd>
+<a href="http://microformats.org">
+<cite>
+Microformats
+</cite>
+</a>.
+URL:
+<a href="http://microformats.org">
+http://microformats.org
+</a>
+</dd>
+<dt id="bib-RDF-SCHEMA">
+[RDF-SCHEMA]
+</dt>
+<dd>
+Dan
+Brickley;
+Ramanathan
+V.
+Guha.
+<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
+<cite>
+RDF
+Vocabulary
+Description
+Language
+1.0:
+RDF
+Schema.
+</cite>
+</a>
+10
+February
+2004.
+W3C
+Recommendation.
+URL:
+<a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">
+http://www.w3.org/TR/2004/REC-rdf-schema-20040210
+</a>
+</dd>
+<dt id="bib-RDFA-CORE">
+[RDFA-CORE]
+</dt>
+<dd>
+Shane
+McCarron;
+et
+al.
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+<cite>
+RDFa
+Core
+1.1:
+Syntax
+and
+processing
+rules
+for
+embedding
+RDF
+through
+attributes.
+</cite>
+</a>
+31
+March
+2011.
+W3C
+Working
+Draft.
+URL:
+<a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">
+http://www.w3.org/TR/2011/WD-rdfa-core-20110331
+</a>
+</dd>
+<dt id="bib-TURTLE">
+[TURTLE]
+</dt>
+<dd>
+David
+Beckett,
+Tim
+Berners-Lee.
+<a href="http://www.w3.org/TeamSubmission/turtle/">
+<cite>
+Turtle:
+Terse
+RDF
+Triple
+Language.
+</cite>
+</a>
+January
+2008.
+W3C
+Team
+Submission.
+URL:
+<a href="http://www.w3.org/TeamSubmission/turtle/">
+http://www.w3.org/TeamSubmission/turtle/
+</a>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110911/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4350 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>JSON-LD 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!-- 
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+   -->
+
+
+
+<style>
+.diff { font-weight:bold; color:#0a3; }
+ol.algorithm.update { margin-left: 2em; }
+ol.algorithm.update>li { list-style-type: none; }
+ol.algorithm.update>li>span.list-number {
+  display:block;
+  float: left;
+  margin-left: -3.5em;
+}
+</style>
+<style type="text/css">
+/*****************************************************************
+ * ReSpec CSS
+ * Robin Berjon (robin at berjon dot com)
+ * v0.05 - 2009-07-31
+ *****************************************************************/
+
+
+/* --- INLINES --- */
+em.rfc2119 { 
+    text-transform:     lowercase;
+    font-variant:       small-caps;
+    font-style:         normal;
+    color:              #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+    border: none;
+}
+
+dfn {
+    font-weight:    bold;
+}
+
+a.internalDFN {
+    color:  inherit;
+    border-bottom:  1px solid #99c;
+    text-decoration:    none;
+}
+
+a.externalDFN {
+    color:  inherit;
+    border-bottom:  1px dotted #ccc;
+    text-decoration:    none;
+}
+
+a.bibref {
+    text-decoration:    none;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- WEB IDL --- */
+pre.idl {
+    border-top: 1px solid #90b8de;
+    border-bottom: 1px solid #90b8de;
+    padding:    1em;
+    line-height:    120%;
+}
+
+pre.idl::before {
+    content:    "WebIDL";
+    display:    block;
+    width:      150px;
+    background: #90b8de;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+.idlType {
+    color:  #ff4500;
+    font-weight:    bold;
+    text-decoration:    none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName {
+    font-style: italic;
+}
+
+.extAttr {
+    color:  #666;
+}
+
+/*.idlConst*/
+.idlConstType {
+    color:  #005a9c;
+}
+.idlConstName {
+    color:  #ff4500;
+}
+.idlConstName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+    font-weight:    bold;
+    color:  #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+    color:  #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+    color:  #c00;
+    font-weight:    normal;
+}
+
+.excName a {
+    font-family:    monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+    border-bottom:  1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+    width:  45px;
+    text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color:  #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color:  #c00; }
+
+.idlImplements a {
+    font-weight:    bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.fields {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code {
+    color:  #005a9c;
+    background:  transparent;
+    font-family:    inherit;
+    font-weight:    normal;
+    font-style: italic;
+}
+
+.methods dt code {
+    background:  #d9e6f8;
+}
+
+.constants dt code {
+    background:  #ddffd2;
+}
+
+.attributes dd, .methods dd, .constants dd, .fields dd {
+    margin-bottom:  1em;
+}
+
+table.parameters, table.exceptions {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    margin: 0.5em 0;
+    width:  100%;
+}
+table.parameters { border-bottom:  1px solid #90b8de; }
+table.exceptions { border-bottom:  1px solid #deb890; }
+
+.parameters th, .exceptions th {
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+    font-family:    initial;
+    font-weight:    normal;
+    text-shadow:    #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+    vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+    border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+    width:  100px;
+}
+
+.parameters td.prmType {
+    width:  120px;
+}
+
+table.exceptions table {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    width:  100%;
+}
+
+/* --- TOC --- */
+.toc a {
+    text-decoration:    none;
+}
+
+a .secno {
+    color:  #000;
+}
+
+/* --- TABLE --- */
+table.simple {
+    border-spacing: 0;
+    border-collapse:    collapse;
+    border-bottom:  3px solid #005a9c;
+}
+
+.simple th {
+    background: #005a9c;
+    color:  #fff;
+    padding:    3px 5px;
+    text-align: left;
+}
+
+.simple th[scope="row"] {
+    background: inherit;
+    color:  inherit;
+    border-top: 1px solid #ddd;
+}
+
+.simple td {
+    padding:    3px 10px;
+    border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+    background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+    margin-top: 0;
+}
+
+.section dd > p:last-child {
+    margin-bottom: 0;
+}
+
+.section dd {
+    margin-bottom:  1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+    margin-bottom:  0;
+}
+
+/* --- EXAMPLES --- */
+pre.example {
+    border-top: 1px solid #ff4500;
+    border-bottom: 1px solid #ff4500;
+    padding:    1em;
+    margin-top: 1em;
+}
+
+pre.example::before {
+    content:    "Example";
+    display:    block;
+    width:      150px;
+    background: #ff4500;
+    color:  #fff;
+    font-family:    initial;
+    padding:    3px;
+    font-weight:    bold;
+    margin: -1em 0 1em -1em;
+}
+
+/* --- EDITORIAL NOTES --- */
+.issue {
+    padding:    1em;
+    margin: 1em 0em 0em;
+    border: 1px solid #f00;
+    background: #ffc;
+}
+
+.issue::before {
+    content:    "Issue";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #f00;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+.note {
+    margin: 1em 0em 0em;
+    padding:    1em;
+    border: 2px solid #cff6d9;
+    background: #e2fff0;
+}
+
+.note::before {
+    content:    "Note";
+    display:    block;
+    width:  150px;
+    margin: -1.5em 0 0.5em 0;
+    font-weight:    bold;
+    border: 1px solid #cff6d9;
+    background: #fff;
+    padding:    3px 1em;
+}
+
+/* --- Best Practices --- */
+div.practice {
+    border: solid #bebebe 1px;
+    margin: 2em 1em 1em 2em;
+}
+
+span.practicelab {
+    margin: 1.5em 0.5em 1em 1em;
+    font-weight: bold;
+    font-style: italic;
+}
+
+span.practicelab   { background: #dfffff; }
+
+span.practicelab {
+    position: relative;
+    padding: 0 0.5em;
+    top: -1.5em;
+}
+
+p.practicedesc {
+    margin: 1.5em 0.5em 1em 1em;
+}
+
+@media screen {
+    p.practicedesc {
+        position: relative;
+        top: -2em;
+        padding: 0;
+        margin: 1.5em 0.5em -1em 1em;
+    }
+}
+
+/* --- SYNTAX HIGHLIGHTING --- */
+pre.sh_sourceCode {
+  background-color: white;
+  color: black;
+  font-style: normal;
+  font-weight: normal;
+}
+
+pre.sh_sourceCode .sh_keyword { color: #005a9c; font-weight: bold; }           /* language keywords */
+pre.sh_sourceCode .sh_type { color: #666; }                            /* basic types */
+pre.sh_sourceCode .sh_usertype { color: teal; }                             /* user defined types */
+pre.sh_sourceCode .sh_string { color: red; font-family: monospace; }        /* strings and chars */
+pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; }     /* regular expressions */
+pre.sh_sourceCode .sh_specialchar { color: 	#ffc0cb; font-family: monospace; }  /* e.g., \n, \t, \\ */
+pre.sh_sourceCode .sh_comment { color: #A52A2A; font-style: italic; }         /* comments */
+pre.sh_sourceCode .sh_number { color: purple; }                             /* literal numbers */
+pre.sh_sourceCode .sh_preproc { color: #00008B; font-weight: bold; }       /* e.g., #include, import */
+pre.sh_sourceCode .sh_symbol { color: blue; }                            /* e.g., *, + */
+pre.sh_sourceCode .sh_function { color: black; font-weight: bold; }         /* function calls and declarations */
+pre.sh_sourceCode .sh_cbracket { color: red; }                              /* block brackets (e.g., {, }) */
+pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: #00FFFF; }   /* TODO and FIXME */
+
+/* Predefined variables and functions (for instance glsl) */
+pre.sh_sourceCode .sh_predef_var { color: #00008B; }
+pre.sh_sourceCode .sh_predef_func { color: #00008B; font-weight: bold; }
+
+/* for OOP */
+pre.sh_sourceCode .sh_classname { color: teal; }
+
+/* line numbers (not yet implemented) */
+pre.sh_sourceCode .sh_linenum { display: none; }
+
+/* Internet related */
+pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
+
+/* for ChangeLog and Log files */
+pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
+pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: #00008B; font-weight: bold; }
+pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: #006400; }
+
+/* for Prolog, Perl... */
+pre.sh_sourceCode .sh_variable { color: #006400; }
+
+/* for LaTeX */
+pre.sh_sourceCode .sh_italics { color: #006400; font-style: italic; }
+pre.sh_sourceCode .sh_bold { color: #006400; font-weight: bold; }
+pre.sh_sourceCode .sh_underline { color: #006400; text-decoration: underline; }
+pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
+pre.sh_sourceCode .sh_argument { color: #006400; }
+pre.sh_sourceCode .sh_optionalargument { color: purple; }
+pre.sh_sourceCode .sh_math { color: orange; }
+pre.sh_sourceCode .sh_bibtex { color: blue; }
+
+/* for diffs */
+pre.sh_sourceCode .sh_oldfile { color: orange; }
+pre.sh_sourceCode .sh_newfile { color: #006400; }
+pre.sh_sourceCode .sh_difflines { color: blue; }
+
+/* for css */
+pre.sh_sourceCode .sh_selector { color: purple; }
+pre.sh_sourceCode .sh_property { color: blue; }
+pre.sh_sourceCode .sh_value { color: #006400; font-style: italic; }
+
+/* other */
+pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
+pre.sh_sourceCode .sh_paren { color: red; }
+pre.sh_sourceCode .sh_attribute { color: #006400; }
+
+</style><style type="text/css">ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
+</style><link href="http://www.w3.org/StyleSheets/TR/w3c-unofficial" rel="stylesheet" type="text/css" charset="utf-8" /></head>
+
+<body style="display: inherit; "><div class="head"><p></p><h1 class="title" id="title">JSON-LD 1.0</h1><h2 id="subtitle">A Context-based JSON Serialization for Linking Data</h2><h2 id="unofficial-draft-12-september-2011">Unofficial Draft 12 September 2011</h2><dl><dt>Editors:</dt><dd><a href="http://manu.sporny.org/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
+<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dt>Authors:</dt><dd><a href="http://digitalbazaar.com/">Manu Sporny</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://greggkellogg.net/">Gregg Kellogg</a>, Kellogg Associates</dd>
+<dd><a href="http://digitalbazaar.com/">Dave Longley</a>, <a href="http://digitalbazaar.com/">Digital Bazaar</a></dd>
+<dd><a href="http://webbackplane.com/">Mark Birbeck</a>, <a href="http://webbackplane.com/">Backplane Ltd.</a></dd>
+</dl><p>This document is also available in this non-normative format: <a href="diff-20110817.html">diff to previous version</a>.</p><p class="copyright">This document is licensed under a <a class="subfoot" href="http://creativecommons.org/licenses/by/3.0/" rel="license">Creative Commons Attribution 3.0 License</a>.</p><hr /></div>
+<div id="abstract" class="introductory section"><h2>Abstract</h2>
+<p>
+JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] has proven to be a highly useful object serialization and
+messaging format. In an attempt to harmonize the representation of Linked Data
+in JSON, this specification outlines a common JSON representation format for
+expressing directed graphs; mixing both Linked Data and non-Linked Data in
+a single document.
+</p>
+</div><div id="sotd" class="introductory section"><h2>Status of This Document</h2><p>This document is merely a public working draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organisation.</p>
+<p>This document is an experimental work in progress.</p>
+
+<!--  <p>
+This document has been reviewed by W3C Members, by software
+developers, and by other W3C groups and interested parties, and is
+endorsed by the Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited from another
+document. W3C's role in making the Recommendation is to draw attention
+to the specification and to promote its widespread deployment. This
+enhances the functionality and interoperability of the Web.
+</p>  -->
+
+</div><div id="toc" class="section"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a><ul class="toc"><li class="tocline"><a href="#how-to-read-this-document" class="tocxref"><span class="secno">1.1 </span>How to Read this Document</a></li><li class="tocline"><a href="#contributing" class="tocxref"><span class="secno">1.2 </span>Contributing</a></li></ul></li><li class="tocline"><a href="#design" class="tocxref"><span class="secno">2. </span>Design</a><ul class="toc"><li class="tocline"><a href="#goals-and-rationale" class="tocxref"><span class="secno">2.1 </span>Goals and Rationale</a></li><li class="tocline"><a href="#linked-data" class="tocxref"><span class="secno">2.2 </span>Linked Data</a></li><li class="tocline"><a href="#linking-data" class="tocxref"><span class="secno">2.3 </span>Linking Data</a></li><li class="tocline"><a href="#the-context" class="tocxref"><span class="secno">2.4 </span>The Context</a></li><li class="tocline"><a href="#from-json-to-json-ld" class="tocxref"><span class="secno">2.5 </span>From JSON to JSON-LD</a></li></ul></li><li class="tocline"><a href="#basic-concepts" class="tocxref"><span class="secno">3. </span>Basic Concepts</a><ul class="toc"><li class="tocline"><a href="#iris" class="tocxref"><span class="secno">3.1 </span>IRIs</a></li><li class="tocline"><a href="#identifying-the-subject" class="tocxref"><span class="secno">3.2 </span>Identifying the Subject</a></li><li class="tocline"><a href="#specifying-the-type" class="tocxref"><span class="secno">3.3 </span>Specifying the Type</a></li><li class="tocline"><a href="#strings" class="tocxref"><span class="secno">3.4 </span>Strings</a></li><li class="tocline"><a href="#string-internationalization" class="tocxref"><span class="secno">3.5 </span>String Internationalization</a></li><li class="tocline"><a href="#datatypes" class="tocxref"><span class="secno">3.6 </span>Datatypes</a></li><li class="tocline"><a href="#multiple-objects-for-a-single-property" class="tocxref"><span class="secno">3.7 </span>Multiple Objects for a Single Property</a></li><li class="tocline"><a href="#multiple-typed-literals-for-a-single-property" class="tocxref"><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</a></li><li class="tocline"><a href="#expansion" class="tocxref"><span class="secno">3.9 </span>Expansion</a></li><li class="tocline"><a href="#compaction" class="tocxref"><span class="secno">3.10 </span>Compaction</a></li><li class="tocline"><a href="#framing" class="tocxref"><span class="secno">3.11 </span>Framing</a></li></ul></li><li class="tocline"><a href="#advanced-concepts" class="tocxref"><span class="secno">4. </span>Advanced Concepts</a><ul class="toc"><li class="tocline"><a href="#vocabulary-prefixes" class="tocxref"><span class="secno">4.1 </span>Vocabulary Prefixes</a></li><li class="tocline"><a href="#automatic-typing" class="tocxref"><span class="secno">4.2 </span>Automatic Typing</a></li><li class="tocline"><a href="#type-coercion" class="tocxref"><span class="secno">4.3 </span>Type Coercion</a></li><li class="tocline"><a href="#chaining" class="tocxref"><span class="secno">4.4 </span>Chaining</a></li><li class="tocline"><a href="#identifying-unlabeled-nodes" class="tocxref"><span class="secno">4.5 </span>Identifying Unlabeled Nodes</a></li><li class="tocline"><a href="#aliasing-keywords" class="tocxref"><span class="secno">4.6 </span>Aliasing Keywords</a></li><li class="tocline"><a href="#normalization" class="tocxref"><span class="secno">4.7 </span>Normalization</a></li></ul></li><li class="tocline"><a href="#the-application-programming-interface" class="tocxref"><span class="secno">5. </span>The Application Programming Interface</a><ul class="toc"><li class="tocline"><a href="#jsonldprocessor" class="tocxref"><span class="secno">5.1 </span>JsonLdProcessor</a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">5.1.1 </span>Methods</a></li></ul></li><li class="tocline"><a href="#jsonldtriplecallback" class="tocxref"><span class="secno">5.2 </span>JsonLdTripleCallback</a><ul class="toc"><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">5.2.1 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">6. </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#syntax-tokens-and-keywords" class="tocxref"><span class="secno">6.1 </span>Syntax Tokens and Keywords</a></li><li class="tocline"><a href="#algorithm-terms" class="tocxref"><span class="secno">6.2 </span>Algorithm Terms</a></li><li class="tocline"><a href="#context-1" class="tocxref"><span class="secno">6.3 </span>Context</a><ul class="toc"><li class="tocline"><a href="#coerce" class="tocxref"><span class="secno">6.3.1 </span>Coerce</a></li><li class="tocline"><a href="#initial-context" class="tocxref"><span class="secno">6.3.2 </span>Initial Context</a></li></ul></li><li class="tocline"><a href="#iri-expansion" class="tocxref"><span class="secno">6.4 </span>IRI Expansion</a></li><li class="tocline"><a href="#iri-compaction" class="tocxref"><span class="secno">6.5 </span>IRI Compaction</a></li><li class="tocline"><a href="#value-expansion" class="tocxref"><span class="secno">6.6 </span>Value Expansion</a></li><li class="tocline"><a href="#value-compaction" class="tocxref"><span class="secno">6.7 </span>Value Compaction</a></li><li class="tocline"><a href="#expansion-1" class="tocxref"><span class="secno">6.8 </span>Expansion</a><ul class="toc"><li class="tocline"><a href="#expansion-algorithm" class="tocxref"><span class="secno">6.8.1 </span>Expansion Algorithm</a></li></ul></li><li class="tocline"><a href="#compaction-1" class="tocxref"><span class="secno">6.9 </span>Compaction</a><ul class="toc"><li class="tocline"><a href="#compaction-algorithm" class="tocxref"><span class="secno">6.9.1 </span>Compaction Algorithm</a></li></ul></li><li class="tocline"><a href="#framing-1" class="tocxref"><span class="secno">6.10 </span>Framing</a><ul class="toc"><li class="tocline"><a href="#framing-algorithm-terms" class="tocxref"><span class="secno">6.10.1 </span>Framing Algorithm Terms</a></li><li class="tocline"><a href="#framing-algorithm" class="tocxref"><span class="secno">6.10.2 </span>Framing Algorithm</a></li></ul></li><li class="tocline"><a href="#normalization-1" class="tocxref"><span class="secno">6.11 </span>Normalization</a><ul class="toc"><li class="tocline"><a href="#normalization-algorithm-terms" class="tocxref"><span class="secno">6.11.1 </span>Normalization Algorithm Terms</a></li><li class="tocline"><a href="#normalization-state" class="tocxref"><span class="secno">6.11.2 </span>Normalization State</a></li><li class="tocline"><a href="#normalization-algorithm" class="tocxref"><span class="secno">6.11.3 </span>Normalization Algorithm</a></li><li class="tocline"><a href="#node-relabeling-algorithm" class="tocxref"><span class="secno">6.11.4 </span>Node Relabeling Algorithm</a></li><li class="tocline"><a href="#deterministic-labeling-algorithm" class="tocxref"><span class="secno">6.11.5 </span>Deterministic Labeling Algorithm</a></li><li class="tocline"><a href="#shallow-comparison-algorithm" class="tocxref"><span class="secno">6.11.6 </span>Shallow Comparison Algorithm</a></li><li class="tocline"><a href="#object-comparison-algorithm" class="tocxref"><span class="secno">6.11.7 </span>Object Comparison Algorithm</a></li><li class="tocline"><a href="#deep-comparison-algorithm" class="tocxref"><span class="secno">6.11.8 </span>Deep Comparison Algorithm</a></li><li class="tocline"><a href="#node-serialization-algorithm" class="tocxref"><span class="secno">6.11.9 </span>Node Serialization Algorithm</a></li><li class="tocline"><a href="#serialization-label-generation-algorithm" class="tocxref"><span class="secno">6.11.10 </span>Serialization Label Generation Algorithm</a></li><li class="tocline"><a href="#combinatorial-serialization-algorithm" class="tocxref"><span class="secno">6.11.11 </span>Combinatorial Serialization Algorithm</a></li><li class="tocline"><a href="#serialization-comparison-algorithm" class="tocxref"><span class="secno">6.11.12 </span>Serialization Comparison Algorithm</a></li><li class="tocline"><a href="#mapping-serialization-algorithm" class="tocxref"><span class="secno">6.11.13 </span>Mapping Serialization Algorithm</a></li><li class="tocline"><a href="#label-serialization-algorithm" class="tocxref"><span class="secno">6.11.14 </span>Label Serialization Algorithm</a></li></ul></li><li class="tocline"><a href="#data-round-tripping" class="tocxref"><span class="secno">6.12 </span>Data Round Tripping</a></li><li class="tocline"><a href="#rdf-conversion" class="tocxref"><span class="secno">6.13 </span>RDF Conversion</a><ul class="toc"><li class="tocline"><a href="#overview" class="tocxref"><span class="secno">6.13.1 </span>Overview</a></li><li class="tocline"><a href="#rdf-conversion-algorithm-terms" class="tocxref"><span class="secno">6.13.2 </span>RDF Conversion Algorithm Terms</a></li><li class="tocline"><a href="#rdf-conversion-algorithm" class="tocxref"><span class="secno">6.13.3 </span>RDF Conversion Algorithm</a></li></ul></li></ul></li><li class="tocline"><a href="#experimental-concepts" class="tocxref"><span class="secno">A. </span>Experimental Concepts</a><ul class="toc"><li class="tocline"><a href="#disjoint-graphs" class="tocxref"><span class="secno">A.1 </span>Disjoint Graphs</a></li><li class="tocline"><a href="#lists" class="tocxref"><span class="secno">A.2 </span>Lists</a><ul class="toc"><li class="tocline"><a href="#expansion-2" class="tocxref"><span class="secno">A.2.1 </span>Expansion</a></li><li class="tocline"><a href="#normalization-2" class="tocxref"><span class="secno">A.2.2 </span>Normalization</a></li><li class="tocline"><a href="#rdf-conversion-1" class="tocxref"><span class="secno">A.2.3 </span>RDF Conversion</a></li></ul></li></ul></li><li class="tocline"><a href="#markup-examples" class="tocxref"><span class="secno">B. </span>Markup Examples</a><ul class="toc"><li class="tocline"><a href="#rdfa" class="tocxref"><span class="secno">B.1 </span>RDFa</a></li><li class="tocline"><a href="#microformats" class="tocxref"><span class="secno">B.2 </span>Microformats</a></li><li class="tocline"><a href="#microdata" class="tocxref"><span class="secno">B.3 </span>Microdata</a></li></ul></li><li class="tocline"><a href="#mashing-up-vocabularies" class="tocxref"><span class="secno">C. </span>Mashing Up Vocabularies</a></li><li class="tocline"><a href="#iana-considerations" class="tocxref"><span class="secno">D. </span>IANA Considerations</a></li><li class="tocline"><a href="#acknowledgements" class="tocxref"><span class="secno">E. </span>Acknowledgements</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">F. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">F.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">F.2 </span>Informative references</a></li></ul></li></ul></div>
+
+
+
+<div id="introduction" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">1. </span>Introduction</h2>
+
+<p>
+JSON, as specified in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>], is a simple language for representing
+data on the Web. Linked Data is a technique for creating a graph of interlinked data across
+different
+documents or Web sites. Data entities are described using <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s,
+which are typically dereferencable and thus may be used to find more
+information about an entity, creating a "Web of Knowledge". JSON-LD is intended to be a simple
+publishing method for expressing not only Linked Data in JSON, but also for adding
+semantics to existing JSON.
+</p>
+
+<p>
+JSON-LD is designed as a light-weight syntax that can be used to express
+Linked Data. It is primarily intended to be a way to use Linked Data
+in Javascript and other Web-based programming environments. It is also
+useful when building interoperable Web services and when storing Linked
+Data in JSON-based document storage engines. It is practical and designed
+to be as simple as possible, utilizing the large number of JSON parsers
+and libraries available today. It is designed to be able to
+express key-value pairs, RDF data, RDFa [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>] data, Microformats
+[<cite><a class="bibref" rel="biblioentry" href="#bib-MICROFORMATS">MICROFORMATS</a></cite>] data, and Microdata [<cite><a class="bibref" rel="biblioentry" href="#bib-MICRODATA">MICRODATA</a></cite>]. That is, it supports
+every major Web-based structured data model in use today.
+</p>
+
+<p>
+The syntax does not necessarily require applications to change their JSON, but
+allows to easily add meaning by adding context in a way that is either in-band or
+out-of-band. The syntax is designed to not disturb already deployed systems
+running on JSON, but provide a smooth upgrade path from JSON to JSON with
+added semantics. Finally, the format is intended to be easy to parse, efficient to
+generate, stream-based and document-based processing compatible, and require
+a very small memory footprint in order to operate.
+</p>
+
+<div id="how-to-read-this-document" class="section">
+<h3><span class="secno">1.1 </span>How to Read this Document</h3>
+
+<p>
+This document is a detailed specification for a serialization of Linked
+Data in JSON. The document is primarily intended for the following audiences:
+</p>
+
+<ul>
+  <li>Web developers that want to understand the design decisions and
+  language syntax for JSON-LD.</li>
+  <li>Software developers that want to encode Microformats, RDFa, or Microdata
+  in a way that is cross-language compatible via JSON.</li>
+  <li>Software developers that want to implement processors and APIs for
+  JSON-LD.</li>
+</ul>
+
+<p>
+To understand the basics in this specification you must first be familiar with
+JSON, which is detailed in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>]. To understand the API and how it is
+intended to operate  in a programming environment, it is useful to have working
+knowledge of the JavaScript programming language [<cite><a class="bibref" rel="biblioentry" href="#bib-ECMA-262">ECMA-262</a></cite>] and
+WebIDL [<cite><a class="bibref" rel="biblioentry" href="#bib-WEBIDL">WEBIDL</a></cite>]. To understand how JSON-LD maps to RDF, it is helpful to be
+familiar with the basic RDF concepts [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-CONCEPTS">RDF-CONCEPTS</a></cite>].</p>
+
+<p>
+  Examples may contain references to existing vocabularies and use <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es to refer to Web Vocabularies. The following is a list of all vocabularies and their <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> abbreviations, as used in this document:
+</p>
+<ul>
+  <li>The <a href="http://purl.org/dc/terms/">Dublin Core</a>
+  vocabulary (abbreviation: <code>dc</code>, e.g., <code>dc:title</code>)</li>
+  <li>The <a href="http://xmlns.com/foaf/0.1/">Friend of a Friend</a>
+  vocabulary (abbreviation: <code>foaf</code>, e.g., <code>foaf:knows</code>)</li>
+  <li>The <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">RDF</a>
+  vocabulary (abbreviation: <code>rdf</code>, e.g., <code>rdf:type</code>)</li>
+  <li>The <a href="http://www.w3.org/2001/XMLSchema#">XSD</a>
+  vocabulary (abbreviation: <code>xsd</code>, e.g., <code>xsd:integer</code>)</li>
+</ul>
+
+<p>
+  JSON [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC4627">RFC4627</a></cite>] defines several terms which are used throughout this document:
+  </p><dl>
+    <dt><dfn title="JSON_Object" id="dfn-json_object">JSON Object</dfn></dt><dd>
+      An object structure is represented as a pair of curly brackets surrounding zero or
+      more name/value pairs (or members). A name is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>. A single colon comes after
+      each name, separating the name from the value. A single comma separates a value
+      from a following name. The names within an object <em class="rfc2119" title="should">should</em> be unique.
+    </dd>
+    <dt><dfn title="array" id="dfn-array">array</dfn></dt>
+    <dd>
+      An array is an ordered collection of values. An array structure is represented as square brackets surrounding zero or more values (or elements). Elements are separated by commas.  Within JSON-LD, array order is not preserved by default, unless
+      specific markup is provided (see <a href="#lists">Lists</a>). This is because the basic data model of JSON-LD
+      is a directed <a class="tref" title="graph">graph</a>, which is inherently unordered.
+    </dd>
+    <dt><dfn title="string" id="dfn-string">string</dfn></dt><dd>
+      A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A
+      character is represented as a single character string.
+    </dd>
+    <dt><dfn title="number" id="dfn-number">number</dfn></dt>
+    <dd>
+      A number is is similar to that used in most programming languages, except that the octal and hexadecimal formats are not used and that leading zeros are not allowed.</dd>
+    <dt><dfn title="true" id="dfn-true">true</dfn> and <dfn title="false" id="dfn-false">false</dfn></dt><dd>
+      Boolean values.
+    </dd>
+    <dt><dfn title="null" id="dfn-null">null</dfn></dt><dd>
+      The use of the <em>null</em> value is undefined within JSON-LD.
+      <div class="issue">Supporting <em>null</em> in JSON-LD might have a number of advantages and should be evaluated. This is currently an <a href="https://github.com/json-ld/json-ld.org/issues/11">open issue</a>.</div>
+    </dd>
+  </dl>
+<p></p>
+</div>
+
+<div id="contributing" class="section">
+<h3><span class="secno">1.2 </span>Contributing</h3>
+
+<p>There are a number of ways that one may participate in the development of
+this specification:</p>
+
+<ul>
+<li>Technical discussion typically occurs on the public mailing list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
+</li>
+
+<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held
+on Tuesdays at 1500UTC on the second and fourth week of each month.
+</li>
+
+<li>Specification bugs and issues should be reported in the
+<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
+
+<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the
+specification can be found on Github.</li>
+
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a>
+IRC channel is available for real-time discussion on irc.freenode.net.</li>
+</ul>
+
+</div>
+
+</div>
+
+<div id="design" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">2. </span>Design</h2>
+
+<p>The following section outlines the design goals and rationale behind the
+JSON-LD markup language.
+</p>
+
+<div id="goals-and-rationale" class="section">
+<h3><span class="secno">2.1 </span>Goals and Rationale</h3>
+
+<p>
+A number of design considerations were explored during the creation of this
+markup language:
+</p>
+
+<dl>
+ <dt>Simplicity</dt>
+ <dd>Developers need only know JSON and three keywords to use the basic
+ functionality in JSON-LD. No extra processors or software libraries are
+ necessary to use JSON-LD in its most basic form. The language attempts to
+ ensure that developers have an easy learning curve.</dd>
+ <dt>Compatibility</dt>
+ <dd>The JSON-LD markup must be 100% compatible with JSON. This ensures that
+ all of the standard JSON libraries work seamlessly with JSON-LD documents.</dd>
+ <dt>Expressiveness</dt>
+ <dd>The syntax must be able to express directed graphs, which have been proven
+ to be able to simply express almost every real world data model.</dd>
+ <dt>Terseness</dt>
+ <dd>The JSON-LD syntax must be very terse and human readable, requiring as
+ little as possible effort from the developer.</dd>
+ 
+<!-- <dt>Pragmatism</dt>
+ <dd>Mixing the expression of pure Linked Data with data that is not
+ linked was an approach that was driven by pragmatism. JSON-LD attempts to be
+ more practical than theoretical in its approach to Linked Data.</dd> -->
+
+ <dt>Zero Edits, most of the time</dt>
+ <dd>JSON-LD provides a mechanism that allows developers to specify
+ context in a way that is out-of-band. This allows organizations that have
+ already deployed large JSON-based infrastructure to add meaning to their
+ JSON documents in a way that is not disruptive to their day-to-day operations and is
+ transparent to their current customers. At times, mapping JSON to
+ a graph representation can become difficult. In these instances, rather than
+ having JSON-LD support esoteric markup, we chose not to support the use case
+ and support a simplified syntax instead. So, while Zero Edits is a goal,
+ it is not always possible without adding great complexity to the language.
+ </dd>
+ <dt>Streaming</dt>
+ <dd>The format supports both document-based and stream-based processing.</dd>
+</dl>
+</div>
+
+<div id="linked-data" class="section">
+<h3><span class="secno">2.2 </span>Linked Data</h3>
+<p>
+The following definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> is the one that will
+be used for this specification.
+</p>
+<ol>
+  <li><dfn title="Linked_Data" id="dfn-linked_data">Linked Data</dfn> is a set of documents, each containing a representation of a linked data graph.</li>
+  <li>A <dfn title="linked_data_graph" id="dfn-linked_data_graph">linked data graph</dfn> is an unordered labeled directed graph, where nodes are <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>s or <a class="tref internalDFN" title="object" href="#dfn-object">object</a>s, and edges are properties.</li>
+  <li>A <dfn title="subject" id="dfn-subject">subject</dfn> is any node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one outgoing edge.</li>
+  <li>A <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a> <em class="rfc2119" title="should">should</em> be labeled with an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a> (an Internationalized Resource Identifier as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>]).</li>
+  <li>An <dfn title="object" id="dfn-object">object</dfn> is a node in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> with at least one incoming edge.</li>
+  <li>An <a class="tref internalDFN" title="object" href="#dfn-object">object</a> <em class="rfc2119" title="may">may</em> be labeled with an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>.</li>
+  <li>An object <em class="rfc2119" title="may">may</em> be a <dfn title="subject" id="dfn-subject-1">subject</dfn> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> at the same time.</li>
+  <li>A <dfn title="property" id="dfn-property">property</dfn> is an edge of the <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a>.</li>
+  <li>A <a class="tref internalDFN" title="property" href="#dfn-property">property</a> <em class="rfc2119" title="should">should</em> be labeled with an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>.</li>
+  <li>An <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a> that is a label in a <a class="tref internalDFN" title="linked_data_graph" href="#dfn-linked_data_graph">linked data graph</a> <em class="rfc2119" title="should">should</em> be dereferencable to a <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> document describing the labeled <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>, <a class="tref internalDFN" title="object" href="#dfn-object">object</a> or <a class="tref internalDFN" title="property" href="#dfn-property">property</a>.</li>
+  <li>A <dfn title="literal" id="dfn-literal">literal</dfn> is an <a class="tref internalDFN" title="object" href="#dfn-object">object</a> with a label that is not an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a></li>
+</ol>
+
+<p>
+Note that the definition for <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a> above is silent on the
+topic of unlabeled nodes. Unlabeled nodes are not considered
+<a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>. However, this specification allows for the expression
+of unlabled nodes, as most graph-based data sets on the Web contain a number
+of associated nodes that are not named and thus are not directly
+de-referenceable.
+</p>
+</div>
+
+<div id="linking-data" class="section">
+<h3><span class="secno">2.3 </span>Linking Data</h3>
+
+<p>
+An Internationalized Resource Identifier
+(<dfn title="IRI" id="dfn-iri"><abbr title="Internationalized Resource Identifier">IRI</abbr></dfn>),
+as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3987">RFC3987</a></cite>], is a mechanism for representing unique
+identifiers on the web. In <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, an IRI is commonly
+used for expressing a <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>, a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> or an
+<a class="tref internalDFN" title="object" href="#dfn-object">object</a>.
+</p>
+
+<p>JSON-LD defines a mechanism to map JSON terms, i.e., keys and values, to IRIs. This does not mean
+that JSON-LD requires every key or value to be an IRI, but rather ensures that
+keys and values can be mapped to IRIs if the developer desires to transform
+their data into Linked Data. There are a few techniques that can ensure
+that developers will generate good Linked Data for the Web. JSON-LD
+formalizes those techniques.
+</p>
+
+<p>We will be using the following JSON markup as the example for the
+rest of this section:
+</p>
+
+<pre class="example">
+{
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+</div>
+
+<div id="the-context" class="section">
+<h3><span class="secno">2.4 </span>The Context</h3>
+
+<p>In JSON-LD, a context is used to map <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s, i.e., keys and values
+  in an JSON document, to
+  <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s. A <dfn title="term" id="dfn-term">term</dfn> is a short word that <em class="rfc2119" title="may">may</em> be expanded
+to an <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. The Web uses IRIs for unambiguous identification. The 
+idea is that these <a class="tref internalDFN" title="term" href="#dfn-term">term</a>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 <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s to expand to IRIs so that
+developers don't accidentally step on each other's Web Vocabulary terms.
+For example, the term <code>name</code> may map directly to the IRI
+<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to
+be constructed using the common JSON practice of simple name/value pairs while
+ensuring that the data is useful outside of the page, API or database in which it
+resides.
+</p>
+
+<p>These Linked Data <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s are typically collected in a context document that would look something like this:</p>
+
+<pre class="example">
+{
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+}</pre>
+
+<p>This context document can then be used in an JSON-LD document by adding a single line. The JSON markup as shown in the previous section could be changed as follows to link to the context document:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": "http://example.org/json-ld-contexts/person",</span>
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>The addition above transforms the previous JSON document into a JSON document
+with added semantics because the <code>@context</code> specifies how the
+<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong>
+terms map to IRIs.
+Mapping those keys to IRIs gives the data global context. If two
+developers use the same IRI to describe a property, they are more than likely
+expressing the same concept. This allows both developers to re-use each others
+data without having to agree to how their data will inter-operate on a
+site-by-site basis. Contexts may also contain datatype information
+for certain <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s as well as other processing instructions for
+the JSON-LD processor.</p>
+<p>Contexts may be specified in-line. This ensures that JSON-LD documents
+can be processed when a JSON-LD processor does not have access to the Web.</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": {
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": "http://xmlns.com/foaf/0.1/homepage",
+    "avatar": "http://xmlns.com/foaf/0.1/avatar"
+  },</span>
+  "name": "Manu Sporny",
+  "homepage": "http://manu.sporny.org/",
+  "avatar": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>JSON-LD strives to ensure that developers don't have to change the JSON
+  that is going into and being returned from their Web APIs. This means
+  that developers can also specify a context for JSON data in an out-of-band
+  fashion. This is described later in this document. </p>
+
+<p>
+  JSON-LD uses a special type of machine-readable document called a
+  <dfn title="Web_Vocabulary" id="dfn-web_vocabulary">Web Vocabulary</dfn> to define <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s that are then used
+  to describe concepts and "things" in the world.
+  Typically, these Web Vocabulary documents have <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es associated
+  with them and contain a number of <a class="tref internalDFN" title="term" href="#dfn-term">term</a> declarations. A
+  <dfn title="prefix" id="dfn-prefix">prefix</dfn>, like a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, is a short word that expands
+  to a Web Vocabulary base IRI. <a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">Prefix</a>es are helpful when a developer
+  wants to mix multiple vocabularies together in a context, but does not want
+  to go to the trouble of defining every single term in every single vocabulary.
+  Some Web Vocabularies may have dozens of terms defined. If a developer wants to use
+  3-4 different vocabularies, the number of terms that
+  would have to be declared in a single context could become quite large. To
+  reduce the number of different terms that must be defined, JSON-LD also allows
+  prefixes to be used to compact IRIs.
+</p><p>
+
+</p><p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code>
+specifies a <a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a> which may be represented using the
+<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>. The <code>foaf</code> Web Vocabulary
+contains a term called <strong>name</strong>. If you join the
+<code>foaf</code> <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> with the <strong>name</strong> suffix,
+you can build a compact IRI that will expand out into an absolute IRI for the
+<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
+That is, the compact IRI, or short-form, is <code>foaf:name</code> and the
+expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary
+term is used to specify a person's name.
+</p>
+
+<p>Developers, and machines, are able to use this IRI (plugging it
+directly into a web browser, for instance) to go to the term and get a
+definition of what the term means. Much like we can use <a href="http://wordnet.princeton.edu/">WordNet</a> today to
+see the definition
+of words in the English language. Developers and machines need the same sort of
+definition of terms. IRIs provide a way to ensure that these terms
+are unambiguous.
+</p>
+
+<p>The context provides a collection of vocabulary <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es that can be used to expand JSON keys and values into
+<a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s.</p>
+
+</div>
+
+<div id="from-json-to-json-ld" class="section">
+<h3><span class="secno">2.5 </span>From JSON to JSON-LD</h3>
+
+<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>,
+and <strong>avatar</strong>,
+are defined in a context, and that context is used to resolve the
+names in JSON objects, machines are able to automatically expand the terms to
+something meaningful and unambiguous, like this:</p>
+
+<pre class="example">
+{
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+  "<span class="diff">http://xmlns.com/foaf/0.1/homepage</span>": "http://manu.sporny.org"
+  "<span class="diff">http://rdfs.org/sioc/ns#avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Doing this allows JSON to be unambiguously machine-readable without
+requiring developers to drastically change their workflow.</p>
+<p class="note">Please note that this JSON-LD document doesn't define the
+subject and will thus result in an unlabeled or blank node.</p>
+
+</div>
+
+</div>
+
+
+
+<div id="basic-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">3. </span>Basic Concepts</h2>
+
+<p>JSON-LD is designed to ensure that Linked Data concepts can be marked
+up in a way that is simple to understand and author by Web developers. In many
+cases, regular JSON markup can become Linked Data with the simple addition
+of a context. As more JSON-LD features are used, more semantics are added
+to the JSON markup.</p>
+
+<div id="iris" class="section">
+<h3><span class="secno">3.1 </span>IRIs</h3>
+
+<p>Expressing IRIs are fundamental to Linked Data as that is how most
+<a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>s and many <a class="tref internalDFN" title="object" href="#dfn-object">object</a> are named. IRIs can be
+expressed in a variety of different ways in JSON-LD.</p>
+
+<ol>
+  <li>In general, <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s in the key position in
+    a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that have a mapping to an IRI or another key in the context are
+    expanded to an IRI by JSON-LD processors. There are special rules for
+    processing keys in <code>@context</code> and when dealing with keys that
+    start with the <code>@subject</code> character.</li>
+  <li>An IRI is generated for the value specified using <code>@subject</code>,
+    if it is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>.</li>
+  <li>An IRI is generated for the value specified using <code>@type</code>.</li>
+  <li>An IRI is generated for the value specified using the <code>@iri</code>
+    keyword.</li>
+  <li>An IRI is generated when there are <code>@coerce</code> rules in
+    effect for a key named <code>@iri</code>.</li>
+</ol>
+
+<p>IRIs can be expressed directly in the key position like so:
+</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p>In the example above, the key
+<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as
+opposed to being interpreted as a string.</p>
+
+<p>Term expansion occurs for IRIs if a term is defined within the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">name</span>": "<span class="diff">http://xmlns.com/foaf/0.1/name</span>"},
+...
+  "<span class="diff">name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">Prefix</a>es are expanded when used in keys:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@context</span>": {"<span class="diff">foaf</span>": "<span class="diff">http://xmlns.com/foaf/0.1/</span>"},
+...
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+...
+}</pre>
+
+<p><code>foaf:name</code> above will automatically expand out to the IRI
+<code>http://xmlns.com/foaf/0.1/name</code>.</p>
+
+<p>An IRI is generated when a value is associated with a key using
+the <code>@iri</code> keyword:</p>
+
+<pre class="example">
+{
+...
+  "homepage": { "<span class="diff">@iri</span>": "http://manu.sporny.org" }
+...
+}</pre>
+
+<p>If type coercion rules are specified in the <code>@context</code> for
+a particular vocabulary term, an IRI is generated:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context":
+  {
+    ...
+    "@coerce":
+    {
+      "@iri": "homepage"
+    }
+  }</span>
+...
+  "homepage": "http://manu.sporny.org/",
+...
+}</pre>
+
+<p>Even though the value <code>http://manu.sporny.org/</code> is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>,
+the type coercion rules will transform the value into an IRI when processed
+by a JSON-LD Processor</p>
+
+</div>
+
+<div id="identifying-the-subject" class="section">
+<h3><span class="secno">3.2 </span>Identifying the Subject</h3>
+
+<p>
+  To be able to externally reference nodes, it is important that each node has an unambiguous identifier.
+  <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>s are a fundamental concept of Linked Data, and nodes should have a de-referencable
+  identifier used to name and locate them. For nodes to be truely linked, de-referencing the identifier
+  should result in a representation of that node. Associating an IRI with a node tells an application
+  that the returned document contains a description of the node requested.
+</p>
+<p>
+  JSON-LD documents may also contain descriptions of other nodes, so it is necessary to be able to
+  uniquely identify each node which may be externally referenced.
+</p>
+<p>A <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>
+   of an object in JSON is declared using the <code>@subject</code> key. The subject is the
+first piece of information needed by the JSON-LD processor in order to
+create the (subject, property, object) tuple, also known as a triple.</p>
+
+<pre class="example">
+{
+...
+  "<span class="diff">@subject</span>": "<span class="diff">http://example.org/people#joebob</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to the IRI
+<code>http://example.org/people#joebob</code>.
+</p>
+
+</div>
+
+<div id="specifying-the-type" class="section">
+<h3><span class="secno">3.3 </span>Specifying the Type</h3>
+
+<p>The type of a particular subject can be specified using the
+<code>@type</code> key. Specifying the type in this way will generate a
+triple of the form (subject, type, type-iri).</p>
+
+<p>To be Linked Data, types <em class="rfc2119" title="must">must</em> be uniquely identified by an
+  <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>.</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "<span class="diff">@type</span>": "<span class="diff">http://xmlns.com/foaf/0.1/Person</span>",
+...
+}</pre>
+
+<p>The example above would generate the following triple if the JSON-LD
+document is mapped to RDF (in N-Triples notation):</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+</div>
+
+<div id="strings" class="section">
+<h3><span class="secno">3.4 </span>Strings</h3>
+
+<p>Regular text strings, also referred to as <dfn title="plain_literal" id="dfn-plain_literal">plain literal</dfn>s, are
+easily expressed using regular JSON <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s.</p>
+
+<pre class="example">
+{
+...
+  "name": "<span class="diff">Mark Birbeck</span>",
+...
+}</pre>
+
+</div>
+
+<div id="string-internationalization" class="section">
+<h3><span class="secno">3.5 </span>String Internationalization</h3>
+
+<p>JSON-LD makes an assumption that strings with associated language encoding
+information are not very common when used in JavaScript and Web Services.
+Thus, it takes a little more effort to express strings with associated
+language information.</p>
+
+<pre class="example">
+{
+...
+  "name": <span class="diff">
+  {
+    "@literal": "花澄",
+    "@language": "ja"
+  }</span>
+...
+}</pre>
+
+<p>The example above would generate a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> for
+<em>花澄</em> and associate the <code>ja</code> language code with the triple
+that is generated. Languages <em class="rfc2119" title="must">must</em> be expressed in [<cite><a class="bibref" rel="biblioentry" href="#bib-BCP47">BCP47</a></cite>] format.</p>
+
+</div>
+
+<div id="datatypes" class="section">
+<h3><span class="secno">3.6 </span>Datatypes</h3>
+
+<p>
+  A value with an associated datatype, also known as a
+  <dfn title="typed_literal" id="dfn-typed_literal">typed literal</dfn>, is indicated by associating a literal with
+  an IRI which indicates the literal's datatype. Typed literals may be
+  expressed in JSON-LD in three ways:
+</p>
+
+<ol>
+  <li>By utilizing the <code>@coerce</code> keyword.</li>
+  <li>By utilizing the expanded form for specifying objects.</li>
+  <li>By using a native JSON datatype.</li>
+</ol>
+
+<p>The first example uses the <code>@coerce</code> keyword to express a
+typed literal:</p>
+
+<pre class="example">
+{<span class="diff">
+  "@context":
+  {
+    "modified":  "http://purl.org/dc/terms/modified",
+    "dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
+    "@coerce":
+    {
+      "dateTime": "modified"
+    }
+  }</span>
+...
+  "modified": "2010-05-29T14:17:39+02:00",
+...
+}</pre>
+
+<p>The second example uses the expanded form for specifying objects:</p>
+
+<pre class="example">
+{
+...
+  "modified": <span class="diff">
+  {
+    "@literal": "2010-05-29T14:17:39+02:00",
+    "@datatype": "dateTime"
+  }</span>
+...
+}</pre>
+
+<p>Both examples above would generate an object with the literal value of
+<code>2010-05-29T14:17:39+02:00</code> and the datatype of
+<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
+
+<p>The third example uses a built-in native JSON type, a
+  <a class="tref internalDFN" title="number" href="#dfn-number">number</a>, to express a datatype:</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "age": <span class="diff">31</span>
+...
+}</pre>
+
+<p>The example above would generate the following triple:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "31"^^&lt;http://www.w3.org/2001/XMLSchema#integer&gt; .</pre>
+
+</div>
+
+<div id="multiple-objects-for-a-single-property" class="section">
+<h3><span class="secno">3.7 </span>Multiple Objects for a Single Property</h3>
+
+<p>A JSON-LD author can express multiple triples in a compact way by using
+<a class="tref internalDFN" title="array" href="#dfn-array">array</a>s. If a subject has multiple values for the same property, the author
+<em class="rfc2119" title="may">may</em> express each property as an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>.</p>
+
+<p class="note">In JSON-LD, multiple objects on a property are not ordered. This is because typically graphs
+are not inherently ordered data structures. To see more on creating ordered collections
+in JSON-LD, see <a href="#lists">Lists</a>.
+</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "joe" .
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "bob" .
+&lt;http://example.org/people#joebob&gt;
+   &lt;http://xmlns.com/foaf/0.1/nick&gt;
+      "jaybee" .</pre>
+
+</div>
+
+<div id="multiple-typed-literals-for-a-single-property" class="section">
+<h3><span class="secno">3.8 </span>Multiple Typed Literals for a Single Property</h3>
+
+<p>Multiple <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s may also be expressed using the expanded
+form for objects:</p>
+
+<pre class="example">
+{
+...
+  "@subject": "http://example.org/articles/8",
+  "modified": <span class="diff">
+  [
+    {
+      "@literal": "2010-05-29T14:17:39+02:00",
+      "@datatype": "dateTime"
+    },
+    {
+      "@literal": "2010-05-30T09:21:28-04:00",
+      "@datatype": "dateTime"
+    }
+  ]</span>
+...
+}</pre>
+
+<p>The markup shown above would generate the following triples:</p>
+
+<pre class="example">
+&lt;http://example.org/articles/8&gt;
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
+&lt;http://example.org/articles/8&gt;
+   &lt;http://purl.org/dc/terms/modified&gt;
+      "2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .</pre>
+
+</div>
+
+<div id="expansion" class="section">
+<h3><span class="secno">3.9 </span>Expansion</h3>
+
+<p>Expansion is the process of taking a JSON-LD document and applying a
+context such that all IRI, datatypes, and literal values are expanded so
+that the context is no longer necessary. JSON-LD document expansion
+is typically used as a part of <a href="#normalization">Framing</a> or
+<a href="#normalization">Normalization</a>.</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">
+{
+   "@context":
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce":
+      {
+         "@iri": "homepage"
+      }
+   },
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/"
+}</pre>
+
+<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document
+provided above would result in the following output:</p>
+
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage":
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}</pre>
+
+</div>
+
+<div id="compaction" class="section">
+<h3><span class="secno">3.10 </span>Compaction</h3>
+
+<p>Compaction is the process of taking a JSON-LD document and applying a
+context such that the most compact form of the document is generated. JSON
+is typically expressed in a very compact, key-value format. That is, full
+IRIs are rarely used as keys. At times, a JSON-LD document may be received
+that is not in its most compact form. JSON-LD, via the API, provides a way
+to compact a JSON-LD document.
+</p>
+
+<p>For example, assume the following JSON-LD input document:</p>
+
+<pre class="example">
+{
+   "http://xmlns.com/foaf/0.1/name": "Manu Sporny",
+   "http://xmlns.com/foaf/0.1/homepage":
+   {
+      "@iri": "http://manu.sporny.org/"
+   }
+}</pre>
+
+<p>Additionally, assume the following developer-supplied JSON-LD context:</p>
+
+<pre class="example">
+{
+   "name": "http://xmlns.com/foaf/0.1/name",
+   "homepage": "http://xmlns.com/foaf/0.1/homepage",
+   "@coerce":
+   {
+      "@iri": "homepage"
+   }
+}</pre>
+
+<p>Running the JSON-LD Compaction algorithm given the context supplied above
+against the JSON-LD input document provided above would result in the following
+output:</p>
+
+<pre class="example">
+{
+   "@context":
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "@coerce":
+      {
+         "@iri": "homepage"
+      }
+   },
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/"
+}</pre>
+
+<p>The compaction algorithm also enables the developer to map any expanded
+format into an application-specific compacted format. While the context
+provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
+<strong>name</strong>, it could have also mapped it to any arbitrary string
+provided by the developer.
+</p>
+
+</div>
+
+<div id="framing" class="section">
+<h3><span class="secno">3.11 </span>Framing</h3>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+directed graph can have many different serializations, each expressing
+exactly the same information. Developers typically work with trees, represented as
+<a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>s. While mapping a graph to
+a tree can be done, the layout of the end result must be specified in advance.
+A <dfn title="Frame" id="dfn-frame">Frame</dfn> can be used by a developer on a JSON-LD document to
+specify a deterministic layout for a graph.
+</p>
+
+<p>Framing is the process of taking a JSON-LD document, which expresses a
+graph of information, and applying a specific graph layout
+(called a <a class="tref internalDFN" title="Frame" href="#dfn-frame">Frame</a>).
+</p>
+
+<p>The JSON-LD document below expresses a library, a book and a chapter:</p>
+
+<pre class="example">
+{
+  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title",
+    "@coerce":
+    {
+      "@iri": "contains"
+    },
+  },
+  "@subject":
+  [{
+    "@subject": "http://example.com/library",
+    "@type": "Library",
+    "contains": "http://example.org/library/the-republic"
+  },
+  {
+    "@subject": "http://example.org/library/the-republic",
+    "@type": "Book",
+    "creator": "Plato",
+    "title": "The Republic",
+    "contains": "http://example.org/library/the-republic#introduction"
+  },
+  {
+    "@subject": "http://example.org/library/the-republic#introduction",
+    "@type": "Chapter",
+    "description": "An introductory chapter on The Republic.",
+    "title": "The Introduction"
+  }]
+}</pre>
+
+<p>Developers typically like to operate on items in a hierarchical, tree-based
+fashion. Ideally, a developer would want the data above sorted into top-level
+libraries, then the books that are contained in each library, and then the
+chapters contained in each book. To achieve that layout, the developer can
+define the following <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>:</p>
+
+<pre class="example">
+{
+  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title"
+  },
+  "@type": "Library",
+  "contains": {
+    "@type": "Book",
+    "contains": {
+      "@type": "Chapter"
+    }
+  }
+}</pre>
+
+<p>When the framing algorithm is run against the previously defined
+JSON-LD document, paired with the <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> above, the following
+JSON-LD document is the end result:</p>
+
+<pre class="example">
+{
+  "@context": {
+    "Book":         "http://example.org/vocab#Book",
+    "Chapter":      "http://example.org/vocab#Chapter",
+    "contains":     "http://example.org/vocab#contains",
+    "creator":      "http://purl.org/dc/terms/creator"
+    "description":  "http://purl.org/dc/terms/description"
+    "Library":      "http://example.org/vocab#Library",
+    "title":        "http://purl.org/dc/terms/title"
+  },
+  "@subject": "http://example.org/library",
+  "@type": "Library",
+  "contains": {
+    <span class="diff">"@subject": "http://example.org/library/the-republic",</span>
+    "@type": "Book",
+    <span class="diff">"creator": "Plato",</span>
+    <span class="diff">"title": "The Republic",</span>
+    "contains": {
+      <span class="diff">"@subject": "http://example.org/library/the-republic#introduction",</span>
+      "@type": "Chapter",
+      <span class="diff">"description": "An introductory chapter on The Republic.",</span>
+      <span class="diff">"title": "The Introduction"</span>
+    },
+  },
+}</pre>
+
+<p>The JSON-LD framing algorithm allows developers to query by example and
+force a specific tree layout to a JSON-LD document.
+</p>
+
+</div>
+
+</div>
+
+<div id="advanced-concepts" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">4. </span>Advanced Concepts</h2>
+
+<p>JSON-LD has a number of features that provide functionality above and beyond
+the core functionality described above. The following sections outline the
+features that are specific to JSON-LD.
+</p>
+
+<div id="vocabulary-prefixes" class="section">
+  <h3><span class="secno">4.1 </span>Vocabulary Prefixes</h3>
+  <p>
+    Vocabulary terms in Linked Data documents may draw from a number of
+    different Web vocabularies. At times, declaring every single term that
+    a document uses can require the developer to declare tens, if not
+    hundreds of potential vocabulary terms that may be used across an
+    application. This is a concern for at least three reasons; the
+    first is the cognitive load on the developer, the second is
+    the serialized size of the context, the third is future-proofing
+    application contexts. In order to address these issues, the concept of a
+    <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> mechanism is introduced.</p>
+  <p>
+    A <dfn title="prefix" id="dfn-prefix-1">prefix</dfn> is a compact way of expressing a base 
+    <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a> to a <a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a>.
+    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
+    hand for the Friend-of-a-Friend Web Vocabulary, which is identified using
+    the IRI <code>http://xmlns.com/foaf/0.1/</code>. A developer may append any of
+    the FOAF Vocabulary terms to the end of the prefix to specify a short-hand
+    version of the full IRI for the vocabulary term. For example,
+    <code>foaf:name</code> would be expanded out to the IRI
+    <code>http://xmlns.com/foaf/0.1/name</code>. Instead of having to remember
+    and type out the entire IRI, the developer can instead use the prefix in
+    their JSON-LD markup.
+  </p>
+  <p>
+    The ability to use <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>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. 
+    <a class="tref internalDFN" title="Prefix" href="#dfn-prefix-1">Prefix</a> also
+    reduce the cognitive load on the developer. It is far easier to
+    remember <code>foaf:name</code> than it is to remember
+    <code>http://xmlns.com/foaf/0.1/name</code>. The use of prefixes also
+    ensures that a context document does not have to be updated in lock-step
+    with an externally defined <a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a>. Without prefixes, a developer
+    would need to keep their application context terms in lock-step with an
+    externally defined Web Vocabulary. Rather, by just declaring the
+    Web Vocabulary prefix, one can use new terms as they're declared
+    without having to update the application's JSON-LD context.
+  </p>
+  <p>Consider the following example:</p>
+  <pre class="example">
+{
+  "@context": {
+    <span class="diff">"dc": "http://purl.org/dc/elements/1.1/",</span>
+    <span class="diff">"ex": "http://example.org/vocab#"</span>
+  },
+  "@subject": "http://example.org/library",
+  "@type": <span class="diff">"ex:Library"</span>,
+  <span class="diff">"ex:contains"</span>: {
+    "@subject": "http://example.org/library/the-republic",
+    "@type": <span class="diff">"ex:Book"</span>,
+    <span class="diff">"dc:creator"</span>: "Plato",
+    <span class="diff">"dc:title"</span>: "The Republic",
+    <span class="diff">"ex:contains"</span>: {
+      "@subject": "http://example.org/library/the-republic#introduction",
+      "@type": <span class="diff">"ex:Chapter"</span>,
+      <span class="diff">"dc:description"</span>: "An introductory chapter on The Republic.",
+      <span class="diff">"dc:title"</span>: "The Introduction"
+    },
+  },
+}</pre>
+  <p>
+    In this example, two different vocabularies are referred to using
+    prefixes. Those prefixes are then used as type and property values using 
+    the <code>prefix:term</code> notation.
+  </p>
+  <p>
+    Prefixes, 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
+    "CURIE Syntax Definition"</a></cite> [<cite><a class="bibref" rel="biblioentry" href="#bib-RDFA-CORE">RDFA-CORE</a></cite>].
+    JSON-LD does not support the square-bracketed CURIE syntax as the
+    mechanism is not required to disambiguate IRIs in a JSON-LD document like
+    it is in HTML documents.
+  </p>
+</div>
+
+<div id="automatic-typing" class="section">
+<h3><span class="secno">4.2 </span>Automatic Typing</h3>
+
+<p>Since JSON is capable of expressing typed information such as doubles,
+integers, and boolean values. As demonstrated below, JSON-LD utilizes that
+information to create <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s:</p>
+
+<pre class="example">
+{
+...
+  // The following two values are automatically converted to a type of xsd:double
+  // and both values are equivalent to each other.
+  "measure:cups": <span class="diff">5.3</span>,
+  "measure:cups": <span class="diff">5.3e0</span>,
+  // The following value is automatically converted to a type of xsd:double as well
+  "space:astronomicUnits": <span class="diff">6.5e73</span>,
+  // The following value should never be converted to a language-native type
+  "measure:stones": <span class="diff">{ "@literal": "4.8", "@datatype": "xsd:decimal" }</span>,
+  // This value is automatically converted to having a type of xsd:integer
+  "chem:protons": <span class="diff">12</span>,
+  // This value is automatically converted to having a type of xsd:boolean
+  "sensor:active": <span class="diff">true</span>,
+...
+}</pre>
+
+<p class="note">When dealing with a number of modern programming languages,
+including JavaScript ECMA-262, there is no distinction between
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is,
+the <a class="tref internalDFN" title="number" href="#dfn-number">number</a> <code>5.3</code> and the <a class="tref internalDFN" title="number" href="#dfn-number">number</a>
+<code>5.3e0</code> are treated as if they were the same. When converting from
+JSON-LD to a language-native format and back, datatype information is lost in a
+number of these languages. Thus, one could say that <code>5.3</code> is a
+<strong>xsd:decimal</strong> and <code>5.3e0</code> is an
+<strong>xsd:double</strong> in JSON-LD, but when both values are
+converted to a language-native format the datatype difference between the two
+is lost because the machine-level representation will almost always be a
+<strong>double</strong>.
+Implementers should be aware of this potential round-tripping issue between
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
+objects with a datatype of <strong>xsd:decimal</strong> <em class="rfc2119" title="must not">must not</em> be converted
+to a language native type.
+</p>
+
+</div>
+
+<div id="type-coercion" class="section">
+<h3><span class="secno">4.3 </span>Type Coercion</h3>
+
+<p>JSON-LD supports the coercion of values to particular data types.
+Type coercion allows someone deploying JSON-LD to coerce the incoming or
+outgoing types to the proper data type based on a mapping of data type IRIs to
+property types. Using type coercion, one may convert simple JSON data to
+properly typed RDF data.</p>
+
+<p>The example below demonstrates how a JSON-LD author can coerce values to
+<a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>s, <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a>s and IRIs.</p>
+
+<pre class="example">
+{
+  "@context":
+  {
+     "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+     "xsd": "http://www.w3.org/2001/XMLSchema#",
+     "name": "http://xmlns.com/foaf/0.1/name",
+     "age": "http://xmlns.com/foaf/0.1/age",
+     "homepage": "http://xmlns.com/foaf/0.1/homepage",
+<span class="diff">     "@coerce":
+     {
+        "xsd:integer": "age",
+        "@iri": "homepage"
+     }</span>
+  },
+  "name": "John Smith",
+  "age": <span class="diff">"41"</span>,
+  "homepage": <span class="diff">"http://example.org/home/"</span>
+}</pre>
+
+<p>The example above would generate the following triples:</p>
+
+<pre class="example">
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/name&gt;
+      "John Smith" .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/age&gt;
+      "41"^^http://www.w3.org/2001/XMLSchema#integer .
+_:bnode1
+   &lt;http://xmlns.com/foaf/0.1/homepage&gt;
+      &lt;http://example.org/home/&gt; .</pre>
+
+</div>
+
+<div id="chaining" class="section">
+  <h3><span class="secno">4.4 </span>Chaining</h3>
+  <p>
+    Object <dfn title="chaining" id="dfn-chaining">chaining</dfn> is a JSON-LD feature that allows an author to
+    use the definition of JSON-LD objects as <a class="tref internalDFN" title="property" href="#dfn-property">property</a> values. This
+    is a commonly used mechanism for creating a parent-child relationship
+    between two <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a>s.
+  </p>
+  <p>The example shows an two subjects related by a property from the first
+  subject:</p>
+
+  <pre class="example">
+{
+...
+  "name": "Manu Sporny",
+  "<span class="diff">knows</span>": {
+    "<span class="diff">@type</span>": "<span class="diff">Person</span>",
+    "<span class="diff">name</span>": "<span class="diff">Gregg Kellogg</span>",
+  }
+...
+}</pre>
+
+  <p>
+    An object definition, like the one used above, <em class="rfc2119" title="may">may</em> be used as a
+    JSON value at any point in JSON-LD.
+  </p>
+</div>
+
+<div id="identifying-unlabeled-nodes" class="section">
+<h3><span class="secno">4.5 </span>Identifying Unlabeled Nodes</h3>
+
+<p>At times, it becomes necessary to be able to express information without
+being able to specify the subject. Typically, this type of node is called
+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) 
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>. This allows to reference the node locally within the 
+document but not in an external document.</p>
+
+<pre class="example">
+{
+...
+  "@subject": "<span class="diff">_:foo</span>",
+...
+}</pre>
+
+<p>The example above would set the subject to <code>_:foo</code>, which can
+then be used later on in the JSON-LD markup to refer back to the
+unlabeled node. This practice, however, is usually frowned upon when
+generating Linked Data. If a developer finds that they refer to the unlabeled
+node more than once, they should consider naming the node using a resolve-able
+IRI.
+</p>
+
+</div>
+
+<div id="aliasing-keywords" class="section">
+<h3><span class="secno">4.6 </span>Aliasing Keywords</h3>
+
+<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
+to be aliased. This feature allows more legacy JSON content to be supported
+by JSON-LD. It also allows developers to design domain-specific implementations
+using only the JSON-LD context.</p>
+
+<pre class="example">
+{
+  "@context":
+  {
+     <span class="diff">"url": "@subject"</span>,
+     <span class="diff">"a": "@type"</span>,
+     "name": "http://schema.org/name"
+  },
+  "url": "http://example.com/about#gregg",
+  "a": "http://schema.org/Person",
+  "name": "Gregg Kellogg"
+}</pre>
+
+<p>In the example above, the <code>@subject</code> and <code>@type</code>
+keywords have been given the aliases <strong>url</strong> and
+<strong>a</strong>, respectively.
+</p>
+
+</div>
+
+<div id="normalization" class="section">
+<h3><span class="secno">4.7 </span>Normalization</h3>
+
+<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and
+performing a deterministic transformation on that input that results in a
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> that any conforming JSON-LD processor would have
+generated given the same input. The problem is a fairly difficult technical
+problem to solve because it requires a directed graph to be ordered into a
+set of nodes and edges in a deterministic way. This is easy to do when all of
+the nodes have unique names, but very difficult to do when some of the nodes
+are not labeled.
+</p>
+
+<p>Normalization is useful when comparing two graphs against one another,
+when generating a detailed list of differences between two graphs, and
+when generating a cryptographic digital signature for information contained
+in a graph or when generating a hash of the information contained in a graph.
+</p>
+
+<p>The example below is an un-normalized JSON-LD document:</p>
+
+<pre class="example">
+{
+   "@context":
+   {
+      "name": "http://xmlns.com/foaf/0.1/name",
+      "homepage": "http://xmlns.com/foaf/0.1/homepage",
+      "xsd": "http://www.w3.org/2001/XMLSchema#",
+      "@coerce":
+      {
+         "@iri": ["homepage"]
+      }
+   },
+   "name": "Manu Sporny",
+   "homepage": "http://manu.sporny.org/"
+}</pre>
+
+<p>The example below is the normalized form of the JSON-LD document above:</p>
+
+<p class="note">Whitespace is used below to aid readability. The normalization
+algorithm for JSON-LD removes all unnecessary whitespace in the fully
+normalized form.</p>
+
+<pre class="example">
+[{
+    "@subject":
+    {
+        "@iri": "_:c14n0"
+    },
+    "http://xmlns.com/foaf/0.1/homepage":
+    {
+        "@iri": "http://manu.sporny.org/"
+    },
+    "http://xmlns.com/foaf/0.1/name": "Manu Sporny"
+}]</pre>
+
+<p>Notice how all of the <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s have been expanded and sorted in
+alphabetical order. Also, notice how the <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a> has been
+labeled with a <a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier-7">blank node identifier</a>. Normalization ensures that any arbitrary
+graph containing exactly the same information would be normalized to exactly
+the same form shown above.</p>
+
+</div>
+
+</div>
+
+<div id="the-application-programming-interface" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">5. </span>The Application Programming Interface</h2>
+
+<p>This API provides a clean mechanism that enables developers to convert
+JSON-LD data into a a variety of output formats that are easier to work with in
+various programming languages. If a JSON-LD API is provided in a programming
+environment, the entirety of the following API <em class="rfc2119" title="must">must</em> be implemented.
+</p>
+
+<div id="jsonldprocessor" class="section">
+<h3><span class="secno">5.1 </span>JsonLdProcessor</h3>
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JsonLdProcessor">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">JsonLdProcessor</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-expand-object-object-input-object-context">expand</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-compact-object-object-input-object-context">compact</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>, <span class="idlRaises"><a>ProcessingError</a></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-frame-object-object-input-object-frame-object-options">frame</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">frame</span></span>, <span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">options</span></span>) raises (<span class="idlRaises"><a>InvalidFrame</a></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-normalize-object-object-input-object-context">normalize</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span>
+<span class="idlMethod">    <span class="idlMethType"><a>object</a></span> <span class="idlMethName"><a href="#widl-JsonLdProcessor-triples-object-object-input-JsonLdTripleCallback-tripleCallback-object-context">triples</a></span> (<span class="idlParam"><span class="idlParamType"><a>object</a></span> <span class="idlParamName">input</span></span>, <span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdTripleCallback" class="idlType"><code>JsonLdTripleCallback</code></a></span> <span class="idlParamName">tripleCallback</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>object</a>?</span> <span class="idlParamName">context</span></span>) raises (<span class="idlRaises"><a>InvalidContext</a></span>);</span>
+};</span>
+</pre><div id="methods" class="section"><h4><span class="secno">5.1.1 </span>Methods</h4><dl class="methods"><dt id="widl-JsonLdProcessor-compact-object-object-input-object-context"><code>compact</code></dt><dd><a href="#compaction">Compacts</a> the given <code>input</code>
+    according to the steps in the
+    <a href="#compaction-algorithm">Compaction Algorithm</a>. The
+    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, compacted and returned if there are
+    no errors. If the compaction fails, an appropirate exception <em class="rfc2119" title="must">must</em> be
+    thrown.
+  
+
+    
+
+    
+
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform compaction on.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">The base context to use when compacting the <code>input</code>.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidContext</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">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.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_DATATYPES</code></td><td class="excCodeDesc">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.</td></tr></table></td></tr><tr><td class="excName"><a>ProcessingError</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>LOSSY_COMPACTION</code></td><td class="excCodeDesc">The compaction would lead to a loss of information, such as a
+     <code>@language</code> value.</td></tr><tr><td class="excCodeName"><code>CONFLICTING_DATATYPES</code></td><td class="excCodeDesc">The target datatype specified in the coercion rule and the
+     datatype for the typed literal do not match.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JsonLdProcessor-expand-object-object-input-object-context"><code>expand</code></dt><dd><a href="#expansion">Expands</a> the given <code>input</code>
+    according to the steps in the
+    <a href="#expansion-algorithm">Expansion Algorithm</a>. The
+    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, expanded and returned if there are
+    no errors. If the expansion fails, an appropriate exception <em class="rfc2119" title="must">must</em> be thrown.
+    
+    
+
+    
+    
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to copy and perform the expansion upon.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidContext</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">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.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_DATATYPES</code></td><td class="excCodeDesc">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.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JsonLdProcessor-frame-object-object-input-object-frame-object-options"><code>frame</code></dt><dd><a href="#framing">Frames</a> the given <code>input</code>
+    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> <em class="rfc2119" title="must">must</em> be returned. Exceptions <em class="rfc2119" title="must">must</em> be thrown if there are 
+    errors.
+  
+
+    
+
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform framing on.</td></tr><tr><td class="prmName">frame</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The frame to use when re-arranging the data.</td></tr><tr><td class="prmName">options</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A set of options that will affect the framing algorithm.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidFrame</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">A frame must be either an object or an array of objects, if the frame
+    is neither of these types, this exception is thrown.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_EMBEDS</code></td><td class="excCodeDesc">A subject IRI was specified in more than one place in the input
+    frame. More than one embed of a given subject IRI is not allowed, and if
+    requested, <em class="rfc2119" title="must">must</em> result in this exception.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JsonLdProcessor-normalize-object-object-input-object-context"><code>normalize</code></dt><dd><a href="#normalization">Normalizes</a> the given <code>input</code>
+    according to the steps in the
+    <a href="#normalization-algorithm">Normalization Algorithm</a>. The
+    <code>input</code> <em class="rfc2119" title="must">must</em> be copied, normalized and returned if there are
+    no errors. If the compaction fails, <code>null</code> <em class="rfc2119" title="must">must</em> be returned.
+  
+  
+    
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to perform normalization upon.</td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidContext</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">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.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_DATATYPES</code></td><td class="excCodeDesc">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.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd><dt id="widl-JsonLdProcessor-triples-object-object-input-JsonLdTripleCallback-tripleCallback-object-context"><code>triples</code></dt><dd>Processes the <code>input</code> according to the
+    <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>, calling
+    the provided <code>tripleCallback</code> for each triple generated.
+  
+
+    
+
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">input</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The JSON-LD object to process when outputting triples.</td></tr><tr><td class="prmName">tripleCallback</td><td class="prmType"><code><a href="#idl-def-JsonLdTripleCallback" class="idlType"><code>JsonLdTripleCallback</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">A callback that is called whenever a processing error occurs on
+     the given <code>input</code>.
+     <div class="issue">This callback should be aligned with the
+       RDF API.</div></td></tr><tr><td class="prmName">context</td><td class="prmType"><code><a>object</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptTrue">✔</td><td class="prmDesc">An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>InvalidContext</a></td><td class="excDesc"><table class="exceptionCodes"><tr><td class="excCodeName"><code>INVALID_SYNTAX</code></td><td class="excCodeDesc">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.</td></tr><tr><td class="excCodeName"><code>MULTIPLE_DATATYPES</code></td><td class="excCodeDesc">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.</td></tr></table></td></tr></table><div><em>Return type: </em><code><a>object</a></code></div></dd></dl></div>
+
+</div>
+
+<div id="jsonldtriplecallback" class="section">
+<h3><span class="secno">5.2 </span>JsonLdTripleCallback</h3>
+<p>The JsonLdTripleCallback is called whenever the processor generates a
+triple during the <code>triple()</code> call.</p>
+
+<pre class="idl">
+<span class="idlInterface" id="idl-def-JsonLdTripleCallback">[<span class="extAttr">NoInterfaceObject Callback</span>]
+interface <span class="idlInterfaceID">JsonLdTripleCallback</span> {
+<span class="idlMethod">    <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-JsonLdTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language">triple</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">subject</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">property</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">objectType</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a></span> <span class="idlParamName">object</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">datatype</span></span>, <span class="idlParam"><span class="idlParamType"><a>DOMString</a>?</span> <span class="idlParamName">language</span></span>);</span>
+};</span>
+</pre><div id="methods-1" class="section"><h4><span class="secno">5.2.1 </span>Methods</h4><dl class="methods"><dt id="widl-JsonLdTripleCallback-triple-void-DOMString-subject-DOMString-property-DOMString-objectType-DOMString-object-DOMString-datatype-DOMString-language"><code>triple</code></dt><dd>This callback is invoked whenever a triple is generated by the processor.
+  
+  <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">subject</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The subject IRI that is associated with the triple.</td></tr><tr><td class="prmName">property</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The property IRI that is associated with the triple.</td></tr><tr><td class="prmName">objectType</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The type of object that is associated with the triple. Valid values
+       are <code>IRI</code> and <code>literal</code>.</td></tr><tr><td class="prmName">object</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc">The object value associated with the subject and the property.</td></tr><tr><td class="prmName">datatype</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The datatype associated with the object.</td></tr><tr><td class="prmName">language</td><td class="prmType"><code><a>DOMString</a></code></td><td class="prmNullTrue">✔</td><td class="prmOptFalse">✘</td><td class="prmDesc">The language associated with the object in BCP47 format.</td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+</div>
+
+
+</div>
+
+<div id="algorithms" class="section">
+
+<!-- OddPage -->
+<h2><span class="secno">6. </span>Algorithms</h2>
+
+<p>All algorithms described in this section are intended to operate on
+language-native data structures. That is, the serialization to a text-based
+JSON document isn't required as input or output to any of these algorithms and
+language-native data structures <em class="rfc2119" title="must">must</em> be used where applicable.</p>
+
+<div id="syntax-tokens-and-keywords" class="section">
+  <h3><span class="secno">6.1 </span>Syntax Tokens and Keywords</h3>
+
+  <p>JSON-LD specifies a number of syntax tokens and keywords that are using
+  in all algorithms described in this section:</p>
+
+  <dl>
+  <dt><code>@context</code></dt><dd>Used to set the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</dd>
+  <dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected  by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@vocab</code></dt><dd>Used to set the base IRI for all property IRIs affected by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</dd>
+  <dt><code>@coerce</code></dt><dd>Used to specify type coercion rules.</dd>
+  <dt><code>@literal</code></dt><dd>Used to specify a literal value.</dd>
+  <dt><code>@iri</code></dt><dd>Used to specify an IRI value.</dd>
+  <dt><code>@language</code></dt><dd>Used to specify the language for a literal.</dd>
+  <dt><code>@datatype</code></dt><dd>Used to specify the datatype for a literal.</dd>
+  <dt><code>:</code></dt><dd>The separator for JSON keys and values that use the <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> mechanism.</dd>
+  <dt><code>@subject</code></dt><dd>Sets the active subjects.</dd>
+  <dt><code>@type</code></dt><dd>Used to set the type of the active subjects.</dd>
+  </dl>
+</div>
+
+<div id="algorithm-terms" class="section">
+  <h3><span class="secno">6.2 </span>Algorithm Terms</h3>
+  <dl>
+    <dt><dfn title="initial_context" id="dfn-initial_context">initial context</dfn></dt>
+    <dd>
+      a context that is specified to the algorithm before processing begins.
+    </dd>
+    <dt><dfn title="active_subject" id="dfn-active_subject">active subject</dfn></dt>
+    <dd>
+      the currently active subject that the processor should use when
+      processing.
+    </dd>
+    <dt><dfn title="active_property" id="dfn-active_property">active property</dfn></dt>
+    <dd>
+      the currently active property that the processor should use when
+      processing.
+    </dd>
+    <dt><dfn title="active_object" id="dfn-active_object">active object</dfn></dt>
+    <dd>
+      the currently active object that the processor should use when
+      processing.
+    </dd>
+    <dt><dfn title="active_context" id="dfn-active_context">active context</dfn></dt>
+    <dd>
+      a context that is used to resolve <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es and
+      <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s while the processing
+      algorithm is running. The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is the context
+      contained within the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+    </dd>
+    <dt><dfn title="local_context" id="dfn-local_context">local context</dfn></dt>
+    <dd>
+      a context that is specified within a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>,
+      specified via the <code>@context</code> keyword.
+    </dd>
+    <dt><dfn title="processor_state" id="dfn-processor_state">processor state</dfn></dt>
+    <dd>
+      the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>, which includes the <a class="tref" title="active__context">active
+      context</a>, <a class="tref" title="current_subject">current subject</a>, and
+      <a class="tref" title="current_property">current property</a>. The <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> is managed
+      as a stack with elements from the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>
+      copied into a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> when entering a new
+      <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
+    </dd>
+    <dt><dfn title="JSON-LD_input" id="dfn-json-ld_input">JSON-LD input</dfn></dt>
+    <dd>
+      The JSON-LD data structure that is provided as input to the algorithm.
+    </dd>
+    <dt><dfn title="JSON-LD_output" id="dfn-json-ld_output">JSON-LD output</dfn></dt>
+    <dd>
+      The JSON-LD data structure that is produced as output by the algorithm.
+    </dd>
+
+  </dl>
+</div>
+
+<div id="context-1" class="section">
+  <h3 id="context"><span class="secno">6.3 </span>Context</h3>
+  <p>
+    Processing of JSON-LD data structure is managed recursively.
+    During processing, each rule is applied using information provided by the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+    Processing begins by pushing a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> onto the <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> stack and
+    initializing the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> with the <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a>. If a <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is encountered,
+    information from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is merged into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.
+  </p>
+  <p>
+    The <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> is used for expanding keys and values of a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> (or elements
+    of a list (see <span a="#list-processing">List Processing</span>)).
+  </p>
+  <p>
+    A <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> is identified within a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> having a key of
+    <code>@context</code> with <a class="tref internalDFN" title="string" href="#dfn-string">string</a> or a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> value. When processing a <a class="tref" title="local__context">local
+    context</a>, special processing rules apply:
+  </p>
+  <ol class="algorithm">
+    <li>Create a new, empty <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</li>
+    <li>
+      If the value is a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, it <em class="rfc2119" title="must">must</em> have a lexical form of IRI and used to initialize
+      a new JSON document which replaces the value for subsequent processing.
+    </li>
+    <li>If the value is a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>, perform the following steps:
+      <ol class="algorithm">
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@base</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
+          <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of an absolute IRI. Add the base mapping to the <a class="tref" title="local__context">local
+          context</a>. <p class="issue">Turtle allows @base to be relative. If we did this, we
+          would have to add <a href="#iri-expansion">IRI Expansion</a>.</p>
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@vocab</code> key, it <em class="rfc2119" title="must">must</em> have a value of a simple
+          <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of an absolute IRI. Add the vocabulary mapping to the
+          <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> after performing <a href="#iri-expansion">IRI Expansion</a> on
+          the associated value.
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@coerce</code> key, it <em class="rfc2119" title="must">must</em> have a value of a
+          <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>. Add the <code>@coerce</code> mapping to the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>
+          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value(s).
+        </li>
+        <li>
+          Otherwise, the key <em class="rfc2119" title="must">must</em> have the lexical form of <cite><a href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> and
+          <em class="rfc2119" title="must">must</em> have the value of a simple <a class="tref internalDFN" title="string" href="#dfn-string">string</a> with the lexical form of IRI. Merge the key-value
+          pair into the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.
+        </li>
+      </ol>
+    </li>
+    <li>
+      Merge the of <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s <code>@coerce</code> mapping into  the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping as described <a href="#coerce">below</a>.
+    </li>
+    <li>
+      Merge all entries other than the <code>@coerce</code> mapping from the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>to the
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> overwriting any duplicate values.
+    </li>
+  </ol>
+
+  <div id="coerce" class="section">
+    <h4><span class="secno">6.3.1 </span>Coerce</h4>
+    <p>
+      Map each key-value pair in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>'s
+      <code>@coerce</code> mapping into the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s
+      <code>@coerce</code> mapping, overwriting any duplicate values in
+      the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>'s <code>@coerce</code> mapping.
+      The <code>@coerce</code> mapping has either a single 
+      <code>prefix:term</code> value, a single <a class="tref internalDFN" title="term" href="#dfn-term">term</a> value or an
+      <a class="tref internalDFN" title="array" href="#dfn-array">array</a> of <code>prefix:term</code> or <a class="tref internalDFN" title="term" href="#dfn-term">term</a> values. 
+      When merging with an existing mapping in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+      map all <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> and <a class="tref internalDFN" title="term" href="#dfn-term">term</a> values to 
+      <a class="tref internalDFN" title="array" href="#dfn-array">array</a> form and replace with the union of the value from
+      the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> and the value of the 
+      <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>. If the result is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+      with a single value, the processor <em class="rfc2119" title="may">may</em> represent this as a string value.
+    </p>
+  </div>
+
+  <div id="initial-context" class="section">
+    <h4><span class="secno">6.3.2 </span>Initial Context</h4>
+    <p>The <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> is initialized as follows:</p>
+    <ul>
+      <li>
+        <code>@base</code> is set using <cite><href="http: www.ietf.org="" rfc="" rfc2396.txt"="">section 5.1 Establishing a
+        Base URI</href="http:></cite> of [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>]. Processors <em class="rfc2119" title="may">may</em> provide a means
+        of setting the base IRI programatically.
+      </li>
+      <li><code>@coerce</code> is set with a single mapping from <code>@iri</code> to <code>@type</code>.</li>
+    </ul>
+    <pre class="example">
+{
+    "@base": <span class="diff">document-location</span>,
+    "@context": {
+      "@iri": "@type"
+    }
+}</pre>
+  </div>
+</div>
+
+<div id="iri-expansion" class="section">
+  <h3><span class="secno">6.4 </span>IRI Expansion</h3>
+  <p>Keys and some values are evaluated to produce an IRI. This section defines an algorithm for
+    transforming a value representing an IRI into an actual IRI.</p>
+  <p>IRIs may be represented as an absolute IRI, a <a class="tref internalDFN" title="term" href="#dfn-term">term</a>, a <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>:<a class="tref internalDFN" title="term" href="#dfn-term">term</a> construct, or as a value relative to <code>@base</code>
+    or <code>@vocab</code>.</p>
+  <p>The algorithm for generating an IRI is:
+    </p><ol class="algorithm">
+      <li>Split the value into a <em>prefix</em> and <em>suffix</em> from the first occurrence of ':'.</li>
+      <li>If the prefix is a '_' (underscore), the IRI is unchanged.</li>
+      <li>If the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> contains a mapping for <em>prefix</em>, generate an IRI
+        by prepending the mapped prefix to the (possibly empty) suffix using textual concatenation. Note that an empty
+        suffix and no suffix (meaning the value contains no ':' string at all) are treated equivalently.</li>
+      <li>If the IRI being processed is for a property (i.e., a key's value in a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>, or a
+        value in a <code>@coerce</code> mapping) and the active context has a <code>@vocab</code> mapping,
+        join the mapped value to the suffix using textual concatenation.</li>
+      <li>If the IRI being processed is for a subject or object (i.e., not a property) and the active context has a <code>@base</code> mapping,
+        join the mapped value to the suffix using the method described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC3986">RFC3986</a></cite>].</li>
+      <li>Otherwise, use the value directly as an IRI.</li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="iri-compaction" class="section">
+  <h3><span class="secno">6.5 </span>IRI Compaction</h3>
+  <p>Some keys and values are expressed using IRIs. This section defines an
+    algorithm for transforming an IRI to a compact IRI using the
+    <a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es specified in the
+    <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>.</p>
+
+  <p>The algorithm for generating a compacted IRI is:
+    </p><ol class="algorithm">
+      <li>Search every key-value pair in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for
+        a <a class="tref internalDFN" title="term" href="#dfn-term">term</a> that is a complete match
+        against the IRI. If a complete match is found, the resulting compacted
+        IRI is the <a class="tref internalDFN" title="term" href="#dfn-term">term</a> associated with the IRI in the
+        <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>.</li>
+      <li>If a complete match is not found, search for a partial match from
+        the beginning of the IRI. For all matches that are found, the resulting
+        compacted IRI is the <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a> associated with the partially
+        matched IRI in the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> concatenated with a
+        colon (:) character and the unmatched part of the string. If there is
+        more than one compacted IRI produced, the final value is the
+        shortest and lexicographically least value of the entire set of compacted IRIs.</li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="value-expansion" class="section">
+  <h3><span class="secno">6.6 </span>Value Expansion</h3>
+  <p>Some values in JSON-LD can be expressed in a compact form. These values
+    are required to be expanded at times when processing JSON-LD documents.
+  </p>
+
+  <p>The algorithm for expanding a value is:
+    </p><ol class="algorithm">
+      <li>If the key that is associated with the value has an associated
+        coercion entry in the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a>, the resulting
+        expansion is an object populated according to the following steps:
+        <ol class="algorithm">
+          <li>If the coercion target is <code>@iri</code>, expand the value
+            by adding a new key-value pair where the key is <code>@iri</code>
+            and the value is the expanded IRI according to the
+            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+          <li>If the coercion target is a typed literal, expand the value
+            by adding two new key-value pairs. The first key-value pair
+            will be <code>@literal</code> and the unexpanded value. The second
+            key-value pair will be <code>@datatype</code> and the associated
+            coercion datatype expanded according to the
+            <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+        </ol>
+      </li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="value-compaction" class="section">
+  <h3><span class="secno">6.7 </span>Value Compaction</h3>
+  <p>Some values, such as IRIs and typed literals, may be expressed in an
+    expanded form in JSON-LD. These values are required to be compacted at
+    times when processing JSON-LD documents.
+  </p>
+
+  <p>The algorithm for compacting a value is:
+    </p><ol class="algorithm">
+      <li>If the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> contains a coercion target for the
+        key that is associated with the value, compact the value using the
+        following steps:
+        <ol class="algorithm">
+          <li>If the coercion target is an <code>@iri</code>, the compacted
+            value is the value associated with the <code>@iri</code> key,
+            processed according to the
+            <a href="#iri-compaction">IRI Compaction</a> steps.</li>
+          <li>If the coercion target is a typed literal, the compacted
+            value is the value associated with the <code>@literal</code> key.
+          </li>
+          <li>Otherwise, the value is not modified.</li>
+        </ol>
+      </li>
+    </ol>
+  <p></p>
+</div>
+
+<div id="expansion-1" class="section">
+<h3><span class="secno">6.8 </span>Expansion</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>As stated previously, expansion is the process of taking a JSON-LD
+input and expanding all IRIs and typed literals to their fully-expanded form.
+The output will not contain a single context declaration and will have all IRIs
+and typed literals fully expanded.
+</p>
+
+<div id="expansion-algorithm" class="section">
+<h4><span class="secno">6.8.1 </span>Expansion Algorithm</h4>
+
+<ol class="algorithm">
+  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+  process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> recursively using this algorithm.</li>
+  <li>If the top-level item in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> is an object,
+  update the <a class="tref internalDFN" title="local_context" href="#dfn-local_context">local context</a> according to the steps outlined in
+  the <a href="#context">context</a> section. Process each key, expanding
+  the key according to the <a href="#iri-expansion">IRI Expansion</a> rules.</li>
+  <ol class="algorithm">
+    <li>Process each value associated with each key:
+      <ol class="algorithm">
+        <li>If the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+        recursively using this algorithm.</li>
+        <li>If the value is an object, process the object recursively
+        using this algorithm.</li>
+        <li>Otherwise, check to see the associated key has an associated
+        coercion rule. If the value should be coerced, expand the value
+        according to the <a href="#value-expansion">Value Expansion</a> rules.
+        If the value does not need to be coerced, leave the value as-is.
+        </li>
+      </ol>
+    </li><li>Remove the context from the object.</li>
+  </ol>
+</ol>
+</div>
+
+</div>
+
+<div id="compaction-1" class="section">
+<h3><span class="secno">6.9 </span>Compaction</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>As stated previously, compaction is the process of taking a JSON-LD
+input and compacting all IRIs using a given context. The output
+will contain a single top-level context declaration and will only use
+<a class="tref internalDFN" title="term" href="#dfn-term">term</a>s and <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>es and will ensure that all
+typed literals are fully compacted.
+</p>
+
+<div id="compaction-algorithm" class="section">
+<h4><span class="secno">6.9.1 </span>Compaction Algorithm</h4>
+
+<ol class="algorithm">
+  <li>Perform the <a href="#expansion-algorithm">Expansion Algorithm</a> on
+  the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>. This removes any existing context to allow the given context to be cleanly applied.</li>
+  <li>Set the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to the given context.
+  </li><li>If the top-level item is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, process each item in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+    recursively, starting at this step.
+  </li><li>If the top-level item is an object, compress each key using the steps
+    defined in <a href="#iri-compaction">IRI Compaction</a> and compress each
+    value using the steps defined in
+    <a href="#value-compaction">Value Compaction</a>.</li>
+  
+</ol>
+</div>
+
+</div>
+
+
+<div id="framing-1" class="section">
+<h3><span class="secno">6.10 </span>Framing</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>A JSON-LD document is a representation of a directed graph. A single
+directed graph can have many different serializations, each expressing
+exactly the same information. Developers typically don't work directly with
+graphs, but rather, prefer trees when dealing with JSON. While mapping a graph
+to a tree can be done, the layout of the end result must be specified in
+advance. This section defines an algorithm for mapping a graph to
+a tree given a <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a>.
+</p>
+
+<div id="framing-algorithm-terms" class="section">
+<h4><span class="secno">6.10.1 </span>Framing Algorithm Terms</h4>
+ <dl>
+   <dt><dfn title="input_frame" id="dfn-input_frame">input frame</dfn></dt>
+   <dd>
+     the initial <a class="tref internalDFN" title="frame" href="#dfn-frame">frame</a> provided to the framing algorithm.
+   </dd>
+   <dt><dfn title="framing_context" id="dfn-framing_context">framing context</dfn></dt>
+   <dd>
+     a context containing the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, the
+     <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> and the
+     <a class="tref" title="omit_default_flag">omit default flag</a>.
+   </dd>
+   <dt><dfn title="object_embed_flag" id="dfn-object_embed_flag">object embed flag</dfn></dt>
+   <dd>
+     a flag specifying that objects should be directly embedded in the output,
+     instead of being referred to by their IRI.
+   </dd>
+   <dt><dfn title="explicit_inclusion_flag" id="dfn-explicit_inclusion_flag">explicit inclusion flag</dfn></dt>
+   <dd>
+     a flag specifying that for properties to be included in the output, they
+     must be explicitly declared in the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a>.
+   </dd>
+   <dt><dfn title="omit_missing_properties_flag" id="dfn-omit_missing_properties_flag">omit missing properties flag</dfn></dt>
+   <dd>
+     a flag specifying that properties that are missing from the
+     <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> should be omitted from the output.
+   </dd>
+   <dt><dfn title="match_limit" id="dfn-match_limit">match limit</dfn></dt>
+   <dd>
+     A value specifying the maximum number of matches to accept when building
+     arrays of values during the framing algorithm. A value of -1 specifies
+     that there is no match limit.
+   </dd>
+   <dt><dfn title="map_of_embedded_subjects" id="dfn-map_of_embedded_subjects">map of embedded subjects</dfn></dt>
+   <dd>
+     A map that tracks if a subject has been embedded in the output of the
+     <a href="#framing-algorithm">Framing Algorithm</a>.
+   </dd>
+ </dl>
+</div>
+
+<div id="framing-algorithm" class="section">
+<h4><span class="secno">6.10.2 </span>Framing Algorithm</h4>
+
+<p>The framing algorithm takes <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> that has been
+normalized according to the
+<a href="#normalization-algorithm">Normalization Algorithm</a>
+(<strong>normalized input</strong>), an
+<a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a> that has been expanded according to the
+<a href="#expansion-algorithm">Expansion Algorithm</a>
+(<strong>expanded frame</strong>), and a number of options and produces
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The following series of steps is the recursive
+portion of the framing algorithm:
+</p>
+
+<ol class="algorithm">
+  <li>Initialize the <a class="tref internalDFN" title="framing_context" href="#dfn-framing_context">framing context</a> by setting the
+   <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a>, clearing the
+   <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a>, and clearing the
+   <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>. Override these values
+   based on input options provided to the algorithm by the application.
+  </li>
+  <li>Generate a <dfn title="list_of_frames" id="dfn-list_of_frames">list of frames</dfn> by processing the
+    <strong>expanded frame</strong>:
+    <ol class="algorithm">
+      <li>If the <strong>expanded frame</strong> is not an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, set
+        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to 1, place the
+        <strong>expanded frame</strong> into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
+        and set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to <code>null</code>.</li>
+      <li>If the <strong>expanded frame</strong> is an empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, place an
+        empty object into the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>,
+        set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and set
+        <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
+      <li>If the <strong>expanded frame</strong> is a non-empty <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, add
+        each item in the <strong>expanded frame</strong> into the
+        <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a>, set the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to an
+        <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, and set <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> to -1.</li>
+    </ol></li>
+  <li>Create a <dfn title="match_array" id="dfn-match_array">match array</dfn> for each <strong>expanded frame</strong>
+    in the <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> halting when either the
+    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> is zero or the end of the
+    <a class="tref internalDFN" title="list_of_frames" href="#dfn-list_of_frames">list of frames</a> is reached. If an
+    <strong>expanded frame</strong> is
+    not an object, the processor <em class="rfc2119" title="must">must</em> throw a <code>Invalid Frame Format</code>
+    exception. Add each matching item from the <strong>normalized input</strong>
+    to the <a class="tref" title="matches_array">matches array</a> and decrement the
+    <a class="tref internalDFN" title="match_limit" href="#dfn-match_limit">match limit</a> by 1 if:
+    <ol class="algorithm">
+       <li>The <strong>expanded frame</strong> has an <code>rdf:type</code>
+         that exists in the item's list of <code>rdf:type</code>s. Note:
+         the <code>rdf:type</code> can be an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>, but only one value needs
+         to be in common between the item and the
+         <strong>expanded frame</strong> for a match.</li>
+       <li>The <strong>expanded frame</strong> does not have an
+         <code>rdf:type</code> property, but every property in the
+         <strong>expanded frame</strong> exists in the item.</li>
+    </ol></li>
+  <li>Process each item in the <a class="tref internalDFN" title="match_array" href="#dfn-match_array">match array</a> with its associated
+    <dfn title="match_frame" id="dfn-match_frame">match frame</dfn>:
+    <ol class="algorithm">
+      <li>If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@embed</code>
+        keyword, set the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> to its value.
+        If the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> contains an <code>@explicit</code>
+        keyword, set the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> to its value.
+        Note: if the keyword exists, but the value is neither
+        <code>true</code> or <code>false</code>, set the associated flag to
+        <code>true</code>.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is cleared and the item has
+        the <code>@subject</code> property, replace the item with the value
+        of the <code>@subject</code> property.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
+        the <code>@subject</code> property, and its IRI is in the
+        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>, throw a
+        <code>Duplicate Embed</code> exception.</li>
+      <li>If the <a class="tref internalDFN" title="object_embed_flag" href="#dfn-object_embed_flag">object embed flag</a> is set and the item has
+        the <code>@subject</code> property and its IRI is not in the
+        <a class="tref internalDFN" title="map_of_embedded_subjects" href="#dfn-map_of_embedded_subjects">map of embedded subjects</a>:
+        <ol class="algorithm">
+          <li>If the <a class="tref internalDFN" title="explicit_inclusion_flag" href="#dfn-explicit_inclusion_flag">explicit inclusion flag</a> is set,
+            then delete any key from the item that does not exist in the
+            <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except <code>@subject</code>.</li>
+          <li>For each key in the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>, except for
+            keywords and <code>rdf:type</code>:
+          <ol class="algorithm">
+            <li>If the key is in the item, then build a new
+              <dfn title="recursion_input_list" id="dfn-recursion_input_list">recursion input list</dfn> using the object or objects
+              associated with the key. If any object contains an
+              <code>@iri</code> value that exists in the
+              <a class="tref" title="normalized_input">normalized input</a>, replace the object in the
+              <a class="tref" title="recusion_input_list">recusion input list</a> with a new object containing
+              the <code>@subject</code> key where the value is the value of
+              the <code>@iri</code>, and all of the other key-value pairs for
+              that subject. Set the <dfn title="recursion_match_frame" id="dfn-recursion_match_frame">recursion match frame</dfn> to the
+              value associated with the <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a>'s key. Replace
+              the value associated with the key by recursively calling this
+              algorithm using <a class="tref internalDFN" title="recursion_input_list" href="#dfn-recursion_input_list">recursion input list</a>,
+              <a class="tref internalDFN" title="recursion_match_frame" href="#dfn-recursion_match_frame">recursion match frame</a> as input.</li>
+            <li>If the key is not in the item, add the key to the item and
+              set the associated value to an empty array if the
+              <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> key's value is an array
+              or <code>null</code> otherwise.</li>
+            <li>If value associated with the item's key is <code>null</code>,
+              process the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a>:
+              <ol class="algorithm">
+                <li>If the value associated with the key in the
+                  <a class="tref internalDFN" title="match_frame" href="#dfn-match_frame">match frame</a> is an array, use the first frame
+                  from the array as the <dfn title="property_frame" id="dfn-property_frame">property frame</dfn>, otherwise
+                  set the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> to an empty object.</li>
+                <li>If the <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> contains an
+                <code>@omitDefault</code> keyword, set the
+                <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> to its value.
+                Note: if the keyword exists, but the value is neither
+                <code>true</code> or <code>false</code>, set the associated
+                flag to <code>true</code>.</li>
+                <li>If the <a class="tref internalDFN" title="omit_missing_properties_flag" href="#dfn-omit_missing_properties_flag">omit missing properties flag</a> is set,
+                  delete the key in the item. Otherwise, if the
+                  <code>@default</code> keyword is set in the
+                  <a class="tref internalDFN" title="property_frame" href="#dfn-property_frame">property frame</a> set the item's value to the value
+                  of <code>@default</code>.</li>
+              </ol></li>
+          </ol></li>
+        </ol>
+      </li><li>If the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> is <code>null</code> set it to
+        the item, otherwise, append the item to the
+        <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.
+    </li></ol>
+  </li><li>Return the <a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>.</li>
+</ol>
+
+The final, non-recursive step of the framing algorithm requires the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a> to be compacted according to the
+<a href="#compaction-algorithm">Compaction Algorithm</a> by using the
+context provided in the <a class="tref internalDFN" title="input_frame" href="#dfn-input_frame">input frame</a>. The resulting value is the
+final output of the compaction algorithm and is what should be returned to the
+application.
+
+</div>
+
+</div>
+
+<div id="normalization-1" class="section">
+<h3><span class="secno">6.11 </span>Normalization</h3>
+
+<p class="issue">This algorithm is a work in progress, do not implement it.</p>
+
+<p>Normalization is the process of taking <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> and
+performing a deterministic transformation on that input that results in all
+aspects of the graph being fully expanded and named in the
+<a class="tref internalDFN" title="JSON-LD_output" href="#dfn-json-ld_output">JSON-LD output</a>. The normalized output is generated in such a way
+that any conforming JSON-LD processor will generate identical output
+given the same input. The problem is a fairly difficult technical
+problem to solve because it requires a directed graph to be ordered into a
+set of nodes and edges in a deterministic way. This is easy to do when all of
+the nodes have unique names, but very difficult to do when some of the nodes
+are not labeled.
+</p>
+
+<p>In time, there may be more than one normalization algorithm that will need
+to be identified. For identification purposes, this algorithm is named
+<abbr title="Universal Graph Normalization Algorithm 2011">UGNA2011</abbr>.
+</p>
+
+<div id="normalization-algorithm-terms" class="section">
+<h4><span class="secno">6.11.1 </span>Normalization Algorithm Terms</h4>
+ <dl>
+   <dt><dfn title="label" id="dfn-label">label</dfn></dt>
+   <dd>
+     The subject IRI associated with a graph node. The subject IRI is expressed
+     using a key-value pair in a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> where the key is
+     <code>@subject</code> and the value is a string that is an IRI or
+     a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> containing the key <code>@iri</code> and
+     a value that is a string that is an IRI.
+   </dd>
+   <dt><dfn title="list_of_expanded_nodes" id="dfn-list_of_expanded_nodes">list of expanded nodes</dfn></dt>
+   <dd>
+     A list of all nodes in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> graph containing no
+     embedded objects and having all keys and values expanded according to the
+     steps in the <a href="#expansion-algorithm">Expansion Algorithm</a>.
+   </dd>
+   <dt><dfn title="alpha" id="dfn-alpha">alpha</dfn> and <dfn title="beta" id="dfn-beta">beta</dfn> values</dt>
+   <dd>
+     The words <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> refer to the first and
+     second nodes or values being examined in an algorithm. The names are
+     merely used to refer to each input value to a comparison algorithm.
+   </dd>
+   <dt><dfn title="renaming_counter" id="dfn-renaming_counter">renaming counter</dfn></dt>
+   <dd>
+     A counter that is used during the
+     <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. The
+     counter typically starts at one (1) and counts up for every node that is
+     relabeled. There will be two such renaming counters in an implementation
+     of the normalization algorithm. The first is the
+     <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> and the second is the
+     <a class="tref" title="deterministic_labeling_counter">deterministic labeling counter</a>.
+   </dd>
+   <dt><dfn title="serialization_label" id="dfn-serialization_label">serialization label</dfn></dt>
+   <dd>
+     An identifier that is created to aid in the normalization process in the
+     <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a>. The
+     value typically takes the form of <code>s<NUMBER></code> or
+     <code>c<NUMBER></code>.
+   </dd>
+</dl>
+</div>
+
+<div id="normalization-state" class="section">
+<h4><span class="secno">6.11.2 </span>Normalization State</h4>
+
+<p>When performing the steps required by the normalization algorithm,
+it is helpful to track the many pieces of information in a
+data structure called the <dfn title="normalization_state" id="dfn-normalization_state">normalization state</dfn>. Many of these
+pieces simply provide indexes into the graph. The information
+contained in the <a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a> is described below.</p>
+
+<dl>
+   <dt><dfn title="node_state" id="dfn-node_state">node state</dfn></dt>
+   <dd>
+     Each node in the graph will be assigned a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>. This
+     state contains the information necessary to deterministically
+     <a class="tref internalDFN" title="label" href="#dfn-label">label</a> all nodes in the graph. A <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>
+     includes:
+     <dl>
+        <dt><dfn title="node_reference" id="dfn-node_reference">node reference</dfn></dt>
+        <dd>
+          A <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> is a reference to a node in the graph.
+          For a given <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>
+          refers to the node that the state is for. When a
+          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> is created, its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>
+          should be to the node it is created for.
+        </dd>
+        <dt><dfn title="outgoing_list" id="dfn-outgoing_list">outgoing list</dfn></dt>
+        <dd>
+          Lists the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s for all nodes that are properties of
+          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>. This list should be initialized
+          by iterating over every object associated with a property in the
+          <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> adding its label if it is another node.
+        </dd>
+        <dt><dfn title="incoming_list" id="dfn-incoming_list">incoming list</dfn></dt>
+        <dd>
+          Lists the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s for all nodes in the graph for which
+          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> is a property. This list is
+          initialized to an empty list.
+        </dd>
+        <dt><dfn title="outgoing_serialization_map" id="dfn-outgoing_serialization_map">outgoing serialization map</dfn></dt>
+        <dd>
+          Maps node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s to <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s.
+          This map is initialized to an empty map. When this map is populated,
+          it will be filled with keys that are the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of every node in the
+          graph with a label that begins with <code>_:</code> and that has a
+          path, via properties, that starts with the
+          <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
+        </dd>
+        <dt><dfn title="outgoing_serialization" id="dfn-outgoing_serialization">outgoing serialization</dfn></dt>
+        <dd>
+          A string that can be lexicographically compared to the
+          <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a>s of other
+          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>s. It is a representation of the
+          <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> and other related
+          information. This string is initialized to an empty string.
+        </dd>
+        <dt><dfn title="incoming_serialization_map" id="dfn-incoming_serialization_map">incoming serialization map</dfn></dt>
+        <dd>
+          Maps node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s to <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s.
+          This map is initialized to an empty map. When this map is populated,
+          it will be filled with keys that are the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of every
+          node in the graph with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that begins with
+          <code>_:</code> and that has a path, via properties, that ends with
+          the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
+        </dd>
+        <dt><dfn title="incoming_serialization" id="dfn-incoming_serialization">incoming serialization</dfn></dt>
+        <dd>
+          A string that can be lexicographically compared to the
+          <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a>s of other
+          <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>s. It is a representation of the
+          <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> and other related
+          information. This string is initialized to an empty string.
+        </dd>
+     </dl>
+   </dd>
+   <dt><dfn title="node_state_map" id="dfn-node_state_map">node state map</dfn></dt>
+   <dd>
+     A mapping from a node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>.
+     It is initialized to an empty map.
+   </dd>
+   <dt><dfn title="labeling_prefix" id="dfn-labeling_prefix">labeling prefix</dfn></dt>
+   <dd>
+     The labeling prefix is a string that is used as the beginning of a node
+     <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. It should be initialized to a random base string that
+     starts with the characters <code>_:</code>, is not used by any other
+     node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>, and does not
+     start with the characters <code>_:c14n</code>. The prefix has two uses.
+     First it is used to temporarily name nodes during the normalization
+     algorithm in a way that doesn't collide with the names that already
+     exist as well as the names that will be generated by the normalization
+     algorithm. Second, it will eventually be set to <code>_:c14n</code> to
+     generate the final, deterministic labels for nodes in the graph. This
+     prefix will be concatenated with the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> to
+     produce a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. For example, <code>_:j8r3k</code> is
+     a proper initial value for the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a>.
+   </dd>
+   <dt><dfn title="labeling_counter" id="dfn-labeling_counter">labeling counter</dfn></dt>
+   <dd>
+     A counter that is used to label nodes. It is appended to the
+     <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> to create a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>. It is
+     initialized to <code>1</code>.
+   </dd>
+   <dt><dfn title="map_of_flattened_nodes" id="dfn-map_of_flattened_nodes">map of flattened nodes</dfn></dt>
+   <dd>
+     A map containing a representation of all nodes in the graph where the
+     key is a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a> and the value is a single
+     <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that has no nested sub-objects
+     and has had all properties for the same node merged into a single
+     <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
+   </dd>
+</dl>
+
+</div>
+
+<div id="normalization-algorithm" class="section">
+<h4><span class="secno">6.11.3 </span>Normalization Algorithm</h4>
+
+<p>The normalization algorithm expands the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a>,
+flattens the data structure, and creates an initial set of names for all
+nodes in the graph. The flattened data structure is then processed by a
+node labeling algorithm in order to get a fully expanded and named list of
+nodes which is then sorted. The result is a deterministically named and
+ordered list of graph nodes.
+</p>
+
+<ol class="algorithm">
+<li>Expand the <a class="tref internalDFN" title="JSON-LD_input" href="#dfn-json-ld_input">JSON-LD input</a> according to the steps in
+the <a href="#expansion-algorithm">Expansion Algorithm</a> and store the
+result as the <strong>expanded input</strong>.</li>
+<li>Create a <a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a>.</li>
+<li>Initialize the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> by recursively
+processing every <dfn title="expanded_node" id="dfn-expanded_node">expanded node</dfn> in the
+<strong>expanded input</strong> in depth-first order:
+  <ol class="algorithm">
+    <li>If the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> is an unlabeled node, add a
+      new key-value pair to the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>
+      where the key is <code>@subject</code> and the value is the
+      concatenation of the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a>
+      and the string value of the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.
+      Increment the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.</li>
+    <li>Add the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> to the
+      <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>:
+      <ol class="algorithm">
+        <li>If the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is already
+          in the
+          <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> merge all properties from the
+          entry in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> into the
+          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>.</li>
+        <li>Go through every property associated with an array in the
+          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> and remove any duplicate IRI entries from
+          the array. If the resulting array only has one IRI entry, change it
+          from an array to an object.</li>
+        <li>Set the entry for the <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
+          in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> to the
+          <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a>.
+        </li></ol></li>
+    <li>After exiting the recursive step, replace the reference to the
+      <a class="tref internalDFN" title="expanded_node" href="#dfn-expanded_node">expanded node</a> with an object containing a single
+       key-value pair where the key is <code>@iri</code> and the value is
+       the value of the <code>@subject</code> key in the node.</li>
+  </ol></li>
+<li>For every entry in the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>, insert a
+  key-value pair into the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> where the key is the
+  key from the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a> and the value is a
+  <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> where its <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> refers to
+  the value from the <a class="tref internalDFN" title="map_of_flattened_nodes" href="#dfn-map_of_flattened_nodes">map of flattened nodes</a>.
+</li><li>Populate the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> for each <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>
+  by iterating over every node in the graph and adding its <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
+  to the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> associated with each node found in its
+  properties.</li>
+<li>For every entry in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a> that has a
+<a class="tref internalDFN" title="label" href="#dfn-label">label</a> that begins with <code>_:c14n</code>, relabel the node
+using the <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>.
+</li><li>Label all of the nodes that contain a <code>@subject</code> key associated
+with a value starting with <code>_:</code> according to the steps in the
+<a href="#deterministic-labeling-algorithm">Deterministic Labeling Algorithm</a>.
+</li>
+</ol>
+</div>
+
+<div id="node-relabeling-algorithm" class="section">
+<h4><span class="secno">6.11.4 </span>Node Relabeling Algorithm</h4>
+
+<p>This algorithm renames a node by generating a unique
+<dfn title="new_label" id="dfn-new_label">new label</dfn> and updating all references to that <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
+in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>. The <dfn title="old_label" id="dfn-old_label">old label</dfn> and the
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a> must be given as an input to the
+algorithm. The <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> is the current <a class="tref internalDFN" title="label" href="#dfn-label">label</a> of
+the node that is to be relabeled.
+
+</p><p>The node relabeling algorithm is as follows:</p>
+
+<ol class="algorithm">
+  <li>If the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> is <code>_:c14n</code> and the
+    <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> begins with <code>_:c14n</code> then return as
+    the node has already been renamed.
+  </li>
+  <li>Generate the <dfn title="new_label" id="dfn-new_label-1">new label</dfn> by concatenating the
+    <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> with the string value of the
+    <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>. Increment the <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a>.
+  </li>
+  <li>For the <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> associated with the
+  <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a>, update every node in the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>
+  by changing all the properties that reference the <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> to
+  the <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a>.
+  </li>
+  <li>Change the <a class="tref internalDFN" title="old_label" href="#dfn-old_label">old label</a> key in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>
+    to the <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a> and set the associated
+    <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>'s <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the
+    <a class="tref internalDFN" title="new_label" href="#dfn-new_label-1">new label</a>.
+  </li>
+</ol>
+</div>
+
+<div id="deterministic-labeling-algorithm" class="section">
+<h4><span class="secno">6.11.5 </span>Deterministic Labeling Algorithm</h4>
+
+<p>The deterministic labeling algorithm takes the
+<a class="tref internalDFN" title="normalization_state" href="#dfn-normalization_state">normalization state</a>
+and produces a <dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes">list of finished nodes</dfn> that is sorted and
+contains deterministically named and expanded nodes from the graph.
+
+</p><ol class="algorithm">
+  <li>Set the <a class="tref internalDFN" title="labeling_prefix" href="#dfn-labeling_prefix">labeling prefix</a> to <code>_:c14n</code>, the
+    <a class="tref internalDFN" title="labeling_counter" href="#dfn-labeling_counter">labeling counter</a> to <code>1</code>,
+    the <dfn title="list_of_finished_nodes" id="dfn-list_of_finished_nodes-1">list of finished nodes</dfn> to an empty array, and create
+    an empty array, the <dfn title="list_of_unfinished_nodes" id="dfn-list_of_unfinished_nodes">list of unfinished nodes</dfn>.</li>
+  <li>For each <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the <a class="tref internalDFN" title="node_state_map" href="#dfn-node_state_map">node state map</a>:
+    <ol class="algorithm">
+      <li>If the node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> does not start with <code>_:</code>
+        then put the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the
+        <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a>.
+      </li>
+      <li>If the node's <a class="tref internalDFN" title="label" href="#dfn-label">label</a> does start with <code>_:</code>
+        then put the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a> in the
+        <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a>.
+      </li>
+    </ol>
+  </li>
+  <li>Append to the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a> by processing
+    the remainder of the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> until it is
+    empty:
+    <ol class="algorithm">
+      <li>Sort the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> in descending order
+        according to the
+        <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
+        determine the sort order.</li>
+      <li>Create a <dfn title="list_of_labels" id="dfn-list_of_labels">list of labels</dfn> and initialize it to an
+        empty array.</li>
+      <li>For the first node from the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a>:
+        <ol class="algorithm">
+          <li>Add its <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the <a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">list of labels</a>.
+          </li>
+          <li>For each key-value pair from its associated
+            <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, add the key to a list and
+            then sort the list according to the lexicographical order of the
+            keys' associated values. Append the list to the
+            <a class="tref" title="list_of_nodes_to_label">list of nodes to label</a>.
+          </li>
+          <li>For each key-value pair from its associated
+            <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a>, add the key to a list and
+            then sort the list according to the lexicographical order of the
+            keys' associated values. Append the list to the
+            <a class="tref" title="list_of_nodes_to_label">list of nodes to label</a>.
+          </li></ol></li>
+      <li>For each <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the <a class="tref internalDFN" title="list_of_labels" href="#dfn-list_of_labels">list of labels</a>,
+        relabel the associated node according to the
+        <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. If
+        any <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> contains a key that
+        matches the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, clear the map and set the associated
+        <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> to an empty string. If any
+        <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> contains a key that
+        matches the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>, clear the map and set the associated
+        <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> to an empty string.
+      </li>
+      <li>
+        Remove each node with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that starts with
+        <code>_:c14n</code> from the <a class="tref internalDFN" title="list_of_unfinished_nodes" href="#dfn-list_of_unfinished_nodes">list of unfinished nodes</a> and
+        add it to the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a>.
+      </li>
+    </ol>
+  </li>
+  <li>Sort the <a class="tref internalDFN" title="list_of_finished_nodes" href="#dfn-list_of_finished_nodes-1">list of finished nodes</a> in descending order
+    according to the
+    <a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
+    determine the sort order.</li>
+</ol>
+</div>
+
+<div id="shallow-comparison-algorithm" class="section">
+<h4><span class="secno">6.11.6 </span>Shallow Comparison Algorithm</h4>
+
+<p>
+The shallow comparison algorithm takes two unlabeled nodes,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, as input and
+determines which one should come first in a sorted list. The following
+algorithm determines the steps that are executed in order to determine the
+node that should come first in a list:
+</p>
+
+<ol class="algorithm">
+  <li>Compare the total number of node properties. The node with fewer
+    properties is first.</li>
+  <li>Lexicographically sort the property IRIs for each node and compare
+    the sorted lists. If an IRI is found to be lexicographically smaller, the
+    node containing that IRI is first.</li>
+  <li>Compare the values of each property against one another:
+    <ol class="algorithm">
+      <li>The node associated with fewer property values is first.
+      </li>
+      <li>Create an <dfn title="alpha_list" id="dfn-alpha_list">alpha list</dfn> by adding all values associated
+        with the <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> property that are not unlabeled nodes.
+      </li>
+      <li>Create a <dfn title="beta_list" id="dfn-beta_list">beta list</dfn> by adding all values associated
+        with the <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> property that is not an unlabeled node.
+      </li>
+      <li>Compare the length of <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and
+        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a>. The node associated with the list containing
+        the fewer number of items is first.</li>
+      <li>Sort <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a> and <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> according to
+        the
+        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
+        For each offset into the <a class="tref internalDFN" title="alpha_list" href="#dfn-alpha_list">alpha list</a>, compare the item
+        at the offset against the item at the same offset in the
+        <a class="tref internalDFN" title="beta_list" href="#dfn-beta_list">beta list</a> according to the
+        <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
+        The node associated with the lesser item is first.
+    </li></ol></li>
+  <li>Process the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s associated with each node to
+    determine order:
+    <ol class="algorithm">
+      <li>The node with the shortest <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> is first.</li>
+      <li>Sort the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s according to incoming property
+         and then incoming <a class="tref internalDFN" title="label" href="#dfn-label">label</a>.
+      </li><li>The node associated with the fewest number of incoming nodes is
+        first.</li>
+      <li>For each offset into the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>s,
+        compare the associated properties and <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s:
+        <ol class="algorithm">
+          <li>The node associated with a <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that does not begin with
+            <code>_:</code> is first.
+          </li>
+          <li>If the nodes' <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s do not begin with
+            <code>_:</code>, then the node associated with the
+            lexicographically lesser <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is first.</li>
+          
+          <li>The node associated with the lexicographically lesser associated
+            property is first.
+          </li>
+          <li>The node with the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> that does not begin with
+            <code>_:c14n</code> is first.
+          </li>
+          <li>The node with the lexicographically lesser <a class="tref internalDFN" title="label" href="#dfn-label">label</a>
+            is first.
+          </li>
+        </ol>
+    </li></ol></li>
+  <li>Otherwise, the nodes are equivalent.</li>
+</ol></div>
+
+<div id="object-comparison-algorithm" class="section">
+<h4><span class="secno">6.11.7 </span>Object Comparison Algorithm</h4>
+
+<p>
+The object comparison algorithm is designed to compare two graph node
+property values, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>, against the other.
+The algorithm is useful when sorting two lists of graph node properties.
+</p>
+
+<ol class="algorithm">
+  <li>If one of the values is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> and the other is not, the value that is
+    a string is first.
+  </li>
+  <li>If both values are <a class="tref internalDFN" title="string" href="#dfn-string">string</a>s, the lexicographically lesser string is
+    first.
+  </li>
+  <li>If one of the values is a literal and the other is not, the value that is
+    a literal is first.
+  </li>
+  <li>If both values are literals:
+    <ol class="algorithm">
+      <li>The lexicographically lesser string associated with
+        <code>@literal</code> is first.
+      </li>
+      <li>The lexicographically lesser string associated with
+        <code>@datatype</code> is first.
+      </li>
+      <li>The lexicographically lesser string associated with
+        <code>@language</code> is first.
+      </li>
+    </ol>
+  </li>
+  <li>If both values are expanded IRIs, the
+    lexicographically lesser string associated with <code>@iri</code>
+    is first.</li>
+  <li>Otherwise, the two values are equivalent.</li>
+</ol>
+
+</div>
+
+<div id="deep-comparison-algorithm" class="section">
+<h4><span class="secno">6.11.8 </span>Deep Comparison Algorithm</h4>
+
+<p>
+The deep comparison algorithm is used to compare the difference between two
+nodes, <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>.
+A deep comparison takes the incoming and outgoing node edges in
+a graph into account if the number of properties and value of those properties
+are identical. The algorithm is helpful when sorting a list of nodes and will
+return whichever node should be placed first in a list if the two nodes are
+not truly equivalent.
+</p>
+
+<p>When performing the steps required by the deep comparison algorithm, it
+is helpful to track state information about mappings. The information
+contained in a <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> is described below.</p>
+
+<dl class="algorithm">
+   <dt><dfn title="mapping_state" id="dfn-mapping_state">mapping state</dfn></dt>
+   <dd>
+     <dl>
+        <dt><dfn title="mapping_counter" id="dfn-mapping_counter">mapping counter</dfn></dt>
+        <dd>
+          Keeps track of the number of nodes that have been mapped to
+          <a class="tref" title="serialization_labels">serialization labels</a>. It is initialized to
+          <code>1</code>.
+        </dd>
+        <dt><dfn title="processed_labels_map" id="dfn-processed_labels_map">processed labels map</dfn></dt>
+        <dd>
+          Keeps track of the <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of nodes that have already
+          been assigned <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s. It is initialized
+          to an empty map.
+        </dd>
+        <dt><dfn title="serialized_labels_map" id="dfn-serialized_labels_map">serialized labels map</dfn></dt>
+        <dd>
+          Maps a node <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to its associated
+          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>. It is initialized to an empty map.
+        </dd>
+        <dt><dfn title="adjacent_info_map" id="dfn-adjacent_info_map">adjacent info map</dfn></dt>
+        <dd>
+          Maps a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> to the node
+          <a class="tref internalDFN" title="label" href="#dfn-label">label</a> associated with it, the list of sorted
+          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s for adjacent nodes, and the map of
+          adjacent node <a class="tref" title="serialiation_label">serialiation label</a>s to their associated
+          node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s. It is initialized to an empty map.
+        </dd>
+        <dt><dfn title="key_stack" id="dfn-key_stack">key stack</dfn></dt>
+        <dd>
+          A stack where each element contains an array of adjacent
+          <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s and an index into that array. It
+          is initialized to a stack containing a single element where its
+          array contains a single string element <code>s1</code> and its
+          index is set to <code>0</code>.
+        </dd>
+        <dt><dfn title="serialized_keys" id="dfn-serialized_keys">serialized keys</dfn></dt>
+        <dd>
+          Keeps track of which <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s have already
+          been written at least once to the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
+          It is initialized to an empty map.
+        </dd>
+        <dt><dfn title="serialization_string" id="dfn-serialization_string">serialization string</dfn></dt>
+        <dd>
+          A string that is incrementally updated as a serialization is built.
+          It is initialized to an empty string.
+        </dd>
+     </dl>
+   </dd>
+</dl>
+
+<p>The deep comparison algorithm is as follows:</p>
+
+<ol class="algorithm">
+  <li>Perform a comparison between <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+    according to the
+    <a href="#shallow-comparison-algorithm">Shallow Comparison Algorithm</a>.
+    If the result does not show that the two nodes are equivalent, return
+    the result.
+    </li>
+  <li>Compare incoming and outgoing edges for each node, updating their
+    associated <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a> as each node is processed:
+    <ol class="algorithm">
+      <li>If the <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
+        is empty, generate the serialization according to the
+        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+        Provide <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
+        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>,
+        <code>outgoing direction</code> to the algorithm as inputs.
+      </li><li>If the <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a> for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        is empty, generate the serialization according to the
+        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+        Provide <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
+        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, and
+        <code>outgoing direction</code> to the algorithm as inputs.
+      </li><li>If <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> is
+        lexicographically less than <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s, then
+        <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> is first. If it is greater, then <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        is first.</li>
+      <li>If the <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> for <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
+        is empty, generate the serialization according to the
+        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+        Provide <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
+        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> with its <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>
+        set to a copy of <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s
+        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, and
+        <code>incoming direction</code> to the algorithm as inputs.
+      </li><li>If the <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a> for <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        is empty, generate the serialization according to the
+        <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+        Provide <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a new
+        <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> with its <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>
+        set to a copy of <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s
+        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, and
+        <code>incoming direction</code> to the algorithm as inputs.
+      </li><li>If <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>'s <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> is
+        lexicographically less than <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>'s, then
+        <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> is first. If it is greater, then <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a>
+        is first.</li>
+    </ol></li>
+</ol>
+</div>
+
+<div id="node-serialization-algorithm" class="section">
+<h4><span class="secno">6.11.9 </span>Node Serialization Algorithm</h4>
+
+<p>
+The node serialization algorithm takes a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, and a <dfn title="direction" id="dfn-direction">direction</dfn> (either
+<code>outgoing direction</code> or <code>incoming direction</code>) as
+inputs and generates a deterministic serialization for the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
+</p>
+
+<ol class="algorithm">
+<li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> exists in the
+  <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a>, terminate the algorithm as the
+  <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> has already been created.
+</li>
+<li>Set the value associated with the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the
+  <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a> to <code>true</code>.
+</li>
+<li>Generate the next <dfn title="serialization_label" id="dfn-serialization_label-1">serialization label</dfn> for the
+  <a class="tref internalDFN" title="label" href="#dfn-label">label</a> according to the
+  <a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>.
+</li>
+<li>Create an empty map called the <dfn title="adjacent_serialized_labels_map" id="dfn-adjacent_serialized_labels_map">adjacent serialized labels map</dfn>
+that will store mappings from <a class="tref" title="serialized_label">serialized label</a>s to adjacent
+node <a class="tref internalDFN" title="label" href="#dfn-label">label</a>s.</li>
+<li>Create an empty array called the
+<dfn title="adjacent_unserialized_labels_list" id="dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</dfn> that will store
+<a class="tref internalDFN" title="label" href="#dfn-label">label</a>s of adjacent nodes that haven't been assigned
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>s yet.
+</li>
+<li>For every <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in a list, where the list the <a class="tref internalDFN" title="outgoing_list" href="#dfn-outgoing_list">outgoing list</a> if
+the <a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a> is <code>outgoing direction</code> and the
+<a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a> otherwise, if the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> starts with
+<code>_:</code>, it is the <dfn title="target_node_label" id="dfn-target_node_label">target node label</dfn>:
+  <ol class="algorithm">
+    <li>Look up the <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a> in the
+      <a class="tref internalDFN" title="processed_labels_map" href="#dfn-processed_labels_map">processed labels map</a> and if a mapping exists,
+      update the <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a> where the key is
+      the value in the <a class="tref" title="serialization_map">serialization map</a> and the value is the
+      <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a>.</li>
+    <li>Otherwise, add the <a class="tref internalDFN" title="target_node_label" href="#dfn-target_node_label">target node label</a> to the
+      <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a>.
+  </li></ol>
+</li>
+<li>Set the <dfn title="maximum_serialization_combinations" id="dfn-maximum_serialization_combinations">maximum serialization combinations</dfn> to
+  <code>1</code> or the length of the
+  <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a>, whichever is greater.</li>
+<li>While the <a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">maximum serialization combinations</a> is greater than
+  <code>0</code>, perform the
+  <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
+  passing the <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, the <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> for the
+  first iteration and a copy of it for each subsequent iteration, the
+  generated <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, the <a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a>,
+  the <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a>, and the
+  <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a>.
+  Decrement the <a class="tref internalDFN" title="maximum_serialization_combinations" href="#dfn-maximum_serialization_combinations">maximum serialization combinations</a> by
+  <code>1</code> for each iteration.
+</li></ol>
+
+</div>
+
+<div id="serialization-label-generation-algorithm" class="section">
+<h4><span class="secno">6.11.10 </span>Serialization Label Generation Algorithm</h4>
+
+<p>
+The algorithm generates a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> given a
+<a class="tref internalDFN" title="label" href="#dfn-label">label</a> and a <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> and returns the
+<a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>.
+</p>
+
+ <ol class="algorithm">
+   <li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> is already in the
+     <a class="tref" title="serialization_labels_map">serialization labels map</a>, return its associated value.
+   </li>
+   <li>If the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> starts with the string <code>_:c14n</code>,
+     the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> is the letter <code>c</code>
+     followed by the number that follows <code>_:c14n</code> in the
+     <a class="tref internalDFN" title="label" href="#dfn-label">label</a>.
+   </li>
+   <li>Otherwise, the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> is the
+     letter <code>s</code> followed by the string value of
+     <a class="tref" title="mapping_count">mapping count</a>. Increment the <a class="tref" title="mapping_count">mapping count</a> by
+     <code>1</code>.
+   </li>
+   <li>Create a new key-value pair in the <a class="tref" title="serialization_labels_map">serialization labels map</a>
+     where the key is the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> and the value is the
+     generated <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>.
+   </li>
+ </ol>
+</div>
+
+<div id="combinatorial-serialization-algorithm" class="section">
+<h4><span class="secno">6.11.11 </span>Combinatorial Serialization Algorithm</h4>
+
+<p>
+The combinatorial serialization algorithm takes a <a class="tref internalDFN" title="node_state" href="#dfn-node_state">node state</a>, a
+<a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>, a <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>, a
+<a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a>, a <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a>,
+and a <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> as inputs and generates
+the lexicographically least serialization of nodes relating to the
+<a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>.
+</p>
+
+<ol class="algorithm">
+  <li>If the <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> is not empty:
+    <ol class="algorithm">
+      <li>Copy the <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a> to the
+        <dfn title="adjacent_serialized_labels_map_copy" id="dfn-adjacent_serialized_labels_map_copy">adjacent serialized labels map copy</dfn>.</li>
+      <li>Remove the first <a class="tref" title="unserialized_label">unserialized label</a> from the
+        <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> and create a new
+        <dfn title="new_serialization_label" id="dfn-new_serialization_label">new serialization label</dfn> according to the
+        <a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>.
+      </li><li>Create a new key-value mapping in the
+        <a class="tref internalDFN" title="adjacent_serialized_labels_map_copy" href="#dfn-adjacent_serialized_labels_map_copy">adjacent serialized labels map copy</a>
+        where the key is the <a class="tref internalDFN" title="new_serialization_label" href="#dfn-new_serialization_label">new serialization label</a> and the value
+        is the <a class="tref" title="unserialized_label">unserialized label</a>.
+      </li><li>Set the <dfn title="maximum_serialization_rotations" id="dfn-maximum_serialization_rotations">maximum serialization rotations</dfn> to
+        <code>1</code> or the length of the
+        <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a>, whichever is greater.
+      </li>
+      <li>While the <a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">maximum serialization rotations</a> is greater than
+        <code>0</code>:
+        <ol class="algorithm">
+          <li>Recursively perform the
+            <a href="#combinatorial-serialization-algorithm">Combinatorial Serialization Algorithm</a>
+            passing the <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a> for the first iteration of the
+            loop, and a copy of it for each subsequent iteration.
+          </li>
+          <li>Rotate the elements in the
+            <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> by shifting each of
+            them once to the right, moving the element at the end of the list
+            to the beginning of the list.
+          </li>
+          <li>Decrement the <a class="tref internalDFN" title="maximum_serialization_rotations" href="#dfn-maximum_serialization_rotations">maximum serialization rotations</a> by
+            <code>1</code> for each iteration.
+          </li>
+        </ol>
+      </li>
+    </ol>
+  </li>
+  <li>If the <a class="tref internalDFN" title="adjacent_unserialized_labels_list" href="#dfn-adjacent_unserialized_labels_list">adjacent unserialized labels list</a> is empty:
+    <ol class="algorithm">
+      <li>Create a <dfn title="list_of_keys" id="dfn-list_of_keys">list of keys</dfn> from the keys in the
+        <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a> and sort it
+        lexicographically.
+      </li>
+      <li>Add a key-value pair to the <a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">adjacent info map</a> where
+        the key is the <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a> and the value is
+        an object containing the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>'s label, the
+        <a class="tref internalDFN" title="list_of_keys" href="#dfn-list_of_keys">list of keys</a> and the
+        <a class="tref internalDFN" title="adjacent_serialized_labels_map" href="#dfn-adjacent_serialized_labels_map">adjacent serialized labels map</a>.
+      </li>
+      <li>Update the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> according to the
+        <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>.
+      </li>
+      <li>If the <a class="tref internalDFN" title="direction" href="#dfn-direction">direction</a> is <code>outgoing direction</code>
+        then <dfn title="directed_serialization" id="dfn-directed_serialization">directed serialization</dfn> refers to the
+        <a class="tref internalDFN" title="outgoing_serialization" href="#dfn-outgoing_serialization">outgoing serialization</a> and the
+        <dfn title="directed_serialization_map" id="dfn-directed_serialization_map">directed serialization map</dfn> refers to the
+        <a class="tref internalDFN" title="outgoing_serialization_map" href="#dfn-outgoing_serialization_map">outgoing serialization map</a>, otherwise it refers to the
+        <a class="tref internalDFN" title="incoming_serialization" href="#dfn-incoming_serialization">incoming serialization</a> and the
+        <a class="tref internalDFN" title="directed_serialization_map" href="#dfn-directed_serialization_map">directed serialization map</a> refers to the
+        <a class="tref internalDFN" title="incoming_serialization_map" href="#dfn-incoming_serialization_map">incoming serialization map</a>. Compare the
+        <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> to the
+        <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a> according to the
+        <a href="#mapping-serialization-algorithm">Serialization Comparison Algorithm</a>.
+        If the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> is less than or equal to
+        the <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a>:
+        <ol class="algorithm">
+          <li>For each value in the <a class="tref internalDFN" title="list_of_keys" href="#dfn-list_of_keys">list of keys</a>, run the
+            <a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
+          </li>
+	       <li>Update the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> according to the
+	         <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>.
+	       </li>
+	       <li>Compare the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> to the
+	         <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a> again and if it is less than
+	         or equal and the length of the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> is
+	         greater than or equal to the length of the
+	         <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a>, then set the
+	         <a class="tref internalDFN" title="directed_serialization" href="#dfn-directed_serialization">directed serialization</a> to the
+	         <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> and set the
+	         <a class="tref internalDFN" title="directed_serialization_map" href="#dfn-directed_serialization_map">directed serialization map</a> to the
+	         <a class="tref internalDFN" title="serialized_labels_map" href="#dfn-serialized_labels_map">serialized labels map</a>.
+	       </li>
+        </ol>
+      </li>
+    </ol>
+  </li>
+</ol>
+
+</div>
+
+<div id="serialization-comparison-algorithm" class="section">
+<h4><span class="secno">6.11.12 </span>Serialization Comparison Algorithm</h4>
+
+<p>
+The serialization comparison algorithm takes two serializations,
+<a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a> and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> and returns either which of the two
+is less than the other or that they are equal.
+</p>
+
+<ol class="algorithm">
+  <li>Whichever serialization is an empty string is greater. If they are
+    both empty strings, they are equal.</li>
+  <li>Return the result of a lexicographical comparison of <a class="tref internalDFN" title="alpha" href="#dfn-alpha">alpha</a>
+    and <a class="tref internalDFN" title="beta" href="#dfn-beta">beta</a> up to the number of characters in the shortest of
+    the two serializations.
+  </li>
+</ol>
+</div>
+
+<div id="mapping-serialization-algorithm" class="section">
+<h4><span class="secno">6.11.13 </span>Mapping Serialization Algorithm</h4>
+
+<p>
+The mapping serialization algorithm incrementally updates the
+<a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a> in a <a class="tref internalDFN" title="mapping_state" href="#dfn-mapping_state">mapping state</a>.
+</p>
+
+<ol class="algorithm">
+  <li>If the <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a> is not empty:
+    <ol class="algorithm">
+      <li>Pop the <dfn title="serialization_key_info" id="dfn-serialization_key_info">serialization key info</dfn> off of the
+        <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a>.
+      </li>
+      <li>For each <dfn title="serialization_key" id="dfn-serialization_key">serialization key</dfn> in the
+        <a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">serialization key info</a> array, starting at
+        the <dfn title="serialization_key_index" id="dfn-serialization_key_index">serialization key index</dfn> from the
+        <a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">serialization key info</a>:
+        <ol class="algorithm">
+          <li>If the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> is not in the
+            <a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">adjacent info map</a>, push the
+            <a class="tref internalDFN" title="serialization_key_info" href="#dfn-serialization_key_info">serialization key info</a> onto the
+            <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a> and exit from this loop.
+          </li>
+          <li>If the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> is a key in
+            <a class="tref internalDFN" title="serialized_keys" href="#dfn-serialized_keys">serialized keys</a>, a cycle has been detected. Append
+            the concatenation of the <code>_</code> character and the
+            <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> to the
+            <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
+          </li><li>Otherwise, serialize all outgoing and incoming edges in the
+            related node by performing the following steps:
+            <ol class="algorithm">
+              <li>Mark the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> as having
+                been processed by adding a new key-value pair to
+                <a class="tref internalDFN" title="serialized_keys" href="#dfn-serialized_keys">serialized keys</a> where the key
+                is the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> and the value is
+                <code>true</code>.
+              </li>
+              <li>Set the <dfn title="serialization_fragment" id="dfn-serialization_fragment">serialization fragment</dfn> to the value of
+                the <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a>.</li>
+              <li>Set the <a class="tref" title="adjacent_info">adjacent info</a> to the value of the
+                <a class="tref internalDFN" title="serialization_key" href="#dfn-serialization_key">serialization key</a> in the
+                <a class="tref internalDFN" title="adjacent_info_map" href="#dfn-adjacent_info_map">adjacent info map</a>.
+              </li>
+              <li>Set the <a class="tref" title="adjacent_node_label">adjacent node label</a> to the node
+                <a class="tref internalDFN" title="label" href="#dfn-label">label</a> from the <a class="tref" title="adjacent_info">adjacent info</a>.
+              </li>
+              <li>If a mapping for the <a class="tref" title="adjacent_node_label">adjacent node label</a>
+                exists in the <a class="tref" title="map_of_all_labels">map of all labels</a>:
+                <ol class="algorithm">
+                  <li>Append the result of the
+                    <a href="">Label Serialization Algorithm</a> to the
+                    <a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment">serialization fragment</a>.
+                  </li>
+                </ol>
+              </li>
+              <li>Append all of the keys in the <a class="tref" title="adjacent_info">adjacent info</a>
+                to the <a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment">serialization fragment</a>.
+              </li>
+              <li>Append the <a class="tref internalDFN" title="serialization_fragment" href="#dfn-serialization_fragment">serialization fragment</a> to the
+                <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>.
+              </li>
+              <li>Push a new key info object containing the keys from the
+                <a class="tref" title="adjacent_info">adjacent info</a> and an index of <code>0</code>
+                onto the <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a>.
+              </li>
+              <li>Recursively update the <a class="tref internalDFN" title="serialization_string" href="#dfn-serialization_string">serialization string</a>
+                according to the
+                <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>.
+              </li>
+            </ol>
+          </li>
+        </ol>
+      </li>
+    </ol>
+  </li>
+</ol>
+
+</div>
+
+<div id="label-serialization-algorithm" class="section">
+<h4><span class="secno">6.11.14 </span>Label Serialization Algorithm</h4>
+
+<p>
+The label serialization algorithm serializes information about a node that
+has been assigned a particular <a class="tref internalDFN" title="serialization_label" href="#dfn-serialization_label-1">serialization label</a>.
+</p>
+
+<ol class="algorithm">
+  <li>Initialize the <a class="tref" title="label_serialization">label serialization</a> to an empty string.</li>
+  <li>Append the <code>[</code> character to the
+    <a class="tref" title="label_serialization">label serialization</a>.</li>
+  <li>Append all properties to the <a class="tref" title="label_serialization">label serialization</a> by
+    processing each key-value pair in the <a class="tref internalDFN" title="node_reference" href="#dfn-node_reference">node reference</a>,
+    excluding the
+    <code>@subject</code> property. The keys should be processed in
+    lexicographical order and their associated values should be processed
+    in the order produced by the
+    <a href="#object-comparison-algorithm">Object Comparison Algorithm</a>:
+    <ol class="algorithm">
+      <li>Build a string using the pattern <code><</code><strong>KEY</strong><code>></code>
+        where <strong>KEY</strong> is the current key. Append string to the
+        <a class="tref" title="label_serialization">label serialization</a>.</li>
+      <li>The value may be a single object or an array of objects.
+        Process all of the objects that are associated with the key, building
+        an <dfn title="object_string" id="dfn-object_string">object string</dfn> for each item:
+        <ol class="algorithm">
+          <li>If the object contains an <code>@iri</code> key with a
+            value that starts
+            with <code>_:</code>, set the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> to
+            the value <code>_:</code>. If the value does not
+            start with <code>_:</code>, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a>
+            using the pattern
+            <code><</code><strong>IRI</strong><code>></code>
+            where <strong>IRI</strong> is the value associated with the
+            <code>@iri</code> key.</li>
+          <li>If the object contains a <code>@literal</code> key and a
+            <code>@datatype</code> key, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a>
+            using the pattern
+            <code>"</code><strong>LITERAL</strong><code>"^^<</code><strong>DATATYPE</strong><code>></code>
+            where <strong>LITERAL</strong> is the value associated with the
+            <code>@literal</code> key and <strong>DATATYPE</strong> is the
+            value associated with the <code>@datatype</code> key.</li>
+          <li>If the object contains a <code>@literal</code> key and a
+            <code>@language</code> key, build the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a>
+            using the pattern
+            <code>"</code><strong>LITERAL</strong><code>"@</code><strong>LANGUAGE</strong>
+            where <strong>LITERAL</strong> is the value associated with the
+            <code>@literal</code> key and <strong>LANGUAGE</strong> is the
+            value associated with the <code>@language</code> key.</li>
+          <li>Otherwise, the value is a string. Build the
+            <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> using the pattern
+            <code>"</code><strong>LITERAL</strong><code>"</code>
+            where <strong>LITERAL</strong> is the value associated with the
+            current key.</li>
+          <li>If this is the second iteration of the loop,
+            append a <code>|</code> separator character to the
+            <a class="tref" title="label_serialization">label serialization</a>.</li>
+          <li>Append the <a class="tref internalDFN" title="object_string" href="#dfn-object_string">object string</a> to the
+            <a class="tref" title="label_serialization">label serialization</a>.</li>
+        </ol>
+    </li></ol>
+  </li>
+  <li>Append the <code>]</code> character to the
+    <a class="tref" title="label_serialization">label serialization</a>.</li>
+  <li>Append the <code>[</code> character to the
+    <a class="tref" title="label_serialization">label serialization</a>.</li>
+  <li>Append all incoming references for the current
+    <a class="tref internalDFN" title="label" href="#dfn-label">label</a> to the <a class="tref" title="label_serialization">label serialization</a> by
+    processing all of the items associated with the <a class="tref internalDFN" title="incoming_list" href="#dfn-incoming_list">incoming list</a>:
+    <ol class="algorithm">
+      <li>Build a <dfn title="reference_string" id="dfn-reference_string">reference string</dfn>
+        using the pattern <code><</code><strong>PROPERTY</strong><code>></code><code><</code><strong>REFERER</strong><code>></code>
+        where <strong>PROPERTY</strong> is the property associated with the
+        incoming reference and <strong>REFERER</strong> is either the subject of
+        the node referring to the <a class="tref internalDFN" title="label" href="#dfn-label">label</a> in the incoming reference
+        or <code>_:</code> if <strong>REFERER</strong> begins with
+        <code>_:</code>.
+      </li><li>If this is the second iteration of the loop,
+        append a <code>|</code> separator character to the
+        <a class="tref" title="label_serialization">label serialization</a>.</li>
+      <li>Append the <a class="tref internalDFN" title="reference_string" href="#dfn-reference_string">reference string</a> to the
+        <a class="tref" title="label_serialization">label serialization</a>.</li>
+    </ol>
+  </li><li>Append the <code>]</code> character to the
+    <a class="tref" title="label_serialization">label serialization</a>.</li>
+  <li>Append all <a class="tref" title="adjacent_node_labels">adjacent node labels</a> to the
+    <a class="tref" title="label_serialization">label serialization</a> by concatenating the string value
+    for all of them, one after the other, to the
+    <a class="tref" title="label_serialization">label serialization</a>.</li>
+  <li>Push the <a class="tref" title="adjacent_node_labels">adjacent node labels</a> onto the
+    <a class="tref internalDFN" title="key_stack" href="#dfn-key_stack">key stack</a> and append the result of the
+    <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>
+    to the <a class="tref" title="label_serialization">label serialization</a>.
+</li></ol>
+
+</div>
+
+</div>
+
+<div id="data-round-tripping" class="section">
+
+<h3><span class="secno">6.12 </span>Data Round Tripping</h3>
+
+<p>When normalizing <strong>xsd:double</strong> values, implementers <em class="rfc2119" title="must">must</em>
+ensure that the normalized value is a string. In order to generate the
+string from a <strong>double</strong> value, output equivalent to the
+<code>printf("%1.6e", value)</code> function in C <em class="rfc2119" title="must">must</em> be used where
+<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
+is the value to be converted.</p>
+
+<p>To convert the a double value in JavaScript, implementers can use the
+following snippet of code:</p>
+
+<pre class="example">
+// the variable 'value' below is the JavaScript native double value that is to be converted
+(value).toExponential(6).replace(/(e(?:\+|-))([0-9])$/, '$10$2')</pre>
+
+<p class="note">When data needs to be normalized, JSON-LD authors should
+not use values that are going to undergo automatic conversion. This is due
+to the lossy nature of <strong>xsd:double</strong> values.</p>
+
+<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> in some
+versions of PHP. This is problematic when generating a byte
+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 <em class="rfc2119" title="must not">must not</em> backslash-escape 
+forward slashes.</p>
+
+<p class="issue">Round-tripping data can be problematic if we mix and
+match @coerce rules with JSON-native datatypes, like integers. Consider the
+following code example:</p>
+
+<pre class="example">
+var myObj = { "@context" : {
+                "number" : "http://example.com/vocab#number",
+                "@coerce": {
+                   "xsd:nonNegativeInteger": "number"
+                }
+              },
+              "number" : 42 };
+
+// Map the language-native object to JSON-LD
+var jsonldText = jsonld.normalize(myObj);
+
+// Convert the normalized object back to a JavaScript object
+var myObj2 = jsonld.parse(jsonldText);</pre>
+
+<p class="issue">At this point, myObj2 and myObj will have different
+values for the "number" value. myObj will be the number 42, while
+myObj2 will be the string "42". This type of data round-tripping
+error can bite developers. We are currently wondering if having a
+"coerce validation" phase in the parsing/normalization phases would be a
+good idea. It would prevent data round-tripping issues like the
+one mentioned above.</p>
+
+</div>
+
+<div id="rdf-conversion" class="section">
+<h3><span class="secno">6.13 </span>RDF Conversion</h3>
+
+<p>A JSON-LD document <em class="rfc2119" title="may">may</em> be converted to any other RDF-compatible document
+format using the algorithm specified in this section.</p>
+
+<p>
+  The JSON-LD Processing Model describes processing rules for extracting RDF
+  from a JSON-LD document. Note that many uses of JSON-LD may not require
+  generation of RDF.
+</p>
+
+<p>
+The processing algorithm described in this section is provided in
+order to demonstrate how one might implement a JSON-LD to RDF processor.
+Conformant implementations are only required to produce the same type and
+number of triples during the output process and are not required to
+implement the algorithm exactly as described.
+</p>
+
+<p class="issue">The RDF Conversion Algorithm is a work in progress.</p>
+
+<div class="informative section" id="overview">
+  <h4><span class="secno">6.13.1 </span>Overview</h4><p><em>This section is non-normative.</em></p>
+  <p>
+    JSON-LD is intended to have an easy to parse grammar that closely models existing
+    practice in using JSON for describing object representations. This allows the use
+    of existing libraries for parsing JSON in a document-oriented fashion, or can allow
+    for stream-based parsing similar to SAX.
+  </p>
+  <p>
+    As with other grammars used for describing <a class="tref internalDFN" title="Linked_Data" href="#dfn-linked_data">Linked Data</a>, a key concept is that of
+    a <em>resource</em>. Resources may be of three basic types: <em>IRI</em>s, for describing
+    externally named entities, <em>BNodes</em>, resources for which an external name does not
+    exist, or is not known, and Literals, which describe terminal entities such as strings,
+    dates and other representations having a lexical representation possibly including
+    an explicit language or datatype.
+  </p>
+  <p>
+    Data described with JSON-LD may be considered to be the representation of a graph made
+    up of <a class="tref internalDFN" title="subject" href="#dfn-subject-1">subject</a> and <a class="tref internalDFN" title="object" href="#dfn-object">object</a> resources related via a <a class="tref internalDFN" title="property" href="#dfn-property">property</a> resource.
+    However, specific implementations may choose to operate on the document as a normal
+    JSON description of objects having attributes.
+  </p>
+</div>
+
+<div id="rdf-conversion-algorithm-terms" class="section">
+  <h4><span class="secno">6.13.2 </span>RDF Conversion Algorithm Terms</h4>
+  <dl>
+    <dt><dfn title="default_graph" id="dfn-default_graph">default graph</dfn></dt>
+    <dd>
+      the destination graph for all triples generated by JSON-LD markup.
+    </dd>
+  </dl>
+</div>
+
+<div id="rdf-conversion-algorithm" class="section">
+  <h4><span class="secno">6.13.3 </span>RDF Conversion Algorithm</h4>
+  <p>
+    The algorithm below is designed for in-memory implementations with random access to <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> elements.
+  </p>
+  <p>
+    A conforming JSON-LD processor implementing RDF conversion <em class="rfc2119" title="must">must</em> implement a
+    processing algorithm that results in the same <a class="tref internalDFN" title="default_graph" href="#dfn-default_graph">default graph</a> that the following
+    algorithm generates:
+  </p>
+
+  <ol class="algorithm">
+    <li id="processing-step-default-context">
+      Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> with with the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> set to the
+      <a class="tref internalDFN" title="initial_context" href="#dfn-initial_context">initial context</a> and <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      initialized to NULL.
+    </li>
+
+    <li id="processing-step-associative">
+      If a <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> is detected, perform the following steps:
+      <ol class="algorithm">
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@context</code> key, process the local context as
+          described in <a href="#context">Context</a>.
+        </li>
+        <li>
+          Create a new <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> by mapping the keys from the current <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> using the
+          <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> to new keys using the associated value from the current <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.
+          Repeat the mapping until no entry is found within the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> for the key. Use the new
+          <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> in subsequent steps.
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has an <code>@iri</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
+          performing <a href="#iri-expansion">IRI Expansion</a> on the associated value. Generate a
+          triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+          <p class="issue"><code>@iri</code> really just behaves the same as <code>@subject</code>, consider consolidating them.</p>
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@literal</code> key, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>
+          to a literal value as follows:
+          <ol class="algorithm">
+            <li>
+              as a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> if the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> contains a <code>@datatype</code> key
+              after performing <a href="#iri-expansion">IRI Expansion</a> on the specified<code>@datatype</code>.
+            </li>
+            <li>
+              otherwise, as a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a>. If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> contains
+              a <code>@language</code> key, use it's value to set the language of the plain literal.
+            </li>
+            <li>
+              Generate a triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+            </li>
+          </ol>
+        </li>
+        <li id="processing-step-subject">If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@subject</code> key:
+          <ol class="algorithm">
+            <li>
+              If the value is a <a class="tref internalDFN" title="string" href="#dfn-string">string</a>, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the result of performing
+              <a href="#iri-expansion">IRI Expansion</a>. Generate a
+              triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+              <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
+            </li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a>, set the <a class="tref" title="active__subject">active
+              subject</a> to the result and proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> does not have a <code>@subject</code> key, set the <a class="tref" title="active__object">active
+          object</a> to newly generated <dfn title="blank_node_identifier" id="dfn-blank_node_identifier">blank node identifier</dfn>. Generate a triple
+          representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+          <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>. Set the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> to the <a class="tref" title="active__object">active
+          object</a>.
+        </li>
+        <li>
+          For each key in the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> that has not already been processed, perform
+          the following steps:
+          <ol class="algorithm">
+            <li>
+              If the key is <code>@type</code>, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+              to <code>rdf:type</code>.
+            </li>
+            <li>Otherwise, set the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> to the result of performing
+            <a href="#iri-expansion">IRI Expansion</a> on the key.</li>
+            <li>
+              Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+              <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+              starting at <a href="#processing-step-associative">Step 2</a> and proceed using the
+              previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+            </li>
+          </ol>
+        </li>
+        <li>
+          Return the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to the calling location.
+        </li>
+      </ol>
+    </li>
+
+    <li>
+      If a regular <a class="tref internalDFN" title="array" href="#dfn-array">array</a> is detected, process each value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a> by doing the following
+      returning the result of processing the last value in the <a class="tref internalDFN" title="array" href="#dfn-array">array</a>:
+
+      <ol class="algorithm">
+        <li>
+          Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> using copies of the <a class="tref" title="active__context">active
+          context</a>, <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and process the value
+          starting at <a href="#processing-step-associative">Step 2</a> then proceed using the previous
+          <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.
+        </li>
+      </ol>
+    </li>
+
+    <li>
+      If a <a class="tref internalDFN" title="string" href="#dfn-string">string</a> is detected:
+      <ol class="algorithm">
+        <li>
+          If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@iri</code> coercion,
+          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by
+          performing <a href="#iri-expansion">IRI Expansion</a> on the string.
+        </li>
+        <li>
+          Otherwise, if the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of coercion,
+          set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> by creating a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using
+          the string and the coercion key as the datatype IRI.
+        </li>
+        <li>
+          Otherwise, set the <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a> to a <a class="tref internalDFN" title="plain_literal" href="#dfn-plain_literal">plain literal</a> value created from
+          the string.
+        </li>
+      </ol>
+      Generate a
+      triple representing the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the
+      <a class="tref internalDFN" title="active_object" href="#dfn-active_object">active object</a>.
+    </li>
+
+    <li>
+      If a <a class="tref internalDFN" title="number" href="#dfn-number">number</a> is detected, generate a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> using a string representation of
+      the value with datatype set to either <code>xsd:integer</code> or
+      <code>xsd:double</code>, depending on if the value contains a
+      fractional and/or an exponential component. Generate a triple using the <a class="tref" title="active__subject">active
+      subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> and the generated typed literal.
+    </li>
+
+    <li>
+      Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
+      generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+      and a <a class="tref internalDFN" title="typed_literal" href="#dfn-typed_literal">typed literal</a> value created from the string representation of the
+      value with datatype set to <code>xsd:boolean</code>.
+    </li>
+  </ol>
+</div>
+
+
+<!--  THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT
+
+<section>
+<h1>Best Practices</h1>
+
+<p>The nature of Web programming allows one to use basic technologies, such as
+JSON-LD, across a variety of systems and environments. This section attempts to
+describe some of those environments and the way in which JSON-LD can be
+integrated in order to help alleviate certain development headaches.
+</p>
+
+<section>
+<h2>JavaScript</h2>
+
+<p class="issue">It is expected that JSON-LD will be used quite a bit in
+JavaScript environments, however, features like the expanded form for
+object values mean that using JSON-LD directly in JavaScript may be
+annoying without a middleware layer such as a simple library that
+converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
+is a good fit for the RDF API, which enables a variety of RDF-based
+Web Applications, but some don't want to require that level of functionality
+just to use JSON-LD. The group is still discussing the best way to proceed,
+so input on how JSON-LD could more easily be utilized in JavaScript
+environments would be very much appreciated.
+</p>
+</section>
+
+<section>
+<h2>Schema-less Databases</h2>
+
+<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
+schema-less data stores. RDF is a type of schema-less data model and thus
+lends itself to databases such as CouchDB and MongoDB. Both of these databases
+can use JSON-LD as their storage format. The group needs feedback from
+CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
+environments.</p>
+
+<p class="issue">MongoDB does not allow the '.' character to be used in
+key names. This prevents developers from storing IRIs as keys, which also
+prevents storage of the data in normalized form. While this issue can
+be avoided by using <tref>prefix</tref>es for key values, it is not known if this
+mechanism is enough to allow JSON-LD to be used in MongoDB in a way that
+is useful to developers.
+</p>
+
+ -->
+
+</div>
+
+</div>
+
+<div class="appendix section" id="experimental-concepts">
+
+<!-- OddPage -->
+<h2><span class="secno">A. </span>Experimental Concepts</h2>
+
+<p class="issue">There are a few advanced concepts where it is not clear
+whether or not the JSON-LD specification is going to support the complexity
+necessary to support each concept. The entire section on Advanced Concepts
+should be considered as discussion points; it is merely a list of
+possibilities where all of the benefits and drawbacks have not been explored.
+</p>
+
+<div id="disjoint-graphs" class="section">
+<h3><span class="secno">A.1 </span>Disjoint Graphs</h3>
+
+<p>When serializing an RDF graph that contains two or more sections of the
+graph which are entirely disjoint, one must use an <a class="tref internalDFN" title="array" href="#dfn-array">array</a> to express the graph
+as two graphs. This may not be acceptable to some authors, who would rather
+express the information as one graph. Since, by definition, disjoint graphs
+require there to be two top-level objects, JSON-LD utilizes a mechanism that
+allows disjoint graphs to be expressed using a single graph.</p>
+
+<p>Assume the following RDF graph:</p>
+
+<pre class="example">
+&lt;http://example.org/people#john&gt;
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .
+&lt;http://example.org/people#jane&gt;
+   &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt;
+      &lt;http://xmlns.com/foaf/0.1/Person&gt; .</pre>
+
+<p>Since the two subjects are entirely disjoint with one another, it is
+impossible to express the RDF graph above using a single <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a>.</p>
+
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a
+single graph:</p>
+
+<pre class="example">
+{
+  "@context": {
+    "Person": "http://xmlns.com/foaf/0.1/Person"
+  },
+  "@subject":
+  [
+    {
+      "@subject": "http://example.org/people#john",
+      "@type": "Person"
+    },
+    {
+      "@subject": "http://example.org/people#jane",
+      "@type": "Person"
+    }
+  ]
+}</pre>
+
+<p>A disjoint graph could also be expressed like so:</p>
+
+<pre class="example">
+[
+  {
+    "@subject": "http://example.org/people#john",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  },
+  {
+    "@subject": "http://example.org/people#jane",
+    "@type": "http://xmlns.com/foaf/0.1/Person"
+  }
+]</pre>
+
+<p class="note">Warning: Using this serialisation format it is impossible to include <code>@context</code>
+  given that the document's data structure is an array and not an object.</p>
+
+</div>
+
+<div id="lists" class="section">
+  <h3><span class="secno">A.2 </span>Lists</h3>
+  <p>
+    Because graphs do not describe ordering for links between nodes,  in contrast to plain JSON, multi-valued properties
+    in JSON-LD do not provide an ordering of the listed objects. For example, consider the following
+    simple document:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+  <p>
+    This results in three triples being generated, each relating the subject to an individual
+    object, with no inherent order.</p>
+  <p>To preserve the order of the objects, RDF-based languages, such as [<cite><a class="bibref" rel="biblioentry" href="#bib-TURTLE">TURTLE</a></cite>]
+    use the concept of an <code>rdf:List</code> (as described in [<cite><a class="bibref" rel="biblioentry" href="#bib-RDF-SCHEMA">RDF-SCHEMA</a></cite>]). This uses a sequence
+    of unlabeled nodes with properties describing a value, a null-terminated next property. Without
+    specific syntactical support, this could be represented in JSON-LD as follows:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "nick": <span class="diff">{</span>,
+    <span class="diff">"@first": "joe"</span>,
+    <span class="diff">"@rest": {</span>
+      <span class="diff">"@first": "bob"</span>,
+      <span class="diff">"@rest": {</span>
+        <span class="diff">"@first": "jaybee"</span>,
+        <span class="diff">"@rest": "@nil"</span>
+        <span class="diff">}</span>
+      <span class="diff">}</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+}</pre>
+  <p>
+    As this notation is rather unwieldy and the notion of ordered collections is rather important
+    in data modeling, it is useful to have specific language support. In JSON-LD, a list may
+    be represented using the <code>@list</code> keyword as follows:
+  </p>
+  <pre class="example">
+{
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">{"@list": ["joe", "bob", "jaybee"]}</span>,
+...
+}</pre>
+  <p>
+    This describes the use of this <a class="tref internalDFN" title="array" href="#dfn-array">array</a> as being ordered, and order is maintained through
+    normalization and RDF conversion. If every use of a given multi-valued property is a
+    list, this may be abbreviated by adding an <code>@coerce</code> term:
+  </p>
+  <pre class="example">
+{
+  <span class="diff">"@context": {</span>
+    ...
+    <span class="diff">"@coerce": {</span>
+      <span class="diff">"@list": ["foaf:nick"]</span>
+    <span class="diff">}</span>
+  <span class="diff">}</span>,
+...
+  "@subject": "http://example.org/people#joebob",
+  "foaf:nick": <span class="diff">["joe", "bob", "jaybee"]</span>,
+...
+}</pre>
+  <p class="issue">There is an ongoing discussion about this issue. One of the <a href="https://github.com/json-ld/json-ld.org/issues/12">proposed solutions</a> is allowing to change the default behaviour so that arrays are considered as ordered lists by default.</p>
+  <div id="expansion-2" class="section"><h4 id="list-expansion"><span class="secno">A.2.1 </span>Expansion</h4>
+    <p class="issue">TBD.</p>
+  </div>
+  <div id="normalization-2" class="section"><h4 id="list-normalization"><span class="secno">A.2.2 </span>Normalization</h4>
+    <p class="issue">TBD.</p>
+  </div>
+  <div id="rdf-conversion-1" class="section"><h4 id="list-rdf"><span class="secno">A.2.3 </span>RDF Conversion</h4>
+    <p>
+      To support RDF Conversion of lists, <a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>
+      is updated as follows:
+    </p>
+    <ol class="algorithm update">
+      <li>
+        <span class="list-number">2.4a.</span>
+        If the <a class="tref internalDFN" title="JSON_object" href="#dfn-json_object">JSON object</a> has a <code>@list</code> key and the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>
+        process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
+      </li>
+      <li>
+        <span class="list-number">2.7.3.</span>
+        Create a new <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a> copies of the <a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a>,
+        <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a> and <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.
+        <ol class="algorithm">
+          <li>
+            If the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a> is the target of a <code>@list</code> coercion,
+            and the value is an <a class="tref internalDFN" title="array" href="#dfn-array">array</a>,
+            process the value as a list starting at <a href="#processing-step-list">Step 3a</a>.
+          </li>
+          <li>
+            Otherwise, process the value starting at
+            <a href="#processing-step-associative">Step 2</a>.
+          </li>
+          <li>Proceed using the previous <a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">processor state</a>.</li>
+        </ol>
+      </li>
+      <li id="processing-step-list">
+        <span class="list-number">3a.</span>
+        Generate an RDF List by linking
+        each element of the list using <code>rdf:first</code> and <code>rdf:next</code>, terminating the list with <code>rdf:nil</code>
+        using the following sequence:
+        <ol class="algorithm">
+          <li>
+            If the list has no element, generate a triple using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+            and <code>rdf:nil</code>.
+          </li>
+          <li>
+            Otherwise, generate a triple using using the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>
+            and a newly generated BNode identified as <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-1">blank node identifier</dfn></em>.
+          </li>
+          <li>
+            For each element other than the last element in the list:
+            <ol class="algorithm">
+              <li>Create a processor state using the active context, <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-2">blank node identifier</dfn></em> as the <a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">active subject</a>, and <code>rdf:first</code> as the <a class="tref internalDFN" title="active_property" href="#dfn-active_property">active property</a>.</li>
+              <li>Unless this is the last element in the list, generate a new BNode identified as <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-3">blank node identifier</dfn></em>, otherwise use <code>rdf:nil</code>.</li>
+              <li>Generate a new triple using <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-4">blank node identifier</dfn></em>, <code>rdf:rest</code> and <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-5">blank node identifier</dfn></em>.</li>
+              <li>Set <em>first <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-6">blank node identifier</dfn></em> to <em>rest <dfn title="blank_node_identifier" id="dfn-blank_node_identifier-7">blank node identifier</dfn></em>.</li>
+            </ol>
+          </li>
+        </ol>
+      </li>
+    </ol>
+  </div>
+</div>
+
+</div>
+
+<div class="appendix section" id="markup-examples">
+
+<!-- OddPage -->
+<h2><span class="secno">B. </span>Markup Examples</h2>
+
+<p>The JSON-LD markup examples below demonstrate how JSON-LD can be used to
+express semantic data marked up in other languages such as RDFa, Microformats,
+and Microdata. These sections are merely provided as proof that JSON-LD is
+very flexible in what it can express across different Linked Data approaches.
+</p>
+
+<div id="rdfa" class="section">
+<h3><span class="secno">B.1 </span>RDFa</h3>
+
+<p>The following example describes three people with their respective names and
+homepages.</p>
+
+<pre class="example">
+&lt;div <span class="diff">prefix="foaf: http://xmlns.com/foaf/0.1/"</span>&gt;
+   &lt;ul&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/bob/" property="foaf:name" </span>&gt;Bob&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/eve/" property="foaf:name" </span>&gt;Eve&lt;/a&gt;
+      &lt;/li&gt;
+      &lt;li <span class="diff">typeof="foaf:Person"</span>&gt;
+        &lt;a <span class="diff">rel="foaf:homepage" href="http://example.com/manu/" property="foaf:name" </span>&gt;Manu&lt;/a&gt;
+      &lt;/li&gt;
+   &lt;/ul&gt;
+&lt;/div&gt;</pre>
+
+<p>An example JSON-LD implementation is described below, however, there are
+other ways to mark-up this information such that the context is not
+repeated.</p>
+
+<pre class="example">
+{
+  "@context": { "foaf": "http://xmlns.com/foaf/0.1/"},
+  "@subject": [
+   {
+     "@subject": "_:bnode1",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/bob/",
+     "foaf:name": "Bob"
+   },
+   {
+     "@subject": "_:bnode2",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/eve/",
+     "foaf:name": "Eve"
+   },
+   {
+     "@subject": "_:bnode3",
+     "@type": "foaf:Person",
+     "foaf:homepage": "http://example.com/manu/",
+     "foaf:name": "Manu"
+   }
+  ]
+}</pre>
+
+</div>
+
+<div id="microformats" class="section">
+<h3><span class="secno">B.2 </span>Microformats</h3>
+
+<p>The following example uses a simple Microformats hCard example to express
+how the Microformat is represented in JSON-LD.</p>
+
+<pre class="example">
+&lt;div class="vcard"&gt;
+ &lt;a class="url fn" href="http://tantek.com/"&gt;Tantek Çelik&lt;/a&gt;
+&lt;/div&gt;</pre>
+
+<p>The representation of the hCard expresses the Microformat terms in the
+context and uses them directly for the <code>url</code> and <code>fn</code>
+properties. Also note that the Microformat to JSON-LD processor has
+generated the proper URL type for <code>http://tantek.com</code>.</p>
+
+<pre class="example">
+{
+  "@context":
+  {
+    "vcard": "http://microformats.org/profile/hcard#vcard",
+    "url": "http://microformats.org/profile/hcard#url",
+    "fn": "http://microformats.org/profile/hcard#fn",
+    "@coerce": { "@iri": "url" }
+  },
+  "@subject": "_:bnode1",
+  "@type": "vcard",
+  "url": "http://tantek.com/",
+  "fn": "Tantek Çelik"
+}</pre>
+
+</div>
+
+<div id="microdata" class="section">
+<h3><span class="secno">B.3 </span>Microdata</h3>
+
+<p>The Microdata example below expresses book information as a Microdata Work
+item.
+</p>
+
+<pre class="example">
+&lt;dl itemscope
+    itemtype="http://purl.org/vocab/frbr/core#Work"
+    itemid="http://purl.oreilly.com/works/45U8QJGZSQKDH8N"&gt;
+ &lt;dt&gt;Title&lt;/dt&gt;
+ &lt;dd&gt;&lt;cite itemprop="http://purl.org/dc/terms/title"&gt;Just a Geek&lt;/cite&gt;&lt;/dd&gt;
+ &lt;dt&gt;By&lt;/dt&gt;
+ &lt;dd&gt;&lt;span itemprop="http://purl.org/dc/terms/creator"&gt;Wil Wheaton&lt;/span&gt;&lt;/dd&gt;
+ &lt;dt&gt;Format&lt;/dt&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596007683.BOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/BOOK"&gt;
+  Print
+ &lt;/dd&gt;
+ &lt;dd itemprop="http://purl.org/vocab/frbr/core#realization"
+     itemscope
+     itemtype="http://purl.org/vocab/frbr/core#Expression"
+     itemid="http://purl.oreilly.com/products/9780596802189.EBOOK"&gt;
+  &lt;link itemprop="http://purl.org/dc/terms/type" href="http://purl.oreilly.com/product-types/EBOOK"&gt;
+  Ebook
+ &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+
+<p>Note that the JSON-LD representation of the Microdata information stays
+true to the desires of the Microdata community to avoid contexts and
+instead refer to items by their full IRI.</p>
+
+<pre class="example">
+[
+  {
+    "@subject": "http://purl.oreilly.com/works/45U8QJGZSQKDH8N",
+    "@type": "http://purl.org/vocab/frbr/core#Work",
+    "http://purl.org/dc/terms/title": "Just a Geek",
+    "http://purl.org/dc/terms/creator": "Whil Wheaton",
+    "http://purl.org/vocab/frbr/core#realization":
+      ["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596007683.BOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/BOOK"
+  },
+  {
+    "@subject": "http://purl.oreilly.com/products/9780596802189.EBOOK",
+    "@type": "http://purl.org/vocab/frbr/core#Expression",
+    "http://purl.org/dc/terms/type": "http://purl.oreilly.com/product-types/EBOOK"
+  }
+]</pre>
+</div>
+</div>
+
+<div class="appendix section" id="mashing-up-vocabularies">
+
+<!-- OddPage -->
+<h2><span class="secno">C. </span>Mashing Up Vocabularies</h2>
+
+<p>Developers would also benefit by allowing other vocabularies to be used
+automatically with their JSON API. There are over 200
+<a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a> Documents that are available for use on the Web 
+today. Some of these vocabularies are:
+</p>
+
+<ul>
+   <li>RDF - for describing information about objects and concepts on the Web.</li>
+   <li>RDFS - for expressing things like labels and comments.</li>
+   <li>XSD - for specifying basic types like strings, integers, dates and times.</li>
+   <li>Dublin Core - for describing creative works.</li>
+   <li>FOAF - for describing social networks.</li>
+   <li>Calendar - for specifying events.</li>
+   <li>SIOC - for describing discussions on blogs and websites.</li>
+   <li>CCrel - for describing Creative Commons and other types of licenses.</li>
+   <li>GEO - for describing geographic location.</li>
+   <li>VCard - for describing organizations and people.</li>
+   <li>DOAP - for describing projects.</li>
+</ul>
+
+<p>You can use these vocabularies in combination, like so:</p>
+
+<pre class="example">
+{
+  "<span class="diff">@type</span>": "<span class="diff">foaf:Person</span>",
+  "<span class="diff">foaf:name</span>": "Manu Sporny",
+  "<span class="diff">foaf:homepage</span>": "http://manu.sporny.org/",
+  "<span class="diff">sioc:avatar</span>": "http://twitter.com/account/profile_image/manusporny"
+}</pre>
+
+<p>Developers can also specify their own Vocabulary documents by modifying the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">active context</a> in-line using the <code>@context</code> keyword,
+like so:</p>
+
+<pre class="example">
+{
+  <span class="diff">"@context": { "myvocab": "http://example.org/myvocab#" }</span>,
+  "@type": "foaf:Person",
+  "foaf:name": "Manu Sporny",
+  "foaf:homepage": "http://manu.sporny.org/",
+  "sioc:avatar": "http://twitter.com/account/profile_image/manusporny"<span class="diff">,
+  "myvocab:personality": "friendly"</span>
+}</pre>
+
+<p>The <code>@context</code> keyword is used to change how the JSON-LD
+processor evaluates key-value pairs. In this case, it was used to
+map one string ('myvocab') to another string, which is interpreted as
+a <a class="tref internalDFN" title="IRI" href="#dfn-iri">IRI</a>. In the example above, the <code>myvocab</code> string is replaced
+with "<code>http://example.org/myvocab#</code>" when it
+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 <a class="tref internalDFN" title="Web_Vocabulary" href="#dfn-web_vocabulary">Web Vocabulary</a> <a class="tref internalDFN" title="prefix" href="#dfn-prefix-1">prefix</a>, 
+and provides developers an unambiguous way to map any JSON value to RDF.</p><p>
+
+</p></div>
+
+<div class="appendix section" id="iana-considerations">
+
+<!-- OddPage -->
+<h2><span class="secno">D. </span>IANA Considerations</h2>
+
+<p>This section is included merely for standards community review and will be
+submitted to the Internet Engineering Steering Group if this specification
+becomes a W3C Recommendation.</p>
+
+<dl>
+  <dt>Type name:</dt>
+  <dd>application</dd>
+  <dt>Subtype name:</dt>
+  <dd>ld+json</dd>
+  <dt>Required parameters:</dt>
+  <dd>None</dd>
+  <dt>Optional parameters:</dt>
+  <dd>
+    <dl>
+      <dt><code>form</code></dt>
+      <dd>Determines the serialization form for the JSON-LD document. Valid
+        values include; <code>compacted</code>, <code>expanded</code>,
+        <code>framed</code>, and <code>normalized</code>. Other values are
+        allowed, but must be pre-pended with a <code>x-</code> string until
+        they are clearly defined by a stable specification. If no form
+        is specified in an HTTP request header to a responding application,
+        such as a Web server, the application <em class="rfc2119" title="may">may</em> choose any form. If no
+        form is specified for a receiving application, the form <em class="rfc2119" title="must not">must not</em>
+        be assumed to take any particular form.</dd>
+      <div class="issue">It is currently <a href="https://github.com/json-ld/json-ld.org/issues/14"> being discussed to remove form=framed</a> from this specification as there are several issues with it.</div>
+    </dl>
+  </dd>
+  <dt>Encoding considerations:</dt>
+  <dd>The same as the <code>application/json</code> MIME media type.</dd>
+  <dt>Security considerations:</dt>
+  <dd>Since JSON-LD is intended to be a pure data exchange format for
+    directed graphs, the serialization <em class="rfc2119" title="should not">should not</em> be passed through a
+    code execution mechanism such as JavaScript's <code>eval()</code>
+    function. It is <em class="rfc2119" title="recommended">recommended</em> that a conforming parser does not attempt to
+    directly evaluate the JSON-LD serialization and instead purely parse the
+    input into a language-native data structure. </dd>
+  <dt>Interoperability considerations:</dt>
+  <dd>Not Applicable</dd>
+  <dt>Published specification:</dt>
+  <dd>The <a href="http://json-ld/spec/latest/">JSON-LD</a> specification.</dd>
+  <dt>Applications that use this media type:</dt>
+  <dd>Any programming environment that requires the exchange of
+    directed graphs. Implementations of JSON-LD have been created for
+    JavaScript, Python, Ruby, PHP and C++.
+  </dd>
+  <dt>Additional information:</dt>
+  <dd>
+    <dl>
+      <dt>Magic number(s):</dt>
+      <dd>Not Applicable</dd>
+      <dt>File extension(s):</dt>
+      <dd>.jsonld</dd>
+      <dt>Macintosh file type code(s):</dt>
+      <dd>TEXT</dd>
+    </dl>
+  </dd>
+  <dt>Person & email address to contact for further information:</dt>
+  <dd>Manu Sporny <msporny@digitalbazaar.com></dd>
+  <dt>Intended usage:</dt>
+  <dd>Common</dd>
+  <dt>Restrictions on usage:</dt>
+  <dd>None</dd>
+  <dt>Author(s):</dt>
+  <dd>Manu Sporny, Gregg Kellogg, Dave Longley</dd>
+  <dt>Change controller:</dt>
+  <dd>W3C</dd>
+</dl>
+
+</div>
+
+<div class="appendix section" id="acknowledgements">
+
+<!-- OddPage -->
+<h2><span class="secno">E. </span>Acknowledgements</h2>
+
+<p>The editors would like to thank Mark Birbeck, who provided a great deal of
+the initial push behind the JSON-LD work via his work on RDFj,
+Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and
+performed several implementations of the specification, and Ian Davis, who
+created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
+Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
+Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard
+Cyganiak for their input on the specification. Another huge thank you goes out
+to Dave Longley who designed many of the algorithms used in this specification,
+including the normalization algorithm which was a monumentally difficult
+design challenge.
+</p>
+</div>
+
+
+
+<div id="references" class="appendix section">
+<!-- OddPage -->
+<h2><span class="secno">F. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">F.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BCP47">[BCP47]</dt><dd>A. Phillips, M. Davis. <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt"><cite>Tags for Identifying Languages</cite></a> September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/rfc/bcp/bcp47.txt">http://tools.ietf.org/rfc/bcp/bcp47.txt</a>
+</dd><dt id="bib-RDF-CONCEPTS">[RDF-CONCEPTS]</dt><dd>Graham Klyne; Jeremy J. Carroll. <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210"><cite>Resource Description Framework (RDF): Concepts and Abstract Syntax.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-concepts-20040210">http://www.w3.org/TR/2004/REC-rdf-concepts-20040210</a> 
+</dd><dt id="bib-RFC3986">[RFC3986]</dt><dd>T. Berners-Lee; R. Fielding; L. Masinter. <a href="http://www.ietf.org/rfc/rfc3986.txt"><cite>Uniform Resource Identifier (URI): Generic Syntax.</cite></a> January 2005. Internet RFC 3986. URL: <a href="http://www.ietf.org/rfc/rfc3986.txt">http://www.ietf.org/rfc/rfc3986.txt</a> 
+</dd><dt id="bib-RFC3987">[RFC3987]</dt><dd>M. Dürst; M. Suignard. <a href="http://www.ietf.org/rfc/rfc3987.txt"><cite>Internationalized Resource Identifiers (IRIs).</cite></a> January 2005. Internet RFC 3987. URL: <a href="http://www.ietf.org/rfc/rfc3987.txt">http://www.ietf.org/rfc/rfc3987.txt</a> 
+</dd><dt id="bib-RFC4627">[RFC4627]</dt><dd>D. Crockford. <a href="http://www.ietf.org/rfc/rfc4627.txt"><cite>The application/json Media Type for JavaScript Object Notation (JSON)</cite></a> July 2006. Internet RFC 4627. URL: <a href="http://www.ietf.org/rfc/rfc4627.txt">http://www.ietf.org/rfc/rfc4627.txt</a>
+</dd><dt id="bib-WEBIDL">[WEBIDL]</dt><dd>Cameron McCormack. <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219"><cite>Web IDL.</cite></a> 19 December 2008. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2008/WD-WebIDL-20081219">http://www.w3.org/TR/2008/WD-WebIDL-20081219</a> 
+</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">F.2 </span>Informative references</h3><dl class="bibliography"><dt id="bib-ECMA-262">[ECMA-262]</dt><dd><a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm"><cite>ECMAScript Language Specification, Third Edition.</cite></a> December 1999. URL: <a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">http://www.ecma-international.org/publications/standards/Ecma-262.htm</a> 
+</dd><dt id="bib-MICRODATA">[MICRODATA]</dt><dd>Ian Hickson; et al. <a href="http://www.w3.org/TR/microdata/"><cite>Microdata</cite></a> 04 March 2010. W3C Working Draft. URL: <a href="http://www.w3.org/TR/microdata/">http://www.w3.org/TR/microdata/</a> 
+</dd><dt id="bib-MICROFORMATS">[MICROFORMATS]</dt><dd><a href="http://microformats.org"><cite>Microformats</cite></a>. URL: <a href="http://microformats.org">http://microformats.org</a> 
+</dd><dt id="bib-RDF-SCHEMA">[RDF-SCHEMA]</dt><dd>Dan Brickley; Ramanathan V. Guha. <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210"><cite>RDF Vocabulary Description Language 1.0: RDF Schema.</cite></a> 10 February 2004. W3C Recommendation. URL: <a href="http://www.w3.org/TR/2004/REC-rdf-schema-20040210">http://www.w3.org/TR/2004/REC-rdf-schema-20040210</a> 
+</dd><dt id="bib-RDFA-CORE">[RDFA-CORE]</dt><dd>Shane McCarron; et al. <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331"><cite>RDFa Core 1.1: Syntax and processing rules for embedding RDF through attributes.</cite></a> 31 March 2011. W3C Working Draft. URL: <a href="http://www.w3.org/TR/2011/WD-rdfa-core-20110331">http://www.w3.org/TR/2011/WD-rdfa-core-20110331</a> 
+</dd><dt id="bib-TURTLE">[TURTLE]</dt><dd>David Beckett, Tim Berners-Lee. <a href="http://www.w3.org/TeamSubmission/turtle/"><cite>Turtle: Terse RDF Triple Language.</cite></a> January 2008. W3C Team Submission. URL: <a href="http://www.w3.org/TeamSubmission/turtle/">http://www.w3.org/TeamSubmission/turtle/</a> 
+</dd></dl></div></div></body></html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-syntax/20110911/spec.css	Sun Oct 16 01:57:59 2011 -0400
@@ -0,0 +1,4 @@
+ol.algorithm { counter-reset:numsection; list-style-type: none; }
+ol.algorithm li { margin: 0.5em 0; }
+ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
+
--- a/spec/index.php	Sun Oct 16 01:08:39 2011 -0400
+++ b/spec/index.php	Sun Oct 16 01:57:59 2011 -0400
@@ -33,9 +33,11 @@
             <div id="info"> 
                <h1>Specifications</h1> 
                <p>The following specifications are sorted in most recent to
-               least recent order:</p>
+               least recent order.</p>
+               
+               <h2>The JSON-LD Syntax</h2>
                <ul>
-                 <li><a href="latest/">latest</a></li>
+                 <li><a href="latest/json-ld-syntax/">latest</a></li>
 
 htmlcode;
 
@@ -51,6 +53,18 @@
 
 print <<< htmlcode
                </ul>
+
+               <h2>The JSON-LD API</h2>
+               <ul>
+                 <li><a href="latest/json-ld-api/">latest</a></li>
+               </ul>
+
+
+               <h2>RDF Graph Normalization</h2>
+               <ul>
+                 <li><a href="latest/rdf-graph-normalization/">latest</a></li>
+               </ul>
+
             </div>
          </div>
  
--- a/spec/latest/json-ld-syntax/index.html	Sun Oct 16 01:08:39 2011 -0400
+++ b/spec/latest/json-ld-syntax/index.html	Sun Oct 16 01:57:59 2011 -0400
@@ -174,15 +174,12 @@
           // only "name" is required
           editors:  [
               { name: "Manu Sporny", url: "http://manu.sporny.org/",
-                company: "Digital Bazaar", companyURL: "http://digitalbazaar.com/" },
-              { name: "Gregg Kellogg", url: "http://greggkellogg.net/",
-                company: "Kellogg Associates" }
+                company: "Digital Bazaar", companyURL: "http://digitalbazaar.com/" }
           ],
 
           // authors, add as many as you like.
           // This is optional, uncomment if you have authors as well as editors.
           // only "name" is required. Same format as editors.
-
           authors:  [
               { name: "Manu Sporny", url: "http://digitalbazaar.com/",
                 company: "Digital Bazaar", companyURL: "http://digitalbazaar.com/" },