Adding new W3C editor's drafts for JSON-LD Syntax and JSON-LD API specs.
authorManu Sporny <msporny@digitalbazaar.com>
Sun, 23 Dec 2012 13:52:00 -0500
changeset 1090 2f7ac8852aa8
parent 1089 66d980964784
child 1091 1e9231dbd505
Adding new W3C editor's drafts for JSON-LD Syntax and JSON-LD API specs.
spec/ED/json-ld-api/20121225/diff-20120930.html
spec/ED/json-ld-api/20121225/index.html
spec/ED/json-ld-syntax/20121225/diff-20120930.html
spec/ED/json-ld-syntax/20121225/index.html
spec/latest/json-ld-api/index.html
spec/latest/json-ld-syntax/index.html
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/ED/json-ld-api/20121225/diff-20120930.html	Sun Dec 23 13:52:00 2012 -0500
@@ -0,0 +1,31118 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.1//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd'>
+<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" prefix='bibo: http://purl.org/ontology/bibo/' typeof="bibo:Document">
+<head>
+<title>JSON-LD Algorithms 1.0</title>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+
+<!--
+  === NOTA BENE ===
+  For the three scripts below, if your spec resides on dev.w3 you can check them
+  out in the same tree and use relative links so that they'll work offline,
+  -->
+
+
+
+
+<style type="text/css">
+  .diff { font-weight:bold; color:#0a3; }
+</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;
+}
+
+.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 {
+    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 rel="stylesheet" href="http://www.w3.org/StyleSheets/TR/W3C-ED" />
+<!--[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 width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C" />
+</a>
+</p>
+<h1 class="title" id="title">
+JSON-LD
+<del class="diff-old">API
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+1.0
+</h1>
+<h2 id="subtitle">
+<del class="diff-old">An
+Application
+Programming
+Interface
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+for
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">Processing
+</ins>
+JSON-LD
+<del class="diff-old">Syntax
+</del>
+<ins class="diff-chg">Documents
+</ins>
+</h2>
+<h2 id="w3c-editor-s-draft-25-december-2012">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Editor's
+Draft
+<del class="diff-old">30
+September
+</del>
+<ins class="diff-chg">25
+December
+</ins>
+2012
+</h2>
+<dl>
+<dt>
+This
+version:
+</dt>
+<dd>
+<a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html">
+http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html
+</a>
+</dd>
+<dt>
+Latest
+published
+version:
+</dt>
+<dd>
+<a href="http://www.w3.org/TR/json-ld-api/">
+http://www.w3.org/TR/json-ld-api/
+</a>
+</dd>
+<dt>
+Latest
+editor's
+draft:
+</dt>
+<dd>
+<a href="http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html">
+http://dvcs.w3.org/hg/json-ld/raw-file/default/spec/latest/json-ld-api/index.html
+</a>
+</dd>
+<dt>
+Editors:
+</dt>
+<dd rel="bibo:editor" inlist="">
+<span typeof="foaf:Person">
+<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://manu.sporny.org/">
+Manu
+Sporny
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</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">
+<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>
+<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">
+<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://digitalbazaar.com/">
+Manu
+Sporny
+</a>,
+<a rel="foaf:workplaceHomepage" href="http://digitalbazaar.com/">
+Digital
+Bazaar
+</a>
+</span>
+</dd>
+<dd rel="dcterms:contributor">
+<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="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>
+</dl>
+<p>
+This
+document
+is
+also
+available
+in
+this
+non-normative
+format:
+<a href="diff-20120930.html">
+diff
+to
+previous
+version
+</a>
+</p>
+<p class="copyright">
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
+Copyright
+</a>

+2010-2012
+<a href="http://www.w3.org/">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+</a>
+<sup>

+</sup>
+(
+<a href="http://www.csail.mit.edu/">
+<abbr title="Massachusetts Institute of Technology">
+MIT
+</abbr>
+</a>,
+<a href="http://www.ercim.eu/">
+<abbr title="European Research Consortium for Informatics and Mathematics">
+ERCIM
+</abbr>
+</a>,
+<a href="http://www.keio.ac.jp/">
+Keio
+</a>
+),
+All
+Rights
+Reserved.
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">
+liability
+</a>,
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">
+trademark
+</a>
+and
+<a href="http://www.w3.org/Consortium/Legal/copyright-documents">
+document
+use
+</a>
+rules
+apply.
+</p>
+<hr />
+</div>
+<section id="abstract" class="introductory" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:chapter">
+<h2>
+Abstract
+</h2>
+<p>
+JSON
+[
+<cite>
+<a class="bibref" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+]
+has
+proven
+to
+be
+a
+highly
+useful
+object
+serialization
+and
+messaging
+format.
+JSON-LD
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+]
+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.
+This
+document
+outlines
+an
+Application
+Programming
+Interface
+and
+a
+set
+of
+algorithms
+for
+programmatically
+transforming
+JSON-LD
+documents
+in
+order
+to
+make
+them
+easier
+to
+work
+with
+in
+programming
+environments
+like
+JavaScript,
+Python,
+and
+Ruby.
+</p>
+</section>
+<section id="sotd" class="introductory" typeof="bibo:Chapter" resource="#sotd" rel="bibo:chapter">
+<h2>
+Status
+of
+This
+Document
+</h2>
+<p>
+<em>
+This
+section
+describes
+the
+status
+of
+this
+document
+at
+the
+time
+of
+its
+publication.
+Other
+documents
+may
+supersede
+this
+document.
+A
+list
+of
+current
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+publications
+and
+the
+latest
+revision
+of
+this
+technical
+report
+can
+be
+found
+in
+the
+<a href="http://www.w3.org/TR/">
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+technical
+reports
+index
+</a>
+at
+http://www.w3.org/TR/.
+</em>
+</p>
+<p>
+This
+document
+has
+been
+under
+development
+for
+over
+18
+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
+18
+months.
+</p>
+<p>
+There
+are
+<del class="diff-old">currently
+</del>
+<ins class="diff-chg">several
+independent
+</ins>
+<a href="http://json-ld.org/#impl">
+<del class="diff-old">five
+</del>
+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
+development
+on
+implementations,
+the
+test
+suite
+and
+the
+live
+editor
+will
+continue,
+they
+are
+believed
+to
+be
+mature
+enough
+to
+be
+integrated
+into
+a
+non-production
+system
+at
+this
+point
+in
+time
+with
+the
+expectation
+that
+they
+could
+be
+used
+in
+a
+production
+system
+within
+the
+next
+year.
+</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
+e-mail
+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>
+<p>
+This
+document
+was
+published
+by
+the
+<a href="http://www.w3.org/2011/rdf-wg/">
+RDF
+Working
+Group
+</a>
+as
+an
+Editor's
+Draft.
+If
+you
+wish
+to
+make
+comments
+regarding
+this
+document,
+please
+send
+them
+to
+<a href="mailto:[email protected]">
[email protected]
+</a>
+(
+<a href="mailto:[email protected]?subject=subscribe">
+subscribe
+</a>,
+<a href="http://lists.w3.org/Archives/Public/public-rdf-comments/">
+archives
+</a>
+).
+All
+feedback
+is
+welcome.
+</p>
+<p>
+Publication
+as
+an
+Editor's
+Draft
+does
+not
+imply
+endorsement
+by
+the
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+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.
+</p>
+<p>
+This
+document
+was
+produced
+by
+a
+group
+operating
+under
+the
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">
+5
+February
+2004
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Patent
+Policy
+</a>.
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+maintains
+a
+<a href="http://www.w3.org/2004/01/pp-impl/46168/status" rel="disclosure">
+public
+list
+of
+any
+patent
+disclosures
+</a>
+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
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">
+Essential
+Claim(s)
+</a>
+must
+disclose
+the
+information
+in
+accordance
+with
+<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">
+section
+6
+of
+the
+<abbr title="World Wide Web Consortium">
+W3C
+</abbr>
+Patent
+Policy
+</a>.
+</p>
+</section>
+<section id="toc">
+<h2 class="introductory">
+Table
+of
+Contents
+</h2>
+<ul class="toc">
+<li class="tocline">
+<a href="#introduction" class="tocxref">
+<span class="secno">
+1.
+</span>
+Introduction
+</a>
+</li>
+<li class="tocline">
+<a href="#features" class="tocxref">
+<span class="secno">
+2.
+</span>
+Features
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#expansion" class="tocxref">
+<span class="secno">
+2.1
+</span>
+Expansion
+</a>
+</li>
+<li class="tocline">
+<a href="#compaction" class="tocxref">
+<span class="secno">
+2.2
+</span>
+Compaction
+</a>
+</li>
+<li class="tocline">
+<a href="#flattening" class="tocxref">
+<span class="secno">
+2.3
+</span>
+<del class="diff-old">RDF
+Conversion
+</del>
+<ins class="diff-chg">Flattening
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.
+</del>
+<ins class="diff-chg">2.4
+</ins>
+</span>
+<del class="diff-old">The
+Application
+Programming
+Interface
+</del>
+<ins class="diff-chg">RDF
+Conversion
+</ins>
+</a>
+</li>
+<del class="diff-old">3.1
+General
+Terminology
+</del>
+</ul>
+</li>
+<li class="tocline">
+<a href="#conformance" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.2
+</del>
+<ins class="diff-chg">3.
+</ins>
+</span>
+<del class="diff-old">JsonLdProcessor
+</del>
+<ins class="diff-chg">Conformance
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#general-terminology" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.2.1
+</del>
+<ins class="diff-chg">4.
+</ins>
+</span>
+<del class="diff-old">Methods
+</del>
+<ins class="diff-chg">General
+Terminology
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#algorithms" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+<del class="diff-old">Callbacks
+</del>
+<ins class="diff-chg">Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#algorithm-terms" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+<del class="diff-old">JsonLdProcessingError
+</del>
+<ins class="diff-chg">Algorithm
+Terms
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#expansion-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+<del class="diff-old">JsonLdCallback
+</del>
+<ins class="diff-chg">Expansion
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#context-processing" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3.3
+</del>
+<ins class="diff-chg">5.3
+</ins>
+</span>
+<del class="diff-old">QuadCallback
+</del>
+<ins class="diff-chg">Context
+Processing
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-expansion" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.3.4
+</del>
+<ins class="diff-chg">5.4
+</ins>
+</span>
+<del class="diff-old">ConformanceCallback
+</del>
+<del class="diff-old">3.4
+Data
+Structures
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr><ins class="diff-chg">
+Expansion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#value-expansion" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.1
+</del>
+<ins class="diff-chg">5.5
+</ins>
+</span>
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">Value
+Expansion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#label-blank-nodes-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.2
+</del>
+<ins class="diff-chg">5.6
+</ins>
+</span>
+<del class="diff-old">JsonLdOptions
+</del>
+<ins class="diff-chg">Label
+Blank
+Nodes
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#generate-blank-node-identifier" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.3
+</del>
+<ins class="diff-chg">5.7
+</ins>
+</span>
+<del class="diff-old">Quad
+</del>
+<ins class="diff-chg">Generate
+Blank
+Node
+Identifier
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#compaction-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.4
+</del>
+<ins class="diff-chg">5.8
+</ins>
+</span>
+<del class="diff-old">Node
+</del>
+<ins class="diff-chg">Compaction
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#iri-compaction-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.5
+</del>
+<ins class="diff-chg">5.9
+</ins>
+</span>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-chg">Compaction
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#inverse-context-creation" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.6
+</del>
+<ins class="diff-chg">5.10
+</ins>
+</span>
+<del class="diff-old">Blank
+Node
+</del>
+<ins class="diff-chg">Inverse
+Context
+Creation
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#inverse-context-query-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">3.4.7
+</del>
+<ins class="diff-chg">5.11
+</ins>
+</span>
+<del class="diff-old">Literal
+</del>
+<ins class="diff-chg">Inverse
+Context
+Query
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#value-compaction" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">5.12
+</ins>
+</span>
+<del class="diff-old">Algorithms
+</del>
+<ins class="diff-chg">Value
+Compaction
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#find-and-remove-property-generator-duplicates" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">5.13
+</ins>
+</span>
+<del class="diff-old">Algorithm
+Terms
+</del>
+<ins class="diff-chg">Find
+and
+Remove
+Property
+Generator
+Duplicates
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#flattening-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">5.14
+</ins>
+</span>
+<del class="diff-old">Context
+Processing
+</del>
+<ins class="diff-chg">Flattening
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#node-map-generation" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.3
+</del>
+<ins class="diff-chg">5.15
+</ins>
+</span>
+<del class="diff-old">IRI
+Expansion
+</del>
+<ins class="diff-chg">Node
+Map
+Generation
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#rdf-conversion-algorithms" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4
+</del>
+<ins class="diff-chg">5.16
+</ins>
+</span>
+<del class="diff-old">IRI
+Compaction
+</del>
+<ins class="diff-chg">RDF
+Conversion
+Algorithms
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#convert-to-rdf-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4.1
+</del>
+<ins class="diff-chg">5.16.1
+</ins>
+</span>
+<del class="diff-old">IRI
+Compaction
+</del>
+<ins class="diff-chg">Convert
+to
+RDF
+</ins>
+Algorithm
+</a>
+</li>
+<li class="tocline">
+<a href="#list-conversion" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.4.2
+</del>
+<ins class="diff-chg">5.16.2
+</ins>
+</span>
+<del class="diff-old">Term
+Rank
+Algorithm
+</del>
+<ins class="diff-chg">List
+Conversion
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#convert-from-rdf-algorithm" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.5
+</del>
+<ins class="diff-chg">5.16.3
+</ins>
+</span>
+<del class="diff-old">Value
+Expansion
+</del>
+<ins class="diff-chg">Convert
+from
+RDF
+Algorithm
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#data-round-tripping" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.6
+</del>
+<ins class="diff-chg">5.16.4
+</ins>
+</span>
+<del class="diff-old">Value
+Compaction
+</del>
+<ins class="diff-chg">Data
+Round
+Tripping
+</ins>
+</a>
+</li>
+<del class="diff-old">4.7
+Expansion
+4.7.1
+Expansion
+Algorithm
+</del>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#the-application-programming-interface" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.8
+</del>
+<ins class="diff-chg">6.
+</ins>
+</span>
+<del class="diff-old">Compaction
+</del>
+<ins class="diff-chg">The
+Application
+Programming
+Interface
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#jsonldprocessor" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.8.1
+</del>
+<ins class="diff-chg">6.1
+</ins>
+</span>
+<del class="diff-old">Compaction
+Algorithm
+</del>
+<ins class="diff-chg">JsonLdProcessor
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#methods" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9
+</del>
+<ins class="diff-chg">6.1.1
+</ins>
+</span>
+<del class="diff-old">Flattening
+</del>
+<ins class="diff-chg">Methods
+</ins>
+</a>
+</li>
+<del class="diff-old">4.9.1
+Flattening
+Algorithm
+</del>
+</ul>
+</li>
+<li class="tocline">
+<a href="#callbacks" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9.2
+</del>
+<ins class="diff-chg">6.2
+</ins>
+</span>
+<del class="diff-old">Node
+Map
+Generation
+</del>
+<ins class="diff-chg">Callbacks
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#jsonldcallback" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.9.3
+</del>
+<ins class="diff-chg">6.2.1
+</ins>
+</span>
+<del class="diff-old">Generate
+Blank
+Node
+Identifier
+</del>
+<ins class="diff-chg">JsonLdCallback
+</ins>
+</a>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<a href="#data-structures" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10
+</del>
+<ins class="diff-chg">6.3
+</ins>
+</span>
+<del class="diff-old">RDF
+Conversion
+</del>
+<ins class="diff-chg">Data
+Structures
+</ins>
+</a>
+<ul class="toc">
+<li class="tocline">
+<del class="diff-old">4.10.1
+Overview
+4.10.2
+Parsing
+Examples
+</del>
+<a href="#jsonldoptions" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10.3
+</del>
+<ins class="diff-chg">6.3.1
+</ins>
+</span>
+<del class="diff-old">Convert
+to
+RDF
+Algorithm
+</del>
+<ins class="diff-chg">JsonLdOptions
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#jsonldprocessingerror" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10.4
+</del>
+<ins class="diff-chg">6.3.2
+</ins>
+</span>
+<del class="diff-old">List
+Conversion
+</del>
+<ins class="diff-chg">JsonLdProcessingError
+</ins>
+</a>
+</li>
+<li class="tocline">
+<a href="#jsonlderrorcode" class="tocxref">
+<span class="secno">
+<del class="diff-old">4.10.5
+</del>
+<ins class="diff-chg">6.3.3
+</ins>
+</span>
+<del class="diff-old">Convert
+from
+RDF
+Algorithm
+</del>
+<ins class="diff-chg">JsonLdErrorCode
+</ins>
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+<li class="tocline">
+<del class="diff-old">5.
+Data
+Round
+Tripping
+</del>
+<a href="#acknowledgements" class="tocxref">
+<span class="secno">
+A.
+</span>
+Acknowledgements
+</a>
+</li>
+<li class="tocline">
+<a href="#references" class="tocxref">
+<span class="secno">
+B.
+</span>
+References
+</a>
+<ul class="toc">
+<li class="tocline">
+<a href="#normative-references" class="tocxref">
+<span class="secno">
+B.1
+</span>
+Normative
+references
+</a>
+</li>
+<li class="tocline">
+<a href="#informative-references" class="tocxref">
+<span class="secno">
+B.2
+</span>
+Informative
+references
+</a>
+</li>
+</ul>
+</li>
+</ul>
+</section>
+<section class="informative" id="introduction">
+<h2>
+<span class="secno">
+1.
+</span>
+Introduction
+</h2>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+This
+document
+is
+a
+detailed
+specification
+for
+an
+Application
+Programming
+Interface
+for
+the
+JSON-LD
+Syntax.
+The
+document
+is
+primarily
+intended
+for
+the
+following
+audiences:
+</p>
+<ul>
+<li>
+Web
+authors
+and
+developers
+that
+want
+a
+very
+detailed
+view
+of
+how
+a
+JSON-LD
+processor
+and
+the
+API
+operates.
+</li>
+<li>
+Software
+developers
+that
+want
+to
+implement
+processors
+and
+APIs
+for
+JSON-LD.
+</li>
+</ul>
+<p>
+To
+understand
+the
+basics
+in
+this
+specification
+you
+must
+first
+be
+familiar
+with
+JSON,
+which
+is
+detailed
+in
+[
+<cite>
+<a class="bibref" href="#bib-RFC4627">
+RFC4627
+</a>
+</cite>
+].
+You
+must
+also
+understand
+the
+JSON-LD
+Syntax
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+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 class="bibref" href="#bib-ECMA-262">
+ECMA-262
+</a>
+</cite>
+]
+and
+WebIDL
+[
+<cite>
+<a class="bibref" href="#bib-WEBIDL">
+WEBIDL
+</a>
+</cite>
+].
+To
+understand
+how
+JSON-LD
+maps
+to
+RDF,
+it
+is
+helpful
+to
+be
+familiar
+with
+the
+basic
+RDF
+concepts
+[
+<cite>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+</p>
+</section>
+<section class="informative" id="features">
+<h2>
+<span class="secno">
+2.
+</span>
+Features
+</h2>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+The
+JSON-LD
+Syntax
+specification
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+]
+outlines
+a
+language
+that
+may
+be
+used
+to
+express
+Linked
+Data
+in
+JSON.
+Often,
+it
+is
+useful
+to
+be
+able
+to
+transform
+JSON-LD
+documents
+so
+that
+they
+may
+be
+easily
+processed
+in
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">various
+</ins>
+programming
+<del class="diff-old">environment
+like
+JavaScript,
+Python
+or
+Ruby.
+</del>
+<ins class="diff-chg">environments.
+</ins>
+</p>
+<p>
+There
+are
+four
+major
+types
+of
+transformation
+that
+are
+discussed
+in
+this
+<del class="diff-old">document;
+compaction,
+</del>
+<ins class="diff-chg">document:
+</ins>
+expansion,
+<ins class="diff-new">compaction,
+flattening,
+</ins>
+and
+RDF
+conversion.
+</p>
+<section class="informative" id="expansion">
+<h3>
+<span class="secno">
+2.1
+</span>
+Expansion
+</h3>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+Software
+algorithms
+are
+easiest
+to
+write
+when
+the
+data
+that
+they
+are
+processing
+have
+a
+regular
+form.
+Since
+information
+can
+be
+represented
+by
+JSON-LD
+in
+a
+variety
+of
+different
+ways,
+transforming
+all
+of
+these
+methods
+into
+a
+uniform
+structure
+allows
+the
+developer
+to
+simplify
+their
+processing
+code.
+For
+example,
+note
+that
+the
+following
+input
+uses
+only
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+and
+is
+fairly
+compact:
+</p>
+<del class="diff-old">  var input1 = {
+  &quot;@context&quot;: &quot;http://json-ld.org/contexts/person.jsonld&quot;
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+</del>
+  <div class="example"><div class="example-title"><span>Example 1</span></div><pre class="example">{
+<ins class="diff-chg">  &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;
+</ins>
+}
+</pre>
+</div>
+<p>
+The
+next
+input
+example
+uses
+one
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+to
+express
+a
+property,
+but
+leaves
+the
+rest
+of
+the
+information
+untouched.
+</p>
+<del class="diff-old">  var input2 = {
+  &quot;@context&quot;: &quot;http://json-ld.org/contexts/person.jsonld&quot;
+  &quot;&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+</del>
+  <div class="example"><div class="example-title"><span>Example 2</span></div><pre class="example">{
+<ins class="diff-chg">  &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;<span class="diff">http://xmlns.com/foaf/0.1/name</span>&quot;: &quot;Markus Lanthaler&quot;,
+  &quot;homepage&quot;: &quot;http://www.markus-lanthaler.com/&quot;
+</ins>
+}
+</pre>
+</div>
+<p>
+While
+both
+inputs
+are
+valid
+JSON-LD,
+writing
+a
+program
+to
+handle
+every
+permutation
+of
+possible
+inputs
+can
+be
+difficult,
+especially
+when
+the
+incoming
+context
+could
+change
+as
+well.
+To
+ensure
+that
+the
+data
+can
+be
+given
+a
+more
+uniform
+structure,
+JSON-LD
+introduces
+the
+notion
+of
+expansion.
+<dfn title="expansion" id="dfn-expansion">
+Expansion
+</dfn>
+performs
+two
+important
+operations.
+The
+first
+is
+to
+expand
+all
+values
+that
+<del class="diff-old">are
+</del>
+<ins class="diff-chg">represent
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+to
+<del class="diff-old">their
+fully
+expanded
+form.
+</del>
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+<ins class="diff-chg">absolute
+IRIs
+</ins></a>.
+The
+second
+is
+to
+express
+all
+values
+in
+<a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">
+expanded
+form
+<del class="diff-old">.
+To
+transform
+both
+inputs
+above
+to
+the
+same
+representation,
+</del>
+</a>.
+<ins class="diff-chg">Running
+</ins>
+the
+<del class="diff-old">developer
+could
+do
+</del>
+<a href="#expansion-algorithm">
+<ins class="diff-chg">Expansion
+algorithm
+</ins></a><ins class="diff-chg">
+against
+</ins>
+the
+<del class="diff-old">following:
+  function expansionCallback(output) {
+   console.log(output);
+}
+// the second parameter is 'null' because the developer does not wish to
+// inject another context value
+jsonld.expand(input1, null, expansionCallback);
+jsonld.expand(input2,
+null,
+expansionCallback);
+The
+output
+for
+both
+calls
+</del>
+<ins class="diff-chg">examples
+provided
+</ins>
+above
+<del class="diff-old">will
+be:
+</del>
+<ins class="diff-chg">results
+in
+the
+following
+output:
+</ins>
+</p>
+<del class="diff-old">  [{
+  &quot;http://xmlns.com/foaf/0.1/name&quot;: [{
+    &quot;@value&quot;: &quot;Manu Sporny&quot;
+  }],
+  &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [{
+    &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+  }]
+}]
+</del>
+  <div class="example"><div class="example-title"><span>Example 3</span></div><pre class="example">[
+<ins class="diff-chg">  {
+    &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; }
+    ]
+  }
+]
+</ins>
+</pre>
+</div>
+<p>
+Note
+that
+in
+the
+<del class="diff-old">example
+above;
+</del>
+<ins class="diff-chg">output
+above
+</ins>
+all
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+definitions
+have
+been
+removed,
+all
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+and
+<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
+prefixes
+</a>
+have
+been
+expanded
+to
+<del class="diff-old">full
+IRIs,
+</del>
+<ins class="diff-chg">absolute
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins></a>,
+and
+all
+<del class="diff-old">literal
+</del>
+<a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">
+<ins class="diff-chg">JSON-LD
+values
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+are
+expressed
+in
+<a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">
+expanded
+form
+</a>.
+While
+the
+output
+is
+more
+difficult
+for
+a
+human
+to
+read,
+it
+is
+easier
+for
+a
+software
+program
+to
+process
+because
+of
+its
+very
+regular
+structure.
+</p>
+</section>
+<section class="informative" id="compaction">
+<h3>
+<span class="secno">
+2.2
+</span>
+Compaction
+</h3>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+While
+expansion
+expands
+a
+given
+input
+as
+much
+as
+possible,
+compaction
+performs
+the
+opposite
+<del class="diff-old">operation
+-
+expressing
+</del>
+<ins class="diff-chg">operation:
+it
+expresses
+</ins>
+a
+given
+input
+as
+succinctly
+as
+possible.
+<del class="diff-old">While
+</del>
+<ins class="diff-chg">In
+contrast
+to
+</ins>
+expansion
+<ins class="diff-new">which
+</ins>
+is
+meant
+to
+produce
+something
+that
+is
+easy
+to
+process
+by
+software
+programs,
+compaction
+is
+meant
+to
+produce
+something
+that
+is
+easy
+to
+read
+by
+software
+developers.
+Compaction
+uses
+a
+developer-supplied
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+to
+<del class="diff-old">compresses
+all
+</del>
+<ins class="diff-chg">compress
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">IRI
+</del>
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+to
+<a class="tref internalDFN" title="term" href="#dfn-term">
+<del class="diff-old">term
+</del>
+<ins class="diff-chg">terms
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+or
+<del class="diff-old">prefix
+</del>
+<a class="tref internalDFN" title="compact_iri" href="#dfn-compact_iri">
+<ins class="diff-chg">compact
+IRIs
+</ins>
+</a>
+<del class="diff-old">es,
+</del>
+and
+<del class="diff-old">compacts
+all
+literal
+</del>
+<a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">
+<ins class="diff-chg">JSON-LD
+values
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+expressed
+in
+<a class="tref internalDFN" title="expanded_form" href="#dfn-expanded_form">
+expanded
+form
+</a>
+<ins class="diff-new">to
+simple
+values
+such
+</ins>
+as
+<del class="diff-old">much
+as
+possible.
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">strings
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+numbers
+</ins></a>.
+</p>
+<p>
+<del class="diff-old">The
+</del>
+<ins class="diff-chg">For
+example,
+assume
+the
+</ins>
+following
+<del class="diff-old">example
+expresses
+</del>
+<ins class="diff-chg">expanded
+JSON-LD
+</ins>
+input
+<del class="diff-old">that
+has
+already
+been
+fully
+expanded:
+</del>
+<ins class="diff-chg">document:
+</ins>
+</p>
+<del class="diff-old">  var expandedInput = [{
+  &quot;http://xmlns.com/foaf/0.1/name&quot;: [{
+    &quot;@value&quot;: &quot;Manu Sporny&quot;
+  }],
+  &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [{
+    &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+  }]
+}]
+</del>
+  <div class="example"><div class="example-title"><span>Example 4</span></div><pre class="example">[
+<ins class="diff-chg">  {
+    &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; }
+    ]
+  }
+]
+</ins>
+</pre>
+</div>
+<p>
+<del class="diff-old">A
+developer
+that
+wants
+to
+transform
+the
+data
+above
+into
+a
+more
+human-readable
+form,
+could
+do
+</del>
+<ins class="diff-chg">Additionally,
+assume
+</ins>
+the
+following
+<del class="diff-old">using
+the
+</del>
+<ins class="diff-chg">developer-supplied
+</ins>
+JSON-LD
+<del class="diff-old">API:
+</del>
+<a class="tref internalDFN" title="context" href="#dfn-context">
+<ins class="diff-chg">context
+</ins></a>:
+</p>
+<del class="diff-old">  function compactionCallback(output) {
+   console.log(output);
+</del>
+  <div class="example"><div class="example-title"><span>Example 5</span></div><pre class="example">{
+<ins class="diff-chg">  &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;
+    }
+  }
+</ins>
+}
+<del class="diff-old">jsonld.compact(expandedInput,
+&quot;http://json-ld.org/contexts/person.jsonld&quot;,
+compactionCallback);
+</del>
+</pre>
+</div>
+<p>
+<del class="diff-old">The
+following
+would
+be
+</del>
+<ins class="diff-chg">Running
+the
+</ins><a href="#compaction-algorithm"><ins class="diff-chg">
+Compaction
+Algorithm
+</ins></a><ins class="diff-chg">
+given
+</ins>
+the
+<ins class="diff-new">context
+supplied
+above
+against
+the
+JSON-LD
+input
+document
+provided
+above
+would
+</ins>
+result
+<del class="diff-old">of
+</del>
+<ins class="diff-chg">in
+</ins>
+the
+<del class="diff-old">call
+above:
+</del>
+<ins class="diff-chg">following
+output:
+</ins>
+</p>
+<del class="diff-old">  {
+  &quot;@context&quot;: &quot;http://json-ld.org/contexts/person.jsonld&quot;
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+</del>
+  <div class="example"><div class="example-title"><span>Example 6</span></div><pre class="example">{
+<ins class="diff-chg">  &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;
+</ins>
+}
+</pre>
+</div>
+<p>
+Note
+that
+all
+<del class="diff-old">of
+the
+term
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<ins class="diff-chg">IRIs
+</ins>
+</a>
+<del class="diff-old">s
+</del>
+have
+been
+<del class="diff-old">compressed
+and
+</del>
+<ins class="diff-chg">compacted
+to
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+terms
+</ins></a><ins class="diff-chg">
+as
+specified
+in
+</ins>
+the
+<a class="tref internalDFN" title="context" href="#dfn-context">
+context
+</a>
+<ins class="diff-new">which
+consequently
+</ins>
+has
+been
+injected
+into
+the
+output.
+While
+compacted
+output
+is
+most
+useful
+to
+humans,
+it
+can
+<ins class="diff-new">often
+</ins>
+also
+be
+<del class="diff-old">carefully
+</del>
+used
+to
+generate
+structures
+that
+are
+easy
+to
+<del class="diff-old">use
+for
+</del>
+<ins class="diff-chg">program
+against.
+Compaction
+enables
+</ins>
+developers
+to
+<del class="diff-old">program
+against
+as
+well.
+</del>
+<ins class="diff-chg">map
+any
+expanded
+document
+into
+an
+application-specific
+compacted
+document.
+While
+the
+context
+provided
+above
+mapped
+</ins><code><ins class="diff-chg">
+http://xmlns.com/foaf/0.1/name
+</ins></code><ins class="diff-chg">
+to
+</ins><code><ins class="diff-chg">
+name
+</ins></code>,<ins class="diff-chg">
+it
+could
+have
+also
+have
+been
+mapped
+to
+any
+other
+term
+provided
+by
+the
+developer.
+</ins>
+</p>
+</section>
+<section class="informative" id="flattening">
+<h3>
+<span class="secno">
+2.3
+</span>
+<ins class="diff-new">Flattening
+</ins></h3><p><em><ins class="diff-new">
+This
+section
+is
+non-normative.
+</ins></em></p><p><ins class="diff-new">
+While
+expansion
+ensures
+that
+a
+document
+is
+in
+a
+uniform
+structure,
+flattening
+goes
+a
+step
+further
+and
+ensures
+that
+also
+the
+shape
+of
+the
+data
+is
+deterministic.
+In
+expanded
+documents
+properties
+of
+a
+single
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a><ins class="diff-new">
+may
+still
+be
+spread
+across
+a
+number
+of
+different
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+objects
+</ins></a>.<ins class="diff-new">
+By
+flattening
+a
+document,
+all
+properties
+of
+a
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a><ins class="diff-new">
+are
+collected
+in
+a
+single
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+and
+all
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-new">
+blank
+nodes
+</ins></a><ins class="diff-new">
+are
+labeled
+with
+a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifier
+</ins></a>.<ins class="diff-new">
+Often
+this
+drastically
+simplifies
+the
+code
+to
+process
+JSON-LD
+data.
+</ins></p><p><ins class="diff-new">
+For
+example,
+assume
+the
+following
+JSON-LD
+input
+document:
+</ins></p>  <div class="example"><div class="example-title"><span>Example 7</span></div><pre class="example">{<ins class="diff-new">
+  &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;
+    }
+  ]
+}
+</ins></pre></div><p><ins class="diff-new">
+Running
+the
+</ins><a href="#flattening-algorithm"><ins class="diff-new">
+Flattening
+Algorithm
+</ins></a><ins class="diff-new">
+with
+a
+context
+set
+to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
+null
+</ins></a><ins class="diff-new">
+to
+prevent
+compaction
+returns
+the
+following
+document:
+</ins></p>  <div class="example"><div class="example-title"><span>Example 8</span></div><pre class="example">[<ins class="diff-new">
+  {
+    &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; }
+    ]
+  }
+]
+</ins></pre></div><p><ins class="diff-new">
+Note
+how
+in
+the
+output
+above
+all
+properties
+of
+a
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-new">
+node
+</ins></a><ins class="diff-new">
+are
+collected
+in
+a
+single
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+and
+how
+the
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-new">
+blank
+node
+</ins></a><ins class="diff-new">
+representing
+&quot;Manu
+Sporny&quot;
+has
+been
+assigned
+the
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifier
+</ins></a><code><ins class="diff-new">
+_:t0
+</ins></code>.</p><p><ins class="diff-new">
+To
+make
+it
+easier
+for
+humans
+to
+read
+such
+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:
+</ins></p>  <div class="example"><div class="example-title"><span>Example 9</span></div><pre class="example">{<ins class="diff-new">
+  &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;
+    }
+  ]
+}
+</ins></pre></div><p><ins class="diff-new">
+Please
+note
+that
+the
+flattened
+and
+compacted
+result
+will
+always
+explicitly
+designate
+the
+default
+by
+the
+</ins><code><ins class="diff-new">
[email protected]
+</ins></code><ins class="diff-new">
+member
+in
+the
+top-level
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a>.<a href="#compaction"><ins class="diff-new">
+Compaction
+</ins></a><ins class="diff-new">
+optimizes
+that
+member
+away
+if
+its
+value
+contains
+just
+one
+item.
+</ins></p></section><section class="informative" id="rdf-conversion"><h3><span class="secno"><ins class="diff-new">
+2.4
+</ins></span>
+RDF
+Conversion
+</h3>
+<p>
+<em>
+<ins class="diff-new">This
+section
+is
+non-normative.
+</ins></em></p>
+<p>
+JSON-LD
+can
+be
+used
+to
+<del class="diff-old">losslessly
+express
+the
+RDF
+</del>
+<ins class="diff-chg">serialize
+</ins>
+data
+<del class="diff-old">model
+</del>
+<ins class="diff-chg">expressed
+in
+RDF
+</ins>
+as
+described
+in
+<del class="diff-old">the
+RDF
+Concepts
+document
+</del>
+[
+<cite>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+].
+This
+ensures
+that
+data
+can
+be
+round-tripped
+from
+<ins class="diff-new">and
+to
+</ins>
+any
+RDF
+<del class="diff-old">syntax,
+like
+N-Triples
+or
+TURTLE,
+</del>
+<ins class="diff-chg">syntax
+</ins>
+without
+any
+loss
+in
+the
+fidelity
+of
+the
+data.
+<del class="diff-old">Assume
+</del>
+</p>
+<p>
+<ins class="diff-chg">For
+example,
+assume
+</ins>
+the
+following
+RDF
+input
+<ins class="diff-new">serialized
+</ins>
+in
+<del class="diff-old">N-Triples
+format:
+</del>
+<ins class="diff-chg">Turtle
+[
+</ins><cite><a class="bibref" href="#bib-TURTLE-TR"><ins class="diff-chg">
+TURTLE-TR
+</ins></a></cite><ins class="diff-chg">
+]:
+</ins>
+</p>
+<del class="diff-old">  var data = &quot;
+&lt;http://manu.sporny.org/about/#manu&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; \&quot;Manu Sporny\&quot; .\n
+&lt;http://manu.sporny.org/about/#manu&gt;
+</del>
+  <div class="example"><div class="example-title"><span>Example 10</span></div><pre class="example">&lt;http://me.markus-lanthaler.com/&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; &quot;Markus Lanthaler&quot; .
+<ins class="diff-chg">&lt;http://me.markus-lanthaler.com/&gt;
+</ins>
+&lt;http://xmlns.com/foaf/0.1/homepage&gt;
+<del class="diff-old">&lt;http://manu.sporny.org/&gt;
+.&quot;;
+</del>
+<ins class="diff-chg">&lt;http://www.markus-lanthaler.com/&gt;
+.
+</ins>
+</pre>
+</div>
+<p>
+<del class="diff-old">A
+developer
+can
+use
+</del>
+<ins class="diff-chg">Using
+</ins>
+the
+<del class="diff-old">JSON-LD
+API
+to
+</del>
+<a href="#convert-from-rdf-algorithm">
+<ins class="diff-chg">Convert
+from
+RDF
+Algorithm
+</ins></a><ins class="diff-chg">
+a
+developer
+could
+</ins>
+transform
+<del class="diff-old">the
+markup
+above
+</del>
+<ins class="diff-chg">this
+document
+</ins>
+into
+<del class="diff-old">a
+JSON-LD
+document:
+  function conversionCallback(result)
+{
+  console.log(&quot;JSON-LD Document: &quot;, result);
+};
+jsonld.fromRDF(data,
+conversionCallback,
+{&quot;format&quot;:
+&quot;ntriples&quot;});
+The
+following
+</del>
+expanded
+<del class="diff-old">output
+would
+be
+the
+result
+of
+the
+call
+above:
+</del>
+<ins class="diff-chg">JSON-LD:
+</ins>
+</p>
+<del class="diff-old">  [{
+  &quot;@id&quot;: &quot;http://manu.sporny.org/about/#manu&quot;,
+  &quot;http://xmlns.com/foaf/0.1/name&quot;: [{
+    &quot;@value&quot;: &quot;Manu Sporny&quot;
+  }],
+  &quot;http://xmlns.com/foaf/0.1/homepage&quot;: [{
+    &quot;@id&quot;: &quot;http://manu.sporny.org/&quot;
+  }]
+}]
+</del>
+  <div class="example"><div class="example-title"><span>Example 11</span></div><pre class="example">[
+<ins class="diff-chg">  {
+    &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;
+      }
+    ]
+  }
+]
+</ins>
+</pre>
+</div>
+<p>
+Note
+that
+the
+output
+<del class="diff-old">above,
+</del>
+<ins class="diff-chg">above
+</ins>
+could
+easily
+be
+compacted
+<del class="diff-old">to
+produce
+the
+following
+</del>
+using
+the
+technique
+outlined
+in
+the
+previous
+<del class="diff-old">section:
+  {
+  &quot;@context&quot;: &quot;http://json-ld.org/contexts/person.jsonld&quot;,
+  &quot;@id&quot;: &quot;http://manu.sporny.org/about/#manu&quot;,
+  &quot;name&quot;: &quot;Manu Sporny&quot;,
+  &quot;homepage&quot;: &quot;http://manu.sporny.org/&quot;
+}
+Transforming
+</del>
+<ins class="diff-chg">section.
+It
+is
+also
+possible
+to
+transform
+</ins>
+the
+<del class="diff-old">node
+above
+</del>
+<ins class="diff-chg">JSON-LD
+document
+</ins>
+back
+to
+RDF
+<del class="diff-old">is
+as
+simple
+as
+calling
+</del>
+<ins class="diff-chg">using
+</ins>
+the
+<del class="diff-old">toRDF()
+method:
+</del>
+<a href="#convert-to-rdf-algorithm">
+<ins class="diff-chg">Convert
+to
+RDF
+Algorithm
+</ins></a>.
+</p>
+<del class="diff-old">  var jsonldDocument = ...; // assign the JSON-LD document here
+function rdfCallback(quads)
+{
+  console.log(&quot;RDF Data: &quot;, quads);
+};
+jsonld.toRDF(jsonldDocument,
+rdfCallback);
+</del>
+</section>
+</section>
+<section id="conformance">
+<h2>
+<span class="secno">
+3.
+</span>
+<del class="diff-old">The
+Application
+Programming
+Interface
+</del>
+<ins class="diff-chg">Conformance
+</ins>
+</h2>
+<p>
+<del class="diff-old">This
+API
+provides
+a
+clean
+mechanism
+</del>
+<ins class="diff-chg">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.
+</ins></p><p><ins class="diff-chg">
+The
+keywords
+</ins><em class="rfc2119" title="must"><ins class="diff-chg">
+must
+</ins></em>,<em class="rfc2119" title="must not"><ins class="diff-chg">
+must
+not
+</ins></em>,<em class="rfc2119" title="required"><ins class="diff-chg">
+required
+</ins></em>,<em class="rfc2119" title="should"><ins class="diff-chg">
+should
+</ins></em>,<em class="rfc2119" title="should not"><ins class="diff-chg">
+should
+not
+</ins></em>,<em class="rfc2119" title="recommended"><ins class="diff-chg">
+recommended
+</ins></em>,<em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em>,<ins class="diff-chg">
+and
+</ins><em class="rfc2119" title="optional"><ins class="diff-chg">
+optional
+</ins></em><ins class="diff-chg">
+in
+this
+specification
+are
+to
+be
+interpreted
+as
+described
+in
+[
+</ins><cite><a class="bibref" href="#bib-RFC2119"><ins class="diff-chg">
+RFC2119
+</ins></a></cite><ins class="diff-chg">
+].
+</ins></p><p><ins class="diff-chg">
+There
+are
+two
+classes
+of
+products
+</ins>
+that
+<del class="diff-old">enables
+developers
+</del>
+<ins class="diff-chg">can
+claim
+conformance
+</ins>
+to
+<del class="diff-old">convert
+</del>
+<ins class="diff-chg">this
+specification:
+</ins><a class="tref internalDFN" title="json-ld_implementation" href="#dfn-json-ld_implementation">
+JSON-LD
+<del class="diff-old">data
+into
+a
+</del>
+<ins class="diff-chg">Implementations
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="json-ld_processor" href="#dfn-json-ld_processor"><ins class="diff-chg">
+JSON-LD
+Processors
+</ins></a>.</p><p><ins class="diff-chg">
+A
+conforming
+</ins><dfn title="json-ld_implementation" id="dfn-json-ld_implementation"><ins class="diff-chg">
+JSON-LD
+Implementation
+</ins></dfn><ins class="diff-chg">
+is
+</ins>
+a
+<del class="diff-old">variety
+</del>
+<ins class="diff-chg">system
+capable
+</ins>
+of
+<del class="diff-old">output
+formats
+that
+are
+easier
+to
+work
+with
+</del>
+<ins class="diff-chg">transforming
+JSON-LD
+documents
+according
+the
+algorithms
+defined
+</ins>
+in
+<del class="diff-old">various
+programming
+languages.
+If
+a
+</del>
+<ins class="diff-chg">this
+specification.
+</ins></p><p><ins class="diff-chg">
+A
+conforming
+</ins><dfn title="json-ld_processor" id="dfn-json-ld_processor">
+JSON-LD
+<del class="diff-old">API
+</del>
+<ins class="diff-chg">Processor
+</ins></dfn>
+is
+<del class="diff-old">provided
+in
+</del>
+a
+<ins class="diff-new">conforming
+</ins><a class="tref internalDFN" title="json-ld_implementation" href="#dfn-json-ld_implementation"><ins class="diff-new">
+JSON-LD
+Implementation
+</ins></a><ins class="diff-new">
+that
+exposes
+the
+application
+</ins>
+programming
+<del class="diff-old">environment,
+</del>
+<ins class="diff-chg">interface
+(API)
+defined
+in
+this
+specification.
+</ins></p><p><ins class="diff-chg">
+The
+algorithms
+in
+this
+specification
+are
+generally
+written
+with
+more
+concern
+for
+clarity
+than
+over
+efficiency.
+Thus,
+JSON-LD
+Implementations
+and
+Processors
+may
+implement
+</ins>
+the
+<del class="diff-old">entirety
+of
+</del>
+<ins class="diff-chg">algorithms
+given
+in
+this
+specification
+in
+any
+way
+desired,
+so
+long
+as
+</ins>
+the
+<del class="diff-old">following
+API
+</del>
+<ins class="diff-chg">end
+result
+is
+indistinguishable
+from
+the
+result
+that
+would
+be
+obtained
+by
+the
+specification's
+algorithms.
+</ins></p><p><ins class="diff-chg">
+This
+specification
+does
+not
+define
+how
+JSON-LD
+Implementations
+or
+Processors
+handle
+non-conforming
+input
+documents.
+This
+implies
+that
+JSON-LD
+Implementations
+or
+Processors
+</ins><em class="rfc2119" title="must not">
+must
+<ins class="diff-new">not
+</ins>
+</em>
+<del class="diff-old">be
+implemented.
+</del>
+<ins class="diff-chg">attempt
+to
+correct
+malformed
+IRIs
+or
+language
+tags;
+however,
+they
+</ins><em class="rfc2119" title="may"><ins class="diff-chg">
+may
+</ins></em><ins class="diff-chg">
+issue
+validation
+warnings.
+</ins>
+</p>
+<del class="diff-old">3.1
+General
+Terminology
+</del>
+<div class="note">
+<div class="note-title">
+<span>
+<del class="diff-old">Issue
+</del>
+<ins class="diff-chg">Note
+</ins>
+</span>
+</div>
+<p class="">
+<del class="diff-old">The
+intent
+of
+the
+Working
+Group
+and
+the
+Editors
+</del>
+<ins class="diff-chg">Implementers
+can
+partially
+check
+their
+level
+</ins>
+of
+<del class="diff-old">this
+specification
+is
+</del>
+<ins class="diff-chg">conformance
+</ins>
+to
+<del class="diff-old">eventually
+align
+terminology
+used
+in
+</del>
+this
+<del class="diff-old">document
+with
+</del>
+<ins class="diff-chg">specification
+by
+successfully
+passing
+</ins>
+the
+<del class="diff-old">terminology
+used
+in
+</del>
+<ins class="diff-chg">test
+cases
+of
+</ins>
+the
+<del class="diff-old">RDF
+Concepts
+document
+to
+</del>
+<ins class="diff-chg">JSON-LD
+test
+suite
+[
+</ins><cite><a class="bibref" href="#bib-JSON-LD-TESTS"><ins class="diff-chg">
+JSON-LD-TESTS
+</ins></a></cite><ins class="diff-chg">
+].
+Note,
+however,
+that
+passing
+all
+</ins>
+the
+<del class="diff-old">extent
+to
+which
+it
+makes
+sense
+to
+do
+so.
+In
+general,
+if
+there
+is
+an
+analogue
+to
+terminology
+used
+in
+this
+document
+</del>
+<ins class="diff-chg">tests
+</ins>
+in
+the
+<del class="diff-old">RDF
+Concepts
+document,
+the
+preference
+is
+</del>
+<ins class="diff-chg">test
+suite
+does
+not
+imply
+complete
+conformance
+</ins>
+to
+<del class="diff-old">use
+</del>
+<ins class="diff-chg">this
+specification.
+It
+only
+implies
+that
+</ins>
+the
+<del class="diff-old">terminology
+in
+</del>
+<ins class="diff-chg">implementation
+conforms
+to
+aspects
+tested
+by
+</ins>
+the
+<del class="diff-old">RDF
+Concepts
+document.
+</del>
+<ins class="diff-chg">test
+suite.
+</ins>
+</p>
+</div>
+</section>
+<section id="general-terminology">
+<h2>
+<span class="secno">
+<ins class="diff-new">4.
+</ins></span><ins class="diff-new">
+General
+Terminology
+</ins></h2>
+<p>
+<del class="diff-old">The
+</del>
+<ins class="diff-chg">This
+document
+uses
+the
+</ins>
+following
+<del class="diff-old">is
+an
+explanation
+of
+</del>
+<ins class="diff-chg">terms
+as
+defined
+in
+JSON
+[
+</ins><cite><a class="bibref" href="#bib-RFC4627"><ins class="diff-chg">
+RFC4627
+</ins></a></cite><ins class="diff-chg">
+].
+Refer
+to
+</ins>
+the
+<del class="diff-old">general
+terminology
+used
+</del>
+<em>
+<ins class="diff-chg">JSON
+Grammar
+</ins></em><ins class="diff-chg">
+section
+</ins>
+in
+<del class="diff-old">this
+document:
+</del>
+<ins class="diff-chg">[
+</ins><cite><a class="bibref" href="#bib-RFC4627"><ins class="diff-chg">
+RFC4627
+</ins></a></cite><ins class="diff-chg">
+]
+for
+formal
+definitions.
+</ins>
+</p>
+<dl>
+<dt>
+<dfn title="json_object" id="dfn-json_object">
+JSON
+object
+</dfn>
+</dt>
+<dd>
+An
+object
+structure
+is
+represented
+as
+a
+pair
+of
+curly
+brackets
+surrounding
+zero
+or
+more
+<del class="diff-old">name-value
+</del>
+<ins class="diff-chg">key-value
+</ins>
+pairs.
+A
+<del class="diff-old">name
+</del>
+<ins class="diff-chg">key
+</ins>
+is
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+</a>.
+A
+single
+colon
+comes
+after
+each
+<del class="diff-old">name,
+</del>
+<ins class="diff-chg">key,
+</ins>
+separating
+the
+<del class="diff-old">name
+</del>
+<ins class="diff-chg">key
+</ins>
+from
+the
+value.
+A
+single
+comma
+separates
+a
+value
+from
+a
+following
+<del class="diff-old">name.
+The
+names
+within
+an
+object
+should
+be
+unique.
+</del>
+<ins class="diff-chg">key.
+</ins>
+</dd>
+<dt>
+<dfn title="array" id="dfn-array">
+array
+</dfn>
+</dt>
+<dd>
+An
+array
+<ins class="diff-new">structure
+</ins>
+is
+represented
+as
+square
+brackets
+surrounding
+zero
+or
+more
+values
+<del class="diff-old">that
+</del>
+<ins class="diff-chg">(or
+elements).
+Elements
+</ins>
+are
+separated
+by
+commas.
+<ins class="diff-new">In
+JSON,
+an
+array
+is
+an
+</ins><em><ins class="diff-new">
+ordered
+</ins></em><ins class="diff-new">
+sequence
+of
+zero
+or
+more
+values.
+While
+JSON-LD
+uses
+the
+same
+array
+representation
+as
+JSON,
+the
+collection
+is
+</ins><em><ins class="diff-new">
+unordered
+</ins></em><ins class="diff-new">
+by
+default.
+While
+order
+is
+preserved
+in
+regular
+JSON
+arrays,
+it
+is
+not
+in
+regular
+JSON-LD
+arrays
+unless
+specific
+markup
+is
+provided
+(see
+</ins><a href="#sets-and-lists"></a><ins class="diff-new">
+).
+</ins>
+</dd>
+<dt>
+<dfn title="string" id="dfn-string">
+string
+</dfn>
+</dt>
+<dd>
+A
+string
+is
+a
+sequence
+of
+zero
+or
+more
+Unicode
+<del class="diff-old">(UTF-8)
+</del>
+characters,
+wrapped
+in
+double
+quotes,
+using
+backslash
+escapes
+(if
+necessary).
+A
+character
+is
+represented
+as
+a
+single
+character
+string.
+</dd>
+<dt>
+<dfn title="number" id="dfn-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 title="true" id="dfn-true">
+true
+</dfn>
+and
+<dfn title="false" id="dfn-false">
+false
+</dfn>
+</dt>
+<dd>
+Values
+that
+are
+used
+to
+express
+one
+of
+two
+possible
+boolean
+states.
+</dd>
+<dt>
+<dfn title="null" id="dfn-null">
+null
+</dfn>
+</dt>
+<dd>
+The
+<del class="diff-old">use
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a><ins class="diff-chg">
+value.
+A
+key-value
+pair
+in
+the
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+where
+the
+value,
+or
+the
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>
+of
+the
+<ins class="diff-new">value,
+is
+</ins>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+null
+</a>
+<del class="diff-old">value
+within
+</del>
+<ins class="diff-chg">explicitly
+decouples
+a
+term's
+association
+with
+an
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>.<ins class="diff-chg">
+A
+key-value
+pair
+in
+the
+body
+of
+a
+</ins>
+JSON-LD
+<ins class="diff-new">document
+whose
+value
+</ins>
+is
+<del class="diff-old">used
+to
+ignore
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a><ins class="diff-chg">
+has
+the
+same
+meaning
+as
+if
+the
+key-value
+pair
+was
+not
+defined.
+If
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<code><ins class="diff-chg">
[email protected]
+</ins></code>,
+or
+<del class="diff-old">reset
+values.
+</del>
+<code>
+<ins class="diff-chg">@set
+</ins></code><ins class="diff-chg">
+is
+set
+to
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+in
+expanded
+form,
+then
+the
+entire
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+is
+ignored.
+</ins>
+</dd>
+</dl>
+<p>
+<ins class="diff-new">Furthermore,
+the
+following
+terminology
+is
+used
+throughout
+this
+document:
+</ins></p><dl>
+<dt>
+<dfn title="keyword" id="dfn-keyword">
+keyword
+</dfn>
+</dt>
+<dd>
+A
+JSON
+key
+that
+is
+specific
+to
+JSON-LD,
+specified
+in
+the
+JSON-LD
+Syntax
+specification
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+]
+in
+the
+section
+titled
+<cite>
+<a href="../json-ld-syntax/#syntax-tokens-and-keywords">
+Syntax
+Tokens
+and
+Keywords
+</a>
+</cite>.
+</dd>
+<dt>
+<dfn title="context" id="dfn-context">
+context
+</dfn>
+</dt>
+<dd>
+A
+a
+set
+of
+rules
+for
+interpreting
+a
+JSON-LD
+document
+as
+specified
+in
+<cite>
+<a href="../json-ld-syntax/#the-context">
+The
+Context
+</a>
+</cite>
+of
+the
+[
+<cite>
+<a class="bibref" href="#bib-JSON-LD">
+JSON-LD
+</a>
+</cite>
+]
+specification.
+</dd>
+<dt>
+<del class="diff-old">IRI
+An
+Internationalized
+Resource
+Identifier
+as
+described
+in
+[
+RFC3987
+].
+Linked
+Data
+A
+set
+of
+documents,
+each
+containing
+a
+representation
+of
+a
+linked
+data
+graph
+.
+linked
+data
+graph
+</del>
+<dfn title="json-ld_document" id="dfn-json-ld_document">
+<ins class="diff-chg">JSON-LD
+document
+</ins>
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">An
+unordered
+labeled
+directed
+graph,
+where
+nodes
+are
+IRIs
+or
+Blank
+Nodes
+,
+or
+other
+values.
+</del>
+A
+<del class="diff-old">linked
+data
+graph
+</del>
+<a class="tref internalDFN" title="json-ld_document" href="#dfn-json-ld_document">
+<ins class="diff-chg">JSON-LD
+document
+</ins>
+</a>
+is
+a
+<del class="diff-old">generalized
+representation
+</del>
+<ins class="diff-chg">serialization
+</ins>
+of
+a
+<del class="diff-old">RDF
+graph
+</del>
+<ins class="diff-chg">collection
+of
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+graphs
+</ins>
+</a>
+<del class="diff-old">as
+defined
+in
+[
+RDF-CONCEPTS
+</del>
+<ins class="diff-chg">and
+comprises
+exactly
+one
+</ins><a class="tref internalDFN" title="default_graph" href="#dfn-default_graph"><ins class="diff-chg">
+default
+graph
+</ins>
+</a>
+<del class="diff-old">].
+</del>
+<ins class="diff-chg">and
+zero
+or
+more
+</ins><a class="tref internalDFN" title="named_graph" href="#dfn-named_graph"><ins class="diff-chg">
+named
+graphs
+</ins></a>.
+</dd>
+<dt>
+<dfn title="named_graph" id="dfn-named_graph">
+named
+graph
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">linked
+data
+</del>
+<ins class="diff-chg">named
+</ins>
+graph
+<del class="diff-old">that
+</del>
+is
+<del class="diff-old">identified
+by
+</del>
+<ins class="diff-chg">a
+pair
+consisting
+of
+</ins>
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+</del>
+</a>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+node
+</ins></a><ins class="diff-chg">
+(the
+</ins>
+<dfn title="graph_name" id="dfn-graph_name">
+graph
+name
+</dfn>
+<del class="diff-old">The
+IRI
+identifying
+</del>
+<ins class="diff-chg">)
+and
+</ins>
+a
+<del class="diff-old">named
+</del>
+<a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph">
+<ins class="diff-chg">JSON-LD
+</ins>
+graph
+</a>.
+</dd>
+<dt>
+<dfn title="default_graph" id="dfn-default_graph">
+default
+graph
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">When
+executing
+an
+algorithm,
+the
+graph
+where
+data
+should
+be
+placed
+if
+a
+named
+graph
+is
+not
+specified.
+node
+A
+piece
+of
+information
+that
+is
+represented
+in
+a
+linked
+data
+</del>
+<ins class="diff-chg">The
+default
+</ins>
+graph
+<del class="diff-old">.
+node
+definition
+A
+JSON
+object
+used
+to
+represent
+a
+node
+and
+one
+or
+more
+properties
+of
+that
+node.
+A
+JSON
+object
+</del>
+is
+<del class="diff-old">a
+node
+definition
+if
+it
+does
+not
+contain
+</del>
+the
+<del class="diff-old">keys
[email protected]
+,
[email protected]
+or
[email protected]
+and
+it
+has
+one
+or
+more
+keys
+other
+than
[email protected]
+.
+node
+reference
+A
+JSON
+object
+used
+to
+reference
+a
+node
+having
+</del>
+only
+<del class="diff-old">the
[email protected]
+key.
+blank
+node
+A
+node
+in
+the
+linked
+data
+</del>
+graph
+<del class="diff-old">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
+linked
+data
+graph.
+A
+blank
+node
+is
+assigned
+an
+identifier
+starting
+with
+the
+prefix
+_:
+.
+property
+The
+IRI
+label
+of
+an
+edge
+</del>
+in
+a
+<del class="diff-old">linked
+data
+</del>
+<ins class="diff-chg">JSON-LD
+document
+which
+has
+no
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name">
+graph
+<ins class="diff-new">name
+</ins>
+</a>.
+</dd>
+<dt>
+<del class="diff-old">subject
+A
+node
+in
+a
+linked
+data
+</del>
+<dfn title="json-ld_graph" id="dfn-json-ld_graph">
+<ins class="diff-chg">JSON-LD
+</ins>
+graph
+<del class="diff-old">with
+at
+least
+one
+outgoing
+edge,
+related
+to
+an
+object
+node
+through
+a
+property
+.
+object
+</del>
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">node
+in
+</del>
+<ins class="diff-chg">labeled
+directed
+graph,
+i.e.,
+</ins>
+a
+<del class="diff-old">linked
+data
+graph
+with
+at
+least
+one
+incoming
+edge.
+quad
+A
+piece
+</del>
+<ins class="diff-chg">set
+</ins>
+of
+<del class="diff-old">information
+that
+contains
+four
+items;
+a
+subject
+,
+a
+property
+,
+an
+object
+,
+and
+a
+graph
+name
+.
+literal
+An
+object
+expressed
+as
+a
+value
+such
+as
+a
+string,
+number
+or
+in
+expanded
+form.
+3.2
+JsonLdProcessor
+The
+JSON-LD
+processor
+interface
+is
+the
+high-level
+programming
+structure
+that
+developers
+use
+to
+access
+the
+JSON-LD
+transformation
+methods.
+Note
+The
+JSON-LD
+API
+signatures
+are
+the
+same
+across
+all
+programming
+languages.
+Due
+to
+the
+fact
+that
+asynchronous
+programming
+is
+uncommon
+in
+certain
+languages,
+developers
+may
+implement
+a
+processor
+with
+a
+synchronous
+interface
+instead.
+In
+that
+case,
+the
+callback
+parameter
+must
+not
+be
+included
+and
+the
+result
+must
+be
+returned
+as
+a
+return
+value
+instead.
+    ]
+interface  {
+};
+3.2.1
+Methods
+compact
+Compacts
+</del>
+<a class="tref internalDFN" title="node" href="#dfn-node">
+<ins class="diff-chg">nodes
+</ins>
+</a>
+<del class="diff-old">the
+given
+input
+using
+the
+context
+according
+to
+the
+steps
+in
+the
+Compaction
+Algorithm
+.
+The
+input
+must
+be
+copied,
+compacted
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+compaction
+fails,
+an
+appropriate
+error
+must
+be
+returned
+via
+the
+callback.
+INVALID_SYNTAX
+A
+general
+syntax
+error
+was
+detected
+in
+the
[email protected]
+.
+For
+example,
+if
+a
[email protected]
+key
+maps
+to
+anything
+other
+than
[email protected]
+or
+an
+absolute
+IRI
+</del>
+<ins class="diff-chg">connected
+by
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edges
+</ins>
+</a>,
+<del class="diff-old">this
+error
+would
+be
+returned
+via
+the
+callback
+.
+LOAD_ERROR
+There
+was
+a
+problem
+encountered
+loading
+a
+remote
+context.
+LOSSY_COMPACTION
+The
+compaction
+would
+lead
+to
+a
+loss
+of
+information,
+such
+</del>
+as
+<del class="diff-old">a
[email protected]
+value.
+CONFLICTING_DATATYPES
+The
+target
+datatype
+</del>
+specified
+in
+the
+<del class="diff-old">coercion
+rule
+and
+the
+datatype
+for
+the
+typed
+literal
+do
+not
+match.
+LIST_OF_LISTS_DETECTED
+A
+list
+of
+lists
+was
+detected.
+The
+list
+of
+lists
+feature
+is
+not
+supported
+in
+this
+version
+of
+JSON-LD
+due
+to
+the
+algorithmic
+complexity
+associated
+with
+conversion
+to
+RDF.
+Parameter
+Type
+Nullable
+Optional
+Description
+input
+</del>
+<cite>
+<del class="diff-old">object
+or
+object[]
+or
+IRI
+</del>
+<a href="../json-ld-syntax/#data-model">
+<ins class="diff-chg">Data
+Model
+</ins>
+</a>
+<del class="diff-old">✘
+✘
+The
+JSON-LD
+object
+or
+array
+</del>
+</cite>
+<ins class="diff-chg">section
+</ins>
+of
+<del class="diff-old">JSON-LD
+objects
+to
+perform
+the
+compaction
+upon
+or
+an
+IRI
+referencing
+</del>
+the
+JSON-LD
+<del class="diff-old">document
+to
+compact.
+context
+object
+or
+IRI
+✘
+✘
+The
+context
+to
+use
+when
+compacting
+the
+input
+;
+either
+in
+the
+form
+of
+an
+JSON
+object
+or
+as
+IRI
+.
+callback
+JsonLdCallback
+✘
+✘
+A
+callback
+that
+is
+called
+when
+processing
+is
+complete
+on
+the
+given
+input
+.
+options
+JsonLdOptions
+✔
+✔
+A
+set
+of
+options
+that
+may
+affect
+the
+expansion
+algorithm
+such
+as,
+e.g.,
+the
+input
+document's
+base
+IRI
+.
+This
+also
+includes
+optimize
+,
+which
+if
+set
+will
+cause
+processor-specific
+optimization.
+Return
+type:
+</del>
+<ins class="diff-chg">syntax
+specification
+[
+</ins><cite>
+<del class="diff-old">void
+</del>
+<a class="bibref" href="#bib-JSON-LD">
+<ins class="diff-chg">JSON-LD
+</ins>
+</a>
+</cite>
+<ins class="diff-chg">].
+</ins>
+</dd>
+<dt>
+<del class="diff-old">expand
+</del>
+<dfn title="edge" id="dfn-edge">
+<ins class="diff-chg">edge
+</ins></dfn>
+</dt>
+<dd>
+<del class="diff-old">Expands
+</del>
+<ins class="diff-chg">Every
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edge
+</ins>
+</a>
+<del class="diff-old">the
+given
+input
+according
+to
+the
+steps
+in
+the
+Expansion
+Algorithm
+.
+The
+input
+must
+be
+copied,
+expanded
+and
+returned
+if
+there
+are
+no
+errors.
+If
+the
+expansion
+fails,
+an
+appropriate
+error
+must
+be
+returned
+via
+the
+callback.
+INVALID_SYNTAX
+A
+general
+syntax
+error
+was
+detected
+in
+the
[email protected]
+.
+For
+example,
+if
+a
[email protected]
+key
+maps
+to
+anything
+other
+than
[email protected]
+or
+an
+absolute
+IRI
+,
+this
+error
+type
+will
+be
+set
+in
+the
+error
+sent
+to
+the
+callback
+.
+LOAD_ERROR
+There
+was
+a
+problem
+encountered
+loading
+</del>
+<ins class="diff-chg">has
+</ins>
+a
+<del class="diff-old">remote
+context.
+LIST_OF_LISTS_DETECTED
+A
+list
+of
+lists
+was
+detected.
+The
+list
+of
+lists
+feature
+is
+not
+supported
+in
+this
+version
+of
+JSON-LD
+due
+to
+the
+algorithmic
+complexity
+</del>
+<ins class="diff-chg">direction
+</ins>
+associated
+with
+<del class="diff-old">conversion
+to
+RDF.
+Parameter
+Type
+Nullable
+Optional
+Description
+input
+object
+or
+object[]
+or
+IRI
+✘
+✘
+The
+JSON-LD
+object
+or
+array
+of
+JSON-LD
+objects
+to
+perform
+the
+expansion
+upon
+or
+</del>
+<ins class="diff-chg">it
+and
+is
+labeled
+with
+</ins>
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+<del class="diff-old">referencing
+the
+JSON-LD
+document
+to
+expand.
+context
+object
+</del>
+or
+<del class="diff-old">IRI
+✔
+✘
+An
+optional
+external
+context
+to
+use
+additionally
+to
+the
+context
+embedded
+in
+input
+when
+expanding
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-chg">
+blank
+node
+identifier
+</ins></a>.<ins class="diff-chg">
+Within
+</ins>
+the
+<del class="diff-old">input
+.
+callback
+JsonLdCallback
+✘
+✘
+A
+callback
+that
+is
+</del>
+<ins class="diff-chg">JSON-LD
+syntax
+these
+edge
+labels
+are
+</ins>
+called
+<del class="diff-old">when
+processing
+is
+complete
+on
+the
+given
+input
+.
+options
+JsonLdOptions
+</del>
+<dfn title="property" id="dfn-property">
+<ins class="diff-chg">properties
+</ins></dfn>.<ins class="diff-chg">
+Whenever
+possible,
+an
+</ins><a class="tref internalDFN" title="edge" href="#dfn-edge"><ins class="diff-chg">
+edge
+</ins>
+</a>
+<del class="diff-old">✔
+✔
+A
+set
+of
+options
+that
+may
+</del>
+<em class="rfc2119" title="should">
+<ins class="diff-chg">should
+</ins>
+</em>
+<del class="diff-old">affect
+the
+expansion
+algorithm
+such
+as,
+e.g.,
+the
+input
+document's
+base
+</del>
+<ins class="diff-chg">be
+labeled
+with
+an
+</ins>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+<del class="diff-old">Return
+type:
+void
+</del>
+</dd>
+<dt>
+<del class="diff-old">fromRDF
+</del>
+<dfn title="node" id="dfn-node">
+<ins class="diff-chg">node
+</ins></dfn>
+</dt>
+<dd>
+<del class="diff-old">Creates
+a
+JSON-LD
+document
+given
+an
+set
+of
+Quads
+.
+Parameter
+Type
+Nullable
+Optional
+Description
+input
+Quad
+[]
+✘
+✘
+A
+set
+of
+linked
+data
+graph
+s
+represented
+as
+an
+array
+of
+Quads
+.
+callback
+JsonLdCallback
+</del>
+<ins class="diff-chg">Every
+</ins><a class="tref internalDFN" title="node" href="#dfn-node"><ins class="diff-chg">
+node
+</ins>
+</a>
+<del class="diff-old">✘
+✘
+A
+callback
+that
+is
+called
+when
+processing
+</del>
+is
+<del class="diff-old">complete
+on
+the
+given
+input
+.
+options
+JsonLdOptions
+✔
+✔
+A
+set
+of
+options
+that
+will
+affect
+the
+algorithm.
+This
+includes
+notType
+,
+which
+if
+set
+to
+true
+causes
+the
+resulting
+document
+to
+use
+rdf:type
+as
+a
+property,
+instead
+of
[email protected]
+.
+Return
+type:
+void
+toRDF
+Processes
+the
+input
+according
+to
+the
+Convert
+to
+RDF
+Algorithm
+,
+calling
+the
+provided
+callback
+for
+each
+Quad
+generated.
+INVALID_SYNTAX
+A
+general
+syntax
+error
+was
+detected
+in
+the
[email protected]
+.
+For
+example,
+if
+a
[email protected]
+key
+maps
+to
+anything
+other
+than
[email protected]
+or
+</del>
+an
+<del class="diff-old">absolute
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>,
+<del class="diff-old">this
+error
+will
+be
+returned.
+LOAD_ERROR
+There
+was
+</del>
+a
+<del class="diff-old">problem
+encountered
+loading
+</del>
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+<ins class="diff-chg">blank
+node
+</ins></a>,
+a
+<del class="diff-old">remote
+context.
+LIST_OF_LISTS_DETECTED
+A
+list
+of
+lists
+was
+detected.
+This
+is
+not
+supported
+in
+this
+version
+of
+JSON-LD.
+Parameter
+Type
+Nullable
+Optional
+Description
+input
+object
+or
+object[]
+or
+IRI
+✘
+✘
+The
+JSON-LD
+object
+or
+array
+of
+</del>
+<a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value">
+JSON-LD
+<del class="diff-old">objects
+to
+convert
+to
+RDF
+</del>
+<ins class="diff-chg">value
+</ins></a>,
+or
+a
+<del class="diff-old">IRI
+referencing
+the
+JSON-LD
+document
+to
+convert
+to
+RDF.
+callback
+QuadCallback
+✘
+✘
+A
+callback
+that
+is
+called
+when
+a
+Quad
+is
+created
+from
+processing
+the
+given
+input
+.
+options
+JsonLdOptions
+✔
+✔
+</del>
+<a class="tref internalDFN" title="list" href="#dfn-list">
+<ins class="diff-chg">list
+</ins></a>.</dd><dt>
+<del class="diff-old">A
+set
+of
+options
+that
+may
+affect
+the
+conversion
+to
+RDF
+such
+as,
+e.g.,
+the
+input
+document's
+base
+</del>
+<dfn title="iri" id="dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+Return
+type:
+void
+3.3
+Callbacks
+Issue
+153
+Developers
+should
+note
+that
+the
+details
+of
+error
+handling
+and
+conformance
+handling
+are
+being
+actively
+debated.
+JSON-LD
+processors
+utilize
+a
+variety
+of
+callbacks
+in
+order
+to
+return
+information
+in
+an
+asynchronous
+manner
+to
+calling
+applications.
+This
+section
+details
+the
+parameters
+sent
+to
+those
+callbacks
+as
+well
+as
+the
+desired
+operation
+of
+the
+callbacks.
+3.3.1
+JsonLdProcessingError
+The
+JsonLdError
+type
+is
+used
+to
+encapsulate
+a
+variety
+of
+parameters
+that
+outline
+the
+cause
+of
+a
+particular
+JsonLdProcessor
+error.
+       {
+};
+Dictionary
+JsonLdProcessingError
+Members
+operation
+of
+type
+string
+a
+string
+representing
+the
+operation
+that
+was
+being
+performed
+when
+the
+conformance
+issue
+was
+raised.
+Valid
+values
+for
+the
+string
+include
+compact
+,
+expand
+,
+toRDF
+,
+and
+fromRDF
+.
+source
+of
+type
+array
+of
+object
+or
+object
+</del>
+</dfn>
+</dt>
+<dd>
+An
+<del class="diff-old">object
+reference
+to
+the
+original
+JSON-LD
+document
+being
+processed.
+sourceKey
+of
+type
+string
+The
+key
+value
+associated
+with
+the
+value
+that
+triggered
+the
+conformance
+issue.
+sourceValue
+of
+type
+object
+or
+object[]
+or
+string
+or
+number
+The
+value
+that
+triggered
+the
+conformance
+issue.
+type
+of
+type
+string
+a
+string
+representing
+the
+particular
+error
+type,
+such
+as
+LIST_OF_LISTS_DETECTED
+,
+as
+described
+in
+the
+various
+algorithms
+in
+this
+document.
+3.3.2
+JsonLdCallback
+The
+JsonLdCallback
+is
+used
+to
+return
+a
+processed
+JSON-LD
+representation
+as
+the
+result
+of
+processing
+an
+API
+method.
+      ]
+interface  {
+};
+Methods
+processingComplete
+This
+callback
+is
+invoked
+when
+processing
+is
+complete.
+Parameter
+Type
+Nullable
+Optional
+Description
+error
+JsonLdProcessingError
+✘
+✘
+If
+the
+value
+is
+null
+,
+then
+no
+error
+occurred.
+If
+the
+value
+is
+non-
+null
+,
+a
+processing
+error
+occurred
+and
+the
+details
+will
+be
+contained
+within
+the
+error
+object.
+document
+object
+or
+object
+[]
+✘
+✘
+The
+processed
+JSON-LD
+document.
+Return
+type:
+void
+3.3.3
+QuadCallback
+The
+QuadCallback
+is
+called
+whenever
+the
+processor
+generates
+a
+quad
+during
+processing.
+      ]
+interface  {
+};
+Methods
+quad
+This
+callback
+is
+invoked
+whenever
+a
+quad
+is
+generated
+by
+the
+processor.
+Parameter
+Type
+Nullable
+Optional
+Description
+error
+JsonLdProcessingError
+✘
+✘
+If
+the
+value
+is
+null
+,
+then
+no
+error
+occurred.
+If
+the
+value
+is
+non-
+null
+,
+a
+processing
+error
+occurred
+and
+the
+details
+will
+be
+contained
+within
+the
+error
+object.
+quad
+Quad
+✘
+✘
+If
+there
+is
+no
+error,
+the
+quad
+that
+was
+generated.
+Return
+type:
+void
+3.3.4
+ConformanceCallback
+The
+ConformanceCallback
+may
+be
+specified
+in
+the
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<del class="diff-old">JsonLdOptions
+</del>
+<abbr title="Internationalized Resource Identifier">
+<ins class="diff-chg">IRI
+</ins></abbr>
+</a>
+<del class="diff-old">via
+the
+conformanceCallback
+parameter.
+If
+specified,
+the
+callback
+is
+called
+whenever
+a
+recoverable
+conformance
+issue
+is
+detected.
+The
+developer
+may
+then
+determine
+whether
+or
+not
+processing
+should
+continue
+based
+on
+the
+type
+of
+conformance
+issue.
+      ]
+interface  {
+};
+Methods
+issue
+This
+callback
+</del>
+<ins class="diff-chg">(Internationalized
+Resource
+Identifier)
+</ins>
+is
+<del class="diff-old">invoked
+when
+</del>
+a
+<del class="diff-old">conformance
+issue
+is
+detected
+by
+the
+JSON-LD
+processor.
+Parameter
+Type
+Nullable
+Optional
+Description
+issue
+JsonLdProcessingError
+✘
+✘
+Details
+about
+the
+conformance
+issue.
+callback
+function
+✘
+✘
+A
+function
+that
+must
+be
+called
+when
+the
+program
+has
+determined
+how
+to
+respond
+to
+the
+conformance
+issue.
+A
+single
+parameter
+must
+be
+passed
+to
+the
+callback.
+The
+value
+of
+the
+parameter
+should
+be
+null
+if
+processing
+should
+continue
+by
+acting
+as
+if
+the
+key-value
+</del>
+<ins class="diff-chg">string
+</ins>
+that
+<del class="diff-old">triggered
+the
+issue
+never
+existed.
+The
+issue
+should
+be
+passed
+</del>
+<ins class="diff-chg">conforms
+</ins>
+to
+the
+<del class="diff-old">callback
+without
+modification
+if
+processing
+should
+stop.
+Return
+type:
+</del>
+<ins class="diff-chg">syntax
+defined
+in
+[
+</ins><cite>
+<del class="diff-old">void
+</del>
+<a class="bibref" href="#bib-RFC3987">
+<ins class="diff-chg">RFC3987
+</ins>
+</a>
+</cite>
+<ins class="diff-chg">].
+</ins>
+</dd>
+<dt>
+<del class="diff-old">3.4
+Data
+Structures
+This
+section
+describes
+datatype
+definitions
+used
+within
+the
+JSON-LD
+API.
+3.4.1
+</del>
+<dfn title="absolute_iri" id="dfn-absolute_iri">
+<ins class="diff-chg">absolute
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">The
+IRI
+datatype
+is
+a
+string
+representation
+of
+an
+</del>
+</dfn>
+</dt>
+<dd>
+<ins class="diff-new">An
+absolute
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+typedef
+DOMString
+IRI
+;
+This
+datatype
+indicates
+that
+the
+string
+</del>
+is
+<del class="diff-old">interpreted
+as
+an
+Internationalized
+Resource
+Identifier
+</del>
+<ins class="diff-chg">defined
+in
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-RFC3987">
+RFC3987
+</a>
+</cite>
+]
+<del class="diff-old">identifying
+a
+document,
+which
+when
+parsed
+as
+JSON
+yields
+either
+a
+JSON
+object
+or
+array
+.
+3.4.2
+JsonLdOptions
+The
+JsonLdOptions
+type
+is
+used
+to
+pass
+various
+options
+to
+the
+JsonLdProcessor
+methods.
+     {
+};
+Dictionary
+JsonLdOptions
+Members
+base
+of
+type
+IRI
+,
+nullable
+The
+Base
+IRI
+to
+use
+when
+expanding
+the
+document.
+This
+overrides
+the
+value
+of
+input
+if
+it
+is
+</del>
+<ins class="diff-chg">containing
+</ins>
+a
+<del class="diff-old">IRI
+.
+If
+not
+specified
+and
+</del>
+<em>
+<del class="diff-old">input
+</del>
+<ins class="diff-chg">scheme
+</ins>
+</em>
+<del class="diff-old">is
+not
+an
+IRI
+,
+the
+base
+IRI
+defaults
+to
+the
+current
+document
+IRI
+if
+in
+a
+browser
+context,
+or
+the
+empty
+string
+if
+there
+is
+no
+document
+context.
+compactArrays
+of
+type
+boolean
+,
+defaulting
+to
+true
+If
+set
+to
+true
+,
+the
+JSON-LD
+processor
+replaces
+arrays
+with
+just
+one
+element
+with
+that
+element
+during
+compaction.
+If
+set
+to
+false
+,
+all
+arrays
+will
+remain
+arrays
+even
+if
+they
+have
+just
+one
+element.
+conformanceCallback
+of
+type
+function
+,
+defaulting
+to
+null
+The
+purpose
+of
+this
+option
+is
+to
+instruct
+the
+processor
+about
+whether
+or
+not
+it
+should
+continue
+processing.
+If
+the
+value
+is
+null
+,
+the
+processor
+should
+ignore
+any
+key-value
+pair
+associated
+</del>
+<ins class="diff-chg">along
+</ins>
+with
+<del class="diff-old">any
+recoverable
+conformance
+issue
+and
+continue
+processing.
+More
+details
+about
+this
+feature
+can
+be
+found
+in
+the
+ConformanceCallback
+section.
+flatten
+of
+type
+boolean
+,
+defaulting
+to
+false
+If
+set
+to
+</del>
+a
+<del class="diff-old">value
+that
+is
+not
+false
+,
+the
+JSON-LD
+processor
+must
+modify
+the
+output
+of
+the
+Compaction
+Algorithm
+or
+the
+Expansion
+Algorithm
+by
+coalescing
+all
+properties
+associated
+with
+each
+subject
+via
+the
+Flattening
+Algorithm
+.
+The
+value
+of
+flatten
+must
+</del>
+<em>
+<ins class="diff-chg">path
+</ins>
+</em>
+<del class="diff-old">be
+either
+an
+IRI
+value
+representing
+the
+name
+of
+the
+graph
+to
+flatten,
+or
+true
+.
+If
+the
+value
+is
+true
+,
+then
+the
+first
+graph
+encountered
+in
+the
+input
+document
+is
+selected
+and
+flattened.
+optimize
+of
+type
+boolean
+,
+defaulting
+to
+false
+If
+set
+to
+true
+,
+the
+JSON-LD
+processor
+is
+allowed
+to
+optimize
+the
+output
+of
+the
+Compaction
+Algorithm
+to
+produce
+even
+compacter
+representations.
+The
+algorithm
+for
+compaction
+optimization
+is
+beyond
+the
+scope
+of
+this
+specification
+</del>
+and
+<del class="diff-old">thus
+not
+defined.
+Consequently,
+different
+implementations
+may
+</del>
+<ins class="diff-chg">optional
+</ins><em><ins class="diff-chg">
+query
+</ins>
+</em>
+<del class="diff-old">implement
+different
+optimization
+algorithms.
+useNativeTypes
+of
+type
+boolean
+,
+defaulting
+to
+true
+If
+set
+to
+true
+,
+the
+JSON-LD
+processor
+will
+try
+to
+convert
+datatyped
+literals
+to
+JSON
+native
+types
+instead
+of
+using
+the
+expanded
+object
+form
+when
+converting
+from
+RDF
+.
+xsd:boolean
+values
+will
+be
+converted
+to
+true
+or
+false
+.
+xsd:integer
+</del>
+and
+<del class="diff-old">xsd:double
+values
+will
+be
+converted
+to
+JSON
+numbers
+.
+</del>
+<ins class="diff-chg">fragment
+segments.
+</ins>
+</dd>
+<dt>
+<del class="diff-old">useRdfType
+of
+type
+boolean
+,
+defaulting
+to
+false
+If
+set
+to
+true
+,
+the
+JSON-LD
+processor
+will
+use
+the
+expanded
+rdf:type
+</del>
+<dfn title="relative_iri" id="dfn-relative_iri">
+<ins class="diff-chg">relative
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">as
+the
+property
+instead
+of
[email protected]
+when
+converting
+from
+RDF
+.
+The
+following
+data
+structures
+are
+used
+for
+representing
+data
+about
+RDF
+quads.
+They
+are
+used
+for
+normalization,
+and
+RDF
+conversion
+.
+3.4.3
+Quad
+The
+Quad
+interface
+represents
+an
+RDF
+Quad.
+See
+[
+RDF-CONCEPTS
+]
+definition
+for
+RDF
+triple
+,
+which
+most
+closely
+aligns
+to
+Quad
+.
+    ]
+interface  {
+};
+Attributes
+graph
+of
+type
+Node
+,
+readonly,
+nullable
+If
+present,
+the
+name
+associated
+with
+the
+Quad
+identifying
+it
+as
+a
+member
+of
+a
+named
+graph
+.
+If
+it
+is
+missing,
+the
+quad
+is
+a
+member
+of
+the
+default
+graph
+.
+Issue
+125
+This
+element
+is
+at
+risk,
+and
+may
+be
+removed.
+object
+of
+type
+Node
+,
+readonly
+The
+object
+associated
+with
+the
+Quad
+.
+</del>
+<del class="diff-old">property
+of
+type
+Node
+,
+readonly
+The
+property
+associated
+with
+the
+Quad
+.
+Within
+JSON-LD,
+an
+RDF
+predicate
+</del>
+</dfn>
+<del class="diff-old">is
+refered
+to
+as
+a
+property
+</del>
+<del class="diff-old">subject
+of
+type
+Node
+,
+readonly
+</del>
+</dt>
+<dd>
+<del class="diff-old">The
+subject
+associated
+with
+the
+Quad
+.
+3.4.4
+Node
+Node
+is
+the
+base
+class
+of
+</del>
+<ins class="diff-chg">A
+relative
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">,
+BlankNode
+,
+and
+Literal
+.
+It
+</del>
+is
+<del class="diff-old">the
+IDL
+representation
+of
+a
+linked
+data
+graph
+node
+.
+    ]
+interface  {
+};
+3.4.5
+</del>
+<ins class="diff-chg">an
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">A
+node
+</del>
+that
+is
+<del class="diff-old">an
+</del>
+<ins class="diff-chg">relative
+some
+other
+</ins><a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri"><ins class="diff-chg">
+absolute
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">.
+    ]
+interface  {
+};
+Attributes
+value
+of
+type
+DOMString
+</del>
+</a>
+<del class="diff-old">,
+readonly
+The
+IRI
+identifier
+</del>
+<ins class="diff-chg">;
+in
+the
+case
+</ins>
+of
+<ins class="diff-new">JSON-LD
+this
+is
+</ins>
+the
+<del class="diff-old">node
+as
+a
+[
+UNICODE
+]
+string.
+</del>
+<ins class="diff-chg">base
+location
+of
+the
+document.
+</ins>
+</dd>
+<dt>
+<dfn title="blank_node" id="dfn-blank_node">
+<ins class="diff-chg">blank
+node
+</ins></dfn>
+<del class="diff-old">3.4.6
+Blank
+Node
+</del>
+</dt>
+<dd>
+A
+<a class="tref internalDFN" title="node" href="#dfn-node">
+node
+</a>
+in
+<del class="diff-old">the
+linked
+data
+</del>
+<ins class="diff-chg">a
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+</ins>
+graph
+</a>
+that
+does
+not
+contain
+a
+<del class="diff-old">de-reference-able
+</del>
+<ins class="diff-chg">de-referenceable
+</ins>
+identifier
+because
+it
+is
+either
+ephemeral
+in
+nature
+or
+does
+not
+contain
+information
+that
+needs
+to
+be
+linked
+to
+from
+outside
+of
+the
+<del class="diff-old">linked
+data
+graph
+.
+A
+</del>
+<ins class="diff-chg">JSON-LD
+graph.
+</ins></dd><dt><dfn title="blank_node_identifier" id="dfn-blank_node_identifier">
+blank
+node
+<del class="diff-old">is
+assigned
+an
+identifier
+starting
+with
+the
+prefix
+_:
+and
+an
+implementation
+dependent,
+auto-generated
+suffix
+that
+is
+unique
+to
+all
+information
+associated
+with
+the
+particular
+blank
+node.
+    ]
+interface  {
+};
+Attributes
+</del>
+identifier
+<del class="diff-old">of
+type
+DOMString
+</del>
+</dfn>
+<del class="diff-old">,
+readonly
+</del>
+</dt>
+<dd>
+<del class="diff-old">The
+temporary
+identifier
+of
+the
+</del>
+<ins class="diff-chg">A
+</ins>
+blank
+node
+<del class="diff-old">.
+The
+</del>
+identifier
+<del class="diff-old">must
+not
+be
+relied
+upon
+in
+any
+way
+between
+two
+separate
+processing
+runs
+of
+the
+same
+document
+or
+with
+</del>
+<ins class="diff-chg">is
+</ins>
+a
+<del class="diff-old">different
+document.
+Note
+Developers
+and
+authors
+must
+not
+assume
+</del>
+<ins class="diff-chg">string
+</ins>
+that
+<del class="diff-old">the
+value
+of
+</del>
+<ins class="diff-chg">can
+be
+used
+as
+an
+identifier
+for
+</ins>
+a
+<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node">
+blank
+node
+</a>
+<del class="diff-old">will
+remain
+the
+same
+between
+two
+processing
+runs.
+BlankNode
+values
+are
+only
+valid
+for
+the
+most
+recent
+processing
+run
+on
+</del>
+<ins class="diff-chg">within
+</ins>
+the
+<ins class="diff-new">scope
+of
+a
+JSON-LD
+</ins>
+document.
+<ins class="diff-chg">Blank
+node
+identifiers
+begin
+with
+</ins>
+<code>
+<del class="diff-old">BlankNode
+values
+will
+often
+be
+generated
+differently
+by
+different
+processors.
+Note
+Implementers
+must
+ensure
+that
+</del>
+<ins class="diff-chg">_:
+</ins></code>.</dd><dt>
+<del class="diff-old">BlankNode
+</del>
+<dfn title="json-ld_value" id="dfn-json-ld_value">
+<ins class="diff-chg">JSON-LD
+value
+</ins></dfn>
+</dt>
+<dd>
+<ins class="diff-new">A
+</ins><a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value"><ins class="diff-new">
+JSON-LD
+value
+</ins>
+</a>
+<del class="diff-old">values
+are
+unique
+within
+the
+current
+environment,
+two
+BlankNodes
+</del>
+<ins class="diff-chg">is
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+number
+</ins></a>,<a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins>
+</a>
+<del class="diff-old">are
+considered
+equal
+if,
+and
+only
+if,
+their
+values
+are
+strictly
+equal.
+</del>
+<ins class="diff-chg">or
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>,<ins class="diff-chg">
+a
+</ins><a class="tref internalDFN" title="typed_value" href="#dfn-typed_value"><ins class="diff-chg">
+typed
+value
+</ins></a>,<ins class="diff-chg">
+or
+a
+</ins><a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string"><ins class="diff-chg">
+language-tagged
+string
+</ins></a>.</dd><dt>
+<dfn title="typed_value" id="dfn-typed_value">
+<ins class="diff-chg">typed
+value
+</ins></dfn>
+<del class="diff-old">3.4.7
+Literal
+Literals
+represent
+values
+such
+as
+numbers,
+dates
+and
+strings
+in
+RDF
+data.
+</del>
+</dt>
+<dd>
+A
+<del class="diff-old">Literal
+</del>
+<a class="tref internalDFN" title="typed_value" href="#dfn-typed_value">
+<ins class="diff-chg">typed
+value
+</ins>
+</a>
+<del class="diff-old">is
+comprised
+</del>
+<ins class="diff-chg">consists
+</ins>
+of
+<del class="diff-old">three
+attributes:
+</del>
+a
+<del class="diff-old">lexical
+form
+of
+the
+value
+an
+optional
+language
+tag
+</del>
+<ins class="diff-chg">value,
+which
+is
+</ins>
+a
+<del class="diff-old">datatype
+specified
+by
+</del>
+<ins class="diff-chg">string,
+and
+a
+type,
+which
+is
+</ins>
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>.
+</dd>
+<dt>
+<del class="diff-old">Literals
+representing
+plain
+text
+in
+</del>
+<dfn title="language-tagged_string" id="dfn-language-tagged_string">
+<ins class="diff-chg">language-tagged
+string
+</ins></dfn></dt><dd><ins class="diff-chg">
+A
+</ins><a class="tref internalDFN" title="language-tagged_string" href="#dfn-language-tagged_string"><ins class="diff-chg">
+language-tagged
+string
+</ins></a><ins class="diff-chg">
+consists
+of
+</ins>
+a
+<del class="diff-old">natural
+language
+may
+have
+</del>
+<ins class="diff-chg">string
+and
+</ins>
+a
+<ins class="diff-chg">non-empty
+</ins>
+language
+tag
+<del class="diff-old">specified
+by
+a
+string
+token,
+</del>
+as
+<del class="diff-old">specified
+in
+</del>
+<ins class="diff-chg">defined
+by
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+<del class="diff-old">],
+normalized
+to
+lowercase
+(e.g.,
+'en'
+,
+'fr'
+,
+'en-gb'
+).
+They
+also
+have
+a
+datatype
+attribute
+such
+as
+xsd:string
+.
+If
+unspecified,
+the
+datatype
+defaults
+</del>
+<ins class="diff-chg">].
+The
+language
+tag
+must
+be
+well-formed
+according
+</ins>
+to
+<del class="diff-old">xsd:string
+.
+Literals
+representing
+values
+with
+a
+specific
+datatype,
+such
+as
+the
+integer
+72,
+may
+have
+a
+datatype
+attribute
+specified
+in
+the
+form
+of
+a
+IRI
+(e.g.,
+xsd:integer
+).
+See[
+RDF-CONCEPTS
+]
+definition
+for
+literal
+.
+      ]
+interface  {
+};
+Attributes
+datatype
+of
+type
+IRI
+</del>
+<ins class="diff-chg">section
+</ins><a href="http://tools.ietf.org/html/bcp47#section-2.2.9"><ins class="diff-chg">
+2.2.9
+</ins>
+</a>
+<del class="diff-old">,
+readonly,
+nullable
+An
+optional
+datatype
+identified
+by
+a
+IRI
+.
+language
+</del>
+of
+<del class="diff-old">type
+DOMString
+,
+readonly,
+nullable
+An
+optional
+language
+tag
+as
+defined
+in
+</del>
+[
+<cite>
+<a class="bibref" href="#bib-BCP47">
+BCP47
+</a>
+</cite>
+],
+<ins class="diff-new">and
+</ins><em class="rfc2119" title="must"><ins class="diff-new">
+must
+</ins></em><ins class="diff-new">
+be
+</ins>
+normalized
+to
+lowercase.
+</dd>
+<dt>
+<del class="diff-old">value
+of
+type
+DOMString
+</del>
+<dfn title="list" id="dfn-list">
+<ins class="diff-chg">list
+</ins></dfn>
+<del class="diff-old">,
+readonly
+</del>
+</dt>
+<dd>
+<del class="diff-old">The
+lexical
+form
+</del>
+<ins class="diff-chg">A
+</ins><a class="tref internalDFN" title="list" href="#dfn-list"><ins class="diff-chg">
+list
+</ins></a><ins class="diff-chg">
+is
+an
+ordered
+sequence
+</ins>
+of
+<del class="diff-old">the
+Literal's
+value.
+</del>
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<ins class="diff-chg">IRIs
+</ins></a>,<a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+nodes
+</ins></a>,<ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="json-ld_value" href="#dfn-json-ld_value"><ins class="diff-chg">
+JSON-LD
+values
+</ins></a>.
+</dd>
+</dl>
+</section>
+<section id="algorithms">
+<h2>
+<span class="secno">
+<del class="diff-old">4.
+</del>
+<ins class="diff-chg">5.
+</ins>
+</span>
+Algorithms
+</h2>
+<p>
+All
+algorithms
+described
+in
+this
+section
+are
+intended
+to
+operate
+on
+language-native
+data
+structures.
+That
+is,
+the
+serialization
+to
+a
+text-based
+JSON
+document
+isn't
+required
+as
+input
+or
+output
+to
+any
+of
+these
+algorithms
+and
+language-native
+data
+structures
+<em class="rfc2119" title="must">
+must
+</em>
+be
+used
+where
+applicable.
+</p>
+<section id="algorithm-terms">
+<h3>
+<span class="secno">
+<del class="diff-old">4.1
+</del>
+<ins class="diff-chg">5.1
+</ins>
+</span>
+Algorithm
+Terms
+</h3>
+<dl>
+<dt>
+<dfn title="active_graph" id="dfn-active_graph">
+<ins class="diff-new">active
+graph
+</ins></dfn></dt><dd><ins class="diff-new">
+The
+name
+of
+the
+currently
+active
+graph
+that
+the
+processor
+should
+use
+when
+processing.
+</ins></dd><dt>
+<dfn title="active_subject" id="dfn-active_subject">
+active
+subject
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">The
+</ins>
+currently
+active
+subject
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_property" id="dfn-active_property">
+active
+property
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">The
+</ins>
+currently
+active
+property
+that
+the
+processor
+should
+use
+when
+processing.
+The
+active
+property
+is
+represented
+in
+the
+original
+lexical
+form,
+which
+is
+used
+for
+finding
+<del class="diff-old">coercion
+</del>
+<ins class="diff-chg">type
+</ins>
+mappings
+in
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>.
+</dd>
+<dt>
+<dfn title="active_object" id="dfn-active_object">
+active
+object
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">The
+</ins>
+currently
+active
+object
+that
+the
+processor
+should
+use
+when
+processing.
+</dd>
+<dt>
+<dfn title="active_context" id="dfn-active_context">
+active
+context
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">A
+</ins>
+context
+that
+is
+used
+to
+resolve
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+s
+while
+the
+processing
+algorithm
+is
+running.
+The
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+is
+the
+context
+contained
+within
+the
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>.
+</dd>
+<dt>
+<del class="diff-old">compact
+IRI
+a
+compact
+IRI
+is
+has
+the
+form
+of
+prefix
+and
+suffix
+and
+is
+used
+as
+a
+way
+of
+expressing
+an
+IRI
+without
+needing
+to
+define
+separate
+term
+definitions
+for
+each
+IRI
+contained
+within
+a
+common
+vocabulary
+identified
+by
+prefix
+.
+</del>
+<dfn title="local_context" id="dfn-local_context">
+local
+context
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">A
+</ins>
+context
+that
+is
+specified
+within
+a
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>,
+specified
+via
+the
+<code>
[email protected]
+</code>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+</a>.
+</dd>
+<dt>
+<dfn title="processor_state" id="dfn-processor_state">
+processor
+state
+</dfn>
+</dt>
+<dd>
+<del class="diff-old">the
+</del>
+<ins class="diff-chg">The
+</ins>
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>,
+which
+includes
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>,
+<a class="tref internalDFN" title="active_subject" href="#dfn-active_subject">
+active
+subject
+</a>,
+and
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+active
+property
+</a>.
+The
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+is
+managed
+as
+a
+stack
+with
+elements
+from
+the
+previous
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+copied
+into
+a
+new
+<a class="tref internalDFN" title="processor_state" href="#dfn-processor_state">
+processor
+state
+</a>
+when
+entering
+a
+new
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+JSON
+object
+</a>.
+</dd>
+<dt>
+<dfn title="json-ld_input" id="dfn-json-ld_input">
+JSON-LD
+input
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+provided
+as
+input
+to
+the
+algorithm.
+</dd>
+<dt>
+<dfn title="json-ld_output" id="dfn-json-ld_output">
+JSON-LD
+output
+</dfn>
+</dt>
+<dd>
+The
+JSON-LD
+data
+structure
+that
+is
+produced
+as
+output
+by
+the
+algorithm.
+</dd>
+<dt>
+<dfn title="term" id="dfn-term">
+term
+</dfn>
+</dt>
+<dd>
+A
+<a class="tref internalDFN" title="term" href="#dfn-term">
+term
+</a>
+is
+a
+short
+word
+defined
+in
+a
+context
+that
+<em class="rfc2119" title="may">
+may
+</em>
+be
+expanded
+to
+an
+<a class="tref internalDFN" title="iri" href="#dfn-iri">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+</a>
+</dd>
+<dt>
+<del class="diff-old">prefix
+</del>
+<dfn title="compact_iri" id="dfn-compact_iri">
+<ins class="diff-chg">compact
+</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
+IRI
+</ins></abbr>
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">prefix
+is
+a
+term
+that
+expands
+to
+a
+vocabulary
+base
+</del>
+<ins class="diff-chg">compact
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+<del class="diff-old">.
+It
+</del>
+</abbr>
+is
+<del class="diff-old">typically
+used
+along
+with
+a
+</del>
+<ins class="diff-chg">has
+the
+form
+of
+</ins><dfn title="prefix" id="dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></dfn>:
+<em>
+suffix
+</em>
+<del class="diff-old">to
+form
+</del>
+<ins class="diff-chg">and
+is
+used
+as
+</ins>
+a
+<del class="diff-old">compact
+</del>
+<ins class="diff-chg">way
+of
+expressing
+an
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-chg">without
+needing
+</ins>
+to
+<del class="diff-old">create
+an
+</del>
+<ins class="diff-chg">define
+separate
+</ins><a class="tref internalDFN" title="term" href="#dfn-term"><ins class="diff-chg">
+term
+</ins></a><ins class="diff-chg">
+definitions
+for
+each
+</ins>
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<ins class="diff-new">contained
+</ins>
+within
+a
+<del class="diff-old">vocabulary.
+</del>
+<ins class="diff-chg">common
+vocabulary
+identified
+by
+</ins><a class="tref internalDFN" title="prefix" href="#dfn-prefix"><ins class="diff-chg">
+prefix
+</ins></a>.
+</dd>
+<dt>
+<del class="diff-old">language-tagged
+string
+</del>
+<dfn title="node_object" id="dfn-node_object">
+<ins class="diff-chg">node
+object
+</ins>
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">language-tagged
+string
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+<ins class="diff-chg">node
+object
+</ins>
+</a>
+<del class="diff-old">is
+</del>
+<ins class="diff-chg">represents
+zero
+or
+more
+properties
+of
+</ins>
+a
+<del class="diff-old">literal
+</del>
+<a class="tref internalDFN" title="node" href="#dfn-node">
+<ins class="diff-chg">node
+</ins>
+</a>
+<del class="diff-old">without
+a
+datatype,
+including
+</del>
+<ins class="diff-chg">in
+the
+</ins><a class="tref internalDFN" title="json-ld_graph" href="#dfn-json-ld_graph"><ins class="diff-chg">
+JSON-LD
+graph
+</ins></a><ins class="diff-chg">
+serialized
+by
+the
+JSON-LD
+document.
+A
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+is
+</ins>
+a
+<del class="diff-old">language.
+See
+languaged-tagged
+string
+</del>
+<a class="tref internalDFN" title="node_object" href="#dfn-node_object">
+<ins class="diff-chg">node
+object
+</ins>
+</a>
+<del class="diff-old">in
+[
+RDF-CONCEPTS
+</del>
+<ins class="diff-chg">if
+it
+exists
+outside
+of
+the
+JSON-LD
+</ins><a class="tref internalDFN" title="context" href="#dfn-context"><ins class="diff-chg">
+context
+</ins>
+</a>
+<del class="diff-old">].
+</del>
+<ins class="diff-chg">and:
+</ins><ul><li><ins class="diff-chg">
+it
+does
+not
+contain
+the
+</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><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+keywords,
+or
+</ins></li><li><ins class="diff-chg">
+it
+is
+not
+the
+top-level
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+in
+the
+JSON-LD
+document
+containing
+the
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+keyword.
+</ins></li></ul>
+</dd>
+<dt>
+<del class="diff-old">typed
+literal
+</del>
+<dfn title="list_object" id="dfn-list_object">
+<ins class="diff-chg">list
+object
+</ins>
+</dfn>
+</dt>
+<dd>
+A
+<del class="diff-old">typed
+literal
+</del>
+<a class="tref internalDFN" title="list_object" href="#dfn-list_object">
+<ins class="diff-chg">list
+object
+</ins>
+</a>
+is
+a
+<del class="diff-old">literal
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins>
+</a>
+<del class="diff-old">with
+an
+associated
+</del>
+<ins class="diff-chg">that
+has
+a
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+member.
+</ins></dd><dt>
+<del class="diff-old">IRI
+</del>
+<dfn title="scalar" id="dfn-scalar">
+<ins class="diff-chg">scalar
+</ins></dfn>
+<del class="diff-old">which
+indicates
+the
+literal's
+datatype.
+See
+</del>
+</dt>
+<dd>
+<ins class="diff-chg">A
+scalar
+is
+either
+a
+JSON
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+string
+</ins></a>,<a class="tref internalDFN" title="number" href="#dfn-number"><ins class="diff-chg">
+number
+</ins></a>,<a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-chg">
+true
+</ins></a>,<ins class="diff-chg">
+or
+</ins><a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-chg">
+false
+</ins></a>.</dd><dt>
+<del class="diff-old">literal
+</del>
+<dfn title="quad" id="dfn-quad">
+<ins class="diff-chg">quad
+</ins></dfn>
+<del class="diff-old">in
+</del>
+</dt>
+<dd>
+<ins class="diff-chg">An
+</ins><em><ins class="diff-chg">
+RDF
+triple
+</ins></em><ins class="diff-chg">
+as
+specified
+by
+</ins>
+[
+<cite>
+<a class="bibref" href="#bib-RDF-CONCEPTS">
+RDF-CONCEPTS
+</a>
+</cite>
+<del class="diff-old">].
+</del>
+<ins class="diff-chg">]
+augmented
+with
+a
+a
+fourth
+component,
+a
+</ins><a class="tref internalDFN" title="graph_name" href="#dfn-graph_name"><ins class="diff-chg">
+graph
+name
+</ins></a>.
+</dd>
+</dl>
+</section>
+<section id="expansion-algorithm">
+<h3>
+<span class="secno">
+<del class="diff-old">4.2
+</del>
+<ins class="diff-chg">5.2
+</ins>
+</span>
+<del class="diff-old">Context
+Processing
+</del>
+<ins class="diff-chg">Expansion
+Algorithm
+</ins>
+</h3>
+<p>
+<del class="diff-old">Processing
+of
+JSON-LD
+data
+structure
+is
+managed
+recursively.
+During
+processing,
+each
+rule
+is
+applied
+using
+information
+provided
+by
+the
+</del>
+<ins class="diff-chg">The
+algorithm
+takes
+three
+input
+variables:
+an
+</ins>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+<del class="diff-old">.
+Processing
+begins
+by
+pushing
+a
+new
+processor
+state
+onto
+</del>
+</a>,
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>,<ins class="diff-chg">
+and
+an
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+be
+expanded.
+To
+begin,
+</ins>
+the
+<del class="diff-old">processor
+state
+stack.
+If
+a
+local
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+</ins>
+context
+</a>
+is
+<del class="diff-old">encountered,
+information
+from
+</del>
+<ins class="diff-chg">set
+to
+</ins>
+the
+<del class="diff-old">local
+context
+</del>
+<ins class="diff-chg">result
+of
+performing,
+</ins><a href="#context-processing"><ins class="diff-chg">
+Context
+Processing
+</ins>
+</a>
+<del class="diff-old">is
+merged
+into
+</del>
+<ins class="diff-chg">on
+</ins>
+the
+<del class="diff-old">active
+context
+.
+The
+active
+context
+</del>
+<ins class="diff-chg">passed
+</ins><code class="idlMemberName"><a href="#widl-JsonLdOptions-expandContext"><ins class="diff-chg">
+expandContext
+</ins></a></code>,<ins class="diff-chg">
+or
+empty
+if
+</ins><code class="idlMemberName"><a href="#widl-JsonLdOptions-expandContext"><ins class="diff-chg">
+expandContext
+</ins>
+</a>
+</code>
+is
+<del class="diff-old">used
+for
+expanding
+properties
+and
+values
+of
+a
+JSON
+object
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,<a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins>
+</a>
+<del class="diff-old">(or
+elements
+of
+an
+array)
+using
+a
+term
+mapping
+.
+It
+</del>
+is
+<del class="diff-old">also
+used
+to
+maintain
+coercion
+mapping
+s
+from
+terms
+to
+datatypes,
+language
+mapping
+s
+from
+terms
+</del>
+<ins class="diff-chg">set
+</ins>
+to
+<del class="diff-old">language
+codes,
+and
+list
+mapping
+s
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins></a>,
+and
+<del class="diff-old">set
+mapping
+s
+for
+terms.
+Processors
+must
+</del>
+<em>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">use
+</del>
+<ins class="diff-chg">is
+set
+to
+</ins>
+the
+<del class="diff-old">lexical
+form
+of
+</del>
+<a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">
+<ins class="diff-chg">JSON-LD
+input
+</ins></a>.<ins class="diff-chg">
+This
+algorithm
+expects
+</ins>
+the
+<del class="diff-old">property
+when
+creating
+</del>
+<a class="tref internalDFN" title="json-ld_input" href="#dfn-json-ld_input">
+<ins class="diff-chg">JSON-LD
+input
+</ins></a><ins class="diff-chg">
+to
+be
+</ins>
+a
+<del class="diff-old">mapping,
+</del>
+<ins class="diff-chg">well-formed
+JSON-LD
+document
+</ins>
+as
+<del class="diff-old">lookup
+is
+performed
+on
+lexical
+forms,
+not
+expanded
+IRI
+representations.
+A
+local
+context
+</del>
+<ins class="diff-chg">defined
+in
+[
+</ins><cite><a class="bibref" href="#bib-JSON-LD"><ins class="diff-chg">
+JSON-LD
+</ins>
+</a>
+</cite>
+<ins class="diff-new">].
+</ins></p><ol class="algorithm"><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+element
+</ins></em>
+is
+<del class="diff-old">identified
+within
+</del>
+a
+<del class="diff-old">JSON
+object
+</del>
+<a class="tref internalDFN" title="scalar" href="#dfn-scalar">
+<ins class="diff-chg">scalar
+</ins></a>,<ins class="diff-chg">
+expand
+it
+according
+to
+the
+</ins><a href="#value-expansion"><ins class="diff-chg">
+Value
+Expansion
+</ins>
+</a>
+<del class="diff-old">having
+a
[email protected]
+</del>
+<ins class="diff-chg">algorithm,
+passing
+copies
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins></a><ins class="diff-chg">
+and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+</ins>
+property
+<del class="diff-old">with
+a
+string
+</del>
+</a>
+<ins class="diff-chg">and
+return.
+</ins></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins>
+</a>,
+<ins class="diff-new">return.
+</ins></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+element
+</ins></em><ins class="diff-new">
+is
+an
+</ins>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">or
+a
+JSON
+object
+value.
+When
+processing
+a
+local
+context
+</del>
+</a>,
+<del class="diff-old">special
+processing
+rules
+apply:
+</del>
+<ol class="algorithm">
+<li>
+<del class="diff-old">Create
+a
+new,
+</del>
+<ins class="diff-chg">initialize
+an
+</ins>
+empty
+<del class="diff-old">local
+context
+.
+</del>
+<ins class="diff-chg">array
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.
+</li>
+<li>
+<del class="diff-old">Let
+</del>
+<ins class="diff-chg">Expand
+each
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">be
+the
+value
+</del>
+<ins class="diff-chg">by
+recursively
+using
+this
+algorithm,
+passing
+copies
+</ins>
+of
+<del class="diff-old">@context
+If
+context
+equals
+null
+,
+clear
+</del>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<ins class="diff-new">and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins>
+</a>.
+</li>
+<li>
+If
+<ins class="diff-new">the
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property's
+</ins></a><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-new">
+container
+mapping
+</ins></a><ins class="diff-new">
+is
+set
+to
+</ins><code><ins class="diff-new">
[email protected]
+</ins></code><ins class="diff-new">
+and
+the
+expanded
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+is
+an
+<a class="tref internalDFN" title="array" href="#dfn-array">
+array
+<del class="diff-old">,
+process
+each
+element
+as
+</del>
+</a>
+<ins class="diff-chg">or
+a
+</ins><a class="tref internalDFN" title="list_object" href="#dfn-list_object"><ins class="diff-chg">
+list
+object
+</ins></a><ins class="diff-chg">
+trigger
+a
+</ins><code class="error"><ins class="diff-chg">
+LIST_OF_LISTS_DETECTED
+</ins></code><ins class="diff-chg">
+error.
+</ins></li><li><ins class="diff-chg">
+If
+the
+expanded
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">in
+order
+by
+starting
+at
+Step
+2.1
+.
+</del>
+<ins class="diff-chg">is
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+drop
+it.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise,
+if
+the
+expanded
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+is
+<del class="diff-old">a
+string
+</del>
+<ins class="diff-chg">an
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins>
+</a>,
+<del class="diff-old">it
+must
+</del>
+<ins class="diff-chg">merge
+its
+entries
+with
+</ins><em><ins class="diff-chg">
+result's
+</ins>
+</em>
+<del class="diff-old">have
+a
+lexical
+form
+of
+IRI
+.
+</del>
+<ins class="diff-chg">entries.
+</ins></li>
+<li>
+<del class="diff-old">Expand
+</del>
+<ins class="diff-chg">Otherwise,
+append
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">item
+</ins>
+</em>
+<del class="diff-old">according
+</del>
+to
+<del class="diff-old">IRI
+Expansion
+.
+Dereference
+</del>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+the
+resulting
+document
+is
+a
+JSON
+document,
+extract
+the
+top-level
[email protected]
+element
+using
+the
+JSON
+Pointer
+&quot;/@context&quot;
+as
+described
+in
+[
+JSON-POINTER
+].
+Set
+</del>
+<ins class="diff-chg">Finally,
+set
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+to
+<del class="diff-old">the
+extracted
+content
+</del>
+<em>
+<ins class="diff-chg">result
+</ins></em>
+and
+<del class="diff-old">process
+it
+by
+starting
+at
+Step
+2.1
+.
+</del>
+<ins class="diff-chg">return.
+</ins>
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Otherwise,
+</ins>
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">is
+a
+JSON
+object
+,
+perform
+the
+following
+steps:
+</del>
+<ins class="diff-chg">must
+be
+an
+object.
+</ins>
+<ol class="algorithm">
+<li>
+If
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+has
+a
+<code>
+<del class="diff-old">@language
+</del>
+<ins class="diff-chg">@context
+</ins>
+</code>
+<del class="diff-old">property,
+it
+must
+have
+a
+value
+of
+a
+simple
+string
+</del>
+<ins class="diff-chg">member,
+update
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins>
+</a>
+<del class="diff-old">with
+</del>
+<ins class="diff-chg">according
+to
+</ins>
+the
+<del class="diff-old">lexical
+form
+described
+</del>
+<ins class="diff-chg">steps
+outlined
+</ins>
+in
+<del class="diff-old">[
+BCP47
+</del>
+<a href="#context-processing">
+<ins class="diff-chg">Context
+Processing
+</ins>
+</a>
+<del class="diff-old">],
+or
+null
+.
+Add
+the
+language
+to
+</del>
+<ins class="diff-chg">and
+remove
+</ins>
+the
+<del class="diff-old">local
+context
+.
+</del>
+<code>
+<ins class="diff-chg">@context
+</ins></code><ins class="diff-chg">
+member.
+</ins>
+</li>
+<li>
+<del class="diff-old">If
+</del>
+<ins class="diff-chg">Initialize
+an
+empty
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>
+<em>
+<del class="diff-old">value
+has
+a
[email protected]
+key,
+it
+must
+</del>
+<ins class="diff-chg">result
+</ins>
+</em>
+<del class="diff-old">have
+a
+value
+of
+a
+simple
+string
+with
+the
+lexical
+form
+of
+an
+absolute
+IRI
+,
+or
+null
+.
+Add
+the
+vocabulary
+mapping
+to
+the
+local
+context
+.
+</del>
+<ins class="diff-chg">and
+</ins>
+</li>
+<del class="diff-old">Otherwise,
+for
+</del>
+<li>
+<ins class="diff-chg">then
+process
+</ins>
+each
+<em>
+property
+</em>
+<ins class="diff-new">and
+</ins><em><ins class="diff-new">
+value
+</ins></em>
+in
+<em>
+<del class="diff-old">context
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>
+<del class="diff-old">perform
+the
+following
+steps:
+</del>
+<ins class="diff-chg">ordered
+by
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins>
+<ol class="algorithm">
+<li>
+If
+the
+<del class="diff-old">property's
+value
+is
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins></a><ins class="diff-chg">
+contains
+</ins>
+a
+<del class="diff-old">simple
+string
+</del>
+<a class="tref internalDFN" title="property_generator" href="#dfn-property_generator">
+<ins class="diff-chg">property
+generator
+</ins></a><ins class="diff-chg">
+for
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+set
+</ins><em><ins class="diff-chg">
+expanded
+property
+</ins></em><ins class="diff-chg">
+to
+its
+</ins><a class="tref internalDFN" title="iri" href="#dfn-iri"><ins class="diff-chg">
+IRIs
+</ins>
+</a>,
+<del class="diff-old">determine
+</del>
+<ins class="diff-chg">otherwise
+set
+it
+to
+</ins>
+the
+<del class="diff-old">IRI
+mapping
+value
+by
+performing
+</del>
+<ins class="diff-chg">result
+of
+expanding
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+according
+to
+the
+steps
+outlined
+in
+</ins>
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+</a>
+<del class="diff-old">on
+</del>
+<ins class="diff-chg">(passing
+</ins><code><ins class="diff-chg">
+true
+</ins></code><ins class="diff-chg">
+for
+</ins>
+the
+<del class="diff-old">associated
+value.
+</del>
+<em>
+<ins class="diff-chg">vocabRelative
+</ins></em><ins class="diff-chg">
+flag).
+</ins></li><li>
+If
+<del class="diff-old">the
+result
+of
+the
+IRI
+mapping
+is
+an
+absolute
+IRI
+,
+merge
+the
+property
+into
+the
+local
+context
+term
+mapping
+,
+unless
+the
+</del>
+<em>
+<ins class="diff-chg">expanded
+</ins>
+property
+</em>
+is
+<del class="diff-old">a
+JSON-LD
+keyword
+</del>
+<a class="tref internalDFN" title="null" href="#dfn-null">
+<ins class="diff-chg">null
+</ins>
+</a>,
+<del class="diff-old">in
+which
+case
+return
+an
+error.
+Otherwise,
+if
+</del>
+<ins class="diff-chg">skip
+</ins>
+the
+<del class="diff-old">property's
+</del>
+<ins class="diff-chg">current
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+-
+</ins><em>
+value
+<del class="diff-old">is
+null
+remove
+mapping,
+coercion,
+container
+</del>
+</em>
+<ins class="diff-chg">pair
+</ins>
+and
+<del class="diff-old">language
+information
+associated
+with
+property
+from
+the
+local
+context
+.
+Otherwise,
+</del>
+<ins class="diff-chg">continue
+to
+</ins>
+the
+<ins class="diff-new">next
+</ins>
+<em>
+property
+</em>
+<del class="diff-old">'s
+</del>
+<ins class="diff-chg">-
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">must
+be
+a
+JSON
+object
+.
+</del>
+<ins class="diff-chg">pair
+in
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<ins class="diff-new">expanded
+</ins>
+property
+</em>
+is
+a
+<del class="diff-old">JSON-LD
+</del>
+<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
+keyword
+<del class="diff-old">and
+the
+value
+has
+</del>
+</a>,
+<ins class="diff-chg">process
+it
+as
+follows:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+expanded
+property
+</ins></em><ins class="diff-chg">
+equals
+</ins>
+<code>
[email protected]
+</code>,
+<ins class="diff-new">set
+the
+</ins>
+<code>
+<del class="diff-old">@language
+or
[email protected]
+</del>
+<ins class="diff-chg">@id
+</ins>
+</code>
+<del class="diff-old">properties,
+return
+an
+error.
+Issue
+</del>
+<ins class="diff-chg">member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+to
+the
+result
+of
+expanding
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+according
+the
+</ins><a href="#iri-expansion">
+<del class="diff-old">Undecided
+if
[email protected]
+or
+</del>
+<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>
+<code>
+<del class="diff-old">@graph
+</del>
+<ins class="diff-chg">true
+</ins>
+</code>
+<del class="diff-old">can
+take
+</del>
+<ins class="diff-chg">for
+the
+</ins><em><ins class="diff-chg">
+documentRelative
+</ins></em><ins class="diff-chg">
+flag).
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+is
+not
+</ins>
+a
+<del class="diff-old">@container
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a><ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_ID_VALUE
+</ins>
+</code>
+<del class="diff-old">with
[email protected]
+.
+</del>
+<ins class="diff-chg">error.
+</ins>
+</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<ins class="diff-new">expanded
+</ins>
+property
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">form
+of
+term
+,
+its
+value
+must
+have
+an
+</del>
+<code>
+<del class="diff-old">@id
+</del>
+<ins class="diff-chg">@type
+</ins>
+</code>
+<del class="diff-old">property
+with
+a
+string
+value
+which
+must
+</del>
+<ins class="diff-chg">member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins>
+</em>
+<del class="diff-old">have
+</del>
+<ins class="diff-chg">to
+</ins>
+the
+<del class="diff-old">form
+</del>
+<ins class="diff-chg">result
+</ins>
+of
+<del class="diff-old">a
+term
+,
+compact
+IRI
+,
+or
+absolute
+IRI
+.
+Determine
+</del>
+<ins class="diff-chg">expanding
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+according
+</ins>
+the
+<del class="diff-old">IRI
+mapping
+by
+performing
+</del>
+<a href="#iri-expansion">
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+Expansion
+<ins class="diff-new">algorithm
+</ins>
+</a>
+<del class="diff-old">on
+the
+associated
+value.
+If
+</del>
+<ins class="diff-chg">(passing
+</ins><code><ins class="diff-chg">
+true
+</ins></code><ins class="diff-chg">
+for
+both
+</ins>
+the
+<del class="diff-old">result
+of
+</del>
+<em>
+<ins class="diff-chg">documentRelative
+</ins></em><ins class="diff-chg">
+and
+</ins>
+the
+<del class="diff-old">IRI
+mapping
+</del>
+<em>
+<ins class="diff-chg">vocabRelative
+</ins></em><ins class="diff-chg">
+flag).
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em>
+is
+<ins class="diff-new">neither
+a
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-new">
+string
+</ins></a><ins class="diff-new">
+nor
+</ins>
+an
+<del class="diff-old">absolute
+IRI
+,
+merge
+the
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a><ins class="diff-chg">
+of
+</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
+strings
+</ins></a><ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_TYPE_VALUE
+</ins></code><ins class="diff-chg">
+error.
+Empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+arrays
+</ins></a><ins class="diff-chg">
+are
+ignored.
+</ins></li><li><ins class="diff-chg">
+If
+</ins>
+<em>
+<ins class="diff-new">expanded
+</ins>
+property
+</em>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">local
+context
+</del>
+<code>
+<ins class="diff-chg">@value
+</ins></code><ins class="diff-chg">
+member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+value
+</ins></em>.<ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+is
+neither
+a
+</ins><a class="tref internalDFN" title="scalar" href="#dfn-scalar"><ins class="diff-chg">
+scalar
+</ins>
+</a>
+<del class="diff-old">term
+mapping
+.
+</del>
+<ins class="diff-chg">nor
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a><ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_VALUE_OBJECT_VALUE
+</ins></code><ins class="diff-chg">
+error.
+</ins>
+</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<ins class="diff-new">expanded
+</ins>
+property
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">form
+of
+</del>
+<code>
+<ins class="diff-chg">@language
+</ins></code><ins class="diff-chg">
+member
+</ins>
+of
+<del class="diff-old">a
+compact
+IRI
+or
+absolute
+IRI
+,
+</del>
+<em>
+<ins class="diff-chg">result
+</ins></em><ins class="diff-chg">
+to
+</ins>
+the
+<ins class="diff-new">lowercased
+</ins><em><ins class="diff-new">
+value
+</ins></em>.<ins class="diff-new">
+If
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">may
+have
+</del>
+<ins class="diff-chg">is
+not
+</ins>
+a
+<del class="diff-old">@id
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins></a>,<ins class="diff-chg">
+trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_LANGUAGE_VALUE
+</ins>
+</code>
+<ins class="diff-new">error.
+</ins></li><li><ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+expanded
+</ins>
+property
+<del class="diff-old">with
+a
+string
+value
+which
+must
+</del>
+</em>
+<del class="diff-old">have
+</del>
+<ins class="diff-chg">equals
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code>,<ins class="diff-chg">
+set
+</ins>
+the
+<del class="diff-old">form
+</del>
+<code>
+<ins class="diff-chg">@annotation
+</ins></code><ins class="diff-chg">
+member
+</ins>
+of
+<em>
+<ins class="diff-new">result
+</ins></em><ins class="diff-new">
+to
+</ins><em><ins class="diff-new">
+value
+</ins></em>.<ins class="diff-new">
+If
+</ins><em><ins class="diff-new">
+value
+</ins></em><ins class="diff-new">
+is
+not
+</ins>
+a
+<del class="diff-old">term
+,
+compact
+IRI
+,
+or
+absolute
+IRI
+.
+Determine
+the
+IRI
+mapping
+by
+performing
+IRI
+Expansion
+</del>
+<a class="tref internalDFN" title="string" href="#dfn-string">
+<ins class="diff-chg">string
+</ins>
+</a>
+<del class="diff-old">on
+the
+associated
+value.
+</del>
+<ins class="diff-chg">trigger
+an
+</ins><code class="error"><ins class="diff-chg">
+INVALID_ANNOTATION_VALUE
+</ins></code><ins class="diff-chg">
+error.
+</ins></li><li>
+If
+<em>
+<ins class="diff-new">expanded
+property
+</ins></em><ins class="diff-new">
+equals
+</ins><code><ins class="diff-new">
[email protected]
+</ins></code><ins class="diff-new">
+or
+</ins><code><ins class="diff-new">
[email protected]
+</ins></code>,<ins class="diff-new">
+set
+</ins>
+the
+<del class="diff-old">result
+</del>
+<em>
+<ins class="diff-chg">expanded
+property
+</ins></em><ins class="diff-chg">
+member
+</ins>
+of
+<em>
+<ins class="diff-new">result
+</ins></em><ins class="diff-new">
+to
+</ins>
+the
+<del class="diff-old">IRI
+mapping
+is
+an
+absolute
+IRI
+,
+merge
+the
+</del>
+<ins class="diff-chg">result
+of
+expanding
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+</ins>
+the
+<del class="diff-old">local
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+</ins>
+context
+</a>
+<del class="diff-old">term
+mapping
+</del>
+<ins class="diff-chg">and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins>
+</a>.
+</li>
+<li>
+If
+<del class="diff-old">the
+</del>
+<em>
+<del class="diff-old">value
+</del>
+<ins class="diff-chg">expanded
+property
+</ins>
+</em>
+<del class="diff-old">has
+a
+</del>
+<ins class="diff-chg">equals
+</ins>
+<code>
+<del class="diff-old">@type
+</del>
+<ins class="diff-chg">@graph
+</ins></code>,<ins class="diff-chg">
+set
+the
+</ins><code><ins class="diff-chg">
[email protected]
+</ins>
+</code>
+<del class="diff-old">property,
+its
+value
+must
+</del>
+<ins class="diff-chg">member
+of
+</ins><em><ins class="diff-chg">
+result
+</ins>
+</em>
+<del class="diff-old">have
+</del>
+<ins class="diff-chg">to
+</ins>
+the
+<del class="diff-old">form
+</del>
+<ins class="diff-chg">result
+of
+expanding
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+</ins>
+of
+<del class="diff-old">a
+term
+,
+compact
+IRI
+,
+absolute
+IRI
+,
+or
+</del>
+the
+<del class="diff-old">keyword
+</del>
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+<ins class="diff-chg">active
+context
+</ins>
+</a>
+<ins class="diff-new">and
+</ins>
+<code>
+<del class="diff-old">@id
+.
+Determine
+the
+IRI
+by
+performing
+IRI
+Expansion
+on
+</del>
+<ins class="diff-chg">@graph
+</ins></code><ins class="diff-chg">
+as
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-chg">
+active
+property
+</ins></a>.</li><li><ins class="diff-chg">
+Continue
+with
+</ins>
+the
+<del class="diff-old">associated
+value.
+</del>
+<ins class="diff-chg">next
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair
+from
+</ins><em><ins class="diff-chg">
+element
+</ins></em>.</li></ol></li><li>
+If
+<del class="diff-old">the
+result
+of
+the
+IRI
+mapping
+</del>
+<em>
+<ins class="diff-chg">expanded
+property
+</ins></em>
+is
+<ins class="diff-new">not
+</ins>
+an
+<a class="tref internalDFN" title="absolute_iri" href="#dfn-absolute_iri">
+absolute
+<abbr title="Internationalized Resource Identifier">
+IRI
+</abbr>
+<del class="diff-old">or
[email protected]
+,
+merge
+into
+the
+local
+context
+coercion
+mapping
+using
+the
+lexical
+value
+of
+</del>
+</a>,i.e.,
+<ins class="diff-chg">it
+doesn't
+contain
+a
+colon,
+continue
+with
+</ins>
+the
+<ins class="diff-new">next
+member
+from
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">element
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+the
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins>
+<em>
+<del class="diff-old">value
+has
+a
[email protected]
+property,
+its
+value
+must
+</del>
+<ins class="diff-chg">property's
+</ins>
+</em>
+<del class="diff-old">be
[email protected]
+or
[email protected]
+.
+Merge
+the
+list
+</del>
+<a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping">
+<ins class="diff-chg">container
+</ins>
+mapping
+</a>
+<del class="diff-old">or
+</del>
+<ins class="diff-chg">is
+</ins>
+set
+<del class="diff-old">mapping
+into
+the
+local
+context
+</del>
+<ins class="diff-chg">to
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ol class="algorithm"><li><ins class="diff-chg">
+Initialize
+a
+new
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins>
+</a>
+<del class="diff-old">using
+the
+lexical
+value
+of
+the
+</del>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">language
+map
+values
+</ins>
+</em>.
+</li>
+<li>
+<del class="diff-old">If
+the
+</del>
+<ins class="diff-chg">Process
+each
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+pair
+of
+</ins>
+<em>
+value
+</em>
+<del class="diff-old">has
+</del>
+<ins class="diff-chg">ordered
+by
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+is
+not
+an
+array,
+transform
+it
+to
+one.
+</ins></li><li><ins class="diff-chg">
+For
+each
+item
+of
+</ins><em><ins class="diff-chg">
+val
+</ins></em>,<ins class="diff-chg">
+construct
+</ins>
+a
+<ins class="diff-new">new
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+consisting
+of
+two
+members:
+</ins>
+<code>
+<del class="diff-old">@language
+property
+but
+no
[email protected]
+</del>
+<ins class="diff-chg">@value
+</ins>
+</code>
+<del class="diff-old">property,
+the
+value
+of
+</del>
+<ins class="diff-chg">set
+to
+</ins>
+the
+<ins class="diff-new">currently
+processed
+item
+and
+</ins>
+<code>
[email protected]
+</code>
+<del class="diff-old">property
+must
+</del>
+<ins class="diff-chg">set
+to
+the
+lowercased
+</ins><em><ins class="diff-chg">
+key
+</ins></em>.<ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+val
+</ins>
+</em>
+<del class="diff-old">be
+</del>
+<ins class="diff-chg">is
+not
+</ins>
+a
+<a class="tref internalDFN" title="string" href="#dfn-string">
+string
+<del class="diff-old">or
+null
+.
+Merge
+</del>
+</a>,
+<ins class="diff-chg">trigger
+a
+</ins><code class="error"><ins class="diff-chg">
+LANGUAGE_MAP_INVALID_VALUE
+</ins></code><ins class="diff-chg">
+error.
+Otherwise
+append
+</ins>
+the
+<ins class="diff-chg">object
+to
+</ins><em>
+language
+<del class="diff-old">mapping
+into
+the
+local
+context
+using
+the
+lexical
+</del>
+<ins class="diff-chg">map
+values
+</ins></em>.</li></ol></li><li><ins class="diff-chg">
+Set
+</ins><em>
+value
+<del class="diff-old">of
+the
+</del>
+</em>
+<ins class="diff-chg">to
+</ins>
+<em>
+<del class="diff-old">property
+</del>
+<ins class="diff-chg">language
+map
+values
+</ins>
+</em>.
+</li>
+</ol>
+</li>
+<li>
+<del class="diff-old">Merge
+the
+local
+context
+</del>
+<ins class="diff-chg">Otherwise,
+if
+</ins><em><ins class="diff-chg">
+property's
+</ins></em><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+mapping
+</ins>
+</a>
+<del class="diff-old">into
+</del>
+<ins class="diff-chg">is
+set
+to
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ol class="algorithm"><li><ins class="diff-chg">
+Initialize
+a
+new
+empty
+</ins><a class="tref internalDFN" title="array" href="#dfn-array"><ins class="diff-chg">
+array
+</ins></a><em><ins class="diff-chg">
+annotation
+map
+values
+</ins></em>.</li><li><ins class="diff-chg">
+Process
+each
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+pair
+of
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+ordered
+by
+</ins><em><ins class="diff-chg">
+key
+</ins></em><ins class="diff-chg">
+as
+follows:
+</ins><ol class="algorithm"><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+is
+not
+an
+array,
+transform
+it
+to
+one.
+</ins></li><li><ins class="diff-chg">
+Expand
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+</ins>
+the
+<a class="tref internalDFN" title="active_context" href="#dfn-active_context">
+active
+context
+</a>
+<ins class="diff-new">and
+</ins><a class="tref internalDFN" title="active_property" href="#dfn-active_property"><ins class="diff-new">
+active
+property
+</ins>
+</a>.
+</li>
+<li>
+<del class="diff-old">Repeat
+Step
+2.4.2
+until
+no
+entries
+are
+added
+</del>
+<ins class="diff-chg">Add
+to
+each
+item
+of
+</ins><em><ins class="diff-chg">
+val
+</ins></em><ins class="diff-chg">
+a
+member
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+set
+</ins>
+to
+<em>
+<ins class="diff-new">key
+</ins></em><ins class="diff-new">
+if
+no
+such
+member
+exists
+yet
+and
+append
+</ins>
+the
+<del class="diff-old">local
+context
+.
+</del>
+<ins class="diff-chg">resulting
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+annotation
+map
+values
+</ins></em>.
+</li>
+</ol>
+</li>
+<li>
+<ins class="diff-chg">Set
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+annotation
+map
+values
+</ins></em>.
+</li>
+</ol>
+</li>
+<del class="diff-old">Note
+It
+can
+be
+difficult
+to
+distinguish
+between
+a
+compact
+IRI
+</del>
+<li>
+<ins class="diff-chg">Otherwise,
+expand
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+by
+recursively
+using
+this
+algorithm,
+passing
+copies
+of
+the
+</ins><a class="tref internalDFN" title="active_context" href="#dfn-active_context"><ins class="diff-chg">
+active
+context
+</ins>
+</a>
+and
+<del class="diff-old">an
+absolute
+IRI
+,
+</del>
+<em>
+<ins class="diff-chg">property
+</ins></em>
+as
+<del class="diff-old">a
+compact
+IRI
+may
+seem
+to
+be
+a
+valid
+IRI
+</del>
+<a class="tref internalDFN" title="active_property" href="#dfn-active_property">
+<ins class="diff-chg">active
+property
+</ins></a>.</li><li><ins class="diff-chg">
+If
+the
+expanded
+</ins>
+<em>
+<del class="diff-old">scheme
+</del>
+<ins class="diff-chg">value
+</ins></em><ins class="diff-chg">
+equals
+</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
+null
+</ins></a>,<ins class="diff-chg">
+continue
+with
+the
+next
+</ins><em><ins class="diff-chg">
+property
+</ins></em><ins class="diff-chg">
+-
+</ins><em><ins class="diff-chg">
+value
+</ins></em><ins class="diff-chg">
+pair
+from
+</ins><em><ins class="diff-chg">
+element
+</ins>
+</em>.
+<del class="diff-old">When
+performing
+repeated
+IRI
+expansion,
+a
+term
+used
+as
+a
+prefix
+may
+not
+have
+a
+valid
+</del>
+</li>
+<li>
+<ins class="diff-chg">If
+</ins><em><ins class="diff-chg">
+property's
+</ins></em><a class="tref internalDFN" title="container_mapping" href="#dfn-container_mapping"><ins class="diff-chg">
+container
+</ins>
+mapping
+<del class="diff-old">due
+to
+dependencies
+in
+resolving
+term
+definitions.
+By
+continuing
+Step
+2.3.2
+</del>
+</a>
+<del class="diff-old">until
+no
+changes
+are
+made,
+mappings
+to
+IRIs
+created
+using
+an
+undefined
+term
+prefix
+will
+eventually
+expand
+</del>
+<ins class="diff-chg">is
+set
+</ins>
+to
+<del class="diff-old">an
+absolute
+IRI
+s.
+4.3
+IRI
+Expansion
+Keys
+</del>
+<code>
+<ins class="diff-chg">@list
+</ins></code>
+and
+<del class="diff-old">some
+values
+are
+evaluated
+to
+produce
+an
+IRI
+.
+This
+section
+defines
+an
+algorithm
+for
+transforming
+a
+</del>
+<em>
+value
+<del class="diff-old">representing
+an
+IRI
+into
+</del>
+</em>
+<ins class="diff-chg">is
+either
+not
+</ins>
+an
+<del class="diff-old">actual
+IRI
+.
+IRIs
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins>
+</a>
+<del class="diff-old">may
+be
+represented
+as
+an
+absolute
+IRI
+,
+a
+term
+,
+a
+compact
+IRI
+,
+</del>
+or
+<del class="diff-old">as
+</del>
+a
+<del class="diff-old">value
+relative
+to
[email protected]
+.
+An
+absolute
+IRI
+is
+defined
+in
+[
+RFC3987
+</del>
+<a class="tref internalDFN" title="json_object" href="#dfn-json_object">
+<ins class="diff-chg">JSON
+object
+</ins>
+</a>
+<del class="diff-old">]
+containing
+a
+</del>
+<ins class="diff-chg">without
+an
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+member,
+replace
+</ins>
+<em>
+<del class="diff-old">scheme
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">along
+</del>
+with
+<ins class="diff-new">a
+</ins><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-new">
+JSON
+object
+</ins></a><ins class="diff-new">
+with
+an
+</ins><code><ins class="diff-new">
[email protected]
+</ins></code><ins class="diff-new">
+member
+whose
+value
+is
+set
+to
+</ins>
+<em>
+<del class="diff-old">path
+and
+optional
+query
+</del>
+<ins class="diff-chg">value
+</ins>
+</em>
+<del class="diff-old">and
+fragment
+segments.
+A
+relative
+IRI
+is
+</del>
+<ins class="diff-chg">(wrapped
+in
+</ins>
+an
+<del class="diff-old">IRI
+that
+is
+relative
+some
+other
+absolute
+IRI
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins>
+</a>
+<del class="diff-old">;
+in
+the
+case
+of
+JSON-LD
+this
+</del>
+<ins class="diff-chg">if
+it
+is
+not
+already
+one).
+</ins></li><li><ins class="diff-chg">
+If
+</ins><em><ins class="diff-chg">
+expanded
+property
+</ins></em>
+is
+<del class="diff-old">the
+base
+location
+of
+the
+document.
+The
+algorithm
+for
+generating
+</del>
+an
+<del class="diff-old">IRI
+is:
+</del>
+<a class="tref internalDFN" title="array" href="#dfn-array">
+<ins class="diff-chg">array
+</ins></a>,
+<ol class="algorithm">
+<li>
+<del class="diff-old">If
+the
+active
+context
+contains
+a
+term
+</del>
+<ins class="diff-chg">label
+all
+</ins><a class="tref internalDFN" title="blank_node" href="#dfn-blank_node"><ins class="diff-chg">
+blank
+nodes
+</ins>
+</a>
+<del class="diff-old">mapping
+for
+the
+</del>
+<ins class="diff-chg">in
+</ins><em>
+value
+</em>
+<ins class="diff-new">with
+</ins><a class="tref internalDFN" title="blank_node_identifier" href="#dfn-blank_node_identifier"><ins class="diff-new">
+blank
+node
+identifiers
+</ins></a><ins class="diff-new">
+by
+</ins>
+using
+<del class="diff-old">a
+case-sensitive
+comparison,
+use
+</del>
+the
+<del class="diff-old">mapped
+</del>
+<a href="#label-blank-nodes-algorithm">
+<ins class="diff-chg">Label
+Blank
+Nodes
+Algorithm
+</ins></a>.</li><li><ins class="diff-chg">
+Then,
+for
+each
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+of
+</ins><em><ins class="diff-chg">
+expanded
+property
+</ins></em><ins class="diff-chg">
+merge
+a
+copy
+of
+</ins><em>
+value
+<del class="diff-old">as
+an
+IRI
+.
+</del>
+</em>
+<ins class="diff-chg">into
+the
+</ins><em><ins class="diff-chg">
+iri
+</ins></em><ins class="diff-chg">
+member
+of
+the
+</ins><em><ins class="diff-chg">
+result
+</ins></em><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>.</li></ol>
+</li>
+<li>
+Otherwise,
+<del class="diff-old">split
+the
+</del>
+<ins class="diff-chg">merge
+</ins><em>
+value
+</em>
+into
+<del class="diff-old">a
+</del>
+<ins class="diff-chg">the
+</ins>
+<em>
+<del class="diff-old">prefix
+</del>
+<ins class="diff-chg">iri
+</ins></em><ins class="diff-chg">
+member
+of
+the
+</ins><em><ins class="diff-chg">
+result
+</ins></em><a class="tref internalDFN" title="json_object" href="#dfn-json_object"><ins class="diff-chg">
+JSON
+object
+</ins></a>.</li></ol></li><li><ins class="diff-chg">
+Set
+</ins><em><ins class="diff-chg">
+element
+</ins></em><ins class="diff-chg">
+to
+</ins><em><ins class="diff-chg">
+result
+</ins>
+</em>
+and
+<em>
+<del class="diff-old">suffix
+</del>
+<ins class="diff-chg">numProperties
+</ins>
+</em>
+<del class="diff-old">from
+</del>
+<ins class="diff-chg">to
+</ins>
+the
+<del class="diff-old">first
+occurrence
+</del>
+<ins class="diff-chg">number
+</ins>
+of
+<del class="diff-old">':'.
+</del>
+<ins class="diff-chg">members
+of
+</ins><em><ins class="diff-chg">
+result
+</ins></em>.
+</li>
+<li>
+If
+<del class="diff-old">the
+prefix
+is
+a
+'_'
+(underscore),
+the
+value
+represents
+a
+named
+blank
+node
+.
+</del>
+<em>
+<ins class="diff-chg">element
+</ins></em><ins class="diff-chg">
+has
+an
+</ins><code><ins class="diff-chg">
[email protected]
+</ins></code><ins class="diff-chg">
+member,
+decrease
+</ins><em><ins class="diff-chg">
+numProperties