Remove the 20130822 CR drafts - that plan didn't work out :-)
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Fri, 06 Sep 2013 11:07:18 +0200
changeset 1983 fe930b147544
parent 1982 7ac2ac2190bb
child 1984 5393a779d3ab
Remove the 20130822 CR drafts - that plan didn't work out :-)
spec/CR/json-ld-api/20130822/diff-20130516.html
spec/CR/json-ld-api/20130822/index.html
spec/CR/json-ld/20130822/diff-20130411.html
spec/CR/json-ld/20130822/index.html
spec/CR/json-ld/20130822/linked-data-graph.png
--- a/spec/CR/json-ld-api/20130822/diff-20130516.html	Thu Sep 05 22:36:04 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36829 +0,0 @@
-<!DOCTYPE html>
-<html lang="en" dir="ltr" prefix="bibo: http://purl.org/ontology/bibo/" typeof="bibo:Document">
-<head>
-<title>JSON-LD 1.0 Processing Algorithms and API</title>
-<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<style type="text/css">
-  .diff {
-    font-weight:bold; color:#0a3;
-  }
-  .error a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-  }
-  .atrisk-head {
-    font-style: italic;
-  }
-  ol.algorithm {
-    counter-reset: numsection;
-    list-style-type: none;
-  }
-  ol.algorithm li {
-    margin: 0.5em 0;
-  }
-  ol.algorithm li:before {
-    font-weight: bold;
-    counter-increment: numsection;
-    content: counters(numsection, ".") ") ";
-  }
-</style>
-<style>
-/* --- 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;
-}
-
-/* --- 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: #2b2; }
-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: 1em 1.2em 0.5em;
-    margin: 1em 0;
-    position: relative;
-    clear: both;
-}
-span.note, span.issue { padding: .1em .5em .15em; }
-
-.issue {
-    border-color: #e05252;
-    background: #fbe9e9;
-}
-.note {
-    border-color: #52e052;
-    background: #e9fbe9;
-}
-
-
-</style><style>/* --- WEB IDL --- */
-pre.idl {
-    border-top: 1px solid #90b8de;
-    border-bottom: 1px solid #90b8de;
-    padding:    1em;
-    line-height:    120%;
-}
-
-pre.idl::before {
-    content:    "WebIDL";
-    display:    block;
-    width:      150px;
-    background: #90b8de;
-    color:  #fff;
-    font-family:    initial;
-    padding:    3px;
-    font-weight:    bold;
-    margin: -1em 0 1em -1em;
-}
-
-.idlType {
-    color:  #ff4500;
-    font-weight:    bold;
-    text-decoration:    none;
-}
-
-/*.idlModule*/
-/*.idlModuleID*/
-/*.idlInterface*/
-.idlInterfaceID, .idlDictionaryID, .idlCallbackID, .idlEnumID {
-    font-weight:    bold;
-    color:  #005a9c;
-}
-a.idlEnumItem {
-    color:  #000;
-    border-bottom:  1px dotted #ccc;
-    text-decoration: none;
-}
-
-.idlSuperclass {
-    font-style: italic;
-    color:  #005a9c;
-}
-
-/*.idlAttribute*/
-.idlAttrType, .idlFieldType, .idlMemberType {
-    color:  #005a9c;
-}
-.idlAttrName, .idlFieldName, .idlMemberName {
-    color:  #ff4500;
-}
-.idlAttrName a, .idlFieldName a, .idlMemberName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlMethod*/
-.idlMethType, .idlCallbackType {
-    color:  #005a9c;
-}
-.idlMethName {
-    color:  #ff4500;
-}
-.idlMethName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlCtor*/
-.idlCtorName {
-    color:  #ff4500;
-}
-.idlCtorName a {
-    color:  #ff4500;
-    border-bottom:  1px dotted #ff4500;
-    text-decoration: none;
-}
-
-/*.idlParam*/
-.idlParamType {
-    color:  #005a9c;
-}
-.idlParamName, .idlDefaultValue {
-    font-style: italic;
-}
-
-.extAttr {
-    color:  #666;
-}
-
-/*.idlSectionComment*/
-.idlSectionComment {
-    color: gray;
-}
-
-/*.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.constructors, dl.fields, dl.dictionary-members {
-    margin-left:    2em;
-}
-
-.attributes dt, .methods dt, .constants dt, .constructors dt, .fields dt, .dictionary-members dt {
-    font-weight:    normal;
-}
-
-.attributes dt code, .methods dt code, .constants dt code, .constructors 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;
-}
-
-.constructors dt code {
-    background:  #cfc;
-}
-
-.attributes dd, .methods dd, .constants dd, .constructors 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="https://www.w3.org/StyleSheets/TR/W3C-CR"><!--[if lt IE 9]><script src='https://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 class="h-entry">
-<div class="head">
-<p>
-<a href="http://www.w3.org/">
-<img width="72" height="48" src="https://www.w3.org/Icons/w3c_home" alt="W3C">
-</a>
-</p>
-<h1 class="title p-name" id="title">
-JSON-LD
-1.0
-Processing
-Algorithms
-and
-API
-</h1>
-<h2 id="w3c-candidate-recommendation-22-august-2013">
-<abbr title="World Wide Web Consortium">
-W3C
-</abbr>
-<del class="diff-old">Last
-Call
-Working
-Draft
-16
-May
-</del>
-<ins class="diff-chg">Candidate
-Recommendation
-</ins><time class="dt-published" datetime="2013-08-22"><ins class="diff-chg">
-22
-August
-</ins>
-2013
-</time>
-</h2>
-<dl>
-<dt>
-This
-version:
-</dt>
-<dd>
-<del class="diff-old">http://www.w3.org/TR/2013/WD-json-ld-api-20130516/
-</del>
-<a class="u-url" href="http://www.w3.org/TR/2013/CR-json-ld-api-20130822/">
-<ins class="diff-chg">http://www.w3.org/TR/2013/CR-json-ld-api-20130822/
-</ins>
-</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://json-ld.org/spec/latest/json-ld-api/index.html">
-http://json-ld.org/spec/latest/json-ld-api/index.html
-</a>
-</dd>
-<dt>
-Test
-suite:
-</dt>
-<dd>
-<a href="http://www.w3.org/2013/json-ld-tests/">
-http://www.w3.org/2013/json-ld-tests/
-</a>
-</dd>
-<dt>
-Previous
-version:
-</dt>
-<dd>
-<del class="diff-old">http://www.w3.org/TR/2013/WD-json-ld-api-20130411/
-</del>
-<a href="http://www.w3.org/TR/2013/WD-json-ld-api-20130516/">
-<ins class="diff-chg">http://www.w3.org/TR/2013/WD-json-ld-api-20130516/
-</ins>
-</a>
-</dd>
-<dt>
-Editors:
-</dt>
-<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" class="p-org org h-org h-card" href="http://www.tugraz.at/">
-Graz
-University
-of
-Technology
-</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" class="p-org org h-org h-card" 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="Manu Sporny" href="http://manu.sporny.org/">
-Manu
-Sporny
-</a>,
-<a rel="foaf:workplaceHomepage" class="p-org org h-org h-card" href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</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" class="p-org org h-org h-card" 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" class="p-org org h-org h-card" 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" class="p-org org h-org h-card" href="http://www.tugraz.at/">
-Graz
-University
-of
-Technology
-</a>
-</span>
-</dd>
-<dd rel="dcterms:contributor">
-<span typeof="foaf:Person">
-<a rel="foaf:homepage" property="foaf:name" content="Manu Sporny" href="http://digitalbazaar.com/">
-Manu
-Sporny
-</a>,
-<a rel="foaf:workplaceHomepage" class="p-org org h-org h-card" href="http://digitalbazaar.com/">
-Digital
-Bazaar
-</a>
-</span>
-</dd>
-</dl>
-<p>
-This
-document
-is
-also
-available
-in
-this
-non-normative
-format:
-<a rel="alternate" href="diff-20130516.html">
-diff
-to
-previous
-version
-</a>
-</p>
-<p class="copyright">
-<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
-Copyright
-</a>

-2010-2013
-<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>,
-<a href="http://ev.buaa.edu.cn/">
-Beihang
-</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>
-This
-specification
-defines
-an
-Application
-Programming
-Interface
-(API)
-and
-a
-set
-of
-algorithms
-for
-programmatic
-transformations
-of
-JSON-LD
-documents.
-Restructuring
-data
-according
-<ins class="diff-new">to
-</ins>
-the
-defined
-transformations
-often
-dramatically
-simplifies
-its
-usage.
-</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
-<del class="diff-old">34
-</del>
-<ins class="diff-chg">30
-</ins>
-months
-in
-the
-JSON
-for
-Linking
-Data
-Community
-Group.
-The
-document
-has
-recently
-been
-transferred
-to
-the
-RDF
-Working
-Group
-for
-review,
-improvement,
-and
-publication
-along
-the
-Recommendation
-track.
-The
-specification
-has
-undergone
-significant
-development,
-review,
-and
-changes
-during
-the
-course
-of
-the
-last
-<del class="diff-old">34
-</del>
-<ins class="diff-chg">30
-</ins>
-months.
-</p>
-<p>
-There
-are
-several
-independent
-<a href="http://json-ld.org/test-suite/reports/">
-interoperable
-implementations
-</a>
-of
-this
-specification.
-There
-is
-a
-fairly
-complete
-test
-suite
-[
-<cite>
-<a class="bibref" href="#bib-JSON-LD-TESTS">
-JSON-LD-TESTS
-</a>
-</cite>
-]
-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
-there
-will
-be
-continuous
-development
-on
-implementations,
-the
-test
-suite,
-and
-the
-live
-editor,
-they
-are
-believed
-to
-be
-mature
-enough
-to
-be
-integrated
-into
-a
-non-production
-system
-at
-this
-point
-in
-time.
-There
-is
-an
-expectation
-that
-they
-could
-be
-used
-in
-a
-production
-system
-within
-the
-next
-three
-months.
-</p>
-<p>
-<del class="diff-old">There
-are
-a
-number
-of
-ways
-that
-one
-may
-participate
-in
-the
-development
-of
-this
-specification:
-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:
[email protected]
-Ad-hoc
-technical
-discussion
-primarily
-occurs
-on
-the
-public
-community
-mailing
-list:
[email protected]
-Public
-JSON-LD
-Community
-Group
-teleconferences
-are
-held
-on
-Tuesdays
-at
-1400UTC
-every
-week.
-Participation
-is
-open
-to
-the
-public.
-RDF
-Working
-Group
-teleconferences
-are
-held
-on
-Wednesdays
-at
-1500UTC
-every
-week.
-Participation
-is
-limited
-to
-RDF
-Working
-Group
-members.
-Specification
-bugs
-and
-issues
-should
-be
-reported
-in
-the
-issue
-tracker
-if
-you
-do
-not
-want
-to
-send
-an
-email
-to
-the
-public-rdf-comments
-mailing
-list.
-Source
-code
-for
-the
-specification
-can
-be
-found
-on
-Github.
-The
-#json-ld
-IRC
-channel
-is
-available
-for
-real-time
-discussion
-on
-irc.freenode.net.
-This
-is
-a
-second
-Last
-Call
-Working
-Draft
-for
-this
-document.
-</del>
-Changes
-since
-the
-<a href="http://www.w3.org/TR/2013/WD-json-ld-api-20130411/">
-<del class="diff-old">11
-April
-2013
-</del>
-<ins class="diff-chg">11&nbsp;April&nbsp;2013
-</ins>
-Last
-Call
-Working
-Draft
-</a>:
-</p>
-<ul>
-<li>
-Use
-of
-DOM
-Futures
-instead
-of
-callbacks
-in
-the
-Application
-Programming
-Interface
-</li>
-<li>
-Processing
-of
-terms
-that
-are
-redefined
-to
-themselves
-without
-raising
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.cyclic-IRI-mapping">
-cyclic
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-</code>
-error
-</li>
-<li>
-Raise
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
-invalid
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-</code>
-error
-if
-relative
-URLs
-are
-used
-in
-term
-definitions
-</li>
-<li>
-Support
-<ins class="diff-new">relative
-IRIs
-in
-</ins><code><ins class="diff-new">
[email protected]
-</ins></code></li><li><ins class="diff-new">
-Remove
-default
-value
-of
-</ins><code class="idlMemberName"><a href="#idl-def-JsonLdOptions"><ins class="diff-new">
-JsonLdOption's
-</ins></a></code><code class="idlMemberName"><a href="#widl-JsonLdOptions-base"><ins class="diff-new">
-base
-</ins></a></code><ins class="diff-new">
-member
-</ins></li><li><ins class="diff-new">
-Support
-</ins>
-lists
-of
-lists
-when
-<del class="diff-old">converting
-from
-</del>
-<ins class="diff-chg">serializing
-</ins>
-RDF
-<del class="diff-old">to
-</del>
-<ins class="diff-chg">as
-</ins>
-JSON-LD
-</li>
-<li>
-Support
-for
-relative
-URLs
-in
-<code>
[email protected]
-</code>
-and
-documents
-that
-do
-not
-have
-a
-base
-<del class="diff-old">value.
-</del>
-<ins class="diff-chg">value
-</ins></li></ul><p><ins class="diff-chg">
-Changes
-since
-the
-</ins><a href="http://www.w3.org/TR/2013/WD-json-ld-api-20130516/"><ins class="diff-chg">
-16&nbsp;May&nbsp;2013
-Last
-Call
-Working
-Draft
-</ins></a>:</p><ul><li><ins class="diff-chg">
-Ensure
-determinism
-of
-the
-Deserialize
-JSON-LD
-to
-RDF
-algorithm
-by
-specifying
-the
-processing
-order
-</ins></li><li><ins class="diff-chg">
-Change
-the
-default
-value
-of
-the
-</ins><em><ins class="diff-chg">
-use
-native
-types
-</ins></em><ins class="diff-chg">
-flag
-in
-the
-Serialize
-RDF
-as
-JSON-LD
-algorithm
-to
-</ins><code><ins class="diff-chg">
-false
-</ins></code></li><li><ins class="diff-chg">
-Clarify
-that
-the
-</ins><i><ins class="diff-chg">
-identifier
-map
-</ins></i><ins class="diff-chg">
-and
-the
-</ins><i><ins class="diff-chg">
-counter
-</ins></i><ins class="diff-chg">
-used
-by
-the
-Generate
-Blank
-Node
-Identifier
-algorithm
-are
-reset
-before
-running
-the
-Flattening
-and
-the
-Deserialize
-JSON-LD
-to
-RDF
-algorithms
-</ins></li><li><ins class="diff-chg">
-Raise
-an
-error
-if
-a
-blank
-node
-is
-used
-as
-data
-type
-</ins></li><li><ins class="diff-chg">
-Clarify
-that
-blank
-node
-identifier
-are
-supported
-as
-value
-of
-</ins><code><ins class="diff-chg">
[email protected]
-</ins></code></li><li><ins class="diff-chg">
-When
-generating
-RDF,
-exclude
-</ins><a class="tref internalDFN" title="rdf-triple" href="#dfn-rdf-triple"><ins class="diff-chg">
-triples
-</ins></a><ins class="diff-chg">
-containing
-a
-</ins><a class="tref internalDFN" title="blank-node" href="#dfn-blank-node"><ins class="diff-chg">
-blank
-node
-</ins></a><a class="tref internalDFN" title="rdf-predicate" href="#dfn-rdf-predicate"><ins class="diff-chg">
-predicate
-</ins></a>,<ins class="diff-chg">
-unless
-the
-</ins><i><ins class="diff-chg">
-produce
-generalized
-RDF
-</ins></i><ins class="diff-chg">
-flag
-is
-set;
-discard
-</ins><a class="tref internalDFN" title="rdf-triple" href="#dfn-rdf-triple"><ins class="diff-chg">
-triples
-</ins></a><ins class="diff-chg">
-containing
-relative
-IRIs
-and
-graphs
-with
-a
-relative
-</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
-IRI
-</ins></abbr><ins class="diff-chg">
-as
-graph
-name
-</ins></li><li><ins class="diff-chg">
-Update
-reference
-to
-DOM
-Promises
-(have
-been
-called
-DOM
-Futures)
-</ins></li><li><ins class="diff-chg">
-Fix
-bug
-in
-</ins><a href="#serialize-rdf-as-json-ld-algorithm"><ins class="diff-chg">
-Serialize
-RDF
-to
-JSON-LD
-algorithm
-</ins></a><ins class="diff-chg">
-to
-handle
-lists
-correctly
-</ins></li><li><ins class="diff-chg">
-Support
-processing
-of
-documents
-with
-a
-</ins><code><ins class="diff-chg">
-+json
-</ins></code><ins class="diff-chg">
-media
-type
-as
-defined
-in
-[
-</ins><cite><a class="bibref" href="#bib-RFC6839"><ins class="diff-chg">
-RFC6839
-</ins></a></cite><ins class="diff-chg">
-]
-</ins></li><li><ins class="diff-chg">
-Use
-the
-</ins><a href="#idl-def-LoadDocumentCallback" class="idlType"><code><ins class="diff-chg">
-LoadDocumentCallback
-</ins></code></a><ins class="diff-chg">
-(previously
-</ins><code><ins class="diff-chg">
-LoadContextCallback
-</ins></code><ins class="diff-chg">
-)
-to
-retrieve
-remote
-contexts
-and
-remote
-documents
-</ins></li><li><ins class="diff-chg">
-Allow
-contexts
-to
-be
-passed
-into
-the
-API
-directly.
-Previously
-only
-context
-documents,
-i.e.,
-objects
-having
-a
-</ins><code><ins class="diff-chg">
[email protected]
-</ins></code><ins class="diff-chg">
-member
-were
-allowed.
-</ins>
-</li>
-</ul>
-<p>
-This
-document
-was
-published
-by
-the
-<a href="http://www.w3.org/2011/rdf-wg/">
-RDF
-Working
-Group
-</a>
-as
-a
-<del class="diff-old">Last
-Call
-Working
-Draft.
-</del>
-<ins class="diff-chg">Candidate
-Recommendation.
-</ins>
-This
-document
-is
-intended
-to
-become
-a
-<abbr title="World Wide Web Consortium">
-W3C
-</abbr>
-Recommendation.
-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>
-).
-<del class="diff-old">The
-Last
-Call
-period
-ends
-06
-June
-</del>
-<abbr title="World Wide Web Consortium">
-<ins class="diff-chg">W3C
-</ins></abbr><ins class="diff-chg">
-publishes
-a
-Candidate
-Recommendation
-to
-indicate
-that
-the
-document
-is
-believed
-to
-be
-stable
-and
-to
-encourage
-implementation
-by
-the
-developer
-community.
-This
-Candidate
-Recommendation
-is
-expected
-to
-advance
-to
-Proposed
-Recommendation
-no
-earlier
-than
-19
-September
-</ins>
-2013.
-All
-comments
-are
-welcome.
-</p>
-<p>
-Publication
-as
-a
-<del class="diff-old">Last
-Call
-Working
-Draft
-</del>
-<ins class="diff-chg">Candidate
-Recommendation
-</ins>
-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>
-<del class="diff-old">This
-is
-a
-Last
-Call
-Working
-Draft
-and
-thus
-the
-Working
-Group
-has
-determined
-that
-</del>
-<ins class="diff-chg">Before
-</ins>
-this
-<del class="diff-old">document
-has
-satisfied
-</del>
-<ins class="diff-chg">specification
-exits
-Candidate
-Recommendation,
-two
-or
-more
-independent
-implementations
-must
-pass
-each
-test,
-although
-no
-single
-implementation
-must
-pass
-each
-test.
-The
-working
-group
-will
-decide
-when
-</ins>
-the
-<del class="diff-old">relevant
-technical
-requirements
-and
-</del>
-<ins class="diff-chg">test
-suite
-</ins>
-is
-<del class="diff-old">sufficiently
-stable
-</del>
-<ins class="diff-chg">of
-sufficient
-quality
-</ins>
-to
-<del class="diff-old">advance
-through
-</del>
-<ins class="diff-chg">test
-interoperability
-and
-will
-produce
-an
-implementation
-report
-(hosted
-together
-with
-</ins>
-the
-<del class="diff-old">Technical
-Recommendation
-process.
-</del>
-<ins class="diff-chg">test
-suite).
-</ins>
-</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>
-Flattening
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-serialization-deserialization" class="tocxref">
-<span class="secno">
-2.4
-</span>
-RDF
-<del class="diff-old">Conversion
-</del>
-<ins class="diff-chg">Serialization/Deserialization
-</ins>
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#conformance" class="tocxref">
-<span class="secno">
-3.
-</span>
-Conformance
-</a>
-</li>
-<li class="tocline">
-<a href="#general-terminology" class="tocxref">
-<span class="secno">
-4.
-</span>
-General
-Terminology
-</a>
-</li>
-<li class="tocline">
-<a href="#algorithm-terms" class="tocxref">
-<span class="secno">
-5.
-</span>
-Algorithm
-Terms
-</a>
-</li>
-<li class="tocline">
-<a href="#context-processing-algorithms" class="tocxref">
-<span class="secno">
-6.
-</span>
-Context
-Processing
-Algorithms
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#context-processing-algorithm" class="tocxref">
-<span class="secno">
-6.1
-</span>
-Context
-Processing
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#create-term-definition" class="tocxref">
-<span class="secno">
-6.2
-</span>
-Create
-Term
-Definition
-</a>
-</li>
-<li class="tocline">
-<a href="#iri-expansion" class="tocxref">
-<span class="secno">
-6.3
-</span>
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-Expansion
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#expansion-algorithms" class="tocxref">
-<span class="secno">
-7.
-</span>
-Expansion
-Algorithms
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#expansion-algorithm" class="tocxref">
-<span class="secno">
-7.1
-</span>
-Expansion
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#value-expansion" class="tocxref">
-<span class="secno">
-7.2
-</span>
-Value
-Expansion
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#compaction-algorithms" class="tocxref">
-<span class="secno">
-8.
-</span>
-Compaction
-Algorithms
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#compaction-algorithm" class="tocxref">
-<span class="secno">
-8.1
-</span>
-Compaction
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#inverse-context-creation" class="tocxref">
-<span class="secno">
-8.2
-</span>
-Inverse
-Context
-Creation
-</a>
-</li>
-<li class="tocline">
-<a href="#iri-compaction" class="tocxref">
-<span class="secno">
-8.3
-</span>
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-Compaction
-</a>
-</li>
-<li class="tocline">
-<a href="#term-selection" class="tocxref">
-<span class="secno">
-8.4
-</span>
-Term
-Selection
-</a>
-</li>
-<li class="tocline">
-<a href="#value-compaction" class="tocxref">
-<span class="secno">
-8.5
-</span>
-Value
-Compaction
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#flattening-algorithms" class="tocxref">
-<span class="secno">
-9.
-</span>
-Flattening
-Algorithms
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#flattening-algorithm" class="tocxref">
-<span class="secno">
-9.1
-</span>
-Flattening
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#node-map-generation" class="tocxref">
-<span class="secno">
-9.2
-</span>
-Node
-Map
-Generation
-</a>
-</li>
-<li class="tocline">
-<a href="#generate-blank-node-identifier" class="tocxref">
-<span class="secno">
-9.3
-</span>
-Generate
-Blank
-Node
-Identifier
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#rdf-serialization-deserialization-algorithms" class="tocxref">
-<span class="secno">
-10.
-</span>
-RDF
-<del class="diff-old">Conversion
-</del>
-<ins class="diff-chg">Serialization/Deserialization
-</ins>
-Algorithms
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#deserialize-json-ld-to-rdf-algorithm" class="tocxref">
-<span class="secno">
-10.1
-</span>
-<del class="diff-old">Convert
-</del>
-<ins class="diff-chg">Deserialize
-JSON-LD
-</ins>
-to
-RDF
-<del class="diff-old">Algorithm
-</del>
-<ins class="diff-chg">algorithm
-</ins>
-</a>
-</li>
-<li class="tocline">
-<a href="#object-to-rdf-conversion" class="tocxref">
-<span class="secno">
-10.2
-</span>
-Object
-to
-RDF
-Conversion
-</a>
-</li>
-<li class="tocline">
-<a href="#list-to-rdf-conversion" class="tocxref">
-<span class="secno">
-10.3
-</span>
-List
-to
-RDF
-Conversion
-</a>
-</li>
-<li class="tocline">
-<a href="#serialize-rdf-as-json-ld-algorithm" class="tocxref">
-<span class="secno">
-10.4
-</span>
-<del class="diff-old">Convert
-from
-</del>
-<ins class="diff-chg">Serialize
-</ins>
-RDF
-<ins class="diff-new">as
-JSON-LD
-</ins>
-Algorithm
-</a>
-</li>
-<li class="tocline">
-<a href="#rdf-to-object-conversion" class="tocxref">
-<span class="secno">
-10.5
-</span>
-RDF
-to
-Object
-Conversion
-</a>
-</li>
-<li class="tocline">
-<a href="#data-round-tripping" class="tocxref">
-<span class="secno">
-10.6
-</span>
-Data
-Round
-Tripping
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#the-application-programming-interface" class="tocxref">
-<span class="secno">
-11.
-</span>
-The
-Application
-Programming
-Interface
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#the-jsonldprocessor-interface" class="tocxref">
-<span class="secno">
-11.1
-</span>
-The
-<span class="formerLink">
-<code>
-JsonLdProcessor
-</code>
-</span>
-Interface
-</a>
-</li>
-<li class="tocline">
-<a href="#the-jsonldoptions-type" class="tocxref">
-<span class="secno">
-11.2
-</span>
-The
-<span class="formerLink">
-<code>
-JsonLdOptions
-</code>
-</span>
-Type
-</a>
-</li>
-<li class="tocline">
-<a href="#remote-document-and-context-retrieval" class="tocxref">
-<span class="secno">
-11.3
-</span>
-Remote
-<ins class="diff-new">Document
-and
-</ins>
-Context
-Retrieval
-</a>
-</li>
-<li class="tocline">
-<a href="#error-handling" class="tocxref">
-<span class="secno">
-11.4
-</span>
-Error
-Handling
-</a>
-</li>
-</ul>
-</li>
-<li class="tocline">
-<a href="#acknowledgements" class="tocxref">
-<span class="secno">
-A.
-</span>
-Acknowledgements
-</a>
-</li>
-<li class="tocline">
-<a href="#references" class="tocxref">
-<span class="secno">
-B.
-</span>
-References
-</a>
-<ul class="toc">
-<li class="tocline">
-<a href="#normative-references" class="tocxref">
-<span class="secno">
-B.1
-</span>
-Normative
-references
-</a>
-</li>
-<li class="tocline">
-<a href="#informative-references" class="tocxref">
-<span class="secno">
-B.2
-</span>
-Informative
-references
-</a>
-</li>
-</ul>
-</li>
-</ul>
-</section>
-<section class="informative" id="introduction">
-<h2>
-<span class="secno">
-1.
-</span>
-Introduction
-</h2>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-This
-document
-is
-a
-detailed
-specification
-for
-an
-Application
-Programming
-Interface
-for
-the
-JSON-LD
-syntax.
-The
-document
-is
-primarily
-intended
-for
-the
-following
-audiences:
-</p>
-<ul>
-<li>
-Developers
-who
-want
-an
-overview
-of
-the
-JSON-LD
-API.
-</li>
-<li>
-Web
-authors
-and
-developers
-who
-want
-a
-very
-detailed
-view
-of
-how
-a
-<a class="tref internalDFN" title="json-ld-processor" href="#dfn-json-ld-processor">
-JSON-LD
-Processor
-</a>
-or
-a
-<a class="tref internalDFN" title="json-ld-api-implementation" href="#dfn-json-ld-api-implementation">
-JSON-LD
-API
-Implementation
-</a>
-operates.
-</li>
-<li>
-Software
-developers
-who
-want
-to
-implement
-the
-algorithms
-to
-transform
-JSON-LD
-documents.
-</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
-defined
-in
-[
-<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-RDF11-CONCEPTS">
-RDF11-CONCEPTS
-</a>
-</cite>
-].
-</p>
-</section>
-<section class="informative" id="features">
-<h2>
-<span class="secno">
-2.
-</span>
-Features
-</h2>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-The
-JSON-LD
-Syntax
-specification
-[
-<cite>
-<a class="bibref" href="#bib-JSON-LD">
-JSON-LD
-</a>
-</cite>
-]
-defines
-a
-syntax
-to
-express
-Linked
-Data
-in
-JSON.
-Because
-there
-is
-more
-than
-one
-way
-to
-express
-Linked
-Data
-using
-this
-syntax,
-it
-is
-often
-useful
-to
-be
-able
-to
-transform
-JSON-LD
-documents
-so
-that
-they
-may
-be
-more
-easily
-consumed
-by
-specific
-applications.
-</p>
-<p>
-JSON-LD
-uses
-<a class="tref internalDFN" title="context" href="#dfn-context">
-contexts
-</a>
-to
-allow
-Linked
-Data
-to
-be
-expressed
-in
-a
-way
-that
-is
-specifically
-tailored
-to
-a
-particular
-person
-or
-application.
-By
-providing
-a
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>,
-JSON
-data
-can
-be
-expressed
-in
-a
-way
-that
-is
-a
-natural
-fit
-for
-a
-particular
-person
-or
-application
-whilst
-also
-indicating
-how
-the
-data
-should
-be
-understood
-at
-a
-global
-scale.
-In
-order
-for
-people
-or
-applications
-to
-share
-data
-that
-was
-created
-using
-a
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-that
-is
-different
-from
-their
-own,
-a
-JSON-LD
-processor
-must
-be
-able
-to
-transform
-a
-document
-from
-one
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-to
-another.
-Instead
-of
-requiring
-JSON-LD
-processors
-to
-write
-specific
-code
-for
-every
-imaginable
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-switching
-scenario,
-it
-is
-much
-easier
-to
-specify
-a
-single
-algorithm
-that
-can
-remove
-any
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>.
-Similarly,
-another
-algorithm
-can
-be
-specified
-to
-subsequently
-apply
-any
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>.
-These
-two
-algorithms
-represent
-the
-most
-basic
-transformations
-of
-JSON-LD
-documents.
-They
-are
-referred
-to
-as
-<a class="tref internalDFN" title="expansion" href="#dfn-expansion">
-expansion
-</a>
-and
-<a class="tref internalDFN" title="compaction" href="#dfn-compaction">
-compaction
-</a>,
-respectively.
-</p>
-<p>
-There
-are
-four
-major
-types
-of
-transformation
-that
-are
-discussed
-in
-this
-document:
-expansion,
-compaction,
-flattening,
-and
-RDF
-<del class="diff-old">conversion.
-</del>
-<ins class="diff-chg">serialization/deserialization.
-</ins>
-</p>
-<section class="informative" id="expansion">
-<h3>
-<span class="secno">
-2.1
-</span>
-Expansion
-</h3>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-The
-algorithm
-that
-removes
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-is
-called
-<dfn title="expansion" id="dfn-expansion">
-expansion
-</dfn>.
-Before
-performing
-any
-other
-transformations
-on
-a
-JSON-LD
-document,
-it
-is
-easiest
-to
-remove
-any
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-from
-it
-and
-to
-make
-data
-structures
-more
-regular.
-</p>
-<p>
-To
-get
-an
-idea
-of
-how
-context
-and
-data
-structuring
-affects
-the
-same
-data,
-here
-is
-an
-example
-of
-JSON-LD
-that
-uses
-only
-<a class="tref internalDFN" title="term" href="#dfn-term">
-terms
-</a>
-and
-is
-fairly
-compact:
-</p>
-    <div class="example"><div class="example-title"><span>Example 1</span>: Sample JSON-LD document</div><pre class="example">{
-  "@context": {
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": {
-      "@id": "http://xmlns.com/foaf/0.1/homepage",
-      "@type": "@id"
-    }
-  },
-  "@id": "http://me.markus-lanthaler.com/",
-  "name": "Markus Lanthaler",
-  "homepage": "http://www.markus-lanthaler.com/"
-}
-</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
-and
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-to
-encapsulate
-another,
-but
-leaves
-the
-rest
-of
-the
-information
-untouched.
-</p>
-    <div class="example"><div class="example-title"><span>Example 2</span>: Sample JSON-LD document using an IRI instead of a term to express a property</div><pre class="example">{
-  "@context": {
-    <span class="diff">"website": "http://xmlns.com/foaf/0.1/homepage"</span>
-  },
-  "@id": "http://me.markus-lanthaler.com/",
-  "<span class="diff">http://xmlns.com/foaf/0.1/name</span>": "Markus Lanthaler",
-  <span class="diff">"website"</span>: <span class="diff">{ "@id":</span> "http://www.markus-lanthaler.com/" <span class="diff">}</span>
-}
-</pre>
-</div>
-<p>
-Note
-that
-both
-inputs
-are
-valid
-JSON-LD
-and
-both
-represent
-the
-same
-information.
-The
-difference
-is
-in
-their
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-information
-and
-in
-the
-data
-structures
-used.
-A
-JSON-LD
-processor
-can
-remove
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-and
-ensure
-that
-the
-data
-is
-more
-regular
-by
-employing
-<a class="tref internalDFN" title="expansion" href="#dfn-expansion">
-expansion
-</a>.
-</p>
-<p>
-<a class="tref internalDFN" title="expansion" href="#dfn-expansion">
-Expansion
-</a>
-has
-two
-important
-goals:
-removing
-any
-contextual
-information
-from
-the
-document,
-and
-ensuring
-all
-values
-are
-represented
-in
-a
-regular
-form.
-These
-goals
-are
-accomplished
-by
-expanding
-all
-properties
-to
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-IRIs
-</a>
-and
-by
-expressing
-all
-values
-in
-<a class="tref internalDFN" title="array" href="#dfn-array">
-arrays
-</a>
-in
-<a class="tref internalDFN" title="expanded-form" href="#dfn-expanded-form">
-expanded
-form
-</a>.
-<a class="tref internalDFN" title="expanded-form" href="#dfn-expanded-form">
-Expanded
-form
-</a>
-is
-the
-most
-verbose
-and
-regular
-way
-of
-expressing
-of
-values
-in
-JSON-LD;
-all
-contextual
-information
-from
-the
-document
-is
-instead
-stored
-locally
-with
-each
-value.
-Running
-the
-<a href="#expansion-algorithm">
-Expansion
-algorithm
-</a>
-(
-<code class="idlMemberName">
-<a href="#widl-JsonLdProcessor-expand-Promise-any-input-JsonLdOptions-options">
-expand
-</a>
-</code>
-operation)
-against
-the
-above
-examples
-results
-in
-the
-following
-output:
-</p>
-    <div class="example"><div class="example-title"><span>Example 3</span>: Expanded sample document</div><pre class="example">[
-  {
-    "@id": "http://me.markus-lanthaler.com/",
-    "http://xmlns.com/foaf/0.1/name": [
-      { "@value": "Markus Lanthaler" }
-    ],
-    "http://xmlns.com/foaf/0.1/homepage": [
-      { "@id": "http://www.markus-lanthaler.com/" }
-    ]
-  }
-]
-</pre>
-</div>
-<p>
-Note
-that
-in
-the
-output
-above
-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">
-terms
-</a>
-and
-<a class="tref internalDFN" title="compact-iri" href="#dfn-compact-iri">
-compact
-IRIs
-</a>
-have
-been
-expanded
-to
-absolute
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-IRIs
-</a>,
-and
-all
-<a class="tref internalDFN" title="json-ld-value" href="#dfn-json-ld-value">
-JSON-LD
-values
-</a>
-are
-expressed
-in
-<a class="tref internalDFN" title="array" href="#dfn-array">
-arrays
-</a>
-in
-<a class="tref internalDFN" title="expanded-form" href="#dfn-expanded-form">
-expanded
-form
-</a>.
-While
-the
-output
-is
-more
-verbose
-and
-difficult
-for
-a
-human
-to
-read,
-it
-establishes
-a
-baseline
-that
-makes
-JSON-LD
-processing
-easier
-because
-of
-its
-very
-regular
-structure.
-</p>
-</section>
-<section class="informative" id="compaction">
-<h3>
-<span class="secno">
-2.2
-</span>
-Compaction
-</h3>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-While
-<a class="tref internalDFN" title="expansion" href="#dfn-expansion">
-expansion
-</a>
-removes
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-from
-a
-given
-input,
-<a class="tref internalDFN" title="compaction" href="#dfn-compaction">
-compaction's
-</a>
-primary
-function
-is
-to
-perform
-the
-opposite
-operation:
-to
-express
-a
-given
-input
-according
-to
-a
-particular
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>.
-<dfn title="compaction" id="dfn-compaction">
-Compaction
-</dfn>
-applies
-a
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-that
-specifically
-tailors
-the
-way
-information
-is
-expressed
-for
-a
-particular
-person
-or
-application.
-This
-simplifies
-applications
-that
-consume
-JSON
-or
-JSON-LD
-by
-expressing
-the
-data
-in
-application-specific
-terms,
-and
-it
-makes
-the
-data
-easier
-to
-read
-by
-humans.
-</p>
-<p>
-<a class="tref internalDFN" title="compaction" href="#dfn-compaction">
-Compaction
-</a>
-uses
-a
-developer-supplied
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-to
-shorten
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-IRIs
-</a>
-to
-<a class="tref internalDFN" title="term" href="#dfn-term">
-terms
-</a>
-or
-<a class="tref internalDFN" title="compact-iri" href="#dfn-compact-iri">
-compact
-IRIs
-</a>
-and
-<a class="tref internalDFN" title="json-ld-value" href="#dfn-json-ld-value">
-JSON-LD
-values
-</a>
-expressed
-in
-<a class="tref internalDFN" title="expanded-form" href="#dfn-expanded-form">
-expanded
-form
-</a>
-to
-simple
-values
-such
-as
-<a class="tref internalDFN" title="string" href="#dfn-string">
-strings
-</a>
-or
-<a class="tref internalDFN" title="number" href="#dfn-number">
-numbers
-</a>.
-</p>
-<p>
-For
-example,
-assume
-the
-following
-expanded
-JSON-LD
-input
-document:
-</p>
-    <div class="example"><div class="example-title"><span>Example 4</span>: Expanded sample document</div><pre class="example">[
-  {
-    "@id": "http://me.markus-lanthaler.com/",
-    "http://xmlns.com/foaf/0.1/name": [
-      { "@value": "Markus Lanthaler" }
-    ],
-    "http://xmlns.com/foaf/0.1/homepage": [
-      { "@id": "http://www.markus-lanthaler.com/" }
-    ]
-  }
-]
-</pre>
-</div>
-<p>
-Additionally,
-assume
-the
-following
-developer-supplied
-JSON-LD
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>:
-</p>
-    <div class="example"><div class="example-title"><span>Example 5</span>: JSON-LD context</div><pre class="example">{
-  "@context": {
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": {
-      "@id": "http://xmlns.com/foaf/0.1/homepage",
-      "@type": "@id"
-    }
-  }
-}
-</pre>
-</div>
-<p>
-Running
-the
-<a href="#compaction-algorithm">
-Compaction
-Algorithm
-</a>
-(
-<code class="idlMemberName">
-<a href="#widl-JsonLdProcessor-compact-Promise-any-input-JsonLdContext-context-JsonLdOptions-options">
-compact
-</a>
-</code>
-operation)
-given
-the
-context
-supplied
-above
-against
-the
-JSON-LD
-input
-document
-provided
-above
-would
-result
-in
-the
-following
-output:
-</p>
-    <div class="example"><div class="example-title"><span>Example 6</span>: Compacted sample document</div><pre class="example">{
-  "@context": {
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "homepage": {
-      "@id": "http://xmlns.com/foaf/0.1/homepage",
-      "@type": "@id"
-    }
-  },
-  "@id": "http://me.markus-lanthaler.com/",
-  "name": "Markus Lanthaler",
-  "homepage": "http://www.markus-lanthaler.com/"
-}
-</pre>
-</div>
-<p>
-Note
-that
-all
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-IRIs
-</a>
-have
-been
-compacted
-to
-<a class="tref internalDFN" title="term" href="#dfn-term">
-terms
-</a>
-as
-specified
-in
-the
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>,
-which
-has
-been
-injected
-into
-the
-output.
-While
-compacted
-output
-is
-useful
-to
-humans,
-it
-is
-also
-used
-to
-generate
-structures
-that
-are
-easy
-to
-program
-against.
-Compaction
-enables
-developers
-to
-map
-any
-expanded
-document
-into
-an
-application-specific
-compacted
-document.
-While
-the
-context
-provided
-above
-mapped
-<code>
-http://xmlns.com/foaf/0.1/name
-</code>
-to
-<code>
-name
-</code>,
-it
-could
-also
-have
-been
-mapped
-to
-any
-other
-term
-provided
-by
-the
-developer.
-</p>
-</section>
-<section class="informative" id="flattening">
-<h3>
-<span class="secno">
-2.3
-</span>
-Flattening
-</h3>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-While
-expansion
-ensures
-that
-a
-document
-is
-in
-a
-uniform
-structure,
-flattening
-goes
-a
-step
-further
-to
-ensure
-that
-the
-shape
-of
-the
-data
-is
-deterministic.
-In
-expanded
-documents,
-the
-properties
-of
-a
-single
-<a class="tref internalDFN" title="node" href="#dfn-node">
-node
-</a>
-may
-be
-spread
-across
-a
-number
-of
-different
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-objects
-</a>.
-By
-flattening
-a
-document,
-all
-properties
-of
-a
-<a class="tref internalDFN" title="node" href="#dfn-node">
-node
-</a>
-are
-collected
-in
-a
-single
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-and
-all
-<a class="tref internalDFN" title="blank-node" href="#dfn-blank-node">
-blank
-nodes
-</a>
-are
-labeled
-with
-a
-<a class="tref internalDFN" title="blank-node-identifier" href="#dfn-blank-node-identifier">
-blank
-node
-identifier
-</a>.
-This
-may
-drastically
-simplify
-the
-code
-required
-to
-process
-JSON-LD
-data
-in
-certain
-applications.
-</p>
-<p>
-For
-example,
-assume
-the
-following
-JSON-LD
-input
-document:
-</p>
-    <div class="example"><div class="example-title"><span>Example 7</span>: Sample JSON-LD document</div><pre class="example">{
-  "@context": {
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "knows": "http://xmlns.com/foaf/0.1/knows"
-  },
-  "@id": "http://me.markus-lanthaler.com/",
-  "name": "Markus Lanthaler",
-  "knows": [
-    {
-      "name": "Dave Longley"
-    }
-  ]
-}
-</pre>
-</div>
-<p>
-Running
-the
-<a href="#flattening-algorithm">
-Flattening
-algorithm
-</a>
-(
-<code class="idlMemberName">
-<a href="#widl-JsonLdProcessor-flatten-Promise-any-input-JsonLdContext-context-JsonLdOptions-options">
-flatten
-</a>
-</code>
-operation)
-with
-a
-context
-set
-to
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-to
-prevent
-compaction
-returns
-the
-following
-document:
-</p>
-    <div class="example"><div class="example-title"><span>Example 8</span>: Flattened sample document in expanded form</div><pre class="example">[
-  {
-    "@id": "_:t0",
-    "http://xmlns.com/foaf/0.1/name": [
-      { "@value": "Dave Longley" }
-    ]
-  },
-  {
-    "@id": "http://me.markus-lanthaler.com/",
-    "http://xmlns.com/foaf/0.1/name": [
-      { "@value": "Markus Lanthaler" }
-    ],
-    "http://xmlns.com/foaf/0.1/knows": [
-      { "@id": "_:t0" }
-    ]
-  }
-]
-</pre>
-</div>
-<p>
-Note
-how
-in
-the
-output
-above
-all
-properties
-of
-a
-<a class="tref internalDFN" title="node" href="#dfn-node">
-node
-</a>
-are
-collected
-in
-a
-single
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-and
-how
-the
-<a class="tref internalDFN" title="blank-node" href="#dfn-blank-node">
-blank
-node
-</a>
-representing
-"Dave
-Longley"
-has
-been
-assigned
-the
-<a class="tref internalDFN" title="blank-node-identifier" href="#dfn-blank-node-identifier">
-blank
-node
-identifier
-</a>
-<code>
-_:t0
-</code>.
-</p>
-<p>
-To
-make
-it
-easier
-for
-humans
-to
-read
-or
-for
-certain
-applications
-to
-process
-it,
-a
-flattened
-document
-can
-be
-compacted
-by
-passing
-a
-context.
-Using
-the
-same
-context
-as
-the
-input
-document,
-the
-flattened
-and
-compacted
-document
-looks
-as
-follows:
-</p>
-    <div class="example"><div class="example-title"><span>Example 9</span>: Flattened and compacted sample document</div><pre class="example">{
-  "@context": {
-    "name": "http://xmlns.com/foaf/0.1/name",
-    "knows": "http://xmlns.com/foaf/0.1/knows"
-  },
-  "@graph": [
-    {
-      "@id": "_:t0",
-      "name": "Dave Longley"
-    },
-    {
-      "@id": "http://me.markus-lanthaler.com/",
-      "name": "Markus Lanthaler",
-      "knows": { "@id": "_:t0" }
-    }
-  ]
-}
-</pre>
-</div>
-<p>
-Please
-note
-that
-the
-result
-of
-flattening
-and
-compacting
-a
-document
-is
-always
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-which
-contains
-an
-<code>
[email protected]
-</code>
-member
-that
-represents
-the
-<a class="tref internalDFN" title="default-graph" href="#dfn-default-graph">
-default
-graph
-</a>.
-</p>
-</section>
-<section class="informative" id="rdf-serialization-deserialization">
-<h3>
-<span class="secno">
-2.4
-</span>
-RDF
-<del class="diff-old">Conversion
-</del>
-<ins class="diff-chg">Serialization/Deserialization
-</ins>
-</h3>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-JSON-LD
-can
-be
-used
-to
-serialize
-<del class="diff-old">data
-expressed
-in
-</del>
-RDF
-<ins class="diff-new">data
-</ins>
-as
-described
-in
-[
-<cite>
-<a class="bibref" href="#bib-RDF11-CONCEPTS">
-RDF11-CONCEPTS
-</a>
-</cite>
-].
-This
-ensures
-that
-data
-can
-be
-round-tripped
-to
-and
-from
-any
-RDF
-syntax
-without
-any
-loss
-in
-fidelity.
-</p>
-<p>
-For
-example,
-assume
-the
-following
-RDF
-input
-serialized
-in
-Turtle
-[
-<cite>
-<a class="bibref" href="#bib-TURTLE">
-TURTLE
-</a>
-</cite>
-]:
-</p>
-    <div class="example"><div class="example-title"><span>Example 10</span>: Sample Turtle document</div><pre class="example">&lt;http://me.markus-lanthaler.com/&gt; &lt;http://xmlns.com/foaf/0.1/name&gt; "Markus Lanthaler" .
-&lt;http://me.markus-lanthaler.com/&gt;
-&lt;http://xmlns.com/foaf/0.1/homepage&gt;
-&lt;http://www.markus-lanthaler.com/&gt;
-.
-</pre>
-</div>
-<p>
-Using
-the
-<del class="diff-old">Convert
-from
-</del>
-<a href="#serialize-rdf-as-json-ld-algorithm">
-<ins class="diff-chg">Serialize
-</ins>
-RDF
-<ins class="diff-new">as
-JSON-LD
-</ins>
-algorithm
-</a>
-a
-developer
-could
-transform
-this
-document
-into
-expanded
-JSON-LD:
-</p>
-    <div class="example"><div class="example-title"><span>Example 11</span>: Sample Turtle document converted to JSON-LD</div><pre class="example">[
-  {
-    "@id": "http://me.markus-lanthaler.com/",
-    "http://xmlns.com/foaf/0.1/name": [
-      { "@value": "Markus Lanthaler" }
-    ],
-    "http://xmlns.com/foaf/0.1/homepage": [
-      { "@id": "http://www.markus-lanthaler.com/" }
-    ]
-  }
-]
-</pre>
-</div>
-<p>
-Note
-that
-the
-output
-above
-could
-easily
-be
-compacted
-using
-the
-technique
-outlined
-in
-the
-previous
-section.
-It
-is
-also
-possible
-to
-<del class="diff-old">transform
-</del>
-<ins class="diff-chg">deserialize
-</ins>
-the
-JSON-LD
-document
-back
-to
-RDF
-using
-the
-<del class="diff-old">Convert
-</del>
-<a href="#deserialize-json-ld-to-rdf-algorithm">
-<ins class="diff-chg">Deserialize
-JSON-LD
-</ins>
-to
-RDF
-algorithm
-</a>.
-</p>
-</section>
-</section>
-<section id="conformance">
-<h2>
-<span class="secno">
-3.
-</span>
-Conformance
-</h2>
-<p>
-All
-examples
-and
-notes
-as
-well
-as
-sections
-marked
-as
-non-normative
-in
-this
-specification
-are
-non-normative.
-Everything
-else
-in
-this
-specification
-is
-normative.
-</p>
-<p>
-The
-keywords
-<em class="rfc2119" title="MUST">
-MUST
-</em>,
-<em class="rfc2119" title="MUST NOT">
-MUST
-NOT
-</em>,
-<em class="rfc2119" title="REQUIRED">
-REQUIRED
-</em>,
-<em class="rfc2119" title="SHOULD">
-SHOULD
-</em>,
-<em class="rfc2119" title="SHOULD NOT">
-SHOULD
-NOT
-</em>,
-<em class="rfc2119" title="RECOMMENDED">
-RECOMMENDED
-</em>,
-<em class="rfc2119" title="MAY">
-MAY
-</em>,
-and
-<em class="rfc2119" title="OPTIONAL">
-OPTIONAL
-</em>
-in
-this
-specification
-are
-to
-be
-interpreted
-as
-described
-in
-[
-<cite>
-<a class="bibref" href="#bib-RFC2119">
-RFC2119
-</a>
-</cite>
-].
-</p>
-<p>
-There
-are
-three
-classes
-of
-products
-that
-can
-claim
-conformance
-to
-this
-specification:
-<a class="tref internalDFN" title="json-ld-processor" href="#dfn-json-ld-processor">
-JSON-LD
-Processors
-</a>,
-<a class="tref internalDFN" title="json-ld-api-implementation" href="#dfn-json-ld-api-implementation">
-JSON-LD
-API
-Implementations
-</a>,
-and
-<del class="diff-old">JSON-LD-RDF
-Converters
-</del>
-<a class="tref internalDFN" title="rdf-serializer/deserializer" href="#dfn-rdf-serializer/deserializer">
-<ins class="diff-chg">RDF
-Serializers/Deserializers
-</ins>
-</a>.
-</p>
-<p>
-A
-conforming
-<dfn title="json-ld-processor" id="dfn-json-ld-processor">
-JSON-LD
-Processor
-</dfn>
-is
-a
-system
-which
-can
-perform
-the
-<a href="#expansion-algorithm">
-Expansion
-</a>,
-<a href="#compaction-algorithm">
-Compaction
-</a>,
-and
-<a href="#flattening-algorithm">
-Flattening
-</a>
-operations
-defined
-in
-this
-specification.
-</p>
-<p>
-A
-conforming
-<dfn title="json-ld-api-implementation" id="dfn-json-ld-api-implementation">
-JSON-LD
-API
-Implementation
-</dfn>
-is
-a
-conforming
-<a class="tref internalDFN" title="json-ld-processor" href="#dfn-json-ld-processor">
-JSON-LD
-Processor
-</a>
-that
-exposes
-the
-<a href="#the-application-programming-interface">
-Application
-Programming
-Interface
-(API)
-</a>
-defined
-in
-this
-specification.
-It
-<em class="rfc2119" title="MUST">
-MUST
-</em>
-implement
-the
-<code>
-json-ld-1.0
-</code>
-processing
-mode
-(for
-further
-details,
-see
-the
-<code class="idlMemberName">
-<a href="#widl-JsonLdOptions-processingMode">
-processingMode
-</a>
-</code>
-option
-of
-<a href="#idl-def-JsonLdOptions" class="idlType">
-<code>
-JsonLdOptions
-</code>
-</a>
-).
-</p>
-<p>
-<a class="tref internalDFN" title="json-ld-processor" href="#dfn-json-ld-processor">
-JSON-LD
-Processors
-</a>
-and
-<a class="tref internalDFN" title="json-ld-api-implementation" href="#dfn-json-ld-api-implementation">
-API
-Implementations
-</a>
-<em class="rfc2119" title="MUST NOT">
-MUST
-NOT
-</em>
-attempt
-to
-correct
-malformed
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-IRIs
-</a>
-or
-language
-tags;
-however,
-they
-<em class="rfc2119" title="MAY">
-MAY
-</em>
-issue
-validation
-warnings.
-IRIs
-are
-not
-modified
-other
-than
-<del class="diff-old">converted
-</del>
-<ins class="diff-chg">conversion
-</ins>
-between
-<a class="tref internalDFN" title="relative-iri" href="#dfn-relative-iri">
-relative
-</a>
-and
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-IRIs
-</a>.
-</p>
-<p>
-A
-conforming
-<del class="diff-old">JSON-LD-RDF
-Converter
-</del>
-<dfn title="rdf-serializer/deserializer" id="dfn-rdf-serializer/deserializer">
-<ins class="diff-chg">RDF
-Serializer/Deserializer
-</ins>
-</dfn>
-is
-a
-system
-that
-can
-<del class="diff-old">perform
-Conversion
-</del>
-<a href="#deserialize-json-ld-to-rdf-algorithm">
-<ins class="diff-chg">deserialize
-JSON-LD
-</ins>
-to
-RDF
-</a>
-and
-<del class="diff-old">Conversion
-from
-</del>
-<a href="#serialize-rdf-as-json-ld-algorithm">
-<ins class="diff-chg">serialize
-</ins>
-RDF
-<del class="diff-old">.
-</del>
-<ins class="diff-chg">as
-JSON-LD
-</ins></a><ins class="diff-chg">
-as
-defined
-in
-this
-specification.
-</ins>
-</p>
-<p>
-The
-algorithms
-in
-this
-specification
-are
-generally
-written
-with
-more
-concern
-for
-clarity
-than
-efficiency.
-Thus,
-<a class="tref internalDFN" title="json-ld-processor" href="#dfn-json-ld-processor">
-JSON-LD
-Processors
-</a>
-and
-<a class="tref internalDFN" title="json-ld-api-implementation" href="#dfn-json-ld-api-implementation">
-API
-Implementations
-</a>
-may
-implement
-the
-algorithms
-given
-in
-this
-specification
-in
-any
-way
-desired,
-so
-long
-as
-the
-end
-result
-is
-indistinguishable
-from
-the
-result
-that
-would
-be
-obtained
-by
-the
-specification's
-algorithms.
-</p>
-<div class="note">
-<div class="note-title" role="heading" aria-level="3">
-<span>
-Note
-</span>
-</div>
-<p class="">
-Implementers
-can
-partially
-check
-their
-level
-of
-conformance
-to
-this
-specification
-by
-successfully
-passing
-the
-test
-cases
-of
-the
-JSON-LD
-test
-suite
-[
-<cite>
-<a class="bibref" href="#bib-JSON-LD-TESTS">
-JSON-LD-TESTS
-</a>
-</cite>
-].
-Note,
-however,
-that
-passing
-all
-the
-tests
-in
-the
-test
-suite
-does
-not
-imply
-complete
-conformance
-to
-this
-specification.
-It
-only
-implies
-that
-the
-implementation
-conforms
-to
-aspects
-tested
-by
-the
-test
-suite.
-</p>
-</div>
-</section>
-<section id="general-terminology">
-<h2>
-<span class="secno">
-4.
-</span>
-General
-Terminology
-</h2>
-<p>
-This
-document
-uses
-the
-following
-terms
-as
-defined
-in
-JSON
-[
-<cite>
-<a class="bibref" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-].
-Refer
-to
-the
-<em>
-JSON
-Grammar
-</em>
-section
-in
-[
-<cite>
-<a class="bibref" href="#bib-RFC4627">
-RFC4627
-</a>
-</cite>
-]
-for
-formal
-definitions.
-</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
-key-value
-pairs.
-A
-key
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>.
-A
-single
-colon
-comes
-after
-each
-key,
-separating
-the
-key
-from
-the
-value.
-A
-single
-comma
-separates
-a
-value
-from
-a
-following
-key.
-In
-contrast
-to
-JSON,
-in
-JSON-LD
-the
-keys
-in
-an
-object
-must
-be
-unique.
-</dd>
-<dt>
-<dfn title="array" id="dfn-array">
-array
-</dfn>
-</dt>
-<dd>
-An
-array
-structure
-is
-represented
-as
-square
-brackets
-surrounding
-zero
-or
-more
-values.
-Values
-are
-separated
-by
-commas.
-In
-JSON,
-an
-array
-is
-an
-<em>
-ordered
-</em>
-sequence
-of
-zero
-or
-more
-values.
-While
-JSON-LD
-uses
-the
-same
-array
-representation
-as
-JSON,
-the
-collection
-is
-<em>
-unordered
-</em>
-by
-default.
-While
-order
-is
-preserved
-in
-regular
-JSON
-arrays,
-it
-is
-not
-in
-regular
-JSON-LD
-arrays
-unless
-specifically
-defined
-(see
-<cite>
-<a href="http://www.w3.org/TR/2013/CR-json-ld-20130822/#sets-and-lists">
-Sets
-and
-Lists
-</a>
-</cite>
-in
-the
-JSON-LD
-specification
-[
-<cite>
-<a class="bibref" href="#bib-JSON-LD">
-JSON-LD
-</a>
-</cite>
-]).
-</dd>
-<dt>
-<dfn title="string" id="dfn-string">
-string
-</dfn>
-</dt>
-<dd>
-A
-string
-is
-a
-sequence
-of
-zero
-or
-more
-Unicode
-characters,
-wrapped
-in
-double
-quotes,
-using
-backslash
-escapes
-(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
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-value.
-A
-key-value
-pair
-in
-the
-<code>
[email protected]
-</code>
-where
-the
-value,
-or
-the
-<code>
[email protected]
-</code>
-of
-the
-value,
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-explicitly
-decouples
-a
-term's
-association
-with
-an
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>.
-A
-key-value
-pair
-in
-the
-body
-of
-a
-JSON-LD
-document
-whose
-value
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-has
-the
-same
-meaning
-as
-if
-the
-key-value
-pair
-was
-not
-defined.
-If
-<code>
[email protected]
-</code>,
-<code>
[email protected]
-</code>,
-or
-<code>
[email protected]
-</code>
-is
-set
-to
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-in
-expanded
-form,
-then
-the
-entire
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-is
-ignored.
-</dd>
-</dl>
-<p>
-Furthermore,
-the
-following
-terminology
-is
-used
-throughout
-this
-document:
-</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
-section
-<cite>
-<a href="http://www.w3.org/TR/2013/CR-json-ld-20130822/#syntax-tokens-and-keywords">
-Syntax
-Tokens
-and
-Keywords
-</a>
-</cite>
-of
-the
-JSON-LD
-specification
-[
-<cite>
-<a class="bibref" href="#bib-JSON-LD">
-JSON-LD
-</a>
-</cite>
-].
-</dd>
-<dt>
-<dfn title="context" id="dfn-context">
-context
-</dfn>
-</dt>
-<dd>
-A
-set
-of
-rules
-for
-interpreting
-a
-JSON-LD
-document
-as
-specified
-in
-the
-section
-<cite>
-<a href="http://www.w3.org/TR/2013/CR-json-ld-20130822/#the-context">
-The
-Context
-</a>
-</cite>
-of
-the
-JSON-LD
-specification
-[
-<cite>
-<a class="bibref" href="#bib-JSON-LD">
-JSON-LD
-</a>
-</cite>
-].
-</dd>
-<dt>
-<dfn title="json-ld-document" id="dfn-json-ld-document">
-JSON-LD
-document
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="json-ld-document" href="#dfn-json-ld-document">
-JSON-LD
-document
-</a>
-is
-a
-serialization
-of
-a
-collection
-of
-<del class="diff-old">JSON-LD
-</del>
-<a class="tref internalDFN" title="graph" href="#dfn-graph">
-graphs
-</a>
-and
-comprises
-exactly
-one
-<a class="tref internalDFN" title="default-graph" href="#dfn-default-graph">
-default
-graph
-</a>
-and
-zero
-or
-more
-<a class="tref internalDFN" title="named-graph" href="#dfn-named-graph">
-named
-graphs
-</a>.
-</dd>
-<dt>
-<dfn title="named-graph" id="dfn-named-graph">
-named
-graph
-</dfn>
-</dt>
-<dd>
-A
-named
-graph
-is
-a
-pair
-consisting
-of
-an
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-or
-<a class="tref internalDFN" title="blank-node" href="#dfn-blank-node">
-blank
-node
-</a>
-(the
-<dfn title="graph-name" id="dfn-graph-name">
-graph
-name
-</dfn>
-)
-and
-a
-<del class="diff-old">JSON-LD
-</del>
-<a class="tref internalDFN" title="graph" href="#dfn-graph">
-graph
-</a>.
-</dd>
-<dt>
-<dfn title="default-graph" id="dfn-default-graph">
-default
-graph
-</dfn>
-</dt>
-<dd>
-The
-default
-graph
-is
-the
-only
-graph
-in
-a
-JSON-LD
-document
-which
-has
-no
-<a class="tref internalDFN" title="graph-name" href="#dfn-graph-name">
-graph
-name
-</a>.
-</dd>
-<dt>
-<del class="diff-old">JSON-LD
-graph
-</del>
-<dfn title="graph" id="dfn-graph">
-<ins class="diff-chg">Graph
-</ins>
-</dfn>
-</dt>
-<dd>
-A
-labeled
-directed
-graph,
-i.e.,
-a
-set
-of
-<a class="tref internalDFN" title="node" href="#dfn-node">
-nodes
-</a>
-connected
-by
-<a class="tref internalDFN" title="edge" href="#dfn-edge">
-edges
-</a>,
-as
-specified
-in
-the
-<cite>
-<a href="http://www.w3.org/TR/2013/CR-json-ld-20130822/#data-model">
-Data
-Model
-</a>
-</cite>
-section
-of
-the
-JSON-LD
-specification
-[
-<cite>
-<a class="bibref" href="#bib-JSON-LD">
-JSON-LD
-</a>
-</cite>
-].
-</dd>
-<dt>
-<dfn title="edge" id="dfn-edge">
-edge
-</dfn>
-</dt>
-<dd>
-Every
-<a class="tref internalDFN" title="edge" href="#dfn-edge">
-edge
-</a>
-has
-a
-direction
-associated
-with
-it
-and
-is
-labeled
-with
-an
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-or
-a
-<a class="tref internalDFN" title="blank-node-identifier" href="#dfn-blank-node-identifier">
-blank
-node
-identifier
-</a>.
-Within
-the
-JSON-LD
-syntax
-these
-edge
-labels
-are
-called
-<dfn title="property" id="dfn-property">
-properties
-</dfn>.
-Whenever
-possible,
-an
-<a class="tref internalDFN" title="edge" href="#dfn-edge">
-edge
-</a>
-should
-be
-labeled
-with
-an
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>.
-</dd>
-<dt>
-<dfn title="node" id="dfn-node">
-node
-</dfn>
-</dt>
-<dd>
-Every
-<a class="tref internalDFN" title="node" href="#dfn-node">
-node
-</a>
-is
-an
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>,
-a
-<a class="tref internalDFN" title="blank-node" href="#dfn-blank-node">
-blank
-node
-</a>,
-a
-<a class="tref internalDFN" title="json-ld-value" href="#dfn-json-ld-value">
-JSON-LD
-value
-</a>,
-or
-a
-<a class="tref internalDFN" title="list" href="#dfn-list">
-list
-</a>.
-</dd>
-<dt>
-<dfn title="iri" id="dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>
-</dt>
-<dd>
-An
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-(Internationalized
-Resource
-Identifier)
-is
-a
-string
-that
-conforms
-to
-the
-syntax
-defined
-in
-[
-<cite>
-<a class="bibref" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-].
-</dd>
-<dt>
-<dfn title="absolute-iri" id="dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>
-</dt>
-<dd>
-An
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-is
-defined
-in
-[
-<cite>
-<a class="bibref" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-]
-containing
-a
-<em>
-scheme
-</em>
-along
-with
-a
-<em>
-path
-</em>
-and
-optional
-<em>
-query
-</em>
-and
-fragment
-segments.
-</dd>
-<dt>
-<dfn title="relative-iri" id="dfn-relative-iri">
-relative
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>
-</dt>
-<dd>
-A
-relative
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-is
-an
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-that
-is
-relative
-<ins class="diff-new">to
-</ins>
-some
-other
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-<del class="diff-old">;
-in
-the
-case
-of
-JSON-LD
-this
-is
-the
-base
-location
-of
-the
-document.
-</del>
-</a>.
-</dd>
-<dt>
-<dfn title="blank-node" id="dfn-blank-node">
-blank
-node
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="node" href="#dfn-node">
-node
-</a>
-in
-a
-<del class="diff-old">JSON-LD
-</del>
-<a class="tref internalDFN" title="graph" href="#dfn-graph">
-graph
-</a>
-that
-is
-neither
-an
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>,
-nor
-a
-<a class="tref internalDFN" title="json-ld-value" href="#dfn-json-ld-value">
-JSON-LD
-value
-</a>,
-nor
-a
-<a class="tref internalDFN" title="list" href="#dfn-list">
-list
-</a>.
-</dd>
-<dt>
-<dfn title="blank-node-identifier" id="dfn-blank-node-identifier">
-blank
-node
-identifier
-</dfn>
-</dt>
-<dd>
-A
-blank
-node
-identifier
-is
-a
-string
-that
-can
-be
-used
-as
-an
-identifier
-for
-a
-<a class="tref internalDFN" title="blank-node" href="#dfn-blank-node">
-blank
-node
-</a>
-within
-the
-scope
-of
-a
-JSON-LD
-document.
-Blank
-node
-identifiers
-begin
-with
-<code>
-_:
-</code>.
-</dd>
-<dt>
-<dfn title="json-ld-value" id="dfn-json-ld-value">
-JSON-LD
-value
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="json-ld-value" href="#dfn-json-ld-value">
-JSON-LD
-value
-</a>
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-a
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>,
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>
-or
-<a class="tref internalDFN" title="false" href="#dfn-false">
-false
-</a>,
-a
-<a class="tref internalDFN" title="typed-value" href="#dfn-typed-value">
-typed
-value
-</a>,
-or
-a
-<a class="tref internalDFN" title="language-tagged-string" href="#dfn-language-tagged-string">
-language-tagged
-string
-</a>.
-</dd>
-<dt>
-<dfn title="typed-value" id="dfn-typed-value">
-typed
-value
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="typed-value" href="#dfn-typed-value">
-typed
-value
-</a>
-consists
-of
-a
-value,
-which
-is
-a
-string,
-and
-a
-type,
-which
-is
-an
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>.
-</dd>
-<dt>
-<dfn title="language-tagged-string" id="dfn-language-tagged-string">
-language-tagged
-string
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="language-tagged-string" href="#dfn-language-tagged-string">
-language-tagged
-string
-</a>
-consists
-of
-a
-string
-and
-a
-non-empty
-language
-tag
-as
-defined
-by
-[
-<cite>
-<a class="bibref" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-].
-The
-language
-tag
-must
-be
-well-formed
-according
-to
-<a href="http://tools.ietf.org/html/bcp47#section-2.2.9">
-section
-2.2.9
-Classes
-of
-Conformance
-</a>
-of
-[
-<cite>
-<a class="bibref" href="#bib-BCP47">
-BCP47
-</a>
-</cite>
-],
-and
-is
-normalized
-to
-lowercase.
-</dd>
-<dt>
-<dfn title="list" id="dfn-list">
-list
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="list" href="#dfn-list">
-list
-</a>
-is
-an
-ordered
-sequence
-of
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-IRIs
-</a>,
-<a class="tref internalDFN" title="blank-node" href="#dfn-blank-node">
-blank
-nodes
-</a>,
-and
-<a class="tref internalDFN" title="json-ld-value" href="#dfn-json-ld-value">
-JSON-LD
-values
-</a>.
-</dd>
-</dl>
-</section>
-<section id="algorithm-terms">
-<h2>
-<span class="secno">
-5.
-</span>
-Algorithm
-Terms
-</h2>
-<dl>
-<dt>
-<dfn title="active-graph" id="dfn-active-graph">
-active
-graph
-</dfn>
-</dt>
-<dd>
-The
-name
-of
-the
-currently
-active
-graph
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active-subject" id="dfn-active-subject">
-active
-subject
-</dfn>
-</dt>
-<dd>
-The
-currently
-active
-subject
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active-property" id="dfn-active-property">
-active
-property
-</dfn>
-</dt>
-<dd>
-The
-currently
-active
-<a class="tref internalDFN" title="property" href="#dfn-property">
-property
-</a>
-or
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keyword
-</a>
-that
-the
-processor
-should
-use
-when
-processing.
-</dd>
-<dt>
-<dfn title="active-context" id="dfn-active-context">
-active
-context
-</dfn>
-</dt>
-<dd>
-A
-context
-that
-is
-used
-to
-resolve
-<a class="tref internalDFN" title="term" href="#dfn-term">
-terms
-</a>
-while
-the
-processing
-algorithm
-is
-running.
-</dd>
-<dt>
-<dfn title="local-context" id="dfn-local-context">
-local
-context
-</dfn>
-</dt>
-<dd>
-A
-context
-that
-is
-specified
-within
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>,
-specified
-via
-the
-<code>
[email protected]
-</code>
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keyword
-</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="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
-may
-be
-expanded
-to
-an
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-</dd>
-<dt>
-<dfn title="compact-iri" id="dfn-compact-iri">
-compact
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>
-</dt>
-<dd>
-A
-compact
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-has
-the
-form
-of
-<dfn title="prefix" id="dfn-prefix">
-prefix
-</dfn>:
-<em>
-suffix
-</em>
-and
-is
-used
-as
-a
-way
-of
-expressing
-an
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-without
-needing
-to
-define
-separate
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-definitions
-for
-each
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-contained
-within
-a
-common
-vocabulary
-identified
-by
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>.
-</dd>
-<dt>
-<dfn title="node-object" id="dfn-node-object">
-node
-object
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="node-object" href="#dfn-node-object">
-node
-object
-</a>
-represents
-zero
-or
-more
-properties
-of
-a
-<a class="tref internalDFN" title="node" href="#dfn-node">
-node
-</a>
-in
-the
-<del class="diff-old">JSON-LD
-</del>
-<a class="tref internalDFN" title="graph" href="#dfn-graph">
-graph
-</a>
-serialized
-by
-the
-JSON-LD
-document.
-A
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-is
-a
-<a class="tref internalDFN" title="node-object" href="#dfn-node-object">
-node
-object
-</a>
-if
-it
-exists
-outside
-of
-the
-JSON-LD
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-and:
-<ul>
-<li>
-it
-does
-not
-contain
-the
-<code>
[email protected]
-</code>,
-<code>
[email protected]
-</code>,
-or
-<code>
[email protected]
-</code>
-keywords,
-or
-</li>
-<li>
-it
-is
-not
-the
-top-most
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-in
-the
-JSON-LD
-document
-consisting
-of
-no
-other
-members
-than
-<code>
[email protected]
-</code>
-and
-<code>
[email protected]
-</code>.
-</li>
-</ul>
-</dd>
-<dt>
-<dfn title="value-object" id="dfn-value-object">
-value
-object
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="value-object" href="#dfn-value-object">
-value
-object
-</a>
-is
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-that
-has
-an
-<code>
[email protected]
-</code>
-member.
-</dd>
-<dt>
-<dfn title="list-object" id="dfn-list-object">
-list
-object
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="list-object" href="#dfn-list-object">
-list
-object
-</a>
-is
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-that
-has
-an
-<code>
[email protected]
-</code>
-member.
-</dd>
-<dt>
-<dfn title="set-object" id="dfn-set-object">
-set
-object
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref internalDFN" title="set-object" href="#dfn-set-object">
-set
-object
-</a>
-is
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-that
-has
-an
-<code>
[email protected]
-</code>
-member.
-</dd>
-<dt>
-<dfn title="scalar" id="dfn-scalar">
-scalar
-</dfn>
-</dt>
-<dd>
-A
-scalar
-is
-either
-a
-JSON
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-<a class="tref internalDFN" title="number" href="#dfn-number">
-number
-</a>,
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>,
-or
-<a class="tref internalDFN" title="false" href="#dfn-false">
-false
-</a>.
-</dd>
-<dt>
-<dfn title="rdf-subject" id="dfn-rdf-subject">
-RDF
-subject
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref externalDFN" title="subject" href="http://www.w3.org/TR/rdf11-concepts/#dfn-subject">
-subject
-</a>
-as
-specified
-by
-[
-<cite>
-<a class="bibref" href="#bib-RDF11-CONCEPTS">
-RDF11-CONCEPTS
-</a>
-</cite>
-].
-</dd>
-<dt>
-<dfn title="rdf-predicate" id="dfn-rdf-predicate">
-RDF
-predicate
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref externalDFN" title="predicate" href="http://www.w3.org/TR/rdf11-concepts/#dfn-predicate">
-predicate
-</a>
-as
-specified
-by
-[
-<cite>
-<a class="bibref" href="#bib-RDF11-CONCEPTS">
-RDF11-CONCEPTS
-</a>
-</cite>
-].
-</dd>
-<dt>
-<dfn title="rdf-object" id="dfn-rdf-object">
-RDF
-object
-</dfn>
-</dt>
-<dd>
-An
-<a class="tref externalDFN" title="object" href="http://www.w3.org/TR/rdf11-concepts/#dfn-object">
-object
-</a>
-as
-specified
-by
-[
-<cite>
-<a class="bibref" href="#bib-RDF11-CONCEPTS">
-RDF11-CONCEPTS
-</a>
-</cite>
-].
-</dd>
-<dt>
-<dfn title="rdf-triple" id="dfn-rdf-triple">
-RDF
-triple
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref externalDFN" title="triple" href="http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-triple">
-triple
-</a>
-as
-specified
-by
-[
-<cite>
-<a class="bibref" href="#bib-RDF11-CONCEPTS">
-RDF11-CONCEPTS
-</a>
-</cite>
-].
-</dd>
-<dt>
-<dfn title="rdf-dataset" id="dfn-rdf-dataset">
-RDF
-dataset
-</dfn>
-</dt>
-<dd>
-A
-<a class="tref externalDFN" title="dataset" href="http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset">
-dataset
-</a>
-as
-specified
-by
-[
-<cite>
-<a class="bibref" href="#bib-RDF11-CONCEPTS">
-RDF11-CONCEPTS
-</a>
-</cite>
-]
-representing
-a
-collection
-of
-<a class="tref externalDFN" title="rdf-graphs" href="http://www.w3.org/TR/rdf11-concepts/#dfn-rdf-graph">
-RDF
-graphs
-</a>.
-</dd>
-</dl>
-</section>
-<section id="context-processing-algorithms">
-<h2>
-<span class="secno">
-6.
-</span>
-Context
-Processing
-Algorithms
-</h2>
-<section id="context-processing-algorithm">
-<h3>
-<span class="secno">
-6.1
-</span>
-Context
-Processing
-Algorithm
-</h3>
-<p>
-When
-processing
-a
-JSON-LD
-data
-structure,
-each
-processing
-rule
-is
-applied
-using
-information
-provided
-by
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-This
-section
-describes
-how
-to
-produce
-an
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-</p>
-<p>
-The
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-contains
-the
-active
-<dfn title="term-definition" id="dfn-term-definition">
-term
-definitions
-</dfn>
-which
-specify
-how
-properties
-and
-values
-have
-to
-be
-interpreted
-as
-well
-as
-the
-current
-<dfn title="base-iri" id="dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</dfn>,
-the
-<dfn title="vocabulary-mapping" id="dfn-vocabulary-mapping">
-vocabulary
-mapping
-</dfn>
-and
-the
-<dfn title="default-language" id="dfn-default-language">
-default
-language
-</dfn>.
-Each
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-consists
-of
-an
-<dfn title="iri-mapping" id="dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</dfn>,
-a
-boolean
-flag
-<dfn title="reverse-property" id="dfn-reverse-property">
-reverse
-property
-</dfn>,
-an
-optional
-<dfn title="type-mapping" id="dfn-type-mapping">
-type
-mapping
-</dfn>
-or
-<dfn title="language-mapping" id="dfn-language-mapping">
-language
-mapping
-</dfn>,
-and
-an
-optional
-<dfn title="container-mapping" id="dfn-container-mapping">
-container
-mapping
-</dfn>.
-A
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-can
-not
-only
-be
-used
-to
-map
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-to
-an
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>,
-but
-also
-to
-map
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-to
-a
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keyword
-</a>,
-in
-which
-case
-it
-is
-referred
-to
-as
-a
-<dfn title="keyword-alias" id="dfn-keyword-alias">
-keyword
-alias
-</dfn>.
-</p>
-<p>
-When
-processing,
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-is
-initialized
-without
-any
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definitions
-</a>,
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>,
-or
-<a class="tref internalDFN" title="default-language" href="#dfn-default-language">
-default
-language
-</a>.
-If
-a
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-is
-encountered
-during
-processing,
-a
-new
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-is
-created
-by
-cloning
-the
-existing
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-Then
-the
-information
-from
-the
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-is
-merged
-into
-the
-new
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-Given
-that
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-contexts
-</a>
-may
-contain
-references
-to
-remote
-contexts,
-this
-includes
-their
-retrieval.
-</p>
-<section class="informative">
-<h4 id="overview">
-Overview
-</h4>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-First
-we
-prepare
-a
-new
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-<i>
-result
-</i>
-by
-cloning
-the
-current
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-Then
-we
-normalize
-the
-form
-of
-the
-passed
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-to
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>.
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-Local
-contexts
-</a>
-may
-be
-in
-the
-form
-of
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>,
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-or
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-containing
-a
-combination
-of
-the
-two.
-Finally
-we
-process
-each
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-contained
-in
-the
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-as
-follows.
-</p>
-<p>
-If
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-it
-represents
-a
-reference
-to
-a
-remote
-context.
-We
-dereference
-the
-remote
-context
-and
-replace
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-with
-the
-value
-of
-the
-<code>
[email protected]
-</code>
-key
-of
-the
-top-level
-object
-in
-the
-retrieved
-JSON-LD
-document.
-If
-there's
-no
-such
-key,
-an
-invalid
-remote
-context
-has
-been
-detected.
-Otherwise,
-we
-process
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-by
-recursively
-using
-this
-algorithm
-ensuring
-that
-there
-is
-no
-cyclical
-reference.
-</p>
-<p>
-If
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-is
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>,
-we
-first
-update
-the
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>,
-the
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>,
-and
-the
-<a class="tref internalDFN" title="default-language" href="#dfn-default-language">
-default
-language
-</a>
-by
-processing
-three
-specific
-keywords:
-<code>
[email protected]
-</code>,
-<code>
[email protected]
-</code>,
-and
-<code>
[email protected]
-</code>.
-These
-are
-handled
-before
-any
-other
-keys
-in
-the
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-because
-they
-affect
-how
-the
-other
-keys
-are
-processed.
-Please
-note
-that
-<code>
[email protected]
-</code>
-is
-ignored
-when
-processing
-remote
-contexts.
-</p>
-<p>
-Then,
-for
-every
-other
-key
-in
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-we
-update
-the
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-in
-<i>
-result
-</i>.
-Since
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definitions
-</a>
-in
-a
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-may
-themselves
-contain
-<a class="tref internalDFN" title="term" href="#dfn-term">
-terms
-</a>
-or
-<a class="tref internalDFN" title="compact-iri" href="#dfn-compact-iri">
-compact
-IRIs
-</a>,
-we
-may
-need
-to
-recurse.
-When
-doing
-so,
-we
-must
-ensure
-that
-there
-is
-no
-cyclical
-dependency,
-which
-is
-an
-error.
-After
-we
-have
-processed
-any
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-dependencies,
-we
-update
-the
-current
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>,
-which
-may
-be
-a
-<a class="tref internalDFN" title="keyword-alias" href="#dfn-keyword-alias">
-keyword
-alias
-</a>.
-</p>
-<p>
-Finally,
-we
-return
-<i>
-result
-</i>
-as
-the
-new
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-</p>
-</section>
-<section>
-<h4 id="algorithm">
-Algorithm
-</h4>
-<p>
-This
-algorithm
-specifies
-how
-a
-new
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-is
-updated
-with
-a
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>.
-The
-algorithm
-takes
-three
-input
-variables:
-an
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-a
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-and
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-<i>
-remote
-contexts
-</i>
-which
-is
-used
-to
-detect
-cyclical
-context
-inclusions.
-If
-<i>
-remote
-contexts
-</i>
-is
-not
-passed,
-it
-is
-initialized
-to
-an
-empty
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>.
-</p>
-<div class="issue atrisk">
-<div class="issue-title" role="heading" aria-level="5">
-<span>
-<ins class="diff-new">Feature
-at
-Risk
-10
-</ins></span>:<ins class="diff-new">
-Support
-for
[email protected]:
-null
-</ins></div><div class="atrisk"><p class="atrisk-head"><ins class="diff-new">
-Note:
-This
-feature
-is
-</ins><a href="http://www.w3.org/2005/10/Process-20051014/tr#cfi"><ins class="diff-new">
-"at
-risk"
-</ins></a><ins class="diff-new">
-and
-may
-be
-removed
-from
-this
-specification
-based
-on
-feedback.
-Please
-send
-feedback
-to
-</ins><a href="mailto:[email protected]"><ins class="diff-new">
[email protected]
-</ins></a>.<ins class="diff-new">
-For
-the
-current
-status
-see
-</ins><a href="http://www.w3.org/2011/rdf-wg/wiki/JSON-LD_Features_at_Risk"><ins class="diff-new">
-features
-"at
-risk"
-in
-JSON-LD
-1.0
-</ins></a></p><p><ins class="diff-new">
-Unlike
-many
-other
-serialization
-formats,
-JSON-LD
-allows
-to
-specify
-that
-there
-is
-no
-base
-</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
-IRI
-</ins></abbr><ins class="diff-new">
-from
-within
-the
-document
-(by
-setting
-</ins><code><ins class="diff-new">
[email protected]
-</ins></code><ins class="diff-new">
-to
-</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-new">
-null
-</ins></a><ins class="diff-new">
-).
-The
-result
-is
-that
-the
-algorithm
-for
-establishing
-a
-base
-</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
-IRI
-</ins></abbr><ins class="diff-new">
-as
-specified
-in
-</ins><a href="http://tools.ietf.org/html/rfc3986#section-5.1"><ins class="diff-new">
-RFC3986
-section
-5.1
-</ins></a><ins class="diff-new">
-is
-overridden
-so
-relative
-IRIs
-remain
-relative
-IRIs
-even
-in
-the
-case
-that
-an
-</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
-IRI
-</ins></abbr><ins class="diff-new">
-would
-be
-available
-in
-one
-of
-the
-outer
-layers
-(e.g.,
-the
-</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
-IRI
-</ins></abbr><ins class="diff-new">
-used
-to
-retrieve
-the
-document
-or
-an
-application
-supplied
-base
-</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
-IRI
-</ins></abbr><ins class="diff-new">
-).
-Based
-on
-implementer
-feedback,
-the
-Working
-Group
-may
-decide
-to
-remove
-this
-feature
-from
-JSON-LD
-1.0.
-</ins></p></div></div>
-<ol class="algorithm">
-<li>
-Initialize
-<i>
-result
-</i>
-to
-the
-result
-of
-cloning
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-</li>
-<li>
-If
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-is
-not
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-set
-it
-to
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-containing
-only
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>.
-</li>
-<li>
-For
-each
-item
-<i>
-context
-</i>
-in
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>:
-<ol class="algorithm">
-<li>
-If
-<i>
-context
-</i>
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-set
-<i>
-result
-</i>
-to
-a
-newly-initialized
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-and
-continue
-with
-the
-next
-<i>
-context
-</i>.
-The
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-of
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-is
-set
-to
-the
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-of
-the
-currently
-being
-processed
-document
-(which
-might
-be
-different
-from
-the
-currently
-being
-processed
-context),
-if
-available;
-otherwise
-to
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>.
-If
-set,
-the
-<code class="idlMemberName">
-<del class="diff-old">compactArrays
-</del>
-<a href="#widl-JsonLdOptions-base">
-<ins class="diff-chg">base
-</ins>
-</a>
-</code>
-option
-of
-a
-<a class="tref internalDFN" title="json-ld-api-implementation" href="#dfn-json-ld-api-implementation">
-JSON-LD
-API
-Implementation
-</a>
-overrides
-the
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>.
-</li>
-<li>
-If
-<i>
-context
-</i>
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-<ol class="algorithm">
-<li>
-Set
-<i>
-context
-</i>
-to
-the
-result
-of
-resolving
-<i>
-value
-</i>
-against
-the
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-which
-is
-established
-as
-specified
-in
-<cite>
-<a href="http://tools.ietf.org/html/rfc3986#section-5.1">
-section
-5.1
-Establishing
-a
-Base
-URI
-</a>
-</cite>
-of
-[
-<cite>
-<a class="bibref" href="#bib-RFC3986">
-RFC3986
-</a>
-</cite>
-].
-Only
-the
-basic
-algorithm
-in
-<cite>
-<a href="http://tools.ietf.org/html/rfc3986#section-5.2">
-section
-5.2
-</a>
-</cite>
-of
-[
-<cite>
-<a class="bibref" href="#bib-RFC3986">
-RFC3986
-</a>
-</cite>
-]
-is
-used;
-neither
-<cite>
-<a href="http://tools.ietf.org/html/rfc3986#section-6.2.2">
-Syntax-Based
-Normalization
-</a>
-</cite>
-nor
-<cite>
-<a href="http://tools.ietf.org/html/rfc3986#section-6.2.3">
-Scheme-Based
-Normalization
-</a>
-</cite>
-are
-performed.
-Characters
-additionally
-allowed
-in
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-references
-are
-treated
-in
-the
-same
-way
-that
-unreserved
-characters
-are
-treated
-in
-URI
-references,
-per
-<cite>
-<a href="http://tools.ietf.org/html/rfc3987#section-6.5">
-section
-6.5
-</a>
-</cite>
-of
-[
-<cite>
-<a class="bibref" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-].
-</li>
-<li>
-If
-<i>
-context
-</i>
-is
-in
-the
-<i>
-remote
-contexts
-</i>
-array,
-a
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.recursive-context-inclusion">
-recursive
-context
-inclusion
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted;
-otherwise,
-add
-<i>
-context
-</i>
-to
-<i>
-remote
-contexts
-</i>.
-</li>
-<li>
-Dereference
-<i>
-context
-</i>.
-If
-<i>
-context
-</i>
-cannot
-be
-dereferenced,
-a
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.loading-remote-context-failed">
-loading
-remote
-context
-failed
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-If
-the
-dereferenced
-document
-has
-no
-top-level
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-with
-an
-<code>
[email protected]
-</code>
-member,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-remote-context">
-invalid
-remote
-context
-</a>
-</code>
-has
-been
-detected
-and
-processing
-is
-aborted;
-otherwise,
-set
-<i>
-context
-</i>
-to
-the
-value
-of
-that
-member.
-</li>
-<li>
-Set
-<i>
-result
-</i>
-to
-the
-result
-of
-recursively
-calling
-this
-algorithm,
-passing
-<i>
-result
-</i>
-for
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-<i>
-context
-</i>
-for
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-and
-<i>
-remote
-contexts
-</i>.
-</li>
-<li>
-Continue
-with
-the
-next
-<i>
-context
-</i>.
-</li>
-</ol>
-</li>
-<li>
-If
-<i>
-context
-</i>
-is
-not
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-local-context">
-invalid
-local
-context
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-If
-<i>
-context
-</i>
-has
-an
-<code>
[email protected]
-</code>
-key
-and
-<i>
-remote
-contexts
-</i>
-is
-empty,
-i.e.,
-the
-currently
-being
-processed
-context
-is
-not
-a
-remote
-context:
-<ol class="algorithm">
-<li>
-Initialize
-<i>
-value
-</i>
-to
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key.
-</li>
-<li>
-If
-<i>
-value
-</i>
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-remove
-the
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-of
-<i>
-result
-</i>.
-</li>
-<li>
-Otherwise,
-if
-<i>
-value
-</i>
-is
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>,
-the
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-of
-<i>
-result
-</i>
-is
-set
-to
-<i>
-value
-</i>.
-</li>
-<li>
-Otherwise,
-if
-<i>
-value
-</i>
-is
-a
-<a class="tref internalDFN" title="relative-iri" href="#dfn-relative-iri">
-relative
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-and
-the
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-of
-<i>
-result
-</i>
-is
-not
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-set
-the
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-of
-<i>
-result
-</i>
-to
-the
-result
-of
-resolving
-<i>
-value
-</i>
-against
-the
-current
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-of
-<i>
-result
-</i>.
-</li>
-<li>
-Otherwise,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-base-IRI">
-invalid
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-</ol>
-</li>
-<li>
-If
-<i>
-context
-</i>
-has
-an
-<code>
[email protected]
-</code>
-key:
-<ol class="algorithm">
-<li>
-Initialize
-<i>
-value
-</i>
-to
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key.
-</li>
-<li>
-If
-<i>
-value
-</i>
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-remove
-any
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>
-from
-<i>
-result
-</i>.
-</li>
-<li>
-Otherwise,
-if
-<i>
-value
-</i>
-is
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-<ins class="diff-new">or
-</ins><a class="tref internalDFN" title="blank-node-identifier" href="#dfn-blank-node-identifier"><ins class="diff-new">
-blank
-node
-identifier
-</ins>
-</a>,
-the
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>
-of
-<i>
-result
-</i>
-is
-set
-to
-<i>
-value
-</i>.
-If
-it
-is
-not
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-<ins class="diff-new">or
-</ins><a class="tref internalDFN" title="blank-node-identifier" href="#dfn-blank-node-identifier"><ins class="diff-new">
-blank
-node
-identifier
-</ins>
-</a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-vocab-mapping">
-invalid
-vocab
-mapping
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-</ol>
-</li>
-<li>
-If
-<i>
-context
-</i>
-has
-an
-<code>
[email protected]
-</code>
-key:
-<ol class="algorithm">
-<li>
-Initialize
-<i>
-value
-</i>
-to
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key.
-</li>
-<li>
-If
-<i>
-value
-</i>
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-remove
-any
-<a class="tref internalDFN" title="default-language" href="#dfn-default-language">
-default
-language
-</a>
-from
-<i>
-result
-</i>.
-</li>
-<li>
-Otherwise,
-if
-<i>
-value
-</i>
-is
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-the
-<a class="tref internalDFN" title="default-language" href="#dfn-default-language">
-default
-language
-</a>
-of
-<i>
-result
-</i>
-is
-set
-to
-lowercased
-<i>
-value
-</i>.
-If
-it
-is
-not
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-default-language">
-invalid
-default
-language
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-</ol>
-</li>
-<li>
-Create
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-<i>
-defined
-</i>
-to
-use
-to
-keep
-track
-of
-whether
-or
-not
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-has
-already
-been
-defined
-or
-currently
-being
-defined
-during
-recursion.
-</li>
-<li>
-For
-each
-<i>
-key
-</i>
--
-<i>
-value
-</i>
-pair
-in
-<i>
-context
-</i>
-where
-<i>
-key
-</i>
-is
-not
-<code>
[email protected]
-</code>,
-<code>
[email protected]
-</code>,
-or
-<code>
[email protected]
-</code>,
-invoke
-the
-<a href="#create-term-definition">
-Create
-Term
-Definition
-algorithm
-</a>,
-passing
-<i>
-result
-</i>
-for
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-<i>
-context
-</i>
-for
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-<i>
-key
-</i>,
-and
-<i>
-defined
-</i>.
-</li>
-</ol>
-</li>
-<li>
-Return
-<i>
-result
-</i>.
-</li>
-</ol>
-</section>
-</section>
-<section id="create-term-definition">
-<h3>
-<span class="secno">
-6.2
-</span>
-Create
-Term
-Definition
-</h3>
-<p>
-This
-algorithm
-is
-called
-from
-the
-<a href="#context-processing-algorithm">
-Context
-Processing
-algorithm
-</a>
-to
-create
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-in
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-for
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-being
-processed
-in
-a
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>.
-</p>
-<section class="informative">
-<h4 id="overview-1">
-Overview
-</h4>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-Term
-definitions
-</a>
-are
-created
-by
-parsing
-the
-information
-in
-the
-given
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-for
-the
-given
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>.
-If
-the
-given
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-is
-a
-<a class="tref internalDFN" title="compact-iri" href="#dfn-compact-iri">
-compact
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>,
-it
-may
-omit
-an
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-by
-depending
-on
-its
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-having
-its
-own
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>.
-If
-the
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-is
-a
-key
-in
-the
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-then
-its
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-must
-first
-be
-created,
-through
-recursion,
-before
-continuing.
-Because
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-can
-depend
-on
-other
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definitions
-</a>,
-a
-mechanism
-must
-be
-used
-to
-detect
-cyclical
-dependencies.
-The
-solution
-employed
-here
-uses
-a
-map,
-<i>
-defined
-</i>,
-that
-keeps
-track
-of
-whether
-or
-not
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-has
-been
-defined
-or
-is
-currently
-in
-the
-process
-of
-being
-defined.
-This
-map
-is
-checked
-before
-any
-recursion
-is
-attempted.
-</p>
-<p>
-After
-all
-dependencies
-for
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-have
-been
-defined,
-the
-rest
-of
-the
-information
-in
-the
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-for
-the
-given
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-is
-taken
-into
-account,
-creating
-the
-appropriate
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>,
-<a class="tref internalDFN" title="container-mapping" href="#dfn-container-mapping">
-container
-mapping
-</a>,
-and
-<a class="tref internalDFN" title="type-mapping" href="#dfn-type-mapping">
-type
-mapping
-</a>
-or
-<a class="tref internalDFN" title="language-mapping" href="#dfn-language-mapping">
-language
-mapping
-</a>
-for
-the
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>.
-</p>
-</section>
-<section>
-<h4 id="algorithm-1">
-Algorithm
-</h4>
-<p>
-The
-algorithm
-has
-four
-required
-inputs
-which
-are:
-an
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-a
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-a
-<i>
-term
-</i>,
-and
-a
-map
-<i>
-defined
-</i>.
-</p>
-<ol class="algorithm">
-<li>
-If
-<i>
-defined
-</i>
-contains
-the
-key
-<i>
-term
-</i>
-and
-the
-associated
-value
-is
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>
-(indicating
-that
-the
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-has
-already
-been
-created),
-return.
-Otherwise,
-if
-the
-value
-is
-<a class="tref internalDFN" title="false" href="#dfn-false">
-false
-</a>,
-a
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.cyclic-IRI-mapping">
-cyclic
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-Set
-the
-value
-associated
-with
-<i>
-defined
-</i>
-'s
-<i>
-term
-</i>
-key
-to
-<a class="tref internalDFN" title="false" href="#dfn-false">
-false
-</a>.
-This
-indicates
-that
-the
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-is
-now
-being
-created
-but
-is
-not
-yet
-complete.
-</li>
-<li>
-Since
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keywords
-</a>
-cannot
-be
-overridden,
-<i>
-term
-</i>
-must
-not
-be
-a
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keyword
-</a>.
-Otherwise,
-a
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.keyword-redefinition">
-keyword
-redefinition
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-Remove
-any
-existing
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-for
-<i>
-term
-</i>
-in
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-</li>
-<li>
-Initialize
-<i>
-value
-</i>
-to
-a
-copy
-of
-the
-value
-associated
-with
-the
-key
-<i>
-term
-</i>
-in
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>.
-</li>
-<li>
-If
-<i>
-value
-</i>
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-or
-<i>
-value
-</i>
-is
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-containing
-the
-key-value
-pair
-<code>
[email protected]
-</code>
--
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-set
-the
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-in
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-to
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-set
-the
-value
-associated
-with
-<i>
-defined
-</i>
-'s
-key
-<i>
-term
-</i>
-to
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>,
-and
-return.
-</li>
-<li>
-Otherwise,
-if
-<i>
-value
-</i>
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-convert
-it
-to
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>
-consisting
-of
-a
-single
-member
-whose
-key
-is
-<code>
[email protected]
-</code>
-and
-whose
-value
-is
-<i>
-value
-</i>.
-</li>
-<li>
-Otherwise,
-<i>
-value
-</i>
-must
-be
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>,
-if
-not,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-term-definition">
-invalid
-term
-definition
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-Create
-a
-new
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>,
-<i>
-definition
-</i>.
-</li>
-<li>
-If
-<i>
-value
-</i>
-contains
-the
-key
-<code>
-<del class="diff-old">@reverse
-</del>
-<ins class="diff-chg">@type
-</ins>
-</code>:
-<ol class="algorithm">
-<li>
-<del class="diff-old">If
-</del>
-<ins class="diff-chg">Initialize
-</ins>
-<i>
-<del class="diff-old">value
-</del>
-<ins class="diff-chg">type
-</ins>
-</i>
-<del class="diff-old">contains
-</del>
-<ins class="diff-chg">to
-the
-value
-associated
-with
-the
-</ins><code><ins class="diff-chg">
[email protected]
-</ins></code><ins class="diff-chg">
-key,
-which
-must
-be
-a
-</ins><a class="tref internalDFN" title="string" href="#dfn-string"><ins class="diff-chg">
-string
-</ins></a>.<ins class="diff-chg">
-Otherwise,
-</ins>
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-type-mapping">
-<ins class="diff-new">invalid
-type
-mapping
-</ins></a></code><ins class="diff-new">
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</ins></li><li><ins class="diff-new">
-Set
-</ins><i><ins class="diff-new">
-type
-</ins></i><ins class="diff-new">
-to
-the
-result
-of
-using
-the
-</ins><a href="#iri-expansion"><abbr title="Internationalized Resource Identifier"><ins class="diff-new">
-IRI
-</ins></abbr><ins class="diff-new">
-Expansion
-algorithm
-</ins></a>,<ins class="diff-new">
-passing
-</ins><a class="tref internalDFN" title="active-context" href="#dfn-active-context"><ins class="diff-new">
-active
-context
-</ins></a>,<i><ins class="diff-new">
-type
-</ins></i><ins class="diff-new">
-for
-</ins><i><ins class="diff-new">
-value
-</ins></i>,<a class="tref internalDFN" title="true" href="#dfn-true"><ins class="diff-new">
-true
-</ins></a><ins class="diff-new">
-for
-</ins><i><ins class="diff-new">
-vocab
-</ins></i>,<a class="tref internalDFN" title="false" href="#dfn-false"><ins class="diff-new">
-false
-</ins></a><ins class="diff-new">
-for
-</ins><i><ins class="diff-new">
-document
-relative
-</ins></i>,<a class="tref internalDFN" title="local-context" href="#dfn-local-context"><ins class="diff-new">
-local
-context
-</ins></a>,<ins class="diff-new">
-and
-</ins><i><ins class="diff-new">
-defined
-</ins></i>.<ins class="diff-new">
-If
-the
-expanded
-</ins><i><ins class="diff-new">
-type
-</ins></i><ins class="diff-new">
-is
-neither
-</ins>
-<code>
[email protected]
-</code>,
-<del class="diff-old">an
-</del>
-<ins class="diff-chg">nor
-</ins>
-<code>
-<del class="diff-old">@type
-</del>
-<ins class="diff-chg">@vocab
-</ins>
-</code>,
-<del class="diff-old">or
-</del>
-<ins class="diff-chg">nor
-an
-</ins><a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri"><ins class="diff-chg">
-absolute
-</ins><abbr title="Internationalized Resource Identifier"><ins class="diff-chg">
-IRI
-</ins></abbr></a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-type-mapping">
-<ins class="diff-new">invalid
-type
-mapping
-</ins></a></code><ins class="diff-new">
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</ins></li><li><ins class="diff-new">
-Set
-the
-</ins><a class="tref internalDFN" title="type-mapping" href="#dfn-type-mapping"><ins class="diff-new">
-type
-mapping
-</ins></a><ins class="diff-new">
-for
-</ins><i><ins class="diff-new">
-definition
-</ins></i><ins class="diff-new">
-to
-</ins><i><ins class="diff-new">
-type
-</ins></i>.</li></ol></li><li><ins class="diff-new">
-If
-</ins><i><ins class="diff-new">
-value
-</ins></i><ins class="diff-new">
-contains
-the
-key
-</ins>
-<code>
-<del class="diff-old">@language
-</del>
-<ins class="diff-chg">@reverse
-</ins></code>:<ol class="algorithm"><li><ins class="diff-chg">
-If
-</ins><i><ins class="diff-chg">
-value
-</ins></i><ins class="diff-chg">
-contains
-an
-</ins><code><ins class="diff-chg">
[email protected]
-</ins>
-</code>,
-member,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-reverse-property">
-invalid
-reverse
-property
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-If
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key
-is
-not
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
-invalid
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-Otherwise,
-set
-the
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-of
-<i>
-definition
-</i>
-to
-the
-result
-of
-using
-the
-<a href="#iri-expansion">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-Expansion
-algorithm
-</a>,
-passing
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key
-for
-<i>
-value
-</i>,
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>
-for
-<i>
-vocab
-</i>,
-<a class="tref internalDFN" title="false" href="#dfn-false">
-false
-</a>
-for
-<i>
-document
-relative
-</i>,
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-and
-<i>
-defined
-</i>.
-If
-the
-result
-is
-not
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>,
-i.e.,
-it
-contains
-no
-colon
-(
-<code>:
-</code>
-),
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
-invalid
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-<del class="diff-old">Set
-the
-type
-mapping
-of
-definition
-to
[email protected]
-.
-</del>
-If
-<i>
-value
-</i>
-contains
-an
-<code>
[email protected]
-</code>
-member,
-set
-the
-<a class="tref internalDFN" title="container-mapping" href="#dfn-container-mapping">
-container
-mapping
-</a>
-of
-<i>
-definition
-</i>
-to
-<del class="diff-old">@index
-</del>
-<ins class="diff-chg">its
-value;
-</ins>
-if
-<del class="diff-old">that
-is
-the
-</del>
-<ins class="diff-chg">its
-</ins>
-value
-<del class="diff-old">of
-the
-</del>
-<ins class="diff-chg">is
-neither
-</ins>
-<code>
-<del class="diff-old">@container
-member;
-otherwise
-</del>
-<ins class="diff-chg">@set
-</ins></code>,<ins class="diff-chg">
-nor
-</ins><code><ins class="diff-chg">
[email protected]
-</ins></code>,<ins class="diff-chg">
-nor
-</ins><a class="tref internalDFN" title="null" href="#dfn-null"><ins class="diff-chg">
-null
-</ins></a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-reverse-property">
-invalid
-reverse
-property
-</a>
-</code>
-error
-has
-been
-detected
-(reverse
-properties
-only
-support
-<ins class="diff-new">set-
-and
-</ins>
-index-containers)
-and
-processing
-is
-aborted.
-</li>
-<li>
-Set
-the
-<a class="tref internalDFN" title="reverse-property" href="#dfn-reverse-property">
-reverse
-property
-</a>
-flag
-of
-<i>
-definition
-</i>
-to
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>.
-</li>
-<li>
-Set
-the
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-of
-<i>
-term
-</i>
-in
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-to
-<i>
-definition
-</i>
-and
-the
-value
-associated
-with
-<i>
-defined
-</i>
-'s
-key
-<i>
-term
-</i>
-to
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>
-and
-return.
-</li>
-</ol>
-</li>
-<li>
-Set
-the
-<a class="tref internalDFN" title="reverse-property" href="#dfn-reverse-property">
-reverse
-property
-</a>
-flag
-of
-<i>
-definition
-</i>
-to
-<a class="tref internalDFN" title="false" href="#dfn-false">
-false
-</a>.
-</li>
-<li>
-If
-<i>
-value
-</i>
-contains
-the
-key
-<code>
[email protected]
-</code>
-and
-its
-value
-does
-not
-equal
-<i>
-term
-</i>:
-<ol class="algorithm">
-<li>
-If
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key
-is
-not
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
-invalid
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-Otherwise,
-set
-the
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-of
-<i>
-definition
-</i>
-to
-the
-result
-of
-using
-the
-<a href="#iri-expansion">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-Expansion
-algorithm
-</a>,
-passing
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key
-for
-<i>
-value
-</i>,
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>
-for
-<i>
-vocab
-</i>,
-<a class="tref internalDFN" title="false" href="#dfn-false">
-false
-</a>
-for
-<i>
-document
-relative
-</i>,
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-and
-<i>
-defined
-</i>.
-If
-the
-resulting
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-equals
-<code>
[email protected]
-</code>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-keyword-alias">
-invalid
-keyword
-alias
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-</ol>
-</li>
-<li>
-Otherwise
-if
-the
-<i>
-term
-</i>
-contains
-a
-colon
-(
-<code>:
-</code>
-):
-<ol class="algorithm">
-<li>
-If
-<i>
-term
-</i>
-is
-a
-<a class="tref internalDFN" title="compact-iri" href="#dfn-compact-iri">
-compact
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-with
-a
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-that
-is
-a
-key
-in
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-a
-dependency
-has
-been
-found.
-Use
-this
-algorithm
-recursively
-passing
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-the
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-as
-<i>
-term
-</i>,
-and
-<i>
-defined
-</i>.
-</li>
-<li>
-If
-<i>
-term
-</i>
-'s
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-has
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-in
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-set
-the
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-of
-<i>
-definition
-</i>
-to
-the
-result
-of
-concatenating
-the
-value
-associated
-with
-the
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-'s
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-and
-the
-<i>
-term
-</i>
-'s
-<i>
-suffix
-</i>.
-</li>
-<li>
-Otherwise,
-<i>
-term
-</i>
-is
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>.
-Set
-the
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-of
-<i>
-definition
-</i>
-to
-<i>
-term
-</i>.
-</li>
-</ol>
-</li>
-<li>
-Otherwise,
-if
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-has
-a
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>,
-the
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-of
-<i>
-definition
-</i>
-is
-set
-to
-the
-result
-of
-concatenating
-the
-value
-associated
-with
-the
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>
-and
-<i>
-term
-</i>.
-If
-it
-does
-not
-have
-a
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
-invalid
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-</code>
-error
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-If
-<i>
-value
-</i>
-contains
-the
-key
-<code>
-<del class="diff-old">@type
-:
-Initialize
-type
-to
-the
-value
-associated
-with
-the
[email protected]
-key,
-which
-must
-be
-a
-string
-.
-Otherwise,
-an
-invalid
-type
-mapping
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-Set
-type
-to
-the
-result
-of
-using
-the
-IRI
-Expansion
-algorithm
-,
-passing
-active
-context
-,
-type
-for
-value
-,
-true
-for
-vocab
-,
-false
-for
-document
-relative
-,
-local
-context
-,
-and
-defined
-.
-If
-the
-expanded
-type
-is
-neither
[email protected]
-,
-nor
[email protected]
-,
-nor
-an
-absolute
-IRI
-,
-an
-invalid
-type
-mapping
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-Set
-the
-type
-mapping
-for
-definition
-to
-type
-.
-If
-value
-contains
-the
-key
-</del>
[email protected]
-</code>:
-<ol class="algorithm">
-<li>
-Initialize
-<i>
-container
-</i>
-to
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key,
-which
-must
-be
-either
-<code>
[email protected]
-</code>,
-<code>
[email protected]
-</code>,
-<code>
[email protected]
-</code>,
-or
-<code>
[email protected]
-</code>.
-Otherwise,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-container-mapping">
-invalid
-container
-mapping
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-Set
-the
-<a class="tref internalDFN" title="container-mapping" href="#dfn-container-mapping">
-container
-mapping
-</a>
-of
-<i>
-definition
-</i>
-to
-<i>
-container
-</i>.
-</li>
-</ol>
-</li>
-<li>
-If
-<i>
-value
-</i>
-contains
-the
-key
-<code>
[email protected]
-</code>
-and
-does
-not
-contain
-the
-key
-<code>
[email protected]
-</code>:
-<ol class="algorithm">
-<li>
-Initialize
-<i>
-language
-</i>
-to
-the
-value
-associated
-with
-the
-<code>
[email protected]
-</code>
-key,
-which
-must
-be
-either
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-or
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>.
-Otherwise,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-language-mapping">
-invalid
-language
-mapping
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-If
-<i>
-language
-</i>
-is
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-set
-it
-to
-lowercased
-<i>
-language
-</i>.
-Set
-the
-<a class="tref internalDFN" title="language-mapping" href="#dfn-language-mapping">
-language
-mapping
-</a>
-of
-<i>
-definition
-</i>
-to
-<i>
-language
-</i>.
-</li>
-</ol>
-</li>
-<li>
-Set
-the
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-of
-<i>
-term
-</i>
-in
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-to
-<i>
-definition
-</i>
-and
-set
-the
-value
-associated
-with
-<i>
-defined
-</i>
-'s
-key
-<i>
-term
-</i>
-to
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>.
-</li>
-</ol>
-</section>
-</section>
-<section id="iri-expansion">
-<h3>
-<span class="secno">
-6.3
-</span>
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-Expansion
-</h3>
-<p>
-In
-JSON-LD
-documents,
-some
-keys
-and
-values
-may
-represent
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-IRIs
-</a>.
-This
-section
-defines
-an
-algorithm
-for
-transforming
-a
-<a class="tref internalDFN" title="string" href="#dfn-string">
-string
-</a>
-that
-represents
-an
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-into
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-or
-<a class="tref internalDFN" title="blank-node-identifier" href="#dfn-blank-node-identifier">
-blank
-node
-identifier
-</a>.
-It
-also
-covers
-transforming
-<a class="tref internalDFN" title="keyword-alias" href="#dfn-keyword-alias">
-keyword
-aliases
-</a>
-into
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keywords
-</a>.
-</p>
-<p>
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-expansion
-may
-occur
-during
-context
-processing
-or
-during
-any
-of
-the
-other
-JSON-LD
-algorithms.
-If
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-expansion
-occurs
-during
-context
-processing,
-then
-the
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-and
-its
-related
-<i>
-defined
-</i>
-map
-from
-the
-<a href="#context-processing-algorithm">
-Context
-Processing
-algorithm
-</a>
-are
-passed
-to
-this
-algorithm.
-This
-allows
-for
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-dependencies
-to
-be
-processed
-via
-the
-<a href="#create-term-definition">
-Create
-Term
-Definition
-algorithm
-</a>.
-</p>
-<section class="informative">
-<h4 id="overview-2">
-Overview
-</h4>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-In
-order
-to
-expand
-<i>
-value
-</i>
-to
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>,
-we
-must
-first
-determine
-if
-it
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>,
-a
-<a class="tref internalDFN" title="keyword-alias" href="#dfn-keyword-alias">
-keyword
-alias
-</a>,
-or
-some
-form
-of
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>.
-Based
-on
-what
-we
-find,
-we
-handle
-the
-specific
-kind
-of
-expansion;
-for
-example,
-we
-expand
-a
-<a class="tref internalDFN" title="keyword-alias" href="#dfn-keyword-alias">
-keyword
-alias
-</a>
-to
-a
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keyword
-</a>
-and
-a
-<a class="tref internalDFN" title="term" href="#dfn-term">
-term
-</a>
-to
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-according
-to
-its
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-in
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>.
-While
-inspecting
-<i>
-value
-</i>
-we
-may
-also
-find
-that
-we
-need
-to
-create
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-dependencies
-because
-we're
-running
-this
-algorithm
-during
-context
-processing.
-We
-can
-tell
-whether
-or
-not
-we're
-running
-during
-context
-processing
-by
-checking
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-against
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>.
-We
-know
-we
-need
-to
-create
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-in
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-when
-<i>
-value
-</i>
-is
-a
-key
-in
-the
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-and
-the
-<i>
-defined
-</i>
-map
-does
-not
-have
-a
-key
-for
-<i>
-value
-</i>
-with
-an
-associated
-value
-of
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>.
-The
-<i>
-defined
-</i>
-map
-is
-used
-during
-<a href="#context-processing-algorithm">
-Context
-Processing
-</a>
-to
-keep
-track
-of
-which
-<a class="tref internalDFN" title="term" href="#dfn-term">
-terms
-</a>
-have
-already
-been
-defined
-or
-are
-in
-the
-process
-of
-being
-defined.
-We
-create
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-by
-using
-the
-<a href="#create-term-definition">
-Create
-Term
-Definition
-algorithm
-</a>.
-</p>
-</section>
-<section>
-<h4 id="algorithm-2">
-Algorithm
-</h4>
-<p>
-The
-algorithm
-takes
-two
-required
-and
-four
-optional
-input
-variables.
-The
-required
-inputs
-are
-an
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-and
-a
-<i>
-value
-</i>
-to
-be
-expanded.
-The
-optional
-inputs
-are
-two
-flags,
-<i>
-document
-relative
-</i>
-and
-<i>
-vocab
-</i>,
-that
-specifying
-whether
-<i>
-value
-</i>
-can
-be
-interpreted
-as
-a
-<a class="tref internalDFN" title="relative-iri" href="#dfn-relative-iri">
-relative
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-against
-the
-document's
-base
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-or
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context's
-</a>
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>,
-respectively,
-and
-a
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-and
-a
-map
-<i>
-defined
-</i>
-to
-be
-used
-when
-this
-algorithm
-is
-used
-during
-<a href="#context-processing-algorithm">
-Context
-Processing
-</a>.
-If
-not
-passed,
-the
-two
-flags
-are
-set
-to
-<code>
-false
-</code>
-and
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-and
-<i>
-defined
-</i>
-are
-initialized
-to
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>.
-</p>
-<ol class="algorithm">
-<li>
-If
-<i>
-value
-</i>
-is
-a
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keyword
-</a>
-or
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-return
-<i>
-value
-</i>
-as
-is.
-</li>
-<li>
-If
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-is
-not
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-it
-contains
-a
-key
-that
-equals
-<i>
-value
-</i>,
-and
-the
-value
-associated
-with
-the
-key
-that
-equals
-<i>
-value
-</i>
-in
-<i>
-defined
-</i>
-is
-not
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>,
-invoke
-the
-<a href="#create-term-definition">
-Create
-Term
-Definition
-algorithm
-</a>,
-passing
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-<i>
-value
-</i>
-as
-<i>
-term
-</i>,
-and
-<i>
-defined
-</i>.
-This
-will
-ensure
-that
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-is
-created
-for
-<i>
-value
-</i>
-in
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-during
-<a href="#context-processing-algorithm">
-Context
-Processing
-</a>.
-</li>
-<li>
-If
-<i>
-vocab
-</i>
-is
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>
-and
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-has
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-for
-<i>
-value
-</i>,
-return
-the
-associated
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>.
-</li>
-<li>
-If
-<i>
-value
-</i>
-contains
-a
-colon
-(
-<code>:
-</code>
-),
-it
-is
-either
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-or
-a
-<a class="tref internalDFN" title="compact-iri" href="#dfn-compact-iri">
-compact
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>:
-<ol class="algorithm">
-<li>
-Split
-<i>
-value
-</i>
-into
-a
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-and
-<i>
-suffix
-</i>
-at
-the
-first
-occurrence
-of
-a
-colon
-(
-<code>:
-</code>
-).
-</li>
-<li>
-If
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-is
-underscore
-(
-<code>
-_
-</code>
-)
-or
-<i>
-suffix
-</i>
-begins
-with
-double-forward-slash
-(
-<code>
-//
-</code>
-),
-return
-<i>
-value
-</i>
-as
-it
-is
-already
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>
-or
-a
-<a class="tref internalDFN" title="blank-node-identifier" href="#dfn-blank-node-identifier">
-blank
-node
-identifier
-</a>.
-</li>
-<li>
-If
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-is
-not
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-it
-contains
-a
-key
-that
-equals
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>,
-and
-the
-value
-associated
-with
-the
-key
-that
-equals
-<i>
-prefix
-</i>
-in
-<i>
-defined
-</i>
-is
-not
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>,
-invoke
-the
-<a href="#create-term-definition">
-Create
-Term
-Definition
-algorithm
-</a>,
-passing
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>,
-<i>
-prefix
-</i>
-as
-<i>
-term
-</i>,
-and
-<i>
-defined
-</i>.
-This
-will
-ensure
-that
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-is
-created
-for
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-in
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-during
-<a href="#context-processing-algorithm">
-Context
-Processing
-</a>.
-</li>
-<li>
-If
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-contains
-a
-<a class="tref internalDFN" title="term-definition" href="#dfn-term-definition">
-term
-definition
-</a>
-for
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>,
-return
-the
-result
-of
-concatenating
-the
-<a class="tref internalDFN" title="iri-mapping" href="#dfn-iri-mapping">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-associated
-with
-<a class="tref internalDFN" title="prefix" href="#dfn-prefix">
-prefix
-</a>
-and
-<i>
-suffix
-</i>.
-</li>
-<li>
-Return
-<i>
-value
-</i>
-as
-it
-is
-already
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>.
-</li>
-</ol>
-</li>
-<li>
-If
-<i>
-vocab
-</i>
-is
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>,
-and
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>
-has
-a
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>,
-return
-the
-result
-of
-concatenating
-the
-<a class="tref internalDFN" title="vocabulary-mapping" href="#dfn-vocabulary-mapping">
-vocabulary
-mapping
-</a>
-with
-<i>
-value
-</i>.
-</li>
-<li>
-Otherwise,
-if
-<i>
-document
-relative
-</i>
-is
-<a class="tref internalDFN" title="true" href="#dfn-true">
-true
-</a>,
-set
-<i>
-value
-</i>
-to
-the
-result
-of
-resolving
-<i>
-value
-</i>
-against
-the
-<a class="tref internalDFN" title="base-iri" href="#dfn-base-iri">
-base
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>.
-Only
-the
-basic
-algorithm
-in
-<cite>
-<a href="http://tools.ietf.org/html/rfc3986#section-5.2">
-section
-5.2
-</a>
-</cite>
-of
-[
-<cite>
-<a class="bibref" href="#bib-RFC3986">
-RFC3986
-</a>
-</cite>
-]
-is
-used;
-neither
-<cite>
-<a href="http://tools.ietf.org/html/rfc3986#section-6.2.2">
-Syntax-Based
-Normalization
-</a>
-</cite>
-nor
-<cite>
-<a href="http://tools.ietf.org/html/rfc3986#section-6.2.3">
-Scheme-Based
-Normalization
-</a>
-</cite>
-are
-performed.
-Characters
-additionally
-allowed
-in
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-references
-are
-treated
-in
-the
-same
-way
-that
-unreserved
-characters
-are
-treated
-in
-URI
-references,
-per
-<cite>
-<a href="http://tools.ietf.org/html/rfc3987#section-6.5">
-section
-6.5
-</a>
-</cite>
-of
-[
-<cite>
-<a class="bibref" href="#bib-RFC3987">
-RFC3987
-</a>
-</cite>
-].
-</li>
-<li>
-If
-<a class="tref internalDFN" title="local-context" href="#dfn-local-context">
-local
-context
-</a>
-is
-not
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-and
-<i>
-value
-</i>
-is
-not
-an
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-</a>,
-an
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.invalid-IRI-mapping">
-invalid
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-mapping
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-Otherwise,
-return
-<i>
-value
-</i>
-as
-is.
-</li>
-</ol>
-</section>
-</section>
-</section>
-<section id="expansion-algorithms">
-<h2>
-<span class="secno">
-7.
-</span>
-Expansion
-Algorithms
-</h2>
-<section id="expansion-algorithm">
-<h3>
-<span class="secno">
-7.1
-</span>
-Expansion
-Algorithm
-</h3>
-<p>
-This
-algorithm
-expands
-a
-JSON-LD
-document,
-such
-that
-all
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>
-definitions
-are
-removed,
-all
-<a class="tref internalDFN" title="term" href="#dfn-term">
-terms
-</a>
-and
-<a class="tref internalDFN" title="compact-iri" href="#dfn-compact-iri">
-compact
-IRIs
-</a>
-are
-expanded
-to
-<a class="tref internalDFN" title="absolute-iri" href="#dfn-absolute-iri">
-absolute
-IRIs
-</a>,
-<a class="tref internalDFN" title="blank-node-identifier" href="#dfn-blank-node-identifier">
-blank
-node
-identifiers
-</a>,
-or
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keywords
-</a>
-and
-all
-<a class="tref internalDFN" title="json-ld-value" href="#dfn-json-ld-value">
-JSON-LD
-values
-</a>
-are
-expressed
-in
-<a class="tref internalDFN" title="array" href="#dfn-array">
-arrays
-</a>
-in
-<a class="tref internalDFN" title="expanded-form" href="#dfn-expanded-form">
-expanded
-form
-</a>.
-</p>
-<section class="informative">
-<h4 id="overview-3">
-Overview
-</h4>
-<p>
-<em>
-This
-section
-is
-non-normative.
-</em>
-</p>
-<p>
-Starting
-with
-its
-root
-<i>
-element
-</i>,
-we
-can
-process
-the
-JSON-LD
-document
-recursively,
-until
-we
-have
-a
-fully
-<a class="tref internalDFN" title="expansion" href="#dfn-expansion">
-expanded
-</a>
-<i>
-result
-</i>.
-When
-<a class="tref internalDFN" title="expansion" href="#dfn-expansion">
-expanding
-</a>
-an
-<i>
-element
-</i>,
-we
-can
-treat
-each
-one
-differently
-according
-to
-its
-type,
-in
-order
-to
-break
-down
-the
-problem:
-</p>
-<ol>
-<li>
-If
-the
-<i>
-element
-</i>
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-there
-is
-nothing
-to
-expand.
-</li>
-<li>
-Otherwise,
-if
-<i>
-element
-</i>
-is
-a
-<a class="tref internalDFN" title="scalar" href="#dfn-scalar">
-scalar
-</a>,
-we
-expand
-it
-according
-to
-the
-<a href="#value-expansion">
-Value
-Expansion
-algorithm
-</a>.
-</li>
-<li>
-Otherwise,
-if
-the
-<i>
-element
-</i>
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-then
-we
-expand
-each
-of
-its
-items
-recursively
-and
-return
-them
-in
-a
-new
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>.
-</li>
-<li>
-Otherwise,
-<i>
-element
-</i>
-is
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>.
-We
-expand
-each
-of
-its
-keys,
-adding
-them
-to
-our
-<i>
-result
-</i>,
-and
-then
-we
-expand
-each
-value
-for
-each
-key
-recursively.
-Some
-of
-the
-keys
-will
-be
-<a class="tref internalDFN" title="term" href="#dfn-term">
-terms
-</a>
-or
-<a class="tref internalDFN" title="compact-iri" href="#dfn-compact-iri">
-compact
-IRIs
-</a>
-and
-others
-will
-be
-<a class="tref internalDFN" title="keyword" href="#dfn-keyword">
-keywords
-</a>
-or
-simply
-ignored
-because
-they
-do
-not
-have
-definitions
-in
-the
-<a class="tref internalDFN" title="context" href="#dfn-context">
-context
-</a>.
-Any
-<a class="tref internalDFN" title="iri" href="#dfn-iri">
-IRIs
-</a>
-will
-be
-expanded
-using
-the
-<a href="#iri-expansion">
-<abbr title="Internationalized Resource Identifier">
-IRI
-</abbr>
-Expansion
-algorithm
-</a>.
-</li>
-</ol>
-<p>
-Finally,
-after
-ensuring
-<i>
-result
-</i>
-is
-in
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-we
-return
-<i>
-result
-</i>.
-</p>
-</section>
-<section>
-<h4 id="algorithm-3">
-Algorithm
-</h4>
-<p>
-The
-algorithm
-takes
-three
-input
-variables:
-an
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-an
-<a class="tref internalDFN" title="active-property" href="#dfn-active-property">
-active
-property
-</a>,
-and
-an
-<i>
-element
-</i>
-to
-be
-expanded.
-To
-begin,
-the
-<del class="diff-old">active
-context
-is
-set
-to
-the
-result
-of
-performing,
-Context
-Processing
-on
-the
-passed
-expandContext
-,
-or
-empty
-if
-expandContext
-is
-null
-,
-</del>
-<a class="tref internalDFN" title="active-property" href="#dfn-active-property">
-active
-property
-</a>
-is
-set
-to
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-and
-<i>
-element
-</i>
-is
-set
-to
-the
-<a class="tref internalDFN" title="json-ld-input" href="#dfn-json-ld-input">
-JSON-LD
-input
-</a>.
-</p>
-<ol class="algorithm">
-<li>
-If
-<i>
-element
-</i>
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>,
-return
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>.
-</li>
-<li>
-If
-<i>
-element
-</i>
-is
-a
-<a class="tref internalDFN" title="scalar" href="#dfn-scalar">
-scalar
-</a>,
-<ol class="algorithm">
-<li>
-If
-<a class="tref internalDFN" title="active-property" href="#dfn-active-property">
-active
-property
-</a>
-is
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>
-or
-<code>
[email protected]
-</code>,
-drop
-the
-free-floating
-<a class="tref internalDFN" title="scalar" href="#dfn-scalar">
-scalar
-</a>
-by
-returning
-<a class="tref internalDFN" title="null" href="#dfn-null">
-null
-</a>.
-</li>
-<li>
-Return
-the
-result
-of
-the
-<a href="#value-expansion">
-Value
-Expansion
-algorithm
-</a>,
-passing
-the
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active-property" href="#dfn-active-property">
-active
-property
-</a>,
-and
-<i>
-element
-</i>
-as
-<i>
-value
-</i>.
-</li>
-</ol>
-</li>
-<li>
-If
-<i>
-element
-</i>
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-<ol class="algorithm">
-<li>
-Initialize
-an
-empty
-array,
-<i>
-result
-</i>.
-</li>
-<li>
-For
-each
-<i>
-item
-</i>
-in
-<i>
-element
-</i>:
-<ol class="algorithm">
-<li>
-Initialize
-<i>
-expanded
-item
-</i>
-to
-the
-result
-of
-using
-this
-algorithm
-recursively,
-passing
-<a class="tref internalDFN" title="active-context" href="#dfn-active-context">
-active
-context
-</a>,
-<a class="tref internalDFN" title="active-property" href="#dfn-active-property">
-active
-property
-</a>,
-and
-<i>
-item
-</i>
-as
-<i>
-element
-</i>.
-</li>
-<li>
-If
-the
-<a class="tref internalDFN" title="active-property" href="#dfn-active-property">
-active
-property
-</a>
-is
-<code>
[email protected]
-</code>
-or
-its
-<a class="tref internalDFN" title="container-mapping" href="#dfn-container-mapping">
-container
-mapping
-</a>
-is
-set
-to
-<code>
[email protected]
-</code>,
-the
-<i>
-expanded
-item
-</i>
-must
-not
-be
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>
-or
-a
-<a class="tref internalDFN" title="list-object" href="#dfn-list-object">
-list
-object
-</a>,
-otherwise
-a
-<code class="error">
-<a href="#idl-def-JsonLdErrorCode.list-of-lists">
-list
-of
-lists
-</a>
-</code>
-error
-has
-been
-detected
-and
-processing
-is
-aborted.
-</li>
-<li>
-If
-<i>
-expanded
-item
-</i>
-is
-an
-<a class="tref internalDFN" title="array" href="#dfn-array">
-array
-</a>,
-append
-each
-of
-its
-items
-to
-<i>
-result
-</i>.
-Otherwise,
-if
-<i>
-expanded
-item
-</i>
-is
-not
-null,
-append
-it
-to
-<i>
-result
-</i>.
-</li>
-</ol>
-</li>
-<li>
-Return
-<i>
-result
-</i>.
-</li>
-</ol>
-</li>
-<li>
-Otherwise
-<i>
-element
-</i>
-is
-a
-<a class="tref internalDFN" title="json-object" href="#dfn-json-object">
-JSON
-object
-</a>.
-</li>
<