Create timestamped FCGS
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 28 Mar 2013 15:51:20 +0100
changeset 1504 a1bc3776ed3a
parent 1503 44f5b7532fc9
child 1505 64502923dd06
Create timestamped FCGS
spec/FCGS/json-ld-api/20130328/diff-20121225.html
spec/FCGS/json-ld-api/20130328/index.html
spec/FCGS/json-ld/20130328/diff-20130222.html
spec/FCGS/json-ld/20130328/index.html
spec/FCGS/json-ld/20130328/linked-data-graph.png
spec/index.php
spec/latest/json-ld-api/index.html
spec/latest/json-ld/index.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/FCGS/json-ld-api/20130328/diff-20121225.html	Thu Mar 28 15:51:20 2013 +0100
@@ -0,0 +1,41301 @@
+<!DOCTYPE html>
+<html lang="en" dir="ltr" prefix="bibo: http://purl.org/ontology/bibo/" typeof="bibo:Document">
+<head>
+<title>JSON-LD 1.0 Processing Algorithms and API</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+
+
+
+<style type="text/css">
+  .diff {
+    font-weight:bold; color:#0a3;
+  }
+  .error a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+  }
+</style>
+<style>/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- 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;
+}
+
+cite .bibref {
+    font-style: normal;
+}
+
+code {
+    color:  #ff4500;
+}
+
+
+/* --- --- */
+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, ".") ") "; }
+
+/* --- TOC --- */
+.toc a, .tof a {
+    text-decoration:    none;
+}
+
+a .secno, a .figno {
+    color:  #000;
+}
+
+ul.tof, ol.tof {
+    list-style: none outside none;
+}
+
+.caption {
+    margin-top: 0.5em;
+    font-style:   italic;
+}
+
+/* --- 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;
+}
+</style><style>/* --- EXAMPLES --- */
+div.example-title {
+    min-width: 7.5em;
+    color: #b9ab2d;
+}
+div.example-title span {
+    text-transform: uppercase;
+}
+aside.example, div.example, div.illegal-example {
+    padding: 0.5em;
+    margin: 1em 0;
+    position: relative;
+    clear: both;
+}
+div.illegal-example { color: red }
+div.illegal-example p { color: black }
+aside.example, div.example {
+    padding: .5em;
+    border-left-width: .5em;
+    border-left-style: solid;
+    border-color: #e0cb52;
+    background: #fcfaee;
+}
+
+aside.example div.example {
+    border-left-width: .1em;
+    border-color: #999;
+    background: #fff;
+}
+aside.example div.example div.example-title {
+    color: #999;
+}
+</style><style>/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+    padding-right:  1em;
+    min-width: 7.5em;
+    color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #52e052; }
+div.issue-title span, div.note-title span {
+    text-transform: uppercase;
+}
+div.note, div.issue {
+    margin-top: 1em;
+    margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+    padding: .5em;
+    border-left-width: .5em;
+    border-left-style: solid;
+}
+div.issue, div.note {
+    padding: 0.5em;
+    margin: 1em 0;
+    position: relative;
+    clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+    border-color: #e05252;
+    background: #fbe9e9;
+}
+.note {
+    border-color: #52e052;
+    background: #e9fbe9;
+}
+
+
+</style><style>/* --- 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, .idlDictionaryID, .idlCallbackID, .idlEnumID {
+    font-weight:    bold;
+    color:  #005a9c;
+}
+a.idlEnumItem {
+    color:  #000;
+    border-bottom:  1px dotted #ccc;
+    text-decoration: none;
+}
+
+.idlSuperclass {
+    font-style: italic;
+    color:  #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType, .idlMemberType {
+    color:  #005a9c;
+}
+.idlAttrName, .idlFieldName, .idlMemberName {
+    color:  #ff4500;
+}
+.idlAttrName a, .idlFieldName a, .idlMemberName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType, .idlCallbackType {
+    color:  #005a9c;
+}
+.idlMethName {
+    color:  #ff4500;
+}
+.idlMethName a {
+    color:  #ff4500;
+    border-bottom:  1px dotted #ff4500;
+    text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+    color:  #005a9c;
+}
+.idlParamName, .idlDefaultValue {
+    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, dl.dictionary-members {
+    margin-left:    2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .fields dt, .dictionary-members dt {
+    font-weight:    normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .fields dt code, .dictionary-members dt code {
+    font-weight:    bold;
+    color:  #000;
+    font-family:    monospace;
+}
+
+.attributes dt code, .fields dt code, .dictionary-members dt code {
+    background:  #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType 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, .dictionary-members 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%;
+}
+</style><link href="http://www.w3.org/community/src/css/spec/cg-final.css" rel="stylesheet"><!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--><!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--><!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--><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>
+<div class="head">
+<p>
+<a href="http://www.w3.org/">
+<img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72">
+</a>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+<del class="diff-old">Algorithms
+</del>
+1.0
+<del class="diff-old">Algorithms
+for
+</del>
+Processing
+<del class="diff-old">JSON-LD
+Documents
+W3C
+Editor's
+Draft
+25
+December
+2012
+</del>
+<ins class="diff-chg">Algorithms
+and
+API
+</ins></h1><h2 id="final-community-group-specification-28-march-2013"><ins class="diff-chg">
+Final
+Community
+Group
+Specification
+28
+March
+2013
+</ins>
+</h2>
+<dl>
+<dt>
+<del class="diff-old">This
+version:
+http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/ED/json-ld-api/20121225/index.html
+</del>
+Latest
+<del class="diff-old">published
+version:
+</del>
+<ins class="diff-chg">editor's
+draft:
+</ins>
+</dt>
+<dd>
+<del class="diff-old">http://www.w3.org/TR/json-ld-api/
+</del>
+<a href="http://dvcs.w3.org/hg/json-ld/raw-file/spec/latest/json-ld-api/index.html">
+<ins class="diff-chg">http://dvcs.w3.org/hg/json-ld/raw-file/spec/latest/json-ld-api/index.html
+</ins>
+</a>
+</dd>
+<dt>
+<del class="diff-old">Latest
+editor's
+draft:
+</del>
+<ins class="diff-chg">Test
+suite:
+</ins>
+</dt>
+<dd>
+<del class="diff-old">http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html
+</del>
+<a href="http://json-ld.org/test-suite/">
+<ins class="diff-chg">http://json-ld.org/test-suite/
+</ins>
+</a>
+</dd>
+<dt>
+Editors:
+</dt>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<del class="diff-old">Manu
+Sporny
+</del>
+<a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">
+<ins class="diff-chg">Markus
+Lanthaler
+</ins>
+</a>,
+<del class="diff-old">Digital
+Bazaar
+</del>
+<a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">
+<ins class="diff-chg">Graz
+University
+of
+Technology
+</ins>
+</a>
+</span>
+</dd>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</span>
+</dd>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<del class="diff-old">Markus
+Lanthaler
+</del>
+<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://manu.sporny.org/">
+<ins class="diff-chg">Manu
+Sporny
+</ins>
+</a>,
+<del class="diff-old">Graz
+University
+of
+Technology
+</del>
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+<ins class="diff-chg">Digital
+Bazaar
+</ins>
+</a>
+</span>
+</dd>
+<dt>
+Authors:
+</dt>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Dave Longley" href="http://digitalbazaar.com/">
+Dave
+Longley
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<del class="diff-old">Manu
+Sporny
+,
+Digital
+Bazaar
+</del>
+<a rel="foaf:homepage" property="foaf:name" content="Gregg Kellogg" href="http://greggkellogg.net/">
+Gregg
+Kellogg
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://kellogg-assoc.com/">
+Kellogg
+Associates
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Markus Lanthaler" href="http://www.markus-lanthaler.com/">
+Markus
+Lanthaler
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://www.tugraz.at/">
+Graz
+University
+of
+Technology
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://digitalbazaar.com/">
+<ins class="diff-new">Manu
+Sporny
+</ins></a>,<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/"><ins class="diff-new">
+Digital
+Bazaar
+</ins></a></span></dd>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a rel="alternate" href="diff-20121225.html">
+diff
+to
+previous
+version
+</a>
+</p>
+<p class="copyright">
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
+Copyright
+</a>

+<del class="diff-old">2010-2012
+W3C

+(
+MIT
+,
+ERCIM
+,
+Keio
+</del>
+<ins class="diff-chg">2010-2013
+the
+Contributors
+to
+the
+JSON-LD
+1.0
+Processing
+Algorithms
+and
+API
+Specification,
+published
+by
+the
+</ins><a href="http://www.w3.org/2011/rdf-wg/"><ins class="diff-chg">
+RDF
+Working
+Group
+</ins>
+</a>
+<del class="diff-old">),
+All
+Rights
+Reserved.
+</del>
+<ins class="diff-chg">under
+the
+</ins><a href="https://www.w3.org/community/about/agreements/fsa/">
+W3C
+<del class="diff-old">liability
+,
+trademark
+and
+document
+use
+</del>
+<ins class="diff-chg">Community
+Final
+Specification
+Agreement
+(FSA)
+</ins></a>.<ins class="diff-chg">
+A
+human-readable
+</ins><a href="http://www.w3.org/community/about/agreements/fsa-deed/"><ins class="diff-chg">
+summary
+</ins>
+</a>
+<del class="diff-old">rules
+apply.
+</del>
+<ins class="diff-chg">is
+available.
+</ins>
+</p>
+<hr>
+</div>
+<section rel="bibo:chapter" resource="#abstract" typeof="bibo:Chapter" datatype="" property="dcterms:abstract" class="introductory" id="abstract">
+<h2>
+Abstract
+</h2>
+<p>
+<del class="diff-old">JSON
+[
+RFC4627
+]
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+JSON-LD
+[
+JSON-LD
+]
+harmonizes
+the
+representation
+of
+Linked
+Data
+in
+JSON
+by
+outlining
+a
+common
+JSON
+representation
+format
+for
+expressing
+directed
+graphs;
+mixing
+both
+Linked
+Data
+and
+non-Linked
+Data
+in
+a
+single
+document.
+</del>
+This
+<del class="diff-old">document
+outlines
+</del>
+<ins class="diff-chg">specification
+defines
+</ins>
+an
+Application
+Programming
+Interface
+<ins class="diff-new">(API)
+</ins>
+and
+a
+set
+of
+algorithms
+for
+<del class="diff-old">programmatically
+transforming
+</del>
+<ins class="diff-chg">programmatic
+transformations
+of
+</ins>
+JSON-LD
+<del class="diff-old">documents
+</del>
+<ins class="diff-chg">documents.
+By
+expressing
+the
+data
+</ins>
+in
+<del class="diff-old">order
+to
+make
+them
+easier
+</del>
+<ins class="diff-chg">a
+way
+that
+is
+specifically
+tailored
+</ins>
+to
+<del class="diff-old">work
+with
+in
+programming
+environments
+like
+JavaScript,
+Python,
+and
+Ruby.
+</del>
+<ins class="diff-chg">a
+particular
+use
+case,
+the
+processing
+typically
+becomes
+much
+simpler.
+</ins>
+</p>
+</section>
+<section rel="bibo:chapter" resource="#sotd" typeof="bibo:Chapter" id="sotd" class="introductory">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+This
+<del class="diff-old">section
+describes
+the
+status
+of
+this
+document
+at
+</del>
+<ins class="diff-chg">specification
+was
+published
+by
+</ins>
+the
+<del class="diff-old">time
+of
+its
+publication.
+Other
+documents
+may
+supersede
+this
+document.
+A
+list
+of
+current
+</del>
+<a href="http://www.w3.org/2011/rdf-wg/">
+<ins class="diff-chg">RDF
+Working
+Group
+</ins></a>.<ins class="diff-chg">
+It
+is
+not
+a
+</ins>
+W3C
+<del class="diff-old">publications
+and
+</del>
+<ins class="diff-chg">Standard
+nor
+is
+it
+on
+</ins>
+the
+<del class="diff-old">latest
+revision
+of
+this
+technical
+report
+can
+be
+found
+in
+</del>
+<ins class="diff-chg">W3C
+Standards
+Track.
+Please
+note
+that
+under
+</ins>
+the
+<a href="https://www.w3.org/community/about/agreements/final/">
+W3C
+<del class="diff-old">technical
+reports
+index
+</del>
+<ins class="diff-chg">Community
+Final
+Specification
+Agreement
+(FSA)
+</ins>
+</a>
+<del class="diff-old">at
+http://www.w3.org/TR/.
+</del>
+<ins class="diff-chg">other
+conditions
+apply.
+Learn
+more
+about
+</ins><a href="http://www.w3.org/community/"><ins class="diff-chg">
+W3C
+Community
+and
+Business
+Groups
+</ins></a>.
+</p>
+<p>
+This
+document
+has
+been
+under
+development
+for
+over
+<del class="diff-old">18
+</del>
+<ins class="diff-chg">25
+</ins>
+months
+in
+the
+JSON
+for
+Linking
+Data
+Community
+Group.
+The
+document
+has
+recently
+been
+transferred
+to
+the
+RDF
+Working
+Group
+for
+review,
+improvement,
+and
+publication
+along
+the
+Recommendation
+track.
+The
+specification
+has
+undergone
+significant
+development,
+review,
+and
+changes
+during
+the
+course
+of
+the
+last
+<del class="diff-old">18
+</del>
+<ins class="diff-chg">25
+</ins>
+months.
+</p>
+<p>
+There
+are
+several
+independent
+<a href="http://json-ld.org/#impl">
+interoperable
+implementations
+</a>
+of
+this
+specification.
+There
+is
+a
+<a href="https://github.com/json-ld/json-ld.org/tree/master/test-suite">
+fairly
+complete
+test
+suite
+</a>
+and
+a
+<a href="http://json-ld.org/playground/">
+live
+JSON-LD
+editor
+</a>
+that
+is
+capable
+of
+demonstrating
+the
+features
+described
+in
+this
+document.
+While
+<ins class="diff-new">there
+will
+be
+continuous
+</ins>
+development
+on
+implementations,
+the
+test
+<del class="diff-old">suite
+</del>
+<ins class="diff-chg">suite,
+</ins>
+and
+the
+live
+<del class="diff-old">editor
+will
+continue,
+</del>
+<ins class="diff-chg">editor,
+</ins>
+they
+are
+believed
+to
+be
+mature
+enough
+to
+be
+integrated
+into
+a
+non-production
+system
+at
+this
+point
+in
+<del class="diff-old">time
+with
+the
+</del>
+<ins class="diff-chg">time.
+There
+is
+an
+</ins>
+expectation
+that
+they
+could
+be
+used
+in
+a
+production
+system
+within
+the
+next
+<del class="diff-old">year.
+</del>
+<ins class="diff-chg">six
+months.
+</ins>
+</p>
+<div class="issue">
+<div class="issue-title">
+<span>
+Issue
+</span>
+</div>
+<p class="">
+It
+is
+important
+for
+readers
+to
+understand
+that
+the
+scope
+of
+this
+document
+is
+currently
+under
+debate
+and
+new
+features
+may
+be
+added
+to
+the
+specification.
+Existing
+features
+may
+be
+modified
+heavily
+or
+removed
+entirely
+from
+the
+specification
+upon
+further
+review
+and
+feedback
+from
+the
+broader
+community.
+This
+is
+a
+work
+in
+progress
+and
+publication
+as
+a
+Working
+Draft
+does
+not
+require
+that
+all
+Working
+Group
+members
+agree
+on
+the
+content
+of
+the
+document.
+</p>
+</div>
+<p>
+There
+are
+a
+number
+of
+ways
+that
+one
+may
+participate
+in
+the
+development
+of
+this
+specification:
+</p>
+<ul>
+<li>
+If
+you
+want
+to
+make
+sure
+that
+your
+feedback
+is
+formally
+addressed
+by
+the
+RDF
+Working
+Group,
+you
+should
+send
+it
+to
+public-rdf-comments:
+<a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">
[email protected]
+</a>
+</li>
+<li>
+Ad-hoc
+technical
+discussion
+primarily
+occurs
+on
+the
+public
+community
+mailing
+list:
+<a href="http://lists.w3.org/Archives/Public/public-linked-json/">
[email protected]
+</a>
+</li>
+<li>
+<a href="http://json-ld.org/minutes/">
+Public
+JSON-LD
+Community
+Group
+teleconferences
+</a>
+are
+held
+on
+Tuesdays
+at
+1500UTC
+every
+week.
+Participation
+is
+open
+to
+the
+public.
+</li>
+<li>
+RDF
+Working
+Group
+teleconferences
+are
+held
+on
+Wednesdays
+at
+1500UTC
+every
+week.
+Participation
+is
+limited
+to
+RDF
+Working
+Group
+members.
+</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>
+if
+you
+do
+not
+want
+to
+send
+an
+<del class="diff-old">e-mail
+</del>
+<ins class="diff-chg">email
+</ins>
+to
+the
+public-rdf-comments
+mailing
+list.
+</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>
+<del class="diff-old">This
+document
+was
+published
+by
+the
+RDF
+Working
+Group
+as
+an
+Editor's
+Draft.
+If
+you
+wish
+to
+make
+comments
+regarding
+this
+document,
+please
+send
+them
+to
[email protected]
+(
+subscribe
+,
+archives
+).
+All
+feedback
+is
+welcome.
+Publication
+as
+an
+Editor's
+Draft
+does
+not
+imply
+endorsement
+by
+the
+W3C
+Membership.
+This
+is
+a
+draft
+document
+and
+may
+be
+updated,
+replaced
+or
+obsoleted
+by
+other
+documents
+at
+any
+time.
+It
+is
+inappropriate
+to
+cite
+this
+document
+as
+other
+than
+work
+in
+progress.
+This
+document
+was
+produced
+by
+a
+group
+operating
+under
+the
+5
+February
+2004
+W3C
+Patent
+Policy
+.
+W3C
+maintains
+a
+public
+list
+of
+any
+patent
+disclosures
+made
+in
+connection
+with
+the
+deliverables
+of
+the
+group;
+that
+page
+also
+includes
+instructions
+for
+disclosing
+a
+patent.
+An
+individual
+who
+has
+actual
+knowledge
+of
+a
+patent
+which
+the
+individual
+believes
+contains
+Essential
+Claim(s)
+must
+disclose
+the
+information
+in
+accordance
+with
+section
+6
+of
+the
+W3C
+Patent
+Policy
+.
+</del>
+</section>
+<section id="toc">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#introduction">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#features">
+<span class="secno">
+2.
+</span>
+Features
+</a>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#expansion">
+<span class="secno">
+2.1
+</span>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#compaction">
+<span class="secno">
+2.2
+</span>
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#flattening">
+<span class="secno">
+2.3
+</span>
+Flattening
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#rdf-conversion">
+<span class="secno">
+2.4
+</span>
+RDF
+Conversion
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#conformance">
+<span class="secno">
+3.
+</span>
+Conformance
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#general-terminology">
+<span class="secno">
+4.
+</span>
+General
+Terminology
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#algorithm-terms">
+<span class="secno">
+5.
+</span>
+<del class="diff-old">Algorithms
+</del>
+<ins class="diff-chg">Algorithm
+Terms
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#context-processing-algorithms">
+<span class="secno">
+<del class="diff-old">5.1
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+<del class="diff-old">Algorithm
+Terms
+</del>
+<ins class="diff-chg">Context
+Processing
+Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#context-processing-algorithm">
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+<del class="diff-old">Expansion
+</del>
+<ins class="diff-chg">Context
+Processing
+</ins>
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#create-term-definition">
+<span class="secno">
+<del class="diff-old">5.3
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+<del class="diff-old">Context
+Processing
+</del>
+<ins class="diff-chg">Create
+Term
+Definition
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#iri-expansion">
+<span class="secno">
+<del class="diff-old">5.4
+</del>
+<ins class="diff-chg">6.3
+</ins>
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#expansion-algorithms">
+<span class="secno">
+<del class="diff-old">5.5
+</del>
+<ins class="diff-chg">7.
+</ins>
+</span>
+<del class="diff-old">Value
+</del>
+Expansion
+<ins class="diff-new">Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#expansion-algorithm">
+<span class="secno">
+<del class="diff-old">5.6
+</del>
+<ins class="diff-chg">7.1
+</ins>
+</span>
+<del class="diff-old">Label
+Blank
+Nodes
+</del>
+<ins class="diff-chg">Expansion
+</ins>
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#value-expansion">
+<span class="secno">
+<del class="diff-old">5.7
+</del>
+<ins class="diff-chg">7.2
+</ins>
+</span>
+<del class="diff-old">Generate
+Blank
+Node
+Identifier
+</del>
+<ins class="diff-chg">Value
+Expansion
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#compaction-algorithms">
+<span class="secno">
+<del class="diff-old">5.8
+</del>
+<ins class="diff-chg">8.
+</ins>
+</span>
+Compaction
+<del class="diff-old">Algorithm
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#compaction-algorithm">
+<span class="secno">
+<del class="diff-old">5.9
+</del>
+<ins class="diff-chg">8.1
+</ins>
+</span>
+<del class="diff-old">IRI
+</del>
+Compaction
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#inverse-context-creation">
+<span class="secno">
+<del class="diff-old">5.10
+</del>
+<ins class="diff-chg">8.2
+</ins>
+</span>
+Inverse
+Context
+Creation
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#iri-compaction">
+<span class="secno">
+<del class="diff-old">5.11
+</del>
+<ins class="diff-chg">8.3
+</ins>
+</span>
+<del class="diff-old">Inverse
+Context
+Query
+Algorithm
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+Compaction
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#term-selection">
+<span class="secno">
+<del class="diff-old">5.12
+</del>
+<ins class="diff-chg">8.4
+</ins>
+</span>
+<del class="diff-old">Value
+Compaction
+</del>
+<ins class="diff-chg">Term
+Selection
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#value-compaction">
+<span class="secno">
+<del class="diff-old">5.13
+</del>
+<ins class="diff-chg">8.5
+</ins>
+</span>
+<del class="diff-old">Find
+and
+Remove
+Property
+Generator
+Duplicates
+</del>
+<ins class="diff-chg">Value
+Compaction
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#flattening-algorithms">
+<span class="secno">
+<del class="diff-old">5.14
+</del>
+<ins class="diff-chg">9.
+</ins>
+</span>
+Flattening
+<del class="diff-old">Algorithm
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#flattening-algorithm">
+<span class="secno">
+<del class="diff-old">5.15
+</del>
+<ins class="diff-chg">9.1
+</ins>
+</span>
+<del class="diff-old">Node
+Map
+Generation
+</del>
+<ins class="diff-chg">Flattening
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#node-map-generation">
+<span class="secno">
+<del class="diff-old">5.16
+</del>
+<ins class="diff-chg">9.2
+</ins>
+</span>
+<del class="diff-old">RDF
+Conversion
+Algorithms
+</del>
+<ins class="diff-chg">Node
+Map
+Generation
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#generate-blank-node-identifier">
+<span class="secno">
+<del class="diff-old">5.16.1
+</del>
+<ins class="diff-chg">9.3
+</ins>
+</span>
+<del class="diff-old">Convert
+to
+RDF
+Algorithm
+</del>
+<ins class="diff-chg">Generate
+Blank
+Node
+Identifier
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#rdf-conversion-algorithms">
+<span class="secno">
+<del class="diff-old">5.16.2
+</del>
+<ins class="diff-chg">10.
+</ins>
+</span>
+<del class="diff-old">List
+</del>
+<ins class="diff-chg">RDF
+</ins>
+Conversion
+<ins class="diff-new">Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#convert-to-rdf-algorithm">
+<span class="secno">
+<del class="diff-old">5.16.3
+</del>
+<ins class="diff-chg">10.1
+</ins>
+</span>
+Convert
+<del class="diff-old">from
+</del>
+<ins class="diff-chg">to
+</ins>
+RDF
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#object-to-rdf-conversion">
+<span class="secno">
+<del class="diff-old">5.16.4
+</del>
+<ins class="diff-chg">10.2
+</ins>
+</span>
+<del class="diff-old">Data
+Round
+Tripping
+</del>
+<ins class="diff-chg">Object
+to
+RDF
+Conversion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<del class="diff-old">6.
+The
+Application
+Programming
+Interface
+</del>
+<a class="tocxref" href="#list-to-rdf-conversion">
+<span class="secno">
+<del class="diff-old">6.1
+</del>
+<ins class="diff-chg">10.3
+</ins>
+</span>
+<del class="diff-old">JsonLdProcessor
+</del>
+<ins class="diff-chg">List
+to
+RDF
+Conversion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#convert-from-rdf-algorithm">
+<span class="secno">
+<del class="diff-old">6.1.1
+</del>
+<ins class="diff-chg">10.4
+</ins>
+</span>
+<del class="diff-old">Methods
+</del>
+<ins class="diff-chg">Convert
+from
+RDF
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#rdf-to-object-conversion">
+<span class="secno">
+<del class="diff-old">6.2
+</del>
+<ins class="diff-chg">10.5
+</ins>
+</span>
+<del class="diff-old">Callbacks
+</del>
+<ins class="diff-chg">RDF
+to
+Object
+Conversion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#data-round-tripping">
+<span class="secno">
+<del class="diff-old">6.2.1
+</del>
+<ins class="diff-chg">10.6
+</ins>
+</span>
+<del class="diff-old">JsonLdCallback
+</del>
+<ins class="diff-chg">Data
+Round
+Tripping
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#the-application-programming-interface">
+<span class="secno">
+<del class="diff-old">6.3
+</del>
+<ins class="diff-chg">11.
+</ins>
+</span>
+<del class="diff-old">Data
+Structures
+</del>
+<ins class="diff-chg">The
+Application
+Programming
+Interface
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#jsonldprocessor">
+<span class="secno">
+<del class="diff-old">6.3.1
+</del>
+<ins class="diff-chg">11.1
+</ins>
+</span>
+<del class="diff-old">JsonLdOptions
+</del>
+<ins class="diff-chg">JsonLdProcessor
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#callbacks">
+<span class="secno">
+<del class="diff-old">6.3.2
+</del>
+<ins class="diff-chg">11.2
+</ins>
+</span>
+<del class="diff-old">JsonLdProcessingError
+</del>
+<ins class="diff-chg">Callbacks
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#data-structures">
+<span class="secno">
+<del class="diff-old">6.3.3
+</del>
+<ins class="diff-chg">11.3
+</ins>
+</span>
+<del class="diff-old">JsonLdErrorCode
+</del>
+<ins class="diff-chg">Data
+Structures
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#acknowledgements">
+<span class="secno">
+A.
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#references">
+<span class="secno">
+B.
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a class="tocxref" href="#normative-references">
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a class="tocxref" href="#informative-references">
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</section>
+<section id="introduction" class="informative">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+an
+Application
+Programming
+Interface
+for
+the
+JSON-LD
+<del class="diff-old">Syntax.
+</del>
+<ins class="diff-chg">syntax.
+</ins>
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+<ins class="diff-new">Developers
+that
+want
+an
+overview
+of
+the
+JSON-LD
+API.
+</ins></li><li>
+Web
+authors
+and
+developers
+that
+want
+a
+very
+detailed
+view
+of
+how
+a
+JSON-LD
+<del class="diff-old">processor
+and
+the
+</del>
+<ins class="diff-chg">Implementation
+or
+a
+JSON-LD
+Processor's
+</ins>
+API
+operates.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+implement
+<del class="diff-old">processors
+and
+APIs
+for
+JSON-LD.
+</del>
+<ins class="diff-chg">the
+algorithms
+to
+transform
+JSON-LD
+documents.
+</ins>
+</li>
+</ul>
+<p>
+To
+understand
+the
+basics
+in
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a href="#bib-RFC4627" class="bibref">
+RFC4627
+</a>
+</cite>
+].
+You
+must
+also
+understand
+the
+JSON-LD
+Syntax
+[
+<cite>
+<a href="#bib-JSON-LD" class="bibref">
+JSON-LD
+</a>
+</cite>
+],
+which
+is
+the
+base
+syntax
+used
+by
+all
+of
+the
+algorithms
+in
+this
+document.
+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 href="#bib-ECMA-262" class="bibref">
+ECMA-262
+</a>
+</cite>
+]
+and
+WebIDL
+[
+<cite>
+<a href="#bib-WEBIDL" class="bibref">
+WEBIDL
+</a>
+</cite>
+].
+To
+understand
+how
+JSON-LD
+maps
+to
+RDF,
+it
+is
+helpful
+to
+be
+familiar
+with
+the
+basic
+RDF
+concepts
+[
+<cite>
+<del class="diff-old">RDF-CONCEPTS
+</del>
+<a href="#bib-RDF11-CONCEPTS" class="bibref">
+<ins class="diff-chg">RDF11-CONCEPTS
+</ins>
+</a>
+</cite>
+].
+</p>
+</section>
+<section id="features" class="informative">
+<h2>
+<span class="secno">
+2.
+</span>
+Features
+</h2>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+The
+JSON-LD
+Syntax
+specification
+[
+<cite>
+<a href="#bib-JSON-LD" class="bibref">
+JSON-LD
+</a>
+</cite>
+]
+outlines
+a
+<del class="diff-old">language
+</del>
+<ins class="diff-chg">syntax
+</ins>
+that
+may
+be
+used
+to
+express
+Linked
+Data
+in
+JSON.
+<del class="diff-old">Often,
+</del>
+<ins class="diff-chg">Because
+there
+is
+more
+than
+one
+way
+to
+express
+Linked
+Data
+using
+this
+syntax,
+</ins>
+it
+is
+<ins class="diff-new">often
+</ins>
+useful
+to
+be
+able
+to
+transform
+JSON-LD
+documents
+so
+that
+they
+may
+be
+<ins class="diff-new">more
+</ins>
+easily
+<del class="diff-old">processed
+</del>
+<ins class="diff-chg">consumed
+by
+specific
+applications.
+</ins></p><p><ins class="diff-chg">
+The
+way
+JSON-LD
+allows
+Linked
+Data
+to
+be
+expressed
+</ins>
+in
+<del class="diff-old">various
+programming
+environments.
+</del>
+<ins class="diff-chg">a
+way
+that
+is
+specifically
+tailored
+to
+a
+particular
+person
+or
+application
+is
+by
+providing
+a
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a>.<ins class="diff-chg">
+By
+providing
+a
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a>,<ins class="diff-chg">
+JSON
+data
+can
+be
+expressed
+in
+a
+way
+that
+is
+a
+natural
+fit
+for
+a
+particular
+person
+or
+application
+whilst
+also
+indicating
+how
+the
+data
+should
+be
+understood
+at
+a
+global
+scale.
+In
+order
+for
+people
+or
+applications
+to
+share
+data
+that
+was
+created
+using
+a
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+that
+is
+different
+from
+their
+own,
+a
+JSON-LD
+processor
+must
+be
+able
+to
+transform
+a
+document
+from
+one
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+to
+another.
+Instead
+of
+requiring
+JSON-LD
+processors
+to
+write
+specific
+code
+for
+every
+imaginable
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+switching
+scenario,
+it
+is
+much
+easier
+to
+specify
+a
+single
+algorithm
+that
+can
+remove
+any
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a>.<ins class="diff-chg">
+Similarly,
+another
+algorithm
+can
+be
+specified
+to
+subsequently
+apply
+any
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a>.<ins class="diff-chg">
+These
+two
+algorithms
+represent
+the
+most
+basic
+transformations
+of
+JSON-LD
+documents.
+They
+are
+referred
+to
+as
+</ins><a href="#dfn-expansion" title="expansion" class="tref internalDFN"><ins class="diff-chg">
+expansion
+</ins></a><ins class="diff-chg">
+and
+</ins><a href="#dfn-compaction" title="compaction" class="tref internalDFN"><ins class="diff-chg">
+compaction
+</ins></a>,<ins class="diff-chg">
+respectively.
+</ins>
+</p>
+<p>
+There
+are
+four
+major
+types
+of
+transformation
+that
+are
+discussed
+in
+this
+document:
+expansion,
+compaction,
+flattening,
+and
+RDF
+conversion.
+</p>
+<section id="expansion" class="informative">
+<h3>
+<span class="secno">
+2.1
+</span>
+Expansion
+</h3>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+<del class="diff-old">Software
+algorithms
+are
+easiest
+to
+write
+when
+the
+data
+</del>
+<ins class="diff-chg">The
+algorithm
+</ins>
+that
+<del class="diff-old">they
+are
+processing
+have
+</del>
+<ins class="diff-chg">removes
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+is
+called
+</ins><dfn id="dfn-expansion" title="expansion"><ins class="diff-chg">
+expansion
+</ins></dfn>.<ins class="diff-chg">
+Before
+performing
+any
+other
+transformations
+on
+</ins>
+a
+<del class="diff-old">regular
+form.
+Since
+information
+can
+be
+represented
+by
+</del>
+JSON-LD
+<del class="diff-old">in
+a
+variety
+of
+different
+ways,
+transforming
+</del>
+<ins class="diff-chg">document,
+it
+is
+easiest
+to
+remove
+any
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+from
+it,
+localizing
+</ins>
+all
+<ins class="diff-new">information,
+and
+to
+make
+data
+structures
+more
+regular.
+</ins></p><p><ins class="diff-new">
+To
+get
+an
+idea
+</ins>
+of
+<del class="diff-old">these
+methods
+into
+a
+uniform
+structure
+allows
+</del>
+<ins class="diff-chg">how
+context
+and
+data
+structuring
+affects
+</ins>
+the
+<del class="diff-old">developer
+to
+simplify
+their
+processing
+code.
+For
+example,
+note
+</del>
+<ins class="diff-chg">same
+data,
+here
+is
+an
+example
+of
+JSON-LD
+</ins>
+that
+<del class="diff-old">the
+following
+input
+</del>
+uses
+only
+<del class="diff-old">term
+</del>
+<a href="#dfn-term" title="term" class="tref internalDFN">
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+and
+is
+fairly
+compact:
+</p>
+<del class="diff-old">  {
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+  &quot;name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;
+</del>
+    <div class="example"><div class="example-title"><span>Example 1</span>: Sample JSON-LD document</div><pre class="example">{
+<ins class="diff-chg">  "@context": {
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": {
+      "@id": "http://xmlns.com/foaf/0.1/homepage",
+      "@type": "@id"
+    }
+  },
+  "@id": "http://me.markus-lanthaler.com/",
+  "name": "Markus Lanthaler",
+  "homepage": "http://www.markus-lanthaler.com/"
+</ins>
+}
+</pre>
+</div>
+<p>
+The
+next
+input
+example
+uses
+one
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+to
+express
+a
+<del class="diff-old">property,
+</del>
+<ins class="diff-chg">property
+and
+</ins><a href="#dfn-array" title="array" class="tref internalDFN"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+to
+encapsulate
+another,
+</ins>
+but
+leaves
+the
+rest
+of
+the
+information
+untouched.
+</p>
+<del class="diff-old">  {
+  &quot;@context&quot;: {
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+  &quot;&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;
+</del>
+    <div class="example"><div class="example-title"><span>Example 2</span>: Sample JSON-LD document using a IRI instead of a term to express a property</div><pre class="example">{
+<ins class="diff-chg">  "@context": {
+</ins>    <span class="diff">"website": "http://xmlns.com/foaf/0.1/homepage"</span>
+<ins class="diff-chg">
+  },
+  "@id": "http://me.markus-lanthaler.com/",
+  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Markus Lanthaler",
+</ins>  <span class="diff">"website"</span>: <span class="diff">{ "@id":</span> "http://www.markus-lanthaler.com/" <span class="diff">}</span>
+}
+</pre>
+</div>
+<p>
+<del class="diff-old">While
+</del>
+<ins class="diff-chg">Note
+that
+</ins>
+both
+inputs
+are
+valid
+<del class="diff-old">JSON-LD,
+writing
+a
+program
+to
+handle
+every
+permutation
+of
+possible
+inputs
+can
+be
+difficult,
+especially
+when
+</del>
+<ins class="diff-chg">JSON-LD
+and
+both
+represent
+</ins>
+the
+<del class="diff-old">incoming
+</del>
+<ins class="diff-chg">same
+information.
+The
+difference
+is
+in
+their
+</ins><a href="#dfn-context" title="context" class="tref internalDFN">
+context
+<del class="diff-old">could
+change
+as
+well.
+To
+</del>
+</a>
+<ins class="diff-chg">information
+and
+in
+the
+data
+structures
+used.
+A
+JSON-LD
+processor
+can
+remove
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+and
+</ins>
+ensure
+that
+the
+data
+<del class="diff-old">can
+be
+given
+a
+</del>
+<ins class="diff-chg">is
+</ins>
+more
+<del class="diff-old">uniform
+structure,
+JSON-LD
+introduces
+the
+notion
+of
+expansion.
+</del>
+<ins class="diff-chg">regular
+by
+employing
+</ins><a href="#dfn-expansion" title="expansion" class="tref internalDFN"><ins class="diff-chg">
+expansion
+</ins></a>.</p><p><a href="#dfn-expansion" title="expansion" class="tref internalDFN">
+Expansion
+<del class="diff-old">performs
+</del>
+</a>
+<ins class="diff-chg">has
+</ins>
+two
+important
+<del class="diff-old">operations.
+The
+first
+is
+to
+expand
+</del>
+<ins class="diff-chg">goals:
+removing
+any
+contextual
+information
+from
+the
+document,
+and
+ensuring
+</ins>
+all
+values
+<del class="diff-old">that
+represent
+IRIs
+</del>
+<ins class="diff-chg">are
+represented
+in
+a
+regular
+form.
+These
+goals
+are
+accomplished
+by
+expanding
+all
+properties
+</ins>
+to
+<a href="#dfn-absolute-iri" title="absolute-iri" class="tref internalDFN">
+absolute
+IRIs
+<del class="diff-old">.
+The
+second
+is
+to
+express
+</del>
+</a>
+<ins class="diff-chg">and
+by
+expressing
+</ins>
+all
+values
+in
+<a href="#dfn-array" title="array" class="tref internalDFN">
+<ins class="diff-chg">arrays
+</ins></a><ins class="diff-chg">
+in
+</ins><a href="#dfn-expanded-form" title="expanded-form" class="tref internalDFN">
+expanded
+form
+</a>.
+<a href="#dfn-expanded-form" title="expanded-form" class="tref internalDFN">
+<ins class="diff-new">Expanded
+form
+</ins></a><ins class="diff-new">
+is
+the
+most
+verbose
+and
+regular
+way
+of
+expressing
+of
+values
+in
+JSON-LD;
+all
+contextual
+information
+from
+the
+document
+is
+instead
+stored
+locally
+with
+each
+value.
+</ins>
+Running
+the
+<a href="#expansion-algorithm">
+Expansion
+algorithm
+</a>
+<ins class="diff-new">(
+</ins><code class="idlMemberName"><a href="#widl-JsonLdProcessor-expand-void-object-object---DOMString-input-JsonLdCallback-callback-JsonLdOptions-options"><ins class="diff-new">
+expand
+</ins></a></code><ins class="diff-new">
+operation)
+</ins>
+against
+the
+examples
+provided
+above
+results
+in
+the
+following
+output:
+</p>
+<del class="diff-old">  [
+  {
+    &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [
+      { &quot;@value&quot;: &quot;Markus Lanthaler&quot; }
+    ],
+    &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [
+      { &quot;@id&quot;: &quot;http://www.markus-lanthaler.com/&quot; }
+    ]
+  }
+</del>
+    <div class="example"><div class="example-title"><span>Example 3</span>: Expanded sample document</div><pre class="example">[
+<ins class="diff-chg">  {
+    "@id": "http://me.markus-lanthaler.com/",
+    "http://xmlns.com/foaf/0.1/name": [
+      { "@value": "Markus Lanthaler" }
+    ],
+    "http://xmlns.com/foaf/0.1/homepage": [
+      { "@id": "http://www.markus-lanthaler.com/" }
+    ]
+  }
+</ins>
+]
+</pre>
+</div>
+<p>
+Note
+that
+in
+the
+output
+above
+all
+<a href="#dfn-context" title="context" class="tref internalDFN">
+context
+</a>
+definitions
+have
+been
+removed,
+all
+<a href="#dfn-term" title="term" class="tref internalDFN">
+terms
+</a>
+and
+<del class="diff-old">prefixes
+</del>
+<a href="#dfn-compact-iri" title="compact-iri" class="tref internalDFN">
+<ins class="diff-chg">compact
+IRIs
+</ins>
+</a>
+have
+been
+expanded
+to
+absolute
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+IRIs
+</a>,
+and
+all
+<a href="#dfn-json-ld-value" title="json-ld-value" class="tref internalDFN">
+JSON-LD
+values
+</a>
+are
+expressed
+in
+<a href="#dfn-array" title="array" class="tref internalDFN">
+<ins class="diff-chg">arrays
+</ins></a><ins class="diff-chg">
+in
+</ins><a href="#dfn-expanded-form" title="expanded-form" class="tref internalDFN">
+expanded
+form
+</a>.
+While
+the
+output
+is
+more
+<ins class="diff-new">verbose
+and
+</ins>
+difficult
+for
+a
+human
+to
+read,
+it
+<del class="diff-old">is
+easier
+for
+</del>
+<ins class="diff-chg">establishes
+</ins>
+a
+<del class="diff-old">software
+program
+to
+process
+</del>
+<ins class="diff-chg">baseline
+that
+makes
+JSON-LD
+processing
+easier
+</ins>
+because
+of
+its
+very
+regular
+structure.
+</p>
+</section>
+<section id="compaction" class="informative">
+<h3>
+<span class="secno">
+2.2
+</span>
+Compaction
+</h3>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+While
+<a href="#dfn-expansion" title="expansion" class="tref internalDFN">
+expansion
+<del class="diff-old">expands
+</del>
+</a>
+<ins class="diff-chg">removes
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+from
+</ins>
+a
+given
+<del class="diff-old">input
+as
+much
+as
+possible,
+compaction
+performs
+</del>
+<ins class="diff-chg">input,
+</ins><a href="#dfn-compaction" title="compaction" class="tref internalDFN"><ins class="diff-chg">
+compaction's
+</ins></a><ins class="diff-chg">
+primary
+function
+is
+to
+perform
+</ins>
+the
+opposite
+operation:
+<del class="diff-old">it
+expresses
+</del>
+<ins class="diff-chg">to
+express
+</ins>
+a
+given
+input
+<del class="diff-old">as
+succinctly
+as
+possible.
+In
+contrast
+to
+expansion
+which
+is
+meant
+</del>
+<ins class="diff-chg">according
+</ins>
+to
+<del class="diff-old">produce
+something
+</del>
+<ins class="diff-chg">a
+particular
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a>.<dfn id="dfn-compaction" title="compaction"><ins class="diff-chg">
+Compaction
+</ins></dfn><ins class="diff-chg">
+applies
+a
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a>
+that
+<ins class="diff-new">specifically
+tailors
+the
+way
+information
+</ins>
+is
+<del class="diff-old">easy
+to
+process
+by
+software
+programs,
+compaction
+is
+meant
+to
+produce
+something
+</del>
+<ins class="diff-chg">expressed
+for
+a
+particular
+person
+or
+application.
+This
+simplifies
+applications
+</ins>
+that
+<del class="diff-old">is
+easy
+</del>
+<ins class="diff-chg">consume
+JSON
+or
+JSON-LD
+by
+expressing
+the
+data
+in
+application-specific
+terms,
+and
+it
+makes
+the
+data
+easier
+</ins>
+to
+read
+by
+<del class="diff-old">software
+developers.
+</del>
+<ins class="diff-chg">humans.
+</ins></p><p><a href="#dfn-compaction" title="compaction" class="tref internalDFN">
+Compaction
+</a>
+uses
+a
+developer-supplied
+<a href="#dfn-context" title="context" class="tref internalDFN">
+context
+</a>
+to
+<del class="diff-old">compress
+</del>
+<ins class="diff-chg">shorten
+</ins><a href="#dfn-iri" title="iri" class="tref internalDFN">
+IRIs
+</a>
+to
+<a href="#dfn-term" title="term" class="tref internalDFN">
+terms
+</a>
+or
+<a href="#dfn-compact-iri" title="compact-iri" class="tref internalDFN">
+compact
+IRIs
+</a>
+and
+<a href="#dfn-json-ld-value" title="json-ld-value" class="tref internalDFN">
+JSON-LD
+values
+</a>
+expressed
+in
+<a href="#dfn-expanded-form" title="expanded-form" class="tref internalDFN">
+expanded
+form
+</a>
+to
+simple
+values
+such
+as
+<a href="#dfn-string" title="string" class="tref internalDFN">
+strings
+</a>
+<del class="diff-old">and
+</del>
+<ins class="diff-chg">or
+</ins><a href="#dfn-number" title="number" class="tref internalDFN">
+numbers
+</a>.
+</p>
+<p>
+For
+example,
+assume
+the
+following
+expanded
+JSON-LD
+input
+document:
+</p>
+<del class="diff-old">  [
+  {
+    &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [
+      { &quot;@value&quot;: &quot;Markus Lanthaler&quot; }
+    ],
+    &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [
+      { &quot;@id&quot;: &quot;http://www.markus-lanthaler.com/&quot; }
+    ]
+  }
+</del>
+    <div class="example"><div class="example-title"><span>Example 4</span>: Expanded sample document</div><pre class="example">[
+<ins class="diff-chg">  {
+    "@id": "http://me.markus-lanthaler.com/",
+    "http://xmlns.com/foaf/0.1/name": [
+      { "@value": "Markus Lanthaler" }
+    ],
+    "http://xmlns.com/foaf/0.1/homepage": [
+      { "@id": "http://www.markus-lanthaler.com/" }
+    ]
+  }
+</ins>
+]
+</pre>
+</div>
+<p>
+Additionally,
+assume
+the
+following
+developer-supplied
+JSON-LD
+<a href="#dfn-context" title="context" class="tref internalDFN">
+context
+</a>:
+</p>
+<del class="diff-old">  {
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  }
+</del>
+    <div class="example"><div class="example-title"><span>Example 5</span>: JSON-LD context</div><pre class="example">{
+<ins class="diff-chg">  "@context": {
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": {
+      "@id": "http://xmlns.com/foaf/0.1/homepage",
+      "@type": "@id"
+    }
+  }
+</ins>
+}
+</pre>
+</div>
+<p>
+Running
+the
+<a href="#compaction-algorithm">
+Compaction
+Algorithm
+</a>
+<ins class="diff-new">(
+</ins><code class="idlMemberName"><a href="#widl-JsonLdProcessor-compact-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options"><ins class="diff-new">
+compact
+</ins></a></code><ins class="diff-new">
+operation)
+</ins>
+given
+the
+context
+supplied
+above
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+result
+in
+the
+following
+output:
+</p>
+<del class="diff-old">  {
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;homepage&quot;: {
+      &quot;@id&quot;: &quot;http://xmlns.com/foaf/0.1/homepage&quot;,
+      &quot;@type&quot;: &quot;@id&quot;
+    }
+  },
+  &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+  &quot;name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;
+</del>
+    <div class="example"><div class="example-title"><span>Example 6</span>: Compacted sample document</div><pre class="example">{
+<ins class="diff-chg">  "@context": {
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": {
+      "@id": "http://xmlns.com/foaf/0.1/homepage",
+      "@type": "@id"
+    }
+  },
+  "@id": "http://me.markus-lanthaler.com/",
+  "name": "Markus Lanthaler",
+  "homepage": "http://www.markus-lanthaler.com/"
+</ins>
+}
+</pre>
+</div>
+<p>
+Note
+that
+all
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+IRIs
+</a>
+have
+been
+compacted
+to
+<a href="#dfn-term" title="term" class="tref internalDFN">
+terms
+</a>
+as
+specified
+in
+the
+<a href="#dfn-context" title="context" class="tref internalDFN">
+context
+</a>,
+which
+<del class="diff-old">consequently
+</del>
+has
+been
+injected
+into
+the
+output.
+While
+compacted
+output
+is
+<del class="diff-old">most
+</del>
+useful
+to
+humans,
+it
+<del class="diff-old">can
+often
+</del>
+<ins class="diff-chg">is
+</ins>
+also
+<del class="diff-old">be
+</del>
+used
+to
+generate
+structures
+that
+are
+easy
+to
+program
+against.
+Compaction
+enables
+developers
+to
+map
+any
+expanded
+document
+into
+an
+application-specific
+compacted
+document.
+While
+the
+context
+provided
+above
+mapped
+<code>
+<del class="diff-old">http://xmlns.com/foaf/0.1/name
+</del>
+<ins class="diff-chg">http://xmlns.com/foaf/0.1/nam
+</ins>
+</code>
+to
+<code>
+name
+</code>,
+it
+could
+<del class="diff-old">have
+</del>
+also
+have
+been
+mapped
+to
+any
+other
+term
+provided
+by
+the
+developer.
+</p>
+</section>
+<section id="flattening" class="informative">
+<h3>
+<span class="secno">
+2.3
+</span>
+Flattening
+</h3>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+While
+expansion
+ensures
+that
+a
+document
+is
+in
+a
+uniform
+structure,
+flattening
+goes
+a
+step
+further
+<del class="diff-old">and
+ensures
+</del>
+<ins class="diff-chg">to
+ensure
+</ins>
+that
+<del class="diff-old">also
+</del>
+the
+shape
+of
+the
+data
+is
+deterministic.
+In
+expanded
+<del class="diff-old">documents
+</del>
+<ins class="diff-chg">documents,
+the
+</ins>
+properties
+of
+a
+single
+<a href="#dfn-node" title="node" class="tref internalDFN">
+node
+</a>
+may
+<del class="diff-old">still
+</del>
+be
+spread
+across
+a
+number
+of
+different
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+objects
+</a>.
+By
+flattening
+a
+document,
+all
+properties
+of
+a
+<a href="#dfn-node" title="node" class="tref internalDFN">
+node
+</a>
+are
+collected
+in
+a
+single
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>
+and
+all
+<a href="#dfn-blank-node" title="blank-node" class="tref internalDFN">
+blank
+nodes
+</a>
+are
+labeled
+with
+a
+<a href="#dfn-blank-node-identifier" title="blank-node-identifier" class="tref internalDFN">
+blank
+node
+identifier
+</a>.
+<del class="diff-old">Often
+this
+</del>
+<ins class="diff-chg">This
+may
+</ins>
+drastically
+<del class="diff-old">simplifies
+</del>
+<ins class="diff-chg">simplify
+</ins>
+the
+code
+<ins class="diff-new">required
+</ins>
+to
+process
+JSON-LD
+<del class="diff-old">data.
+</del>
+<ins class="diff-chg">data
+in
+certain
+applications.
+</ins>
+</p>
+<p>
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</p>
+<del class="diff-old">  {
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;knows&quot;: &quot;http://xmlns.com/foaf/0.1/knows&quot;
+  },
+  &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+  &quot;name&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;knows&quot;: [
+    {
+      &quot;name&quot;: &quot;Manu Sporny&quot;,
+      &quot;knows&quot;: {
+        &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;
+      }
+    },
+    {
+      &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+      &quot;name&quot;: &quot;Gregg Kellogg&quot;
+    }
+  ]
+</del>
+    <div class="example"><div class="example-title"><span>Example 7</span>: Sample JSON-LD document</div><pre class="example">{
+<ins class="diff-chg">  "@context": {
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "knows": "http://xmlns.com/foaf/0.1/knows"
+  },
+  "@id": "http://me.markus-lanthaler.com/",
+  "name": "Markus Lanthaler",
+  "knows": [
+    {
+      "name": "Dave Longley"
+    }
+  ]
+</ins>
+}
+</pre>
+</div>
+<p>
+Running
+the
+<a href="#flattening-algorithm">
+Flattening
+<del class="diff-old">Algorithm
+</del>
+<ins class="diff-chg">algorithm
+</ins>
+</a>
+<ins class="diff-new">(
+</ins><code class="idlMemberName"><a href="#widl-JsonLdProcessor-flatten-void-object-object---DOMString-input-object-DOMString-context-JsonLdCallback-callback-JsonLdOptions-options"><ins class="diff-new">
+flatten
+</ins></a></code><ins class="diff-new">
+operation)
+</ins>
+with
+a
+context
+set
+to
+<a href="#dfn-null" title="null" class="tref internalDFN">
+null
+</a>
+to
+prevent
+compaction
+returns
+the
+following
+document:
+</p>
+<del class="diff-old">  [
+  {
+    &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [
+      { &quot;@value&quot;: &quot;Markus Lanthaler&quot; }
+    ],
+    &quot;http://xmlns.com/foaf/0.1/knows&quot;: [
+      { &quot;@id&quot;: &quot;_:t0&quot; },
+      { &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot; }
+    ]
+  },
+  {
+    &quot;@id&quot;: &quot;_:t0&quot;,
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [
+      { &quot;@value&quot;: &quot;Manu Sporny&quot; }
+    ],
+    &quot;http://xmlns.com/foaf/0.1/knows&quot;: [
+      { &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot; }
+    ]
+  },
+  {
+    &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [
+      { &quot;@value&quot;: &quot;Gregg Kellogg&quot; }
+    ]
+  }
+</del>
+    <div class="example"><div class="example-title"><span>Example 8</span>: Flattened sample document in expanded form</div><pre class="example">[
+<ins class="diff-chg">  {
+    "@id": "_:t0",
+    "http://xmlns.com/foaf/0.1/name": [
+      { "@value": "Dave Longley" }
+    ]
+  },
+  {
+    "@id": "http://me.markus-lanthaler.com/",
+    "http://xmlns.com/foaf/0.1/name": [
+      { "@value": "Markus Lanthaler" }
+    ],
+    "http://xmlns.com/foaf/0.1/knows": [
+      { "@id": "_:t0" }
+    ]
+  }
+</ins>
+]
+</pre>
+</div>
+<p>
+Note
+how
+in
+the
+output
+above
+all
+properties
+of
+a
+<a href="#dfn-node" title="node" class="tref internalDFN">
+node
+</a>
+are
+collected
+in
+a
+single
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>
+and
+how
+the
+<a href="#dfn-blank-node" title="blank-node" class="tref internalDFN">
+blank
+node
+</a>
+representing
+<del class="diff-old">&quot;Manu
+Sporny&quot;
+</del>
+<ins class="diff-chg">"Dave
+Longley"
+</ins>
+has
+been
+assigned
+the
+<a href="#dfn-blank-node-identifier" title="blank-node-identifier" class="tref internalDFN">
+blank
+node
+identifier
+</a>
+<code>
+_:t0
+</code>.
+</p>
+<p>
+To
+make
+it
+easier
+for
+humans
+to
+read
+<del class="diff-old">such
+</del>
+<ins class="diff-chg">or
+for
+certain
+applications
+to
+process
+it,
+</ins>
+a
+flattened
+document
+can
+be
+compacted
+by
+passing
+a
+context.
+Using
+the
+same
+context
+as
+the
+input
+document,
+the
+flattened
+and
+compacted
+document
+looks
+as
+follows:
+</p>
+<del class="diff-old">  {
+  &quot;@context&quot;: {
+    &quot;name&quot;: &quot;http://xmlns.com/foaf/0.1/name&quot;,
+    &quot;knows&quot;: &quot;http://xmlns.com/foaf/0.1/knows&quot;
+  },
+  &quot;@graph&quot;: [
+    {
+      &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+      &quot;name&quot;: &quot;Markus Lanthaler&quot;,
+      &quot;knows&quot;: [
+        { &quot;@id&quot;: &quot;_:t0&quot; },
+        { &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot; }
+      ]
+    },
+    {
+      &quot;@id&quot;: &quot;_:t0&quot;,
+      &quot;name&quot;: &quot;Manu Sporny&quot;,
+      &quot;knows&quot;: {
+        &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;
+      }
+    },
+    {
+      &quot;@id&quot;: &quot;http://greggkellogg.net/foaf#me&quot;,
+      &quot;name&quot;: &quot;Gregg Kellogg&quot;
+    }
+  ]
+</del>
+    <div class="example"><div class="example-title"><span>Example 9</span>: Flattened and compacted sample document</div><pre class="example">{
+<ins class="diff-chg">  "@context": {
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "knows": "http://xmlns.com/foaf/0.1/knows"
+  },
+  "@graph": [
+    {
+      "@id": "_:t0",
+      "name": "Dave Longley"
+    },
+    {
+      "@id": "http://me.markus-lanthaler.com/",
+      "name": "Markus Lanthaler",
+      "knows": { "@id": "_:t0" }
+    }
+  ]
+</ins>
+}
+</pre>
+</div>
+<p>
+Please
+note
+that
+the
+flattened
+and
+compacted
+result
+<del class="diff-old">will
+</del>
+always
+explicitly
+<del class="diff-old">designate
+</del>
+<ins class="diff-chg">designates
+</ins>
+the
+default
+<ins class="diff-new">graph
+</ins>
+by
+the
+<code>
[email protected]
+</code>
+member
+in
+the
+top-level
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>.
+<del class="diff-old">Compaction
+optimizes
+that
+member
+away
+if
+its
+value
+contains
+just
+one
+item.
+</del>
+</p>
+</section>
+<section id="rdf-conversion" class="informative">
+<h3>
+<span class="secno">
+2.4
+</span>
+RDF
+Conversion
+</h3>
+<p>
+<em>
+This
+section
+is
+non-normative.
+</em>
+</p>
+<p>
+JSON-LD
+can
+be
+used
+to
+serialize
+data
+expressed
+in
+RDF
+as
+described
+in
+[
+<cite>
+<del class="diff-old">RDF-CONCEPTS
+</del>
+<a href="#bib-RDF11-CONCEPTS" class="bibref">
+<ins class="diff-chg">RDF11-CONCEPTS
+</ins>
+</a>
+</cite>
+].
+This
+ensures
+that
+data
+can
+be
+round-tripped
+<del class="diff-old">from
+and
+</del>
+to
+<ins class="diff-new">and
+from
+</ins>
+any
+RDF
+syntax
+without
+any
+loss
+in
+<del class="diff-old">the
+fidelity
+of
+the
+data.
+</del>
+<ins class="diff-chg">fidelity.
+</ins>
+</p>
+<p>
+For
+example,
+assume
+the
+following
+RDF
+input
+serialized
+in
+Turtle
+[
+<cite>
+<del class="diff-old">TURTLE-TR
+</del>
+<a href="#bib-TURTLE" class="bibref">
+<ins class="diff-chg">TURTLE
+</ins>
+</a>
+</cite>
+]:
+</p>
+<del class="diff-old">  &lt;http://me.markus-lanthaler.com/&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; &quot;Markus Lanthaler&quot; .
+</del>
+    <div class="example"><div class="example-title"><span>Example 10</span>: Sample Turtle document</div><pre class="example">&lt;http://me.markus-lanthaler.com/&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; "Markus Lanthaler" .
+&lt;http://me.markus-lanthaler.com/&gt;
+&lt;http://xmlns.com/foaf/0.1/homepage&gt;
+&lt;http://www.markus-lanthaler.com/&gt;
+.
+</pre>
+</div>
+<p>
+Using
+the
+<a href="#convert-from-rdf-algorithm">
+Convert
+from
+RDF
+<del class="diff-old">Algorithm
+</del>
+<ins class="diff-chg">algorithm
+</ins>
+</a>
+a
+developer
+could
+transform
+this
+document
+into
+expanded
+JSON-LD:
+</p>
+<del class="diff-old">  [
+  {
+    &quot;@id&quot;: &quot;http://me.markus-lanthaler.com/&quot;,
+    &quot;http://xmlns.com/foaf/0.1/name&quot;: [
+      {
+        &quot;@value&quot;: &quot;Markus Lanthaler&quot;
+      }
+    ],
+    &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [
+      {
+        &quot;@id&quot;: &quot;http://www.markus-lanthaler.com/&quot;
+      }
+    ]
+  }
+</del>
+    <div class="example"><div class="example-title"><span>Example 11</span>: Sample Turtle document converted to JSON-LD</div><pre class="example">[
+<ins class="diff-chg">  {
+    "@id": "http://me.markus-lanthaler.com/",
+    "http://xmlns.com/foaf/0.1/name": [
+      { "@value": "Markus Lanthaler" }
+    ],
+    "http://xmlns.com/foaf/0.1/homepage": [
+      { "@id": "http://www.markus-lanthaler.com/" }
+    ]
+  }
+</ins>
+]
+</pre>
+</div>
+<p>
+Note
+that
+the
+output
+above
+could
+easily
+be
+compacted
+using
+the
+technique
+outlined
+in
+the
+previous
+section.
+It
+is
+also
+possible
+to
+transform
+the
+JSON-LD
+document
+back
+to
+RDF
+using
+the
+<a href="#convert-to-rdf-algorithm">
+Convert
+to
+RDF
+<del class="diff-old">Algorithm
+</del>
+<ins class="diff-chg">algorithm
+</ins>
+</a>.
+</p>
+</section>
+</section>
+<section id="conformance">
+<h2>
+<span class="secno">
+3.
+</span>
+Conformance
+</h2>
+<p>
+All
+examples
+and
+notes
+as
+well
+as
+sections
+marked
+as
+non-normative
+in
+this
+specification
+are
+non-normative.
+Everything
+else
+in
+this
+specification
+is
+normative.
+</p>
+<p>
+The
+keywords
+<del class="diff-old">must
+</del>
+<em title="MUST" class="rfc2119">
+<ins class="diff-chg">MUST
+</ins>
+</em>,
+<del class="diff-old">must
+not
+</del>
+<em title="MUST NOT" class="rfc2119">
+<ins class="diff-chg">MUST
+NOT
+</ins>
+</em>,
+<del class="diff-old">required
+</del>
+<em title="REQUIRED" class="rfc2119">
+<ins class="diff-chg">REQUIRED
+</ins>
+</em>,
+<del class="diff-old">should
+</del>
+<em title="SHOULD" class="rfc2119">
+<ins class="diff-chg">SHOULD
+</ins>
+</em>,
+<del class="diff-old">should
+not
+</del>
+<em title="SHOULD NOT" class="rfc2119">
+<ins class="diff-chg">SHOULD
+NOT
+</ins>
+</em>,
+<del class="diff-old">recommended
+</del>
+<em title="RECOMMENDED" class="rfc2119">
+<ins class="diff-chg">RECOMMENDED
+</ins>
+</em>,
+<del class="diff-old">may
+</del>
+<em title="MAY" class="rfc2119">
+<ins class="diff-chg">MAY
+</ins>
+</em>,
+and
+<del class="diff-old">optional
+</del>
+<em title="OPTIONAL" class="rfc2119">
+<ins class="diff-chg">OPTIONAL
+</ins>
+</em>
+in
+this
+specification
+are
+to
+be
+interpreted
+as
+described
+in
+[
+<cite>
+<a href="#bib-RFC2119" class="bibref">
+RFC2119
+</a>
+</cite>
+].
+</p>
+<p>
+There
+are
+two
+classes
+of
+products
+that
+can
+claim
+conformance
+to
+this
+specification:
+<a href="#dfn-json-ld-implementation" title="json-ld-implementation" class="tref internalDFN">
+JSON-LD
+Implementations
+</a>
+and
+<a href="#dfn-json-ld-processor" title="json-ld-processor" class="tref internalDFN">
+JSON-LD
+Processors
+</a>.
+</p>
+<p>
+A
+conforming
+<dfn id="dfn-json-ld-implementation" title="json-ld-implementation">
+JSON-LD
+Implementation
+</dfn>
+is
+a
+system
+capable
+of
+transforming
+JSON-LD
+documents
+according
+the
+algorithms
+defined
+in
+this
+specification.
+</p>
+<p>
+A
+conforming
+<dfn id="dfn-json-ld-processor" title="json-ld-processor">
+JSON-LD
+Processor
+</dfn>
+is
+a
+conforming
+<a href="#dfn-json-ld-implementation" title="json-ld-implementation" class="tref internalDFN">
+JSON-LD
+Implementation
+</a>
+that
+exposes
+the
+<del class="diff-old">application
+programming
+interface
+</del>
+<ins class="diff-chg">Application
+Programming
+Interface
+</ins>
+(API)
+defined
+in
+this
+specification.
+<ins class="diff-new">It
+</ins><em title="MUST" class="rfc2119"><ins class="diff-new">
+MUST
+</ins></em><ins class="diff-new">
+implement
+the
+</ins><code><ins class="diff-new">
+json-ld-1.0
+</ins></code><ins class="diff-new">
+processing
+mode
+(for
+further
+details,
+see
+the
+</ins><code class="idlMemberName"><a href="#widl-JsonLdOptions-processingMode"><ins class="diff-new">
+processingMode
+</ins></a></code><ins class="diff-new">
+option
+of
+</ins><a class="idlType" href="#idl-def-JsonLdOptions"><code><ins class="diff-new">
+JsonLdOptions
+</ins></code></a><ins class="diff-new">
+).
+</ins>
+</p>
+<p>
+The
+algorithms
+in
+this
+specification
+are
+generally
+written
+with
+more
+concern
+for
+clarity
+than
+<del class="diff-old">over
+</del>
+efficiency.
+Thus,
+JSON-LD
+Implementations
+and
+Processors
+may
+implement
+the
+algorithms
+given
+in
+this
+specification
+in
+any
+way
+desired,
+so
+long
+as
+the
+end
+result
+is
+indistinguishable
+from
+the
+result
+that
+would
+be
+obtained
+by
+the
+specification's
+algorithms.
+</p>
+<p>
+This
+specification
+does
+not
+define
+how
+JSON-LD
+Implementations
+or
+Processors
+handle
+non-conforming
+input
+documents.
+This
+implies
+that
+JSON-LD
+Implementations
+or
+Processors
+<del class="diff-old">must
+not
+</del>
+<em title="MUST NOT" class="rfc2119">
+<ins class="diff-chg">MUST
+NOT
+</ins>
+</em>
+attempt
+to
+correct
+malformed
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+IRIs
+</a>
+or
+language
+tags;
+however,
+they
+<del class="diff-old">may
+</del>
+<em title="MAY" class="rfc2119">
+<ins class="diff-chg">MAY
+</ins>
+</em>
+issue
+validation
+warnings.
+<ins class="diff-new">IRIs
+are
+not
+modified
+other
+than
+converted
+between
+</ins><a href="#dfn-relative-iri" title="relative-iri" class="tref internalDFN"><ins class="diff-new">
+relative
+</ins></a><ins class="diff-new">
+and
+</ins><a href="#dfn-absolute-iri" title="absolute-iri" class="tref internalDFN"><ins class="diff-new">
+absolute
+IRIs
+</ins></a>.
+</p>
+<div class="note">
+<div class="note-title">
+<span>
+Note
+</span>
+</div>
+<p class="">
+Implementers
+can
+partially
+check
+their
+level
+of
+conformance
+to
+this
+specification
+by
+successfully
+passing
+the
+test
+cases
+of
+the
+JSON-LD
+test
+suite
+[
+<cite>
+<a href="#bib-JSON-LD-TESTS" class="bibref">
+JSON-LD-TESTS
+</a>
+</cite>
+].
+Note,
+however,
+that
+passing
+all
+the
+tests
+in
+the
+test
+suite
+does
+not
+imply
+complete
+conformance
+to
+this
+specification.
+It
+only
+implies
+that
+the
+implementation
+conforms
+to
+aspects
+tested
+by
+the
+test
+suite.
+</p>
+</div>
+</section>
+<section id="general-terminology">
+<h2>
+<span class="secno">
+4.
+</span>
+General
+Terminology
+</h2>
+<p>
+This
+document
+uses
+the
+following
+terms
+as
+defined
+in
+JSON
+[
+<cite>
+<a href="#bib-RFC4627" class="bibref">
+RFC4627
+</a>
+</cite>
+].
+Refer
+to
+the
+<em>
+JSON
+Grammar
+</em>
+section
+in
+[
+<cite>
+<a href="#bib-RFC4627" class="bibref">
+RFC4627
+</a>
+</cite>
+]
+for
+formal
+definitions.
+</p>
+<dl>
+<dt>
+<dfn id="dfn-json-object" title="json-object">
+JSON
+object
+</dfn>
+</dt>
+<dd>
+An
+object
+structure
+is
+represented
+as
+a
+pair
+of
+curly
+brackets
+surrounding
+zero
+or
+more
+key-value
+pairs.
+A
+key
+is
+a
+<a href="#dfn-string" title="string" class="tref internalDFN">
+string
+</a>.
+A
+single
+colon
+comes
+after
+each
+key,
+separating
+the
+key
+from
+the
+value.
+A
+single
+comma
+separates
+a
+value
+from
+a
+following
+key.
+<ins class="diff-new">In
+contrast
+to
+JSON,
+in
+JSON-LD
+the
+keys
+in
+an
+object
+must
+be
+unique.
+</ins>
+</dd>
+<dt>
+<dfn id="dfn-array" title="array">
+array
+</dfn>
+</dt>
+<dd>
+An
+array
+structure
+is
+represented
+as
+square
+brackets
+surrounding
+zero
+or
+more
+values
+(or
+elements).
+Elements
+are
+separated
+by
+commas.
+In
+JSON,
+an
+array
+is
+an
+<em>
+ordered
+</em>
+sequence
+of
+zero
+or
+more
+values.
+While
+JSON-LD
+uses
+the
+same
+array
+representation
+as
+JSON,
+the
+collection
+is
+<em>
+unordered
+</em>
+by
+default.
+While
+order
+is
+preserved
+in
+regular
+JSON
+arrays,
+it
+is
+not
+in
+regular
+JSON-LD
+arrays
+unless
+specific
+markup
+is
+provided
+(see
+<a href="#sets-and-lists">
+</a>
+).
+</dd>
+<dt>
+<dfn id="dfn-string" title="string">
+string
+</dfn>
+</dt>
+<dd>
+A
+string
+is
+a
+sequence
+of
+zero
+or
+more
+Unicode
+characters,
+wrapped
+in
+double
+quotes,
+using
+backslash
+escapes
+(if
+necessary).
+A
+character
+is
+represented
+as
+a
+single
+character
+string.
+</dd>
+<dt>
+<dfn id="dfn-number" title="number">
+number
+</dfn>
+</dt>
+<dd>
+A
+number
+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 id="dfn-true" title="true">
+true
+</dfn>
+and
+<dfn id="dfn-false" title="false">
+false
+</dfn>
+</dt>
+<dd>
+Values
+that
+are
+used
+to
+express
+one
+of
+two
+possible
+boolean
+states.
+</dd>
+<dt>
+<dfn id="dfn-null" title="null">
+null
+</dfn>
+</dt>
+<dd>
+The
+<a href="#dfn-null" title="null" class="tref internalDFN">
+null
+</a>
+value.
+A
+key-value
+pair
+in
+the
+<code>
[email protected]
+</code>
+where
+the
+value,
+or
+the
+<code>
[email protected]
+</code>
+of
+the
+value,
+is
+<a href="#dfn-null" title="null" class="tref internalDFN">
+null
+</a>
+explicitly
+decouples
+a
+term's
+association
+with
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>.
+A
+key-value
+pair
+in
+the
+body
+of
+a
+JSON-LD
+document
+whose
+value
+is
+<a href="#dfn-null" title="null" class="tref internalDFN">
+null
+</a>
+has
+the
+same
+meaning
+as
+if
+the
+key-value
+pair
+was
+not
+defined.
+If
+<code>
[email protected]
+</code>,
+<code>
[email protected]
+</code>,
+or
+<code>
[email protected]
+</code>
+is
+set
+to
+<a href="#dfn-null" title="null" class="tref internalDFN">
+null
+</a>
+in
+expanded
+form,
+then
+the
+entire
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>
+is
+ignored.
+</dd>
+</dl>
+<p>
+Furthermore,
+the
+following
+terminology
+is
+used
+throughout
+this
+document:
+</p>
+<dl>
+<dt>
+<dfn id="dfn-keyword" title="keyword">
+keyword
+</dfn>
+</dt>
+<dd>
+A
+JSON
+key
+that
+is
+specific
+to
+JSON-LD,
+specified
+in
+the
+JSON-LD
+Syntax
+specification
+[
+<cite>
+<a href="#bib-JSON-LD" class="bibref">
+JSON-LD
+</a>
+</cite>
+]
+in
+the
+section
+titled
+<cite>
+<a href="../json-ld/#syntax-tokens-and-keywords">
+Syntax
+Tokens
+and
+Keywords
+</a>
+</cite>.
+</dd>
+<dt>
+<dfn id="dfn-context" title="context">
+context
+</dfn>
+</dt>
+<dd>
+A
+a
+set
+of
+rules
+for
+interpreting
+a
+JSON-LD
+document
+as
+specified
+in
+<cite>
+<a href="../json-ld/#the-context">
+The
+Context
+</a>
+</cite>
+of
+the
+[
+<cite>
+<a href="#bib-JSON-LD" class="bibref">
+JSON-LD
+</a>
+</cite>
+]
+specification.
+</dd>
+<dt>
+<dfn id="dfn-json-ld-document" title="json-ld-document">
+JSON-LD
+document
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-json-ld-document" title="json-ld-document" class="tref internalDFN">
+JSON-LD
+document
+</a>
+is
+a
+serialization
+of
+a
+collection
+of
+<a href="#dfn-json-ld-graph" title="json-ld-graph" class="tref internalDFN">
+JSON-LD
+graphs
+</a>
+and
+comprises
+exactly
+one
+<a href="#dfn-default-graph" title="default-graph" class="tref internalDFN">
+default
+graph
+</a>
+and
+zero
+or
+more
+<a href="#dfn-named-graph" title="named-graph" class="tref internalDFN">
+named
+graphs
+</a>.
+</dd>
+<dt>
+<dfn id="dfn-named-graph" title="named-graph">
+named
+graph
+</dfn>
+</dt>
+<dd>
+A
+named
+graph
+is
+a
+pair
+consisting
+of
+an
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+<a href="#dfn-blank-node" title="blank-node" class="tref internalDFN">
+blank
+node
+</a>
+(the
+<dfn id="dfn-graph-name" title="graph-name">
+graph
+name
+</dfn>
+)
+and
+a
+<a href="#dfn-json-ld-graph" title="json-ld-graph" class="tref internalDFN">
+JSON-LD
+graph
+</a>.
+</dd>
+<dt>
+<dfn id="dfn-default-graph" title="default-graph">
+default
+graph
+</dfn>
+</dt>
+<dd>
+The
+default
+graph
+is
+the
+only
+graph
+in
+a
+JSON-LD
+document
+which
+has
+no
+<a href="#dfn-graph-name" title="graph-name" class="tref internalDFN">
+graph
+name
+</a>.
+</dd>
+<dt>
+<dfn id="dfn-json-ld-graph" title="json-ld-graph">
+JSON-LD
+graph
+</dfn>
+</dt>
+<dd>
+A
+labeled
+directed
+graph,
+i.e.,
+a
+set
+of
+<a href="#dfn-node" title="node" class="tref internalDFN">
+nodes
+</a>
+connected
+by
+<a href="#dfn-edge" title="edge" class="tref internalDFN">
+edges
+</a>,
+as
+specified
+in
+the
+<cite>
+<a href="../json-ld/#data-model">
+Data
+Model
+</a>
+</cite>
+section
+of
+the
+JSON-LD
+syntax
+specification
+[
+<cite>
+<a href="#bib-JSON-LD" class="bibref">
+JSON-LD
+</a>
+</cite>
+].
+</dd>
+<dt>
+<dfn id="dfn-edge" title="edge">
+edge
+</dfn>
+</dt>
+<dd>
+Every
+<a href="#dfn-edge" title="edge" class="tref internalDFN">
+edge
+</a>
+has
+a
+direction
+associated
+with
+it
+and
+is
+labeled
+with
+an
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+or
+a
+<a href="#dfn-blank-node-identifier" title="blank-node-identifier" class="tref internalDFN">
+blank
+node
+identifier
+</a>.
+Within
+the
+JSON-LD
+syntax
+these
+edge
+labels
+are
+called
+<dfn id="dfn-property" title="property">
+properties
+</dfn>.
+Whenever
+possible,
+an
+<a href="#dfn-edge" title="edge" class="tref internalDFN">
+edge
+</a>
+should
+be
+labeled
+with
+an
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</dd>
+<dt>
+<dfn id="dfn-node" title="node">
+node
+</dfn>
+</dt>
+<dd>
+Every
+<a href="#dfn-node" title="node" class="tref internalDFN">
+node
+</a>
+is
+an
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+a
+<a href="#dfn-blank-node" title="blank-node" class="tref internalDFN">
+blank
+node
+</a>,
+a
+<a href="#dfn-json-ld-value" title="json-ld-value" class="tref internalDFN">
+JSON-LD
+value
+</a>,
+or
+a
+<a href="#dfn-list" title="list" class="tref internalDFN">
+list
+</a>.
+</dd>
+<dt>
+<dfn id="dfn-iri" title="iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+</dt>
+<dd>
+An
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+(Internationalized
+Resource
+Identifier)
+is
+a
+string
+that
+conforms
+to
+the
+syntax
+defined
+in
+[
+<cite>
+<a href="#bib-RFC3987" class="bibref">
+RFC3987
+</a>
+</cite>
+].
+</dd>
+<dt>
+<dfn id="dfn-absolute-iri" title="absolute-iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+</dt>
+<dd>
+An
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+defined
+in
+[
+<cite>
+<a href="#bib-RFC3987" class="bibref">
+RFC3987
+</a>
+</cite>
+]
+containing
+a
+<em>
+scheme
+</em>
+along
+with
+a
+<em>
+path
+</em>
+and
+optional
+<em>
+query
+</em>
+and
+fragment
+segments.
+</dd>
+<dt>
+<dfn id="dfn-relative-iri" title="relative-iri">
+relative
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+</dt>
+<dd>
+A
+relative
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+that
+is
+relative
+some
+other
+<a href="#dfn-absolute-iri" title="absolute-iri" class="tref internalDFN">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+;
+in
+the
+case
+of
+JSON-LD
+this
+is
+the
+base
+location
+of
+the
+document.
+</dd>
+<dt>
+<dfn id="dfn-blank-node" title="blank-node">
+blank
+node
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-node" title="node" class="tref internalDFN">
+node
+</a>
+in
+a
+<a href="#dfn-json-ld-graph" title="json-ld-graph" class="tref internalDFN">
+JSON-LD
+graph
+</a>
+that
+does
+not
+contain
+a
+de-referenceable
+identifier
+because
+it
+is
+either
+ephemeral
+in
+nature
+or
+does
+not
+contain
+information
+that
+needs
+to
+be
+linked
+to
+from
+outside
+of
+the
+JSON-LD
+graph.
+</dd>
+<dt>
+<dfn id="dfn-blank-node-identifier" title="blank-node-identifier">
+blank
+node
+identifier
+</dfn>
+</dt>
+<dd>
+A
+blank
+node
+identifier
+is
+a
+string
+that
+can
+be
+used
+as
+an
+identifier
+for
+a
+<a href="#dfn-blank-node" title="blank-node" class="tref internalDFN">
+blank
+node
+</a>
+within
+the
+scope
+of
+a
+JSON-LD
+document.
+Blank
+node
+identifiers
+begin
+with
+<code>
+_:
+</code>.
+</dd>
+<dt>
+<dfn id="dfn-json-ld-value" title="json-ld-value">
+JSON-LD
+value
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-json-ld-value" title="json-ld-value" class="tref internalDFN">
+JSON-LD
+value
+</a>
+is
+a
+<a href="#dfn-string" title="string" class="tref internalDFN">
+string
+</a>,
+a
+<a href="#dfn-number" title="number" class="tref internalDFN">
+number
+</a>,
+<a href="#dfn-true" title="true" class="tref internalDFN">
+true
+</a>
+or
+<a href="#dfn-false" title="false" class="tref internalDFN">
+false
+</a>,
+a
+<a href="#dfn-typed-value" title="typed-value" class="tref internalDFN">
+typed
+value
+</a>,
+or
+a
+<a href="#dfn-language-tagged-string" title="language-tagged-string" class="tref internalDFN">
+language-tagged
+string
+</a>.
+</dd>
+<dt>
+<dfn id="dfn-typed-value" title="typed-value">
+typed
+value
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-typed-value" title="typed-value" class="tref internalDFN">
+typed
+value
+</a>
+consists
+of
+a
+value,
+which
+is
+a
+string,
+and
+a
+type,
+which
+is
+an
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</dd>
+<dt>
+<dfn id="dfn-language-tagged-string" title="language-tagged-string">
+language-tagged
+string
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-language-tagged-string" title="language-tagged-string" class="tref internalDFN">
+language-tagged
+string
+</a>
+consists
+of
+a
+string
+and
+a
+non-empty
+language
+tag
+as
+defined
+by
+[
+<cite>
+<a href="#bib-BCP47" class="bibref">
+BCP47
+</a>
+</cite>
+].
+The
+language
+tag
+must
+be
+well-formed
+according
+to
+<del class="diff-old">section
+</del>
+<a href="http://tools.ietf.org/html/bcp47#section-2.2.9">
+<ins class="diff-new">section
+</ins>
+2.2.9
+</a>
+of
+[
+<cite>
+<a href="#bib-BCP47" class="bibref">
+BCP47
+</a>
+</cite>
+],
+and
+<del class="diff-old">must
+be
+</del>
+<ins class="diff-chg">is
+</ins>
+normalized
+to
+lowercase.
+</dd>
+<dt>
+<dfn id="dfn-list" title="list">
+list
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-list" title="list" class="tref internalDFN">
+list
+</a>
+is
+an
+ordered
+sequence
+of
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+IRIs
+</a>,
+<a href="#dfn-blank-node" title="blank-node" class="tref internalDFN">
+blank
+nodes
+</a>,
+and
+<a href="#dfn-json-ld-value" title="json-ld-value" class="tref internalDFN">
+JSON-LD
+values
+</a>.
+</dd>
+</dl>
+</section>
+<section id="algorithm-terms">
+<h2>
+<span class="secno">
+5.
+</span>
+<del class="diff-old">Algorithms
+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
+must
+be
+used
+where
+applicable.
+5.1
+</del>
+Algorithm
+Terms
+</h2>
+<dl>
+<dt>
+<dfn id="dfn-active-graph" title="active-graph">
+active
+graph
+</dfn>
+</dt>
+<dd>
+The
+name
+of
+the
+currently
+active
+graph
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn id="dfn-active-subject" title="active-subject">
+active
+subject
+</dfn>
+</dt>
+<dd>
+The
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn id="dfn-active-property" title="active-property">
+active
+property
+</dfn>
+</dt>
+<dd>
+The
+currently
+active
+<a href="#dfn-property" title="property" class="tref internalDFN">
+property
+<del class="diff-old">that
+the
+processor
+should
+use
+when
+processing.
+The
+active
+property
+is
+represented
+in
+the
+original
+lexical
+form,
+which
+is
+used
+for
+finding
+type
+mappings
+in
+the
+active
+context
+.
+active
+object
+The
+currently
+active
+object
+</del>
+</a>
+<ins class="diff-chg">or
+</ins><a href="#dfn-keyword" title="keyword" class="tref internalDFN"><ins class="diff-chg">
+keyword
+</ins></a>
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn id="dfn-active-context" title="active-context">
+active
+context
+</dfn>
+</dt>
+<dd>
+A
+context
+that
+is
+used
+to
+resolve
+<del class="diff-old">term
+</del>
+<a href="#dfn-term" title="term" class="tref internalDFN">
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+while
+the
+processing
+algorithm
+is
+running.
+<del class="diff-old">The
+active
+context
+is
+the
+context
+contained
+within
+the
+processor
+state
+.
+</del>
+</dd>
+<dt>
+<dfn id="dfn-local-context" title="local-context">
+local
+context
+</dfn>
+</dt>
+<dd>
+A
+context
+that
+is
+specified
+within
+a
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>,
+specified
+via
+the
+<code>
[email protected]
+</code>
+<a href="#dfn-keyword" title="keyword" class="tref internalDFN">
+keyword
+</a>.
+</dd>
+<dt>
+<del class="diff-old">processor
+state
+The
+processor
+state
+,
+which
+includes
+the
+active
+context
+,
+active
+subject
+,
+and
+active
+property
+.
+The
+processor
+state
+is
+managed
+as
+a
+stack
+with
+elements
+from
+the
+previous
+processor
+state
+copied
+into
+a
+new
+processor
+state
+when
+entering
+a
+new
+JSON
+object
+.
+</del>
+<dfn id="dfn-json-ld-input" title="json-ld-input">
+JSON-LD
+input
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+provided
+as
+input
+to
+the
+algorithm.
+</dd>
+<dt>
+<del class="diff-old">JSON-LD
+output
+The
+JSON-LD
+data
+structure
+that
+is
+produced
+as
+output
+by
+the
+algorithm.
+</del>
+<dfn id="dfn-term" title="term">
+term
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-term" title="term" class="tref internalDFN">
+term
+</a>
+is
+a
+short
+word
+defined
+in
+a
+context
+that
+may
+be
+expanded
+to
+an
+<a href="#dfn-iri" title="iri" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+</dd>
+<dt>
+<dfn id="dfn-compact-iri" title="compact-iri">
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</dfn>
+</dt>
+<dd>
+A
+compact
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+is
+has
+the
+form
+of
+<dfn id="dfn-prefix" title="prefix">
+prefix
+</dfn>:
+<em>
+suffix
+</em>
+and
+is
+used
+as
+a
+way
+of
+expressing
+an
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+without
+needing
+to
+define
+separate
+<a href="#dfn-term" title="term" class="tref internalDFN">
+term
+</a>
+definitions
+for
+each
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+contained
+within
+a
+common
+vocabulary
+identified
+by
+<a href="#dfn-prefix" title="prefix" class="tref internalDFN">
+prefix
+</a>.
+</dd>
+<dt>
+<dfn id="dfn-node-object" title="node-object">
+node
+object
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-node-object" title="node-object" class="tref internalDFN">
+node
+object
+</a>
+represents
+zero
+or
+more
+properties
+of
+a
+<a href="#dfn-node" title="node" class="tref internalDFN">
+node
+</a>
+in
+the
+<a href="#dfn-json-ld-graph" title="json-ld-graph" class="tref internalDFN">
+JSON-LD
+graph
+</a>
+serialized
+by
+the
+JSON-LD
+document.
+A
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>
+is
+a
+<a href="#dfn-node-object" title="node-object" class="tref internalDFN">
+node
+object
+</a>
+if
+it
+exists
+outside
+of
+the
+JSON-LD
+<a href="#dfn-context" title="context" class="tref internalDFN">
+context
+</a>
+and:
+<ul>
+<li>
+it
+does
+not
+contain
+the
+<code>
[email protected]
+</code>,
+<code>
[email protected]
+</code>,
+or
+<code>
[email protected]
+</code>
+keywords,
+or
+</li>
+<li>
+it
+is
+not
+the
+<del class="diff-old">top-level
+</del>
+<ins class="diff-chg">top-most
+</ins><a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>
+in
+the
+JSON-LD
+document
+<del class="diff-old">containing
+the
+</del>
+<ins class="diff-chg">consisting
+of
+no
+other
+members
+than
+</ins>
+<code>
[email protected]
+</code>
+<del class="diff-old">keyword.
+</del>
+<ins class="diff-chg">and
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>.
+</li>
+</ul>
+</dd>
+<dt>
+<dfn id="dfn-value-object" title="value-object">
+<ins class="diff-chg">value
+object
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+</ins><a href="#dfn-value-object" title="value-object" class="tref internalDFN"><ins class="diff-chg">
+value
+object
+</ins></a><ins class="diff-chg">
+is
+a
+</ins><a href="#dfn-json-object" title="json-object" class="tref internalDFN"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+that
+has
+an
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+member.
+</ins></dd><dt><dfn id="dfn-list-object" title="list-object">
+list
+object
+</dfn>
+</dt>
+<dd>
+A
+<a href="#dfn-list-object" title="list-object" class="tref internalDFN">
+list
+object
+</a>
+is
+a
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>
+that
+has
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">an
+</ins>
+<code>
[email protected]
+</code>
+member.
+</dd>
+<dt>
+<dfn id="dfn-set-object" title="set-object">
+<ins class="diff-chg">set
+object
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+</ins><a href="#dfn-set-object" title="set-object" class="tref internalDFN"><ins class="diff-chg">
+set
+object
+</ins></a><ins class="diff-chg">
+is
+a
+</ins><a href="#dfn-json-object" title="json-object" class="tref internalDFN"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+that
+has
+an
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+member.
+</ins></dd><dt><dfn id="dfn-scalar" title="scalar">
+scalar
+</dfn>
+</dt>
+<dd>
+A
+scalar
+is
+either
+a
+JSON
+<a href="#dfn-string" title="string" class="tref internalDFN">
+string
+</a>,
+<a href="#dfn-number" title="number" class="tref internalDFN">
+number
+</a>,
+<a href="#dfn-true" title="true" class="tref internalDFN">
+true
+</a>,
+or
+<a href="#dfn-false" title="false" class="tref internalDFN">
+false
+</a>.
+</dd>
+<dt>
+<del class="diff-old">quad
+</del>
+<dfn id="dfn-rdf-subject" title="rdf-subject">
+<ins class="diff-chg">RDF
+subject
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+</ins><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject" title="subject" class="tref externalDFN"><ins class="diff-chg">
+subject
+</ins></a><ins class="diff-chg">
+as
+specified
+by
+[
+</ins><cite><a href="#bib-RDF11-CONCEPTS" class="bibref"><ins class="diff-chg">
+RDF11-CONCEPTS
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></dd><dt><dfn id="dfn-rdf-predicate" title="rdf-predicate"><ins class="diff-chg">
+RDF
+predicate
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+</ins><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate" title="predicate" class="tref externalDFN"><ins class="diff-chg">
+predicate
+</ins></a><ins class="diff-chg">
+as
+specified
+by
+[
+</ins><cite><a href="#bib-RDF11-CONCEPTS" class="bibref"><ins class="diff-chg">
+RDF11-CONCEPTS
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></dd><dt><dfn id="dfn-rdf-object" title="rdf-object"><ins class="diff-chg">
+RDF
+object
+</ins>
+</dfn>
+</dt>
+<dd>
+An
+<a href="http://www.w3.org/TR/rdf11-concepts/#dfn-object" title="object" class="tref externalDFN">
+<ins class="diff-chg">object
+</ins></a><ins class="diff-chg">
+as
+specified
+by
+[
+</ins><cite><a href="#bib-RDF11-CONCEPTS" class="bibref"><ins class="diff-chg">
+RDF11-CONCEPTS
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></dd><dt><dfn id="dfn-rdf-triple" title="rdf-triple">
+RDF
+triple
+</dfn>
+</dt>
+<dd>
+<ins class="diff-chg">A
+</ins><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple" title="triple" class="tref externalDFN"><ins class="diff-chg">
+triple
+</ins></a>
+as
+specified
+by
+[
+<cite>
+<del class="diff-old">RDF-CONCEPTS
+</del>
+<a href="#bib-RDF11-CONCEPTS" class="bibref">
+<ins class="diff-chg">RDF11-CONCEPTS
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></dd><dt><dfn id="dfn-rdf-dataset" title="rdf-dataset"><ins class="diff-chg">
+RDF
+dataset
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+</ins><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset" title="dataset" class="tref externalDFN"><ins class="diff-chg">
+dataset
+</ins></a><ins class="diff-chg">
+as
+specified
+by
+[
+</ins><cite><a href="#bib-RDF11-CONCEPTS" class="bibref"><ins class="diff-chg">
+RDF11-CONCEPTS
+</ins>
+</a>
+</cite>
+]
+<del class="diff-old">augmented
+with
+a
+a
+fourth
+component,
+</del>
+<ins class="diff-chg">representing
+</ins>
+a
+<del class="diff-old">graph
+name
+</del>
+<ins class="diff-chg">collection
+of
+</ins><a href="http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-graph" title="rdf-graphs" class="tref externalDFN"><ins class="diff-chg">
+RDF
+graphs
+</ins>
+</a>.
+</dd>
+</dl>
+</section>
+<section id="context-processing-algorithms">
+<h2>
+<span class="secno">
+<ins class="diff-chg">6.
+</ins></span><ins class="diff-chg">
+Context
+Processing
+Algorithms
+</ins></h2><section id="context-processing-algorithm">
+<h3>
+<span class="secno">
+<del class="diff-old">5.2
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+<del class="diff-old">Expansion
+</del>
+<ins class="diff-chg">Context
+Processing
+</ins>
+Algorithm
+</h3>
+<p>
+<del class="diff-old">The
+algorithm
+takes
+three
+input
+variables:
+an
+</del>
+<ins class="diff-chg">When
+processing
+a
+JSON-LD
+data
+structure,
+each
+processing
+rule
+is
+applied
+using
+information
+provided
+by
+the
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+context
+<del class="diff-old">,
+</del>
+</a>.
+<ins class="diff-chg">This
+section
+describes
+how
+to
+produce
+</ins>
+an
+<a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+<del class="diff-old">property
+,
+and
+an
+element
+to
+be
+expanded.
+To
+begin,
+the
+</del>
+<ins class="diff-chg">context
+</ins></a>.</p><p><ins class="diff-chg">
+The
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+context
+</a>
+<del class="diff-old">is
+set
+to
+</del>
+<ins class="diff-chg">contains
+</ins>
+the
+<del class="diff-old">result
+of
+performing,
+Context
+Processing
+on
+</del>
+<ins class="diff-chg">active
+</ins><dfn id="dfn-term-definition" title="term-definition"><ins class="diff-chg">
+term
+definitions
+</ins></dfn><ins class="diff-chg">
+which
+specify
+how
+properties
+and
+values
+have
+to
+be
+interpreted
+as
+well
+as
+</ins>
+the
+<del class="diff-old">passed
+</del>
+<ins class="diff-chg">current
+</ins><dfn id="dfn-base-iri" title="base-iri"><ins class="diff-chg">
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+<del class="diff-old">expandContext
+</del>
+</dfn>,
+<ins class="diff-chg">the
+</ins><dfn id="dfn-vocabulary-mapping" title="vocabulary-mapping"><ins class="diff-chg">
+vocabulary
+mapping
+</ins></dfn><ins class="diff-chg">
+and
+the
+</ins><dfn id="dfn-default-language" title="default-language"><ins class="diff-chg">
+default
+language
+</ins></dfn>.<ins class="diff-chg">
+Each
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins>
+</a>
+<ins class="diff-new">consists
+of
+an
+</ins><dfn id="dfn-iri-mapping" title="iri-mapping">
+<del class="diff-old">,
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></dfn>,<ins class="diff-chg">
+a
+boolean
+flag
+</ins><dfn id="dfn-reverse-property" title="reverse-property"><ins class="diff-chg">
+reverse
+property
+</ins></dfn>,<ins class="diff-chg">
+an
+optional
+</ins><dfn id="dfn-type-mapping" title="type-mapping"><ins class="diff-chg">
+type
+mapping
+</ins></dfn>
+or
+<del class="diff-old">empty
+if
+expandContext
+</del>
+<dfn id="dfn-language-mapping" title="language-mapping">
+<ins class="diff-chg">language
+mapping
+</ins></dfn>,<ins class="diff-chg">
+and
+an
+optional
+</ins><dfn id="dfn-container-mapping" title="container-mapping"><ins class="diff-chg">
+container
+mapping
+</ins></dfn>.<ins class="diff-chg">
+A
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins>
+</a>
+<ins class="diff-chg">can
+not
+only
+be
+used
+to
+map
+a
+</ins><a href="#dfn-term" title="term" class="tref internalDFN"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+to
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>,<ins class="diff-chg">
+but
+also
+to
+map
+a
+</ins><a href="#dfn-term" title="term" class="tref internalDFN"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+to
+a
+</ins><a href="#dfn-keyword" title="keyword" class="tref internalDFN"><ins class="diff-chg">
+keyword
+</ins></a>,<ins class="diff-chg">
+in
+which
+case
+it
+</ins>
+is
+<del class="diff-old">null
+</del>
+<ins class="diff-chg">referred
+to
+as
+a
+</ins><dfn id="dfn-keyword-alias" title="keyword-alias"><ins class="diff-chg">
+keyword
+alias
+</ins></dfn>.</p><p><ins class="diff-chg">
+When
+processing,
+the
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+is
+initialized
+without
+any
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definitions
+</ins>
+</a>,
+<a href="#dfn-vocabulary-mapping" title="vocabulary-mapping" class="tref internalDFN">
+<ins class="diff-chg">vocabulary
+mapping
+</ins></a>,<ins class="diff-chg">
+or
+</ins><a href="#dfn-default-language" title="default-language" class="tref internalDFN"><ins class="diff-chg">
+default
+language
+</ins></a>.<ins class="diff-chg">
+If
+a
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+is
+encountered
+during
+processing,
+a
+new
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">context
+</ins>
+</a>
+is
+<del class="diff-old">set
+</del>
+<ins class="diff-chg">created
+by
+cloning
+the
+existing
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a>.<ins class="diff-chg">
+Then
+the
+information
+from
+the
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+is
+merged
+into
+the
+new
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a>.<ins class="diff-chg">
+Given
+that
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+contexts
+</ins></a><ins class="diff-chg">
+may
+contain
+references
+</ins>
+to
+<del class="diff-old">null
+,
+and
+</del>
+<ins class="diff-chg">remote
+contexts,
+this
+includes
+their
+retrieval.
+</ins></p><section class="informative"><h4 id="general-solution"><ins class="diff-chg">
+General
+Solution
+</ins></h4><p>
+<em>
+<del class="diff-old">element
+</del>
+<ins class="diff-chg">This
+section
+</ins>
+is
+<del class="diff-old">set
+to
+</del>
+<ins class="diff-chg">non-normative.
+</ins></em></p><p><ins class="diff-chg">
+First
+we
+prepare
+a
+new
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a><i><ins class="diff-chg">
+result
+</ins></i><ins class="diff-chg">
+by
+cloning
+</ins>
+the
+<del class="diff-old">JSON-LD
+input
+</del>
+<ins class="diff-chg">current
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins>
+</a>.
+<del class="diff-old">This
+algorithm
+expects
+</del>
+<ins class="diff-chg">Then
+we
+normalize
+</ins>
+the
+<del class="diff-old">JSON-LD
+input
+</del>
+<ins class="diff-chg">form
+the
+passed
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins>
+</a>
+to
+<ins class="diff-new">an
+</ins><a href="#dfn-array" title="array" class="tref internalDFN"><ins class="diff-new">
+array
+</ins></a>.<a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-new">
+Local
+contexts
+</ins></a><ins class="diff-new">
+may
+</ins>
+be
+<ins class="diff-new">in
+the
+form
+of
+</ins>
+a
+<del class="diff-old">well-formed
+JSON-LD
+document
+as
+defined
+</del>
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+<ins class="diff-chg">JSON
+object
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a href="#dfn-string" title="string" class="tref internalDFN"><ins class="diff-chg">
+string
+</ins></a>,<ins class="diff-chg">
+or
+an
+</ins><a href="#dfn-array" title="array" class="tref internalDFN"><ins class="diff-chg">
+array
+</ins></a><ins class="diff-chg">
+containing
+a
+combination
+of
+the
+two.
+Finally
+we
+process
+each
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins></a><ins class="diff-chg">
+contained
+</ins>
+in
+<del class="diff-old">[
+JSON-LD
+</del>
+<ins class="diff-chg">the
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins>
+</a>
+<del class="diff-old">].
+</del>
+<a href="#dfn-array" title="array" class="tref internalDFN">
+<ins class="diff-chg">array
+</ins></a><ins class="diff-chg">
+as
+follows.
+</ins>
+</p>
+<p>
+If
+<del class="diff-old">element
+</del>
+<a href="#dfn-context" title="context" class="tref internalDFN">
+<ins class="diff-chg">context
+</ins></a>
+is
+a
+<del class="diff-old">scalar
+</del>
+<a href="#dfn-string" title="string" class="tref internalDFN">
+<ins class="diff-chg">string
+</ins>
+</a>,
+<del class="diff-old">expand
+</del>
+it
+<del class="diff-old">according
+</del>
+<ins class="diff-chg">represents
+a
+reference
+</ins>
+to
+<ins class="diff-new">a
+remote
+context.
+We
+dereference
+</ins>
+the
+<del class="diff-old">Value
+Expansion
+</del>
+<ins class="diff-chg">remote
+context
+and
+replace
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-chg">
+context
+</ins>
+</a>
+<del class="diff-old">algorithm,
+passing
+copies
+</del>
+<ins class="diff-chg">with
+the
+value
+</ins>
+of
+the
+<del class="diff-old">active
+</del>
+<code>
+<ins class="diff-chg">@context
+</ins></code><ins class="diff-chg">
+key
+of
+the
+top-level
+object
+in
+the
+retrieved
+JSON-LD
+document.
+If
+there's
+no
+such
+key,
+an
+invalid
+remote
+context
+has
+been
+detected.
+Otherwise,
+we
+process
+</ins><a href="#dfn-context" title="context" class="tref internalDFN">
+context
+</a>
+<ins class="diff-new">by
+recursively
+using
+this
+algorithm
+ensuring
+that
+there
+is
+no
+cyclical
+reference.
+</ins></p><p><ins class="diff-new">
+If
+</ins><a href="#dfn-context" title="context" class="tref internalDFN"><ins class="diff-new">
+context
+</ins></a><ins class="diff-new">
+is
+a
+</ins><a href="#dfn-json-object" title="json-object" class="tref internalDFN"><ins class="diff-new">
+JSON
+object
+</ins></a>,<ins class="diff-new">
+we
+first
+update
+the
+</ins><a href="#dfn-base-iri" title="base-iri" class="tref internalDFN"><ins class="diff-new">
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
+IRI
+</ins></abbr></a>,<ins class="diff-new">
+the
+</ins><a href="#dfn-vocabulary-mapping" title="vocabulary-mapping" class="tref internalDFN"><ins class="diff-new">
+vocabulary
+mapping
+</ins></a>,
+and
+<del class="diff-old">active
+property
+</del>
+<ins class="diff-chg">the
+</ins><a href="#dfn-default-language" title="default-language" class="tref internalDFN"><ins class="diff-chg">
+default
+language
+</ins>
+</a>
+<ins class="diff-new">by
+processing
+three
+specific
+keywords:
+</ins><code><ins class="diff-new">
[email protected]
+</ins></code>,<code><ins class="diff-new">
[email protected]
+</ins></code>,
+and
+<del class="diff-old">return.
+If
+element
+is
+null
+</del>
+<code>
+<ins class="diff-chg">@language
+</ins></code>.<ins class="diff-chg">
+These
+are
+handled
+before
+any
+other
+keys
+in
+the
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+because
+they
+affect
+how
+the
+other
+keys
+are
+processed.
+</ins></p><p><ins class="diff-chg">
+Then,
+for
+every
+other
+key
+in
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins>
+</a>,
+<del class="diff-old">return.
+If
+element
+</del>
+<ins class="diff-chg">we
+update
+the
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins></a><ins class="diff-chg">
+in
+</ins><i><ins class="diff-chg">
+result
+</ins></i>.<ins class="diff-chg">
+Since
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definitions
+</ins></a><ins class="diff-chg">
+in
+a
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a><ins class="diff-chg">
+may
+themselves
+contain
+</ins><a href="#dfn-term" title="term" class="tref internalDFN"><ins class="diff-chg">
+terms
+</ins></a><ins class="diff-chg">
+or
+</ins><a href="#dfn-compact-iri" title="compact-iri" class="tref internalDFN"><ins class="diff-chg">
+compact
+IRIs
+</ins></a>,<ins class="diff-chg">
+we
+may
+need
+to
+recurse.
+When
+doing
+so,
+we
+must
+ensure
+that
+there
+is
+no
+cyclical
+dependency,
+which
+</ins>
+is
+an
+<del class="diff-old">array
+</del>
+<ins class="diff-chg">error.
+After
+we
+have
+processed
+any
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins></a><ins class="diff-chg">
+dependencies,
+we
+update
+the
+current
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins>
+</a>,
+<del class="diff-old">initialize
+an
+empty
+array
+</del>
+<ins class="diff-chg">which
+may
+be
+a
+</ins><a href="#dfn-keyword-alias" title="keyword-alias" class="tref internalDFN"><ins class="diff-chg">
+keyword
+alias
+</ins></a>.</p><p><ins class="diff-chg">
+Finally,
+we
+return
+</ins><i>
+result
+<del class="diff-old">.
+Expand
+each
+item
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+</del>
+</i>
+<ins class="diff-chg">as
+</ins>
+the
+<ins class="diff-chg">new
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+context
+<del class="diff-old">and
+active
+property
+</del>
+</a>.
+<del class="diff-old">If
+the
+</del>
+</p>
+</section>
+<section>
+<h4 id="algorithm">
+<ins class="diff-chg">Algorithm
+</ins></h4><p><ins class="diff-chg">
+This
+algorithm
+specifies
+how
+a
+new
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+<del class="diff-old">property's
+container
+mapping
+</del>
+<ins class="diff-chg">context
+</ins>
+</a>
+is
+<del class="diff-old">set
+to
[email protected]
+</del>
+<ins class="diff-chg">updated
+with
+a
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a>.<ins class="diff-chg">
+The
+algorithm
+takes
+three
+input
+variables:
+an
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a>,
+and
+<del class="diff-old">the
+expanded
+item
+is
+</del>
+an
+<a href="#dfn-array" title="array" class="tref internalDFN">
+array
+</a>
+<del class="diff-old">or
+a
+list
+object
+trigger
+a
+LIST_OF_LISTS_DETECTED
+error.
+</del>
+<i>
+<ins class="diff-chg">remote
+contexts
+</ins></i><ins class="diff-chg">
+which
+is
+used
+to
+detect
+cyclical
+context
+inclusions.
+</ins>
+If
+<del class="diff-old">the
+expanded
+item
+</del>
+<i>
+<ins class="diff-chg">remote
+contexts
+</ins></i>
+is
+<del class="diff-old">null
+,
+drop
+it.
+Otherwise,
+if
+the
+expanded
+item
+</del>
+<ins class="diff-chg">not
+passed,
+it
+</ins>
+is
+<ins class="diff-new">initialized
+to
+</ins>
+an
+<ins class="diff-chg">empty
+</ins><a href="#dfn-array" title="array" class="tref internalDFN">
+array
+<del class="diff-old">,
+merge
+its
+entries
+with
+result's
+entries.
+</del>
+</a>.
+</p>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Otherwise,
+append
+item
+to
+</del>
+<ins class="diff-chg">Initialize
+</ins><i>
+result
+<del class="diff-old">.
+Finally,
+set
+element
+</del>
+</i>
+to
+<ins class="diff-chg">the
+</ins>
+result
+<del class="diff-old">and
+return.
+</del>
+<ins class="diff-chg">of
+cloning
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">Otherwise,
+element
+must
+be
+an
+object.
+</del>
+If
+<del class="diff-old">element
+has
+a
[email protected]
+member,
+update
+the
+active
+</del>
+<a href="#dfn-local-context" title="local-context" class="tref internalDFN">
+<ins class="diff-chg">local
+</ins>
+context
+</a>
+<del class="diff-old">according
+</del>
+<ins class="diff-chg">is
+not
+an
+</ins><a href="#dfn-array" title="array" class="tref internalDFN"><ins class="diff-chg">
+array
+</ins></a>,<ins class="diff-chg">
+set
+it
+</ins>
+to
+<del class="diff-old">the
+steps
+outlined
+in
+Context
+Processing
+and
+remove
+the
[email protected]
+member.
+Initialize
+</del>
+an
+<del class="diff-old">empty
+JSON
+object
+</del>
+<a href="#dfn-array" title="array" class="tref internalDFN">
+<ins class="diff-chg">array
+</ins>
+</a>
+<del class="diff-old">result
+and
+</del>
+<ins class="diff-chg">containing
+only
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">then
+process
+</del>
+<ins class="diff-chg">For
+</ins>
+each
+<del class="diff-old">property
+and
+value
+</del>
+<ins class="diff-chg">item
+</ins><i><ins class="diff-chg">
+context
+</ins></i>
+in
+<del class="diff-old">element
+ordered
+by
+property
+as
+follows:
+</del>
+<a href="#dfn-local-context" title="local-context" class="tref internalDFN">
+<ins class="diff-chg">local
+context
+</ins></a>:
+<ol class="algorithm">
+<li>
+If
+<del class="diff-old">the
+active
+</del>
+<i>
+context
+<del class="diff-old">contains
+a
+property
+generator
+for
+property
+set
+expanded
+property
+to
+its
+IRIs
+</del>
+</i>
+<ins class="diff-chg">is
+</ins><a href="#dfn-null" title="null" class="tref internalDFN"><ins class="diff-chg">
+null
+</ins>
+</a>,
+<del class="diff-old">otherwise
+</del>
+set
+<del class="diff-old">it
+to
+the
+</del>
+<i>
+result
+<del class="diff-old">of
+expanding
+property
+according
+</del>
+</i>
+to
+<del class="diff-old">the
+steps
+outlined
+in
+IRI
+Expansion
+</del>
+<ins class="diff-chg">a
+newly-initialized
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins>
+</a>
+<del class="diff-old">(passing
+true
+for
+the
+vocabRelative
+flag).
+If
+expanded
+property
+is
+null
+,
+skip
+the
+current
+property
+-
+value
+pair
+</del>
+and
+continue
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">with
+</ins>
+the
+next
+<del class="diff-old">property
+-
+value
+pair
+in
+element
+.
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i>.
+</li>
+<li>
+If
+<del class="diff-old">expanded
+property
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i>
+is
+a
+<del class="diff-old">keyword
+</del>
+<a href="#dfn-string" title="string" class="tref internalDFN">
+<ins class="diff-chg">string
+</ins>
+</a>,
+<del class="diff-old">process
+it
+as
+follows:
+</del>
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+expanded
+property
+equals
[email protected]
+,
+set
+the
[email protected]
+member
+of
+result
+</del>
+<ins class="diff-chg">Set
+</ins><i><ins class="diff-chg">
+context
+</ins></i>
+to
+the
+result
+of
+<del class="diff-old">expanding
+</del>
+<ins class="diff-chg">resolving
+</ins><i>
+value
+<del class="diff-old">according
+</del>
+</i>
+<ins class="diff-chg">against
+</ins>
+the
+<ins class="diff-chg">base
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Expansion
+algorithm
+(passing
+true
+for
+the
+documentRelative
+flag).
+If
+value
+</del>
+<ins class="diff-chg">which
+</ins>
+is
+<del class="diff-old">not
+</del>
+<ins class="diff-chg">established
+as
+specified
+in
+</ins><cite><a href="http://tools.ietf.org/html/rfc3986#section-5.1"><ins class="diff-chg">
+section
+5.1
+Establishing
+</ins>
+a
+<del class="diff-old">string
+</del>
+<ins class="diff-chg">Base
+URI
+</ins>
+</a>
+<del class="diff-old">trigger
+an
+INVALID_ID_VALUE
+error.
+If
+expanded
+property
+equals
[email protected]
+,
+set
+the
[email protected]
+member
+</del>
+</cite>
+of
+<del class="diff-old">result
+to
+</del>
+<ins class="diff-chg">[
+</ins><cite><a href="#bib-RFC3986" class="bibref"><ins class="diff-chg">
+RFC3986
+</ins></a></cite><ins class="diff-chg">
+].
+Only
+</ins>
+the
+<del class="diff-old">result
+</del>
+<ins class="diff-chg">basic
+algorithm
+in
+</ins><cite><a href="http://tools.ietf.org/html/rfc3986#section-5.2"><ins class="diff-chg">
+section
+5.2
+</ins></a></cite>
+of
+<del class="diff-old">expanding
+value
+according
+the
+</del>
+<ins class="diff-chg">[
+</ins><cite>
+<del class="diff-old">IRI
+Expansion
+algorithm
+</del>
+<a href="#bib-RFC3986" class="bibref">
+<ins class="diff-chg">RFC3986
+</ins>
+</a>
+<del class="diff-old">(passing
+true
+for
+both
+the
+documentRelative
+and
+the
+vocabRelative
+flag).
+If
+value
+</del>
+</cite>
+<ins class="diff-chg">]
+</ins>
+is
+<ins class="diff-new">used;
+</ins>
+neither
+<del class="diff-old">a
+string
+</del>
+<cite>
+<a href="http://tools.ietf.org/html/rfc3986#section-6.2.2">
+<ins class="diff-chg">Syntax-Based
+Normalization
+</ins>
+</a>
+</cite>
+nor
+<del class="diff-old">an
+array
+</del>
+<cite>
+<a href="http://tools.ietf.org/html/rfc3986#section-6.2.3">
+<ins class="diff-chg">Scheme-Based
+Normalization
+</ins>
+</a>
+<del class="diff-old">of
+strings
+</del>
+</cite>
+<ins class="diff-chg">are
+performed.
+Characters
+additionally
+allowed
+in
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+references
+are
+treated
+in
+the
+same
+way
+that
+unreserved
+characters
+are
+treated
+in
+URI
+references,
+per
+</ins><cite><a href="http://tools.ietf.org/html/rfc3987#section-6.5"><ins class="diff-chg">
+section
+6.5
+</ins>
+</a>
+<del class="diff-old">trigger
+an
+INVALID_TYPE_VALUE
+error.
+Empty
+arrays
+</del>
+</cite>
+<ins class="diff-chg">of
+[
+</ins><cite><a href="#bib-RFC3987" class="bibref"><ins class="diff-chg">
+RFC3987
+</ins>
+</a>
+<del class="diff-old">are
+ignored.
+</del>
+</cite>
+<ins class="diff-chg">].
+</ins>
+</li>
+<li>
+If
+<del class="diff-old">expanded
+property
+equals
[email protected]
+,
+set
+the
[email protected]
+member
+of
+result
+to
+value
+.
+If
+value
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i>
+is
+<del class="diff-old">neither
+</del>
+<ins class="diff-chg">in
+the
+</ins><i><ins class="diff-chg">
+remote
+contexts
+</ins></i><ins class="diff-chg">
+array,
+</ins>
+a
+<del class="diff-old">scalar
+nor
+null
+trigger
+an
+</del>
+<code class="error">
+<del class="diff-old">INVALID_VALUE_OBJECT_VALUE
+</del>
+<a href="#idl-def-JsonLdErrorCode.recursive-context-inclusion">
+<ins class="diff-chg">recursive
+context
+inclusion
+</ins></a>
+</code>
+<del class="diff-old">error.
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+is
+aborted;
+otherwise,
+add
+</ins><i><ins class="diff-chg">
+context
+</ins></i><ins class="diff-chg">
+to
+</ins><i><ins class="diff-chg">
+remote
+contexts
+</ins></i>.
+</li>
+<li>
+<del class="diff-old">If
+expanded
+property
+equals
[email protected]
+,
+set
+</del>
+<ins class="diff-chg">Initialize
+</ins><i><ins class="diff-chg">
+context
+no
+base
+</ins></i><ins class="diff-chg">
+to
+</ins>
+the
+<del class="diff-old">@language
+member
+of
+</del>
+result
+<del class="diff-old">to
+</del>
+<ins class="diff-chg">of
+cloning
+</ins>
+the
+<del class="diff-old">lowercased
+value
+.
+If
+value
+is
+not
+a
+string
+,
+trigger
+an
+INVALID_LANGUAGE_VALUE
+error.
+</del>
+<a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+<ins class="diff-chg">active
+context
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">If
+expanded
+property
+equals
[email protected]
+,
+set
+</del>
+<ins class="diff-chg">Remove
+</ins>
+the
+<del class="diff-old">@annotation
+member
+of
+result
+to
+value
+.
+If
+value
+is
+not
+a
+string
+</del>
+<a href="#dfn-base-iri" title="base-iri" class="tref internalDFN">
+<ins class="diff-chg">base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>
+<del class="diff-old">trigger
+an
+INVALID_ANNOTATION_VALUE
+error.
+</del>
+<ins class="diff-chg">of
+</ins><i><ins class="diff-chg">
+context
+no
+base
+</ins></i>.
+</li>
+<li>
+<ins class="diff-new">Dereference
+</ins><i><ins class="diff-new">
+context
+</ins></i>.
+If
+<del class="diff-old">expanded
+property
+equals
+</del>
+<ins class="diff-chg">the
+dereferenced
+document
+has
+no
+top-level
+</ins><a href="#dfn-json-object" title="json-object" class="tref internalDFN"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+with
+an
+</ins>
+<code>
+<del class="diff-old">@set
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">or
[email protected]
+,
+</del>
+<ins class="diff-chg">member,
+an
+</ins><code class="error"><a href="#idl-def-JsonLdErrorCode.invalid-remote-context"><ins class="diff-chg">
+invalid
+remote
+context
+</ins></a></code><ins class="diff-chg">
+has
+been
+detected
+and
+processing
+is
+aborted;
+otherwise,
+</ins>
+set
+<i>
+<ins class="diff-new">context
+</ins></i><ins class="diff-new">
+to
+</ins>
+the
+<del class="diff-old">expanded
+property
+member
+</del>
+<ins class="diff-chg">value
+</ins>
+of
+<del class="diff-old">result
+</del>
+<ins class="diff-chg">that
+member.
+</ins></li><li><ins class="diff-chg">
+Set
+</ins><i><ins class="diff-chg">
+context
+</ins></i>
+to
+the
+result
+of
+<del class="diff-old">expanding
+value
+by
+</del>
+recursively
+<del class="diff-old">using
+</del>
+<ins class="diff-chg">calling
+</ins>
+this
+algorithm,
+passing
+<del class="diff-old">copies
+of
+the
+</del>
+<i>
+<ins class="diff-chg">context
+no
+base
+</ins></i><ins class="diff-chg">
+for
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+context
+</a>,
+<i>
+<ins class="diff-chg">context
+</ins></i><ins class="diff-chg">
+for
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a>,
+and
+<del class="diff-old">active
+property
+.
+</del>
+<i>
+<ins class="diff-chg">remote
+contexts
+</ins></i>.
+</li>
+<li>
+If
+<del class="diff-old">expanded
+property
+equals
[email protected]
+,
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i><ins class="diff-chg">
+has
+no
+</ins><a href="#dfn-base-iri" title="base-iri" class="tref internalDFN"><ins class="diff-chg">
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a><ins class="diff-chg">
+but
+</ins><i><ins class="diff-chg">
+result
+</ins></i><ins class="diff-chg">
+does,
+</ins>
+set
+the
+<del class="diff-old">@graph
+member
+</del>
+<a href="#dfn-base-iri" title="base-iri" class="tref internalDFN">
+<ins class="diff-chg">base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>
+of
+<del class="diff-old">result
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i>
+to
+the
+<del class="diff-old">result
+of
+expanding
+value
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+</del>
+<ins class="diff-chg">one
+</ins>
+of
+<del class="diff-old">the
+active
+context
+and
[email protected]
+as
+active
+property
+.
+</del>
+<i>
+<ins class="diff-chg">result
+</ins></i>.
+</li>
+<li>
+<del class="diff-old">Continue
+</del>
+<ins class="diff-chg">Overwrite
+</ins><i><ins class="diff-chg">
+result
+</ins></i><ins class="diff-chg">
+with
+</ins><i><ins class="diff-chg">
+context
+</ins></i><ins class="diff-chg">
+and
+continue
+</ins>
+with
+the
+next
+<del class="diff-old">property
+-
+value
+pair
+from
+element
+.
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i>.
+</li>
+</ol>
+</li>
+<li>
+If
+<del class="diff-old">expanded
+property
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i>
+is
+not
+<ins class="diff-new">a
+</ins><a href="#dfn-json-object" title="json-object" class="tref internalDFN"><ins class="diff-new">
+JSON
+object
+</ins></a>,
+an
+<del class="diff-old">absolute
+IRI
+</del>
+<code class="error">
+<del class="diff-old">,i.e.,
+it
+doesn't
+contain
+a
+colon,
+continue
+with
+the
+next
+member
+from
+element
+.
+Otherwise,
+if
+property's
+container
+mapping
+</del>
+<a href="#idl-def-JsonLdErrorCode.invalid-local-context">
+<ins class="diff-chg">invalid
+local
+context
+</ins>
+</a>
+<del class="diff-old">is
+set
+to
[email protected]
+</del>
+</code>
+<del class="diff-old">Initialize
+a
+new
+empty
+array
+language
+map
+values
+.
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+is
+aborted.
+</ins>
+</li>
+<li>
+<del class="diff-old">Process
+each
+key
+-
+val
+pair
+of
+value
+ordered
+by
+key
+as
+follows:
+</del>
+If
+<del class="diff-old">val
+is
+not
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i><ins class="diff-chg">
+has
+</ins>
+an
+<del class="diff-old">array,
+transform
+it
+to
+one.
+For
+each
+item
+of
+val
+,
+construct
+a
+new
+JSON
+object
+consisting
+of
+two
+members:
+</del>
+<code>
+<del class="diff-old">@value
+</del>
+<ins class="diff-chg">@base
+</ins>
+</code>
+<del class="diff-old">set
+to
+</del>
+<ins class="diff-chg">key:
+</ins><div class="issue"><div class="issue-title"><a href="https://github.com/json-ld/json-ld.org/issues/223"><span><ins class="diff-chg">
+Issue
+223
+</ins></span></a>:<ins class="diff-chg">
+Feature
+at
+risk
+</ins></div><p class="atrisk"><ins class="diff-chg">
+This
+feature
+is
+at
+risk
+as
+</ins>
+the
+<del class="diff-old">currently
+processed
+item
+and
+</del>
+<ins class="diff-chg">fact
+that
+a
+document
+may
+have
+multiple
+base
+IRIs
+is
+potentially
+confusing
+for
+developers.
+It
+is
+also
+being
+discussed
+whether
+relative
+IRIs
+are
+allowed
+as
+values
+of
+</ins>
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">@base
+</ins>
+</code>
+<del class="diff-old">set
+to
+</del>
+<ins class="diff-chg">or
+whether
+</ins>
+the
+<del class="diff-old">lowercased
+key
+.
+If
+val
+is
+not
+a
+</del>
+<ins class="diff-chg">empty
+</ins>
+string
+<del class="diff-old">,
+trigger
+a
+LANGUAGE_MAP_INVALID_VALUE
+error.
+Otherwise
+append
+the
+object
+to
+language
+map
+values
+.
+Set
+value
+</del>
+<ins class="diff-chg">should
+be
+used
+</ins>
+to
+<del class="diff-old">language
+map
+values
+.
+Otherwise,
+if
+property's
+container
+mapping
+is
+set
+</del>
+<ins class="diff-chg">explicitly
+specify
+that
+there
+isn't
+a
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>,<ins class="diff-chg">
+which
+could
+be
+used
+</ins>
+to
+<del class="diff-old">@annotation
+</del>
+<ins class="diff-chg">ensure
+that
+relative
+IRIs
+remain
+relative
+when
+expanding.
+</ins></p></div>
+<ol class="algorithm">
+<li>
+Initialize
+<del class="diff-old">a
+new
+empty
+array
+annotation
+map
+values
+.
+Process
+each
+key
+-
+val
+pair
+of
+</del>
+<i>
+value
+<del class="diff-old">ordered
+by
+key
+as
+follows:
+If
+val
+is
+not
+an
+array,
+transform
+it
+</del>
+</i>
+to
+<del class="diff-old">one.
+Expand
+val
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+</del>
+the
+<del class="diff-old">active
+context
+and
+active
+property
+.
+Add
+to
+each
+item
+of
+val
+a
+member
+</del>
+<ins class="diff-chg">value
+associated
+with
+the
+</ins>
+<code>
+<del class="diff-old">@annotation
+</del>
+<ins class="diff-chg">@base
+</ins>
+</code>
+<del class="diff-old">set
+to
+key
+if
+no
+such
+member
+exists
+yet
+and
+append
+the
+resulting
+JSON
+object
+to
+annotation
+map
+values
+.
+Set
+value
+to
+annotation
+map
+values
+.
+</del>
+<ins class="diff-chg">key.
+</ins>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+expand
+</del>
+<ins class="diff-chg">If
+</ins><i>
+value
+<del class="diff-old">by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+</del>
+</i>
+<ins class="diff-chg">is
+</ins><a href="#dfn-null" title="null" class="tref internalDFN"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+remove
+</ins>
+the
+<del class="diff-old">active
+context
+</del>
+<a href="#dfn-base-iri" title="base-iri" class="tref internalDFN">
+<ins class="diff-chg">base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>
+<del class="diff-old">and
+property
+as
+active
+property
+.
+</del>
+<ins class="diff-chg">of
+</ins><i><ins class="diff-chg">
+result
+</ins></i>.
+</li>
+<li>
+<del class="diff-old">If
+the
+expanded
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><i>
+value
+<del class="diff-old">equals
+null
+</del>
+</i>
+<ins class="diff-chg">is
+an
+</ins><a href="#dfn-absolute-iri" title="absolute-iri" class="tref internalDFN"><ins class="diff-chg">
+absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>,
+<del class="diff-old">continue
+with
+</del>
+the
+<del class="diff-old">next
+property
+-
+value
+pair
+from
+element
+.
+If
+property's
+container
+mapping
+</del>
+<a href="#dfn-base-iri" title="base-iri" class="tref internalDFN">
+<ins class="diff-chg">base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>
+<ins class="diff-new">of
+</ins><i><ins class="diff-new">
+result
+</ins></i>
+is
+set
+to
+<del class="diff-old">@list
+and
+</del>
+<i>
+value
+</i>.
+<ins class="diff-chg">If
+it
+</ins>
+is
+<del class="diff-old">either
+</del>
+not
+an
+<del class="diff-old">JSON
+object
+or
+a
+JSON
+object
+without
+</del>
+<a href="#dfn-absolute-iri" title="absolute-iri" class="tref internalDFN">
+<ins class="diff-chg">absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>,
+an
+<del class="diff-old">@list
+member,
+replace
+value
+with
+a
+JSON
+object
+</del>
+<code class="error">
+<a href="#idl-def-JsonLdErrorCode.invalid-base-IRI">
+<ins class="diff-chg">invalid
+base
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>
+<del class="diff-old">with
+an
[email protected]
+</del>
+</code>
+<del class="diff-old">member
+whose
+value
+is
+set
+to
+value
+(wrapped
+in
+an
+array
+if
+it
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+</ins>
+is
+<del class="diff-old">not
+already
+one).
+</del>
+<ins class="diff-chg">aborted.
+</ins></li></ol>
+</li>
+<li>
+If
+<del class="diff-old">expanded
+property
+is
+</del>
+<i>
+<ins class="diff-chg">context
+</ins></i><ins class="diff-chg">
+has
+</ins>
+an
+<del class="diff-old">array
+,
+</del>
+<code>
+<ins class="diff-chg">@vocab
+</ins></code><ins class="diff-chg">
+key:
+</ins>
+<ol class="algorithm">
+<li>
+<del class="diff-old">label
+all
+blank
+nodes
+in
+</del>
+<ins class="diff-chg">Initialize
+</ins><i>
+value
+</i>
+<ins class="diff-chg">to
+the
+value
+associated
+</ins>
+with
+<del class="diff-old">blank
+node
+identifiers
+by
+using
+</del>
+the
+<del class="diff-old">Label
+Blank
+Nodes
+Algorithm
+.
+</del>
+<code>
+<ins class="diff-chg">@vocab
+</ins></code><ins class="diff-chg">
+key.
+</ins>
+</li>
+<li>
+<del class="diff-old">Then,
+for
+each
+iri
+of
+expanded
+property
+merge
+a
+copy
+of
+</del>
+<ins class="diff-chg">If
+</ins><i>
+value
+<del class="diff-old">into
+the
+iri
+member
+of
+the
+</del>
+</i>
+<ins class="diff-chg">is
+</ins><a href="#dfn-null" title="null" class="tref internalDFN"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+remove
+any
+</ins><a href="#dfn-vocabulary-mapping" title="vocabulary-mapping" class="tref internalDFN"><ins class="diff-chg">
+vocabulary
+mapping
+</ins></a><ins class="diff-chg">
+from
+</ins><i>
+result
+<del class="diff-old">JSON
+object
+.
+</del>
+</i>.
+</li>
+<li>
+Otherwise,
+<del class="diff-old">merge
+</del>
+<ins class="diff-chg">if
+</ins><i>
+value
+<del class="diff-old">into
+</del>
+</i>
+<ins class="diff-chg">is
+an
+</ins><a href="#dfn-absolute-iri" title="absolute-iri" class="tref internalDFN"><ins class="diff-chg">
+absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>,
+the
+<del class="diff-old">iri
+member
+</del>
+<a href="#dfn-vocabulary-mapping" title="vocabulary-mapping" class="tref internalDFN">
+<ins class="diff-chg">vocabulary
+mapping
+</ins></a>
+of
+<del class="diff-old">the
+result
+JSON
+object
+.
+Set
+element
+to
+</del>
+<i>
+result
+<del class="diff-old">and
+numProperties
+</del>
+</i>
+<ins class="diff-chg">is
+set
+</ins>
+to
+<del class="diff-old">the
+number
+of
+members
+of
+result
+.
+</del>
+<i>
+<ins class="diff-chg">value
+</ins></i>.
+If
+<del class="diff-old">element
+has
+</del>
+<ins class="diff-chg">it
+is
+not
+</ins>
+an
+<del class="diff-old">@annotation
+member,
+decrease
+numProperties
+by
+1.
+If
+element
+has
+</del>
+<a href="#dfn-absolute-iri" title="absolute-iri" class="tref internalDFN">
+<ins class="diff-chg">absolute
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr></a>,
+an
+<del class="diff-old">@value
+</del>
+<code class="error">
+<a href="#idl-def-JsonLdErrorCode.invalid-vocab-mapping">
+<ins class="diff-chg">invalid
+vocab
+mapping
+</ins></a>
+</code>
+<del class="diff-old">member,
+decrease
+numProperties
+by
+1.
+If
+element
+</del>
+<ins class="diff-chg">error
+</ins>
+has
+<del class="diff-old">an
[email protected]
+member,
+decrease
+numProperties
+by
+1
+</del>
+<ins class="diff-chg">been
+detected
+</ins>
+and
+<del class="diff-old">check
+that
+the
+value
+of
+the
[email protected]
+member
+</del>
+<ins class="diff-chg">processing
+</ins>
+is
+<del class="diff-old">a
+string.
+If
+not,
+trigger
+an
+INVALID_LANGUAGE_TAGGED_STRING
+error.
+</del>
+<ins class="diff-chg">aborted.
+</ins></li></ol>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+element
+</del>
+<ins class="diff-chg">If
+</ins><i><ins class="diff-chg">
+context
+</ins></i>
+has
+an
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+<del class="diff-old">member,
+decrease
+numProperties
+by
+1
+and
+check
+that
+</del>
+<ins class="diff-chg">key:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+Initialize
+</ins><i><ins class="diff-chg">
+value
+</ins></i><ins class="diff-chg">
+to
+</ins>
+the
+value
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">associated
+with
+</ins>
+the
+<code>
+<del class="diff-old">@type
+member
+is
+a
+string.
+If
+not,
+trigger
+an
+INVALID_TYPED_VALUE
+</del>
+<ins class="diff-chg">@language
+</ins>
+</code>
+<del class="diff-old">error.
+</del>
+<ins class="diff-chg">key.
+</ins>
+</li>
+<li>
+If
+<del class="diff-old">numProperties
+</del>
+<i>
+<ins class="diff-chg">value
+</ins></i>
+is
+<del class="diff-old">greater
+than
+0,
+trigger
+an
+INVALID_VALUE_OBJECT
+error.
+</del>
+<a href="#dfn-null" title="null" class="tref internalDFN">
+<ins class="diff-chg">null
+</ins></a>,<ins class="diff-chg">
+remove
+any
+</ins><a href="#dfn-default-language" title="default-language" class="tref internalDFN"><ins class="diff-chg">
+default
+language
+</ins></a><ins class="diff-chg">
+from
+</ins><i><ins class="diff-chg">
+result
+</ins></i>.
+</li>
+<li>
+<del class="diff-old">If
+the
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><i>
+value
+<del class="diff-old">of
+the
[email protected]
+member
+equals
+null
+</del>
+</i>
+<ins class="diff-chg">is
+</ins><a href="#dfn-string" title="string" class="tref internalDFN"><ins class="diff-chg">
+string
+</ins>
+</a>,
+<ins class="diff-new">the
+</ins><a href="#dfn-default-language" title="default-language" class="tref internalDFN"><ins class="diff-new">
+default
+language
+</ins></a><ins class="diff-new">
+of
+</ins><i><ins class="diff-new">
+result
+</ins></i><ins class="diff-new">
+is
+</ins>
+set
+<del class="diff-old">element
+</del>
+to
+<del class="diff-old">null
+.
+Return.
+If
+element
+has
+an
[email protected]
+member
+whose
+</del>
+<ins class="diff-chg">lowercased
+</ins><i>
+value
+</i>.
+<ins class="diff-new">If
+it
+</ins>
+is
+not
+<del class="diff-old">an
+array
+</del>
+<ins class="diff-chg">a
+</ins><a href="#dfn-string" title="string" class="tref internalDFN"><ins class="diff-chg">
+string
+</ins>
+</a>,
+<del class="diff-old">transform
+it
+to
+an
+array
+.
+If
+element
+has
+</del>
+an
+<del class="diff-old">@list
+or
[email protected]
+</del>
+<code class="error">
+<a href="#idl-def-JsonLdErrorCode.invalid-default-language">
+<ins class="diff-chg">invalid
+default
+language
+</ins></a>
+</code>
+<del class="diff-old">member
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+</ins>
+and
+<del class="diff-old">numProperties
+</del>
+<ins class="diff-chg">processing
+</ins>
+is
+<del class="diff-old">greater
+than
+1,
+trigger
+an
+INVALID_SET_OR_LIST_OBJECT
+error.
+</del>
+<ins class="diff-chg">aborted.
+</ins></li></ol>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+element
+has
+an
[email protected]
+member,
+set
+element
+</del>
+<ins class="diff-chg">Create
+a
+</ins><a href="#dfn-json-object" title="json-object" class="tref internalDFN"><ins class="diff-chg">
+JSON
+object
+</ins></a><i><ins class="diff-chg">
+defined
+</ins></i>
+to
+<del class="diff-old">the
+value
+</del>
+<ins class="diff-chg">use
+to
+keep
+track
+</ins>
+of
+<del class="diff-old">that
+member.
+</del>
+<ins class="diff-chg">whether
+or
+not
+a
+</ins><a href="#dfn-term" title="term" class="tref internalDFN"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+has
+already
+been
+defined
+or
+currently
+being
+defined
+during
+recursion.
+</ins>
+</li>
+<li>
+<del class="diff-old">Otherwise,
+if
+element
+has
+just
+an
+</del>
+<ins class="diff-chg">For
+each
+</ins><i><ins class="diff-chg">
+key
+</ins></i><ins class="diff-chg">
+-
+</ins><i><ins class="diff-chg">
+value
+</ins></i><ins class="diff-chg">
+pair
+in
+</ins><i><ins class="diff-chg">
+context
+</ins></i><ins class="diff-chg">
+where
+</ins><i><ins class="diff-chg">
+key
+</ins></i><ins class="diff-chg">
+is
+not
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<code><ins class="diff-chg">
[email protected]
+</ins></code>,<ins class="diff-chg">
+or
+</ins>
+<code>
[email protected]
+<del class="diff-old">member,
+set
+element
+to
+null.
+</del>
+</code>,
+<ins class="diff-chg">invoke
+the
+</ins><a href="#create-term-definition"><ins class="diff-chg">
+Create
+Term
+Definition
+algorithm
+</ins></a>,<ins class="diff-chg">
+passing
+</ins><i><ins class="diff-chg">
+result
+</ins></i><ins class="diff-chg">
+for
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a>,<i><ins class="diff-chg">
+context
+</ins></i><ins class="diff-chg">
+for
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a>,<i><ins class="diff-chg">
+key
+</ins></i>,<ins class="diff-chg">
+and
+</ins><i><ins class="diff-chg">
+defined
+</ins></i>.
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-new">Return
+</ins><i><ins class="diff-new">
+result
+</ins></i>.</li>
+</ol>
+</section>
+</section>
+<section id="create-term-definition">
+<h3>
+<span class="secno">
+<ins class="diff-new">6.2
+</ins></span><ins class="diff-new">
+Create
+Term
+Definition
+</ins></h3>
+<p>
+<del class="diff-old">If,
+after
+the
+</del>
+<ins class="diff-chg">This
+</ins>
+algorithm
+<del class="diff-old">outlined
+above
+</del>
+is
+<del class="diff-old">run,
+</del>
+<ins class="diff-chg">called
+from
+</ins>
+the
+<del class="diff-old">resulting
+element
+is
+an
+JSON
+object
+</del>
+<a href="#context-processing-algorithm">
+<ins class="diff-chg">Context
+Processing
+algorithm
+</ins>
+</a>
+<del class="diff-old">with
+just
+a
[email protected]
+member,
+element
+is
+set
+</del>
+to
+<ins class="diff-new">create
+a
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-new">
+term
+definition
+</ins></a><ins class="diff-new">
+in
+</ins>
+the
+<del class="diff-old">value
+of
[email protected]
+'s
+value.
+Finally,
+if
+element
+is
+</del>
+<a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+<ins class="diff-chg">active
+context
+</ins></a><ins class="diff-chg">
+for
+</ins>
+a
+<del class="diff-old">JSON
+object
+,
+it
+is
+wrapped
+into
+an
+array
+</del>
+<a href="#dfn-term" title="term" class="tref internalDFN">
+<ins class="diff-chg">term
+</ins></a><ins class="diff-chg">
+being
+processed
+in
+a
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins>
+</a>.
+</p>
+<section class="informative">
+<h4 id="general-solution-1">
+<ins class="diff-chg">General
+Solution
+</ins></h4>
+<del class="diff-old">5.3
+Context
+Processing
+</del>
+<p>
+<del class="diff-old">Processing
+of
+JSON-LD
+data
+structure
+is
+managed
+recursively.
+During
+processing,
+each
+rule
+</del>
+<em>
+<ins class="diff-chg">This
+section
+</ins>
+is
+<del class="diff-old">applied
+using
+information
+provided
+by
+the
+active
+context
+.
+</del>
+<ins class="diff-chg">non-normative.
+</ins></em>
+</p>
+<p>
+<del class="diff-old">The
+active
+</del>
+<a href="#dfn-term-definition" title="term-definition" class="tref internalDFN">
+<ins class="diff-chg">Term
+definitions
+</ins></a><ins class="diff-chg">
+are
+created
+by
+parsing
+the
+information
+in
+the
+given
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+</ins>
+context
+</a>
+<del class="diff-old">contains
+</del>
+<ins class="diff-chg">for
+</ins>
+the
+<del class="diff-old">active
+</del>
+<ins class="diff-chg">given
+</ins><a href="#dfn-term" title="term" class="tref internalDFN">
+term
+<del class="diff-old">definitions
+which
+specify
+how
+properties
+and
+values
+have
+to
+be
+interpreted
+as
+well
+as
+the
+current
+vocabulary
+mapping
+and
+</del>
+</a>.
+<ins class="diff-chg">If
+</ins>
+the
+<del class="diff-old">default
+language
+.
+Each
+</del>
+<ins class="diff-chg">given
+</ins><a href="#dfn-term" title="term" class="tref internalDFN">
+term
+<del class="diff-old">definition
+</del>
+</a>
+<del class="diff-old">consists
+of
+an
+</del>
+<ins class="diff-chg">is
+a
+</ins><a href="#dfn-compact-iri" title="compact-iri" class="tref internalDFN"><ins class="diff-chg">
+compact
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">mapping
+and
+optionally
+a
+type
+mapping
+from
+terms
+to
+datatypes
+or
+language
+mapping
+from
+terms
+to
+language
+codes,
+and
+a
+container
+mapping
+.
+If
+</del>
+</a>,
+<ins class="diff-chg">it
+may
+omit
+</ins>
+an
+<a href="#dfn-iri-mapping" title="iri-mapping" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+mapping
+</a>
+<del class="diff-old">maps
+a
+</del>
+<ins class="diff-chg">by
+depending
+on
+its
+</ins><a href="#dfn-prefix" title="prefix" class="tref internalDFN"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+having
+its
+own
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN">
+term
+<del class="diff-old">to
+multiple
+IRIs
+it
+is
+said
+to
+be
+a
+property
+generator
+.
+</del>
+<ins class="diff-chg">definition
+</ins></a>.
+If
+<del class="diff-old">a
+local
+context
+is
+encountered,
+information
+from
+</del>
+the
+<del class="diff-old">local
+context
+</del>
+<a href="#dfn-prefix" title="prefix" class="tref internalDFN">
+<ins class="diff-chg">prefix
+</ins>
+</a>
+is
+<del class="diff-old">merged
+into
+</del>
+<ins class="diff-chg">a
+key
+in
+</ins>
+the
+<del class="diff-old">active
+context
+.
+A
+</del>
+<a href="#dfn-local-context" title="local-context" class="tref internalDFN">
+local
+context
+</a>,
+<ins class="diff-new">then
+its
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-new">
+term
+definition
+</ins>
+</a>
+<del class="diff-old">is
+identified
+within
+</del>
+<ins class="diff-chg">must
+first
+be
+created,
+through
+recursion,
+before
+continuing.
+Because
+</ins>
+a
+<del class="diff-old">JSON
+object
+</del>
+<a href="#dfn-term-definition" title="term-definition" class="tref internalDFN">
+<ins class="diff-chg">term
+definition
+</ins>
+</a>
+<del class="diff-old">having
+</del>
+<ins class="diff-chg">can
+depend
+on
+other
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definitions
+</ins></a>,
+a
+<del class="diff-old">@context
+member
+with
+</del>
+<ins class="diff-chg">mechanism
+must
+be
+used
+to
+detect
+cyclical
+dependencies.
+The
+solution
+employed
+here
+uses
+</ins>
+a
+<del class="diff-old">string
+,
+array
+</del>
+<ins class="diff-chg">map,
+</ins><i><ins class="diff-chg">
+defined
+</ins></i>,<ins class="diff-chg">
+that
+keeps
+track
+of
+whether
+</ins>
+or
+<ins class="diff-new">not
+</ins>
+a
+<del class="diff-old">JSON
+object
+</del>
+<a href="#dfn-term" title="term" class="tref internalDFN">
+<ins class="diff-chg">term
+</ins>
+</a>
+<del class="diff-old">value.
+</del>
+<ins class="diff-chg">has
+been
+defined
+or
+is
+currently
+in
+the
+process
+of
+being
+defined.
+This
+map
+is
+checked
+before
+any
+recursion
+is
+attempted.
+</ins>
+</p>
+<p>
+<del class="diff-old">This
+algorithm
+specifies
+how
+</del>
+<ins class="diff-chg">After
+all
+dependencies
+for
+a
+</ins><a href="#dfn-term" title="term" class="tref internalDFN"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+have
+been
+defined,
+</ins>
+the
+<del class="diff-old">active
+</del>
+<ins class="diff-chg">rest
+of
+the
+information
+in
+the
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+</ins>
+context
+</a>
+<ins class="diff-new">for
+the
+given
+</ins><a href="#dfn-term" title="term" class="tref internalDFN"><ins class="diff-new">
+term
+</ins></a>
+is
+<del class="diff-old">updated
+with
+a
+local
+context
+</del>
+<ins class="diff-chg">taken
+into
+account,
+creating
+the
+appropriate
+</ins><a href="#dfn-iri-mapping" title="iri-mapping" class="tref internalDFN"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a>,<a href="#dfn-container-mapping" title="container-mapping" class="tref internalDFN"><ins class="diff-chg">
+container
+mapping
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a href="#dfn-type-mapping" title="type-mapping" class="tref internalDFN"><ins class="diff-chg">
+type
+mapping
+</ins></a><ins class="diff-chg">
+or
+</ins><a href="#dfn-language-mapping" title="language-mapping" class="tref internalDFN"><ins class="diff-chg">
+language
+mapping
+</ins></a><ins class="diff-chg">
+for
+the
+</ins><a href="#dfn-term" title="term" class="tref internalDFN"><ins class="diff-chg">
+term
+</ins>
+</a>.
+</p>
+</section>
+<section>
+<h4 id="algorithm-1">
+<ins class="diff-new">Algorithm
+</ins></h4><p>
+The
+algorithm
+<del class="diff-old">takes
+three
+input
+variables:
+</del>
+<ins class="diff-chg">has
+four
+required
+inputs
+which
+are:
+</ins>
+an
+<a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+context
+</a>,
+a
+<a href="#dfn-local-context" title="local-context" class="tref internalDFN">
+local
+context
+</a>,
+<ins class="diff-new">a
+</ins><i><ins class="diff-new">
+term
+</ins></i>,
+and
+<del class="diff-old">an
+array
+of
+already
+included
+remote
+contexts
+remoteContexts
+.
+To
+begin,
+remoteContexts
+is
+initialized
+to
+an
+empty
+array.
+</del>
+<ins class="diff-chg">a
+map
+</ins><i><ins class="diff-chg">
+defined
+</ins></i>.
+</p>
+<del class="diff-old">All
+calls
+of
+</del>
+<ol class="algorithm">
+<li>
+<ins class="diff-chg">If
+</ins><i><ins class="diff-chg">
+defined
+</ins></i><ins class="diff-chg">
+contains
+</ins>
+the
+<ins class="diff-chg">key
+</ins><i><ins class="diff-chg">
+term
+</ins></i><ins class="diff-chg">
+and
+the
+associated
+value
+is
+</ins><a href="#dfn-true" title="true" class="tref internalDFN"><ins class="diff-chg">
+true
+</ins></a><ins class="diff-chg">
+(indicating
+that
+the
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins></a><ins class="diff-chg">
+has
+already
+been
+created),
+return.
+Otherwise,
+if
+the
+value
+is
+</ins><a href="#dfn-false" title="false" class="tref internalDFN"><ins class="diff-chg">
+false
+</ins></a>,<ins class="diff-chg">
+a
+</ins><code class="error">
+<a href="#idl-def-JsonLdErrorCode.cyclic-IRI-mapping">
+<ins class="diff-new">cyclic
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Expansion
+algorithm
+</del>
+<ins class="diff-chg">mapping
+</ins>
+</a>
+<del class="diff-old">pass
+</del>
+</code>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+is
+aborted.
+</ins></li><li><ins class="diff-chg">
+Set
+</ins>
+the
+value
+<del class="diff-old">specified
+in
+the
+algorithm
+along
+</del>
+<ins class="diff-chg">associated
+</ins>
+with
+<i>
+<ins class="diff-new">defined
+</ins></i><ins class="diff-new">
+'s
+</ins><i><ins class="diff-new">
+term
+</ins></i><ins class="diff-new">
+key
+to
+</ins><a href="#dfn-false" title="false" class="tref internalDFN"><ins class="diff-new">
+false
+</ins></a>.<ins class="diff-new">
+This
+indicates
+that
+</ins>
+the
+<del class="diff-old">active
+context
+,
+the
+currently
+</del>
+<a href="#dfn-term-definition" title="term-definition" class="tref internalDFN">
+<ins class="diff-chg">term
+definition
+</ins></a><ins class="diff-chg">
+is
+now
+</ins>
+being
+<del class="diff-old">processed
+local
+context
+,
+and
+true
+for
+the
+vocabRelative
+flag.
+</del>
+<ins class="diff-chg">created
+but
+is
+not
+yet
+complete.
+</ins></li>
+<li>
+<del class="diff-old">If
+the
+local
+context
+</del>
+<ins class="diff-chg">Since
+</ins><a href="#dfn-keyword" title="keyword" class="tref internalDFN"><ins class="diff-chg">
+keywords
+</ins>
+</a>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">cannot
+be
+overridden,
+</ins><i><ins class="diff-chg">
+term
+</ins></i><ins class="diff-chg">
+must
+</ins>
+not
+<del class="diff-old">an
+array,
+transform
+it
+to
+one.
+</del>
+<ins class="diff-chg">be
+a
+</ins><a href="#dfn-keyword" title="keyword" class="tref internalDFN"><ins class="diff-chg">
+keyword
+</ins></a>.<ins class="diff-chg">
+Otherwise,
+a
+</ins><code class="error"><a href="#idl-def-JsonLdErrorCode.keyword-redefinition"><ins class="diff-chg">
+keyword
+redefinition
+</ins></a></code><ins class="diff-chg">
+error
+has
+been
+detected
+and
+processing
+is
+aborted.
+</ins>
+</li>
+<li>
+<del class="diff-old">Process
+each
+item
+</del>
+<ins class="diff-chg">Remove
+any
+existing
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins></a><ins class="diff-chg">
+for
+</ins><i><ins class="diff-chg">
+term
+</ins></i><ins class="diff-chg">
+in
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+</ins>
+context
+<del class="diff-old">of
+</del>
+</a>.
+</li>
+<li>
+<ins class="diff-chg">Initialize
+</ins><i><ins class="diff-chg">
+value
+</ins></i><ins class="diff-chg">
+to
+</ins>
+the
+<ins class="diff-chg">value
+associated
+with
+the
+key
+</ins><i><ins class="diff-chg">
+term
+</ins></i><ins class="diff-chg">
+in
+</ins><a href="#dfn-local-context" title="local-context" class="tref internalDFN">
+local
+context
+<del class="diff-old">as
+follows:
+</del>
+</a>.
+</li>
+<li>
+If
+<del class="diff-old">context
+equals
+</del>
+<i>
+<ins class="diff-chg">value
+</ins></i><ins class="diff-chg">
+is
+</ins><a href="#dfn-null" title="null" class="tref internalDFN"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+or
+</ins><i><ins class="diff-chg">
+value
+</ins></i><ins class="diff-chg">
+is
+a
+</ins><a href="#dfn-json-object" title="json-object" class="tref internalDFN"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+containing
+the
+key-value
+pair
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+-
+</ins><a href="#dfn-null" title="null" class="tref internalDFN">
+null
+</a>,
+<del class="diff-old">reset
+</del>
+<ins class="diff-chg">set
+</ins>
+the
+<a href="#dfn-term-definition" title="term-definition" class="tref internalDFN">
+<ins class="diff-chg">term
+definition
+</ins></a><ins class="diff-chg">
+in
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+context
+</a>
+<del class="diff-old">and
+continue
+with
+</del>
+<ins class="diff-chg">to
+</ins><a href="#dfn-null" title="null" class="tref internalDFN"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">next
+item.
+</del>
+<ins class="diff-chg">value
+associated
+with
+</ins><i><ins class="diff-chg">
+defined
+</ins></i><ins class="diff-chg">
+'s
+key
+</ins><i><ins class="diff-chg">
+term
+</ins></i><ins class="diff-chg">
+to
+</ins><a href="#dfn-true" title="true" class="tref internalDFN"><ins class="diff-chg">
+true
+</ins></a>,<ins class="diff-chg">
+and
+return.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+context
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><i><ins class="diff-chg">
+value
+</ins></i>
+is
+a
+<a href="#dfn-string" title="string" class="tref internalDFN">
+string
+</a>:
+<ol class="algorithm">
+<li>
+Expand
+<del class="diff-old">context
+according
+</del>
+<i>
+<ins class="diff-chg">value
+</ins></i><ins class="diff-chg">
+by
+setting
+it
+</ins>
+to
+<ins class="diff-new">the
+result
+of
+using
+the
+</ins>
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+<del class="diff-old">.
+</del>
+<ins class="diff-chg">algorithm
+</ins></a>,<ins class="diff-chg">
+passing
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a>,<i><ins class="diff-chg">
+value
+</ins></i>,<a href="#dfn-true" title="true" class="tref internalDFN"><ins class="diff-chg">
+true
+</ins></a><ins class="diff-chg">
+for
+</ins><i><ins class="diff-chg">
+vocab
+</ins></i>,<a href="#dfn-true" title="true" class="tref internalDFN"><ins class="diff-chg">
+true
+</ins></a><ins class="diff-chg">
+for
+</ins><i><ins class="diff-chg">
+document
+relative
+</ins></i>,<a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a>,<ins class="diff-chg">
+and
+</ins><i><ins class="diff-chg">
+defined
+</ins></i>.
+</li>
+<li>
+If
+<del class="diff-old">context
+</del>
+<i>
+<ins class="diff-chg">value
+</ins></i>
+is
+<del class="diff-old">in
+the
+remoteContexts
+array,
+raise
+</del>
+<code>
+<ins class="diff-chg">@context
+</ins></code>,
+an
+<code class="error">
+<del class="diff-old">RECURSIVE_CONTEXT_INCLUSION
+</del>
+<a href="#idl-def-JsonLdErrorCode.invalid-keyword-alias">
+<ins class="diff-chg">invalid
+keyword
+alias
+</ins></a>
+</code>
+<del class="diff-old">error.
+Otherwise,
+add
+context
+to
+remoteContexts
+.
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+is
+aborted.
+</ins>
+</li>
+<li>
+<del class="diff-old">Dereference
+</del>
+<ins class="diff-chg">Set
+the
+</ins><a href="#dfn-iri-mapping" title="iri-mapping" class="tref internalDFN"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a><ins class="diff-chg">
+for
+the
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins></a><ins class="diff-chg">
+for
+</ins><i><ins class="diff-chg">
+term
+</ins></i><ins class="diff-chg">
+in
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+</ins>
+context
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">to
+</ins><i><ins class="diff-chg">
+value
+</ins></i>,<ins class="diff-chg">
+set
+the
+value
+associated
+with
+</ins><i><ins class="diff-chg">
+defined
+</ins></i><ins class="diff-chg">
+'s
+key
+</ins><i><ins class="diff-chg">
+term
+</ins></i><ins class="diff-chg">
+to
+</ins><a href="#dfn-true" title="true" class="tref internalDFN"><ins class="diff-chg">
+true
+</ins></a>,<ins class="diff-chg">
+and
+return.
+</ins></li></ol>
+</li>
+<li>
+<del class="diff-old">If
+the
+resulting
+document
+is
+a
+JSON
+document
+consisting
+of
+</del>
+<ins class="diff-chg">Otherwise,
+</ins><i><ins class="diff-chg">
+value
+</ins></i><ins class="diff-chg">
+must
+be
+</ins>
+a
+<del class="diff-old">top-level
+</del>
+<a href="#dfn-json-object" title="json-object" class="tref internalDFN">
+JSON
+object
+</a>,
+<ins class="diff-new">if
+not,
+an
+</ins><code class="error"><a href="#idl-def-JsonLdErrorCode.invalid-term-definition"><ins class="diff-new">
+invalid
+term
+definition
+</ins>
+</a>
+<del class="diff-old">that
+has
+a
[email protected]
+</del>
+</code>
+<del class="diff-old">member
+recursively
+invoke
+this
+algorithm
+passing
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+is
+aborted.
+</ins></li><li><ins class="diff-chg">
+Create
+</ins>
+a
+<del class="diff-old">copy
+of
+active
+context
+</del>
+<ins class="diff-chg">new
+</ins><a href="#dfn-term-definition" title="term-definition" class="tref internalDFN"><ins class="diff-chg">
+term
+definition
+</ins>
+</a>,
+<del class="diff-old">the
+</del>
+<i>
+<ins class="diff-chg">definition
+</ins></i>.</li><li><ins class="diff-chg">
+If
+</ins><i>
+value
+<del class="diff-old">of
+</del>
+</i>
+<ins class="diff-chg">contains
+</ins>
+the
+<ins class="diff-new">key
+</ins>
+<code>
+<del class="diff-old">@context
+member
+as
+local
+context
+,
+and
+a
+copy
+of
+the
+remoteContexts
+array.
+Relative
+IRIs
+are
+expanded
+using
+the
+remote
+context's
+IRI
+.
+Otherwise
+raise
+</del>
+<ins class="diff-chg">@reverse
+</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><i><ins class="diff-chg">
+value
+</ins></i><ins class="diff-chg">
+contains
+an
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<ins class="diff-chg">
+an
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<ins class="diff-chg">
+or
+an
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<ins class="diff-chg">
+member,
+</ins>
+an
+<code class="error">
+<del class="diff-old">INVALID_REMOTE_CONTEXT
+</del>
+<a href="#idl-def-JsonLdErrorCode.invalid-reverse-property">
+<ins class="diff-chg">invalid
+reverse
+property
+</ins></a>
+</code>
+<del class="diff-old">error.
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+is
+aborted.
+</ins>
+</li>
+<li>
+<del class="diff-old">Continue
+</del>
+<ins class="diff-chg">If
+the
+value
+associated
+</ins>
+with
+the
+<del class="diff-old">next
+item
+from
+context
+.
+If
+context
+</del>
+<code>
+<ins class="diff-chg">@reverse
+</ins></code><ins class="diff-chg">
+key
+</ins>
+is
+not
+a
+<del class="diff-old">JSON
+object
+</del>
+<a href="#dfn-string" title="string" class="tref internalDFN">
+<ins class="diff-chg">string
+</ins>
+</a>,
+<del class="diff-old">raise
+</del>
+an
+<code class="error">
+<del class="diff-old">INVALID_LOCAL_CONTEXT
+</del>
+<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
+<ins class="diff-chg">invalid
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a>
+</code>
+<del class="diff-old">error.
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+is
+aborted.
+</ins>
+</li>
+<li>
+Otherwise,
+<del class="diff-old">if
+</del>
+<ins class="diff-chg">set
+the
+</ins><a href="#dfn-iri-mapping" title="iri-mapping" class="tref internalDFN"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a><ins class="diff-chg">
+of
+</ins><i><ins class="diff-chg">
+definition
+</ins></i><ins class="diff-chg">
+to
+the
+result
+of
+using
+the
+</ins><a href="#iri-expansion"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+algorithm
+</ins></a>,<ins class="diff-chg">
+passing
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+</ins>
+context
+<del class="diff-old">is
+an
+JSON
+object
+</del>
+</a>,
+<del class="diff-old">perform
+</del>
+the
+<del class="diff-old">following
+steps:
+If
+context
+has
+a
+</del>
+<ins class="diff-chg">value
+associated
+with
+the
+</ins>
+<code>
+<del class="diff-old">@vocab
+</del>
+<ins class="diff-chg">@reverse
+</ins>
+</code>
+<del class="diff-old">member:
+if
+its
+</del>
+<ins class="diff-chg">key
+for
+</ins><i>
+value
+</i>,
+<a href="#dfn-true" title="true" class="tref internalDFN">
+<ins class="diff-new">true
+</ins></a><ins class="diff-new">
+for
+</ins><i><ins class="diff-new">
+vocab
+</ins></i>,<a href="#dfn-true" title="true" class="tref internalDFN"><ins class="diff-new">
+true
+</ins></a><ins class="diff-new">
+for
+</ins><i><ins class="diff-new">
+document
+relative
+</ins></i>,<a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-new">
+local
+context
+</ins></a>,<ins class="diff-new">
+and
+</ins><i><ins class="diff-new">
+defined
+</ins></i>.<ins class="diff-new">
+If
+the
+result
+</ins>
+is
+<del class="diff-old">neither
+</del>
+<ins class="diff-chg">not
+</ins>
+an
+<a href="#dfn-absolute-iri" title="absolute-iri" class="tref internalDFN">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+i.e.,
+it
+<del class="diff-old">does
+not
+contain
+a
+</del>
+<ins class="diff-chg">contains
+no
+</ins>
+colon
+(
+<code>:
+</code>
+),
+<del class="diff-old">nor
+null
+,
+trigger
+</del>
+an
+<code class="error">
+<del class="diff-old">INVALID_VOCAB_MAPPING
+</del>
+<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
+<ins class="diff-chg">invalid
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+mapping
+</ins></a>
+</code>
+<del class="diff-old">error;
+otherwise
+set
+</del>
+<ins class="diff-chg">error
+has
+been
+detected
+and
+processing
+is
+aborted.
+</ins></li><li><ins class="diff-chg">
+Set
+</ins>
+the
+<del class="diff-old">active
+context's
+vocabulary
+</del>
+<a href="#dfn-type-mapping" title="type-mapping" class="tref internalDFN">
+<ins class="diff-chg">type
+</ins>
+mapping
+</a>
+<ins class="diff-new">of
+</ins><i><ins class="diff-new">
+definition
+</ins></i>
+to
+<del class="diff-old">its
+value
+and
+remove
+the
+</del>
+<code>
+<del class="diff-old">@vocab
+member
+from
+context
+.
+</del>
+<ins class="diff-chg">@id
+</ins></code>.
+</li>
+<li>
+If
+<del class="diff-old">context
+has
+a
[email protected]
+member:
+if
+its
+</del>
+<i>
+value
+<del class="diff-old">is
+neither
+a
+string
+nor
+null
+,
+trigger
+</del>
+</i>
+<ins class="diff-chg">contains
+</ins>
+an
+<del class="diff-old">INVALID_DEFAULT_LANGUAGE
+</del>
+<code>
+<ins class="diff-chg">@container
+</ins>
+</code>
+<del class="diff-old">error;
+otherwise
+</del>
+<ins class="diff-chg">member,
+</ins>
+set
+the
+<del class="diff-old">active
+context's
+default
+language
+</del>
+<a href="#dfn-container-mapping" title="container-mapping" class="tref internalDFN">
+<ins class="diff-chg">container
+mapping
+</ins>
+</a>
+<ins class="diff-new">of
+</ins><i><ins class="diff-new">
+definition
+</ins></i>
+to
+<del class="diff-old">its
+value
+and
+remove
+the
+</del>
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">@index
+</ins>
+</code>
+<del class="diff-old">member
+from
+context
+.
+For
+each
+other
+key
+-
+value
+pair
+in
+context
+perform
+the
+following
+steps:
+Remove
+</del>
+<ins class="diff-chg">if
+that
+is
+</ins>
+the
+<del class="diff-old">key
+-
+</del>
+value
+<del class="diff-old">pair
+from
+context
+.
+</del>
+<ins class="diff-chg">of
+the
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+member;
+otherwise
+an
+</ins><code class="error"><a href="#idl-def-JsonLdErrorCode.invalid-reverse-property"><ins class="diff-chg">
+invalid
+reverse
+property
+</ins></a></code><ins class="diff-chg">
+error
+has
+been
+detected
+(reverse
+properties
+only
+support
+index-containers)
+and
+processing
+is
+aborted.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+key
+is
+a
+JSON-LD
+keyword
+,
+continue
+with
+</del>
+<ins class="diff-chg">Set
+</ins>
+the
+<del class="diff-old">next
+key
+-
+value
+pair.
+</del>
+<a href="#dfn-reverse-property" title="reverse-property" class="tref internalDFN">
+<ins class="diff-chg">reverse
+property
+</ins></a><ins class="diff-chg">
+flag
+of
+</ins><i><ins class="diff-chg">
+definition
+</ins></i><ins class="diff-chg">
+to
+</ins><a href="#dfn-true" title="true" class="tref internalDFN"><ins class="diff-chg">
+true
+</ins></a>.
+</li>
+<li>
+<del class="diff-old">If
+value
+equals
+null
+,
+replace
+</del>
+<ins class="diff-chg">Set
+</ins>
+the
+<a href="#dfn-term-definition" title="term-definition" class="tref internalDFN">
+term
+definition
+</a>
+<del class="diff-old">for
+key
+</del>
+<ins class="diff-chg">of
+</ins><i><ins class="diff-chg">
+term
+</ins></i>
+in
+<del class="diff-old">the
+</del>
+<a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+context
+</a>
+<ins class="diff-new">to
+</ins><i><ins class="diff-new">
+definition
+</ins></i><ins class="diff-new">
+and
+the
+value
+associated
+</ins>
+with
+<del class="diff-old">an
+IRI
+mapping
+set
+</del>
+<i>
+<ins class="diff-chg">defined
+</ins></i><ins class="diff-chg">
+'s
+key
+</ins><i><ins class="diff-chg">
+term
+</ins></i>
+to
+<del class="diff-old">null
+</del>
+<a href="#dfn-true" title="true" class="tref internalDFN">
+<ins class="diff-chg">true
+</ins>
+</a>
+and
+<del class="diff-old">continue
+with
+</del>
+<ins class="diff-chg">return.
+</ins></li></ol></li><li><ins class="diff-chg">
+Set
+</ins>
+the
+<del class="diff-old">next
+key
+-
+value
+pair.
+</del>
+<a href="#dfn-reverse-property" title="reverse-property" class="tref internalDFN">
+<ins class="diff-chg">reverse
+property
+</ins></a><ins class="diff-chg">
+flag
+of
+</ins><i><ins class="diff-chg">
+definition
+</ins></i><ins class="diff-chg">
+to
+</ins><a href="#dfn-false" title="false" class="tref internalDFN"><ins class="diff-chg">
+false
+</ins></a>.
+</li>
+<li>
+If
+<i>
+value
+</i>
+<ins class="diff-chg">contains
+the
+key
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
+If
+the
+value
+associated
+with
+the
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+key
+</ins>
+is
+<ins class="diff-new">not
+</ins>
+a
+<a href="#dfn-string" title="string" class="tref internalDFN">
+string
+</a>,
+<del class="diff-old">expand
+it
+according
+to
+the
+</del>
+<ins class="diff-chg">an
+</ins><code class="error">
+<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
+<ins class="diff-new">invalid
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">Expansion
+algorithm
+</del>
+<ins class="diff-chg">mapping
+</ins>
+</a>
+</code>
+<ins class="diff-new">error
+has
+been
+detected
+</ins>
+and
+<del class="diff-old">replace
+the
+term
+definition
+for
+key
+in
+</del>
+<ins class="diff-chg">processing
+is
+aborted.
+</ins></li><li><ins class="diff-chg">
+Otherwise,
+set
+</ins>
+the
+<del class="diff-old">active
+context
+with
+an
+</del>
+<a href="#dfn-iri-mapping" title="iri-mapping" class="tref internalDFN">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+mapping
+</a>
+<del class="diff-old">set
+</del>
+<ins class="diff-chg">of
+</ins><i><ins class="diff-chg">
+definition
+</ins></i>
+to
+the
+<del class="diff-old">expanded
+</del>
+<ins class="diff-chg">result
+of
+using
+the
+</ins><a href="#iri-expansion"><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+algorithm
+</ins></a>,<ins class="diff-chg">
+passing
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN"><ins class="diff-chg">
+active
+context
+</ins></a>,<ins class="diff-chg">
+the
+</ins>
+value
+<del class="diff-old">.
+Continue
+</del>
+<ins class="diff-chg">associated
+</ins>
+with
+the
+<del class="diff-old">next
+</del>
+<code>
+<ins class="diff-chg">@id
+</ins></code>
+key
+<del class="diff-old">-
+</del>
+<ins class="diff-chg">for
+</ins><i>
+value
+<del class="diff-old">pair.
+</del>
+</i>,
+<a href="#dfn-true" title="true" class="tref internalDFN">
+<ins class="diff-chg">true
+</ins></a><ins class="diff-chg">
+for
+</ins><i><ins class="diff-chg">
+vocab
+</ins></i>,<a href="#dfn-true" title="true" class="tref internalDFN"><ins class="diff-chg">
+true
+</ins></a><ins class="diff-chg">
+for
+</ins><i><ins class="diff-chg">
+document
+relative
+</ins></i>,<a href="#dfn-local-context" title="local-context" class="tref internalDFN"><ins class="diff-chg">
+local
+context
+</ins></a>,<ins class="diff-chg">
+and
+</ins><i><ins class="diff-chg">
+defined
+</ins></i>.</li></ol>
+</li>
+<li>
+<del class="diff-old">If
+value
+is
+not
+</del>
+<ins class="diff-chg">Otherwise
+if
+the
+</ins><i><ins class="diff-chg">
+term
+</ins></i><ins class="diff-chg">
+contains
+</ins>
+a
+<del class="diff-old">JSON
+object
+,
+trigger
+an
+INVALID_TERM_DEFINITION
+</del>
+<ins class="diff-chg">colon
+(
+</ins><code>:
+</code>
+<del class="diff-old">error
+</del>
+<ins class="diff-chg">):
+</ins><ol class="algorithm">
+<li>
+If
+<i>
+term
+<del class="diff-old">definition
+</del>
+</i>
+<ins class="diff-chg">is
+a
+</ins><a href="#dfn-compact-iri" title="compact-iri" class="tref internalDFN"><ins class="diff-chg">
+compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</a>
+<del class="diff-old">for
+</del>
+<ins class="diff-chg">with
+a
+</ins><a href="#dfn-prefix" title="prefix" class="tref internalDFN"><ins class="diff-chg">
+prefix
+</ins></a><ins class="diff-chg">
+that
+is
+a
+</ins>
+key
+<del class="diff-old">exists
+</del>
+in
+<del class="diff-old">the
+</del>
+<a href="#dfn-local-context" title="local-context" class="tref internalDFN">
+<ins class="diff-chg">local
+context
+</ins></a><ins class="diff-chg">
+a
+dependency
+has
+been
+found.
+Use
+this
+algorithm
+recursively
+passing
+</ins><a href="#dfn-active-context" title="active-context" class="tref internalDFN">
+active
+context
+</a>,
+<del class="diff-old">remove
+it.
+Initialize
+a
+new,
+empty
+term
+definition
+</del>
+<a href="#dfn-local-context" title="local-context" class="tref internalDFN">
+<ins class="diff-chg">local
+context
+</ins></a>,<ins class="diff-chg">
+the
+</ins><a href="#dfn-prefix" title="prefix" class="tref internalDFN"><ins class="diff-chg">
+prefix
+</ins>
+</a>
+&