--- a/spec/latest/index.html Wed Aug 31 00:32:20 2011 -0400
+++ b/spec/latest/index.html Thu Sep 01 13:59:21 2011 +0200
@@ -3,7 +3,7 @@
<head>
<title>JSON-LD 1.0</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
-<!--
+<!--
=== NOTA BENE ===
For the three scripts below, if your spec resides on dev.w3 you can check them
out in the same tree and use relative links so that they'll work offline,
@@ -143,7 +143,7 @@
specStatus: "unofficial",
//publishDate: "2010-04-29",
copyrightStart: "2010",
-
+
// the specification's short name, as in http://www.w3.org/TR/short-name/
shortName: "json-ld",
subtitle: "A Context-based JSON Serialization for Linking Data",
@@ -181,7 +181,7 @@
company: "Digital Bazaar", companyURL: "http://digitalbazaar.com/"}
],
- // authors, add as many as you like.
+ // authors, add as many as you like.
// This is optional, uncomment if you have authors as well as editors.
// only "name" is required. Same format as editors.
@@ -195,16 +195,16 @@
{ name: "Mark Birbeck", url: "http://webbackplane.com/",
company: "Backplane Ltd.", companyURL: "http://webbackplane.com/" },
],
-
+
// name of the WG
wg: "Linking Data in JSON Community Group",
-
+
// URI of the public WG page
wgURI: "http://json-ld.org/",
-
+
// name (with the @w3c.org) of the public mailing to which comments are due
wgPublicList: "public-linked-json@w3c.org",
-
+
// URI of the patent status for this WG, for Rec-track documents
// !!!! IMPORTANT !!!!
// This is important for Rec-track documents, do not copy a patent URI from a random
@@ -256,7 +256,7 @@
ol.algorithm.update>li { list-style-type: none; }
ol.algorithm.update>li>span.list-number {
display:block;
- float: left;
+ float: left;
margin-left: -3.5em;
}
</style>
@@ -265,11 +265,11 @@
<body>
<section id="abstract">
<p>
-JSON [[!RFC4627]] has proven to be a highly useful object serialization and
-messaging format. In an attempt to harmonize the representation of Linked Data
-in JSON, this specification outlines a common JSON representation format for
-expressing directed graphs; mixing both Linked Data and non-Linked Data in
-a single document.
+JSON [[!RFC4627]] has proven to be a highly useful object serialization and
+messaging format. In an attempt to harmonize the representation of Linked Data
+in JSON, this specification outlines a common JSON representation format for
+expressing directed graphs; mixing both Linked Data and non-Linked Data in
+a single document.
</p>
</section>
@@ -290,35 +290,35 @@
<h1>Introduction</h1>
<p>
-JSON, as specified in [[!RFC4627]], is a simple language for representing
-data on the Web. Linked Data is a technique for creating a graph of interlinked data across
-different
-documents or Web sites. Data entities are described using <tref>IRI</tref>s,
-which are typically dereferencable and thus may be used to find more
-information about an entity, creating a "Web of Knowledge". JSON-LD is intended to be a simple
+JSON, as specified in [[!RFC4627]], is a simple language for representing
+data on the Web. Linked Data is a technique for creating a graph of interlinked data across
+different
+documents or Web sites. Data entities are described using <tref>IRI</tref>s,
+which are typically dereferencable and thus may be used to find more
+information about an entity, creating a "Web of Knowledge". JSON-LD is intended to be a simple
publishing method for expressing not only Linked Data in JSON, but also for adding
semantics to existing JSON.
</p>
<p>
-JSON-LD is designed as a light-weight syntax that can be used to express
-Linked Data. It is primarily intended to be a way to use Linked Data
-in Javascript and other Web-based programming environments. It is also
-useful when building interoperable Web services and when storing Linked
-Data in JSON-based document storage engines. It is practical and designed
-to be as simple as possible, utilizing the large number of JSON parsers
-and libraries available today. It is designed to be able to
-express key-value pairs, RDF data, RDFa [[RDFA-CORE]] data, Microformats
-[[MICROFORMATS]] data, and Microdata [[MICRODATA]]. That is, it supports
-every major Web-based structured data model in use today.
+JSON-LD is designed as a light-weight syntax that can be used to express
+Linked Data. It is primarily intended to be a way to use Linked Data
+in Javascript and other Web-based programming environments. It is also
+useful when building interoperable Web services and when storing Linked
+Data in JSON-based document storage engines. It is practical and designed
+to be as simple as possible, utilizing the large number of JSON parsers
+and libraries available today. It is designed to be able to
+express key-value pairs, RDF data, RDFa [[RDFA-CORE]] data, Microformats
+[[MICROFORMATS]] data, and Microdata [[MICRODATA]]. That is, it supports
+every major Web-based structured data model in use today.
</p>
<p>
-The syntax does not necessarily require applications to change their JSON, but
-allows to easily add meaning by adding context in a way that is either in-band or
-out-of-band. The syntax is designed to not disturb already deployed systems
-running on JSON, but provide a smooth upgrade path from JSON to JSON with
-added semantics. Finally, the format is intended to be easy to parse, efficient to
+The syntax does not necessarily require applications to change their JSON, but
+allows to easily add meaning by adding context in a way that is either in-band or
+out-of-band. The syntax is designed to not disturb already deployed systems
+running on JSON, but provide a smooth upgrade path from JSON to JSON with
+added semantics. Finally, the format is intended to be easy to parse, efficient to
generate, stream-based and document-based processing compatible, and require
a very small memory footprint in order to operate.
</p>
@@ -332,20 +332,20 @@
</p>
<ul>
- <li>Web developers that want to understand the design decisions and
+ <li>Web developers that want to understand the design decisions and
language syntax for JSON-LD.</li>
- <li>Software developers that want to encode Microformats, RDFa, or Microdata
+ <li>Software developers that want to encode Microformats, RDFa, or Microdata
in a way that is cross-language compatible via JSON.</li>
- <li>Software developers that want to implement processors and APIs for
+ <li>Software developers that want to implement processors and APIs for
JSON-LD.</li>
</ul>
<p>
-To understand the basics in this specification you must first be familiar with
+To understand the basics in this specification you must first be familiar with
JSON, which is detailed in [[!RFC4627]]. 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 [[ECMA-262]] and
-WebIDL [[!WEBIDL]]. To understand how JSON-LD maps to RDF, it is helpful to be
+intended to operate in a programming environment, it is useful to have working
+knowledge of the JavaScript programming language [[ECMA-262]] and
+WebIDL [[!WEBIDL]]. To understand how JSON-LD maps to RDF, it is helpful to be
familiar with the basic RDF concepts [[!RDF-CONCEPTS]].</p>
<p>
@@ -406,17 +406,17 @@
<a href="http://lists.w3.org/Archives/Public/public-linked-json/">public-linked-json@w3.org</a>
</li>
-<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held
+<li><a href="http://json-ld.org/minutes/">Public teleconferences</a> are held
on Tuesdays at 1500UTC on the second and fourth week of each month.
</li>
-<li>Specification bugs and issues should be reported in the
+<li>Specification bugs and issues should be reported in the
<a href="https://github.com/json-ld/json-ld.org/issues">issue tracker</a>.</li>
-<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the
+<li><a href="https://github.com/json-ld/json-ld.org/tree/master/spec">Source code</a> for the
specification can be found on Github.</li>
-<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a>
+<li>The <a href="http://webchat.freenode.net/?channels=#json-ld">#json-ld</a>
IRC channel is available for real-time discussion on irc.freenode.net.</li>
</ul>
@@ -427,7 +427,7 @@
<section>
<h1>Design</h1>
-<p>The following section outlines the design goals and rationale behind the
+<p>The following section outlines the design goals and rationale behind the
JSON-LD markup language.
</p>
@@ -435,13 +435,13 @@
<h2>Goals and Rationale</h2>
<p>
-A number of design considerations were explored during the creation of this
+A number of design considerations were explored during the creation of this
markup language:
</p>
<dl>
<dt>Simplicity</dt>
- <dd>Developers need only know JSON and three keywords to use the basic
+ <dd>Developers need only know JSON and three keywords to use the basic
functionality in JSON-LD. No extra processors or software libraries are
necessary to use JSON-LD in its most basic form. The language attempts to
ensure that developers have an easy learning curve.</dd>
@@ -459,13 +459,13 @@
linked was an approach that was driven by pragmatism. JSON-LD attempts to be
more practical than theoretical in its approach to Linked Data.</dd>-->
<dt>Zero Edits, most of the time</dt>
- <dd>JSON-LD provides a mechanism that allows developers to specify
+ <dd>JSON-LD provides a mechanism that allows developers to specify
context in a way that is out-of-band. This allows organizations that have
already deployed large JSON-based infrastructure to add meaning to their
JSON documents in a way that is not disruptive to their day-to-day operations and is
- transparent to their current customers. At times, mapping JSON to
- a graph representation can become difficult. In these instances, rather than
- having JSON-LD support esoteric markup, we chose not to support the use case
+ transparent to their current customers. At times, mapping JSON to
+ a graph representation can become difficult. In these instances, rather than
+ having JSON-LD support esoteric markup, we chose not to support the use case
and support a simplified syntax instead. So, while Zero Edits is a goal,
it is not always possible without adding great complexity to the language.
</dd>
@@ -477,7 +477,7 @@
<section>
<h2>Linked Data</h2>
<p>
-The following definition for <tref>Linked Data</tref> is the one that will
+The following definition for <tref>Linked Data</tref> is the one that will
be used for this specification.
</p>
<ol>
@@ -495,11 +495,11 @@
</ol>
<p>
-Note that the definition for <tref>Linked Data</tref> above is silent on the
-topic of unlabeled nodes. Unlabeled nodes are not considered
+Note that the definition for <tref>Linked Data</tref> above is silent on the
+topic of unlabeled nodes. Unlabeled nodes are not considered
<tref>Linked Data</tref>. However, this specification allows for the expression
-of unlabled nodes, as most graph-based data sets on the Web contain a number
-of associated nodes that are not named and thus are not directly
+of unlabled nodes, as most graph-based data sets on the Web contain a number
+of associated nodes that are not named and thus are not directly
de-referenceable.
</p>
</section>
@@ -508,19 +508,19 @@
<h2>Linking Data</h2>
<p>
-An Internationalized Resource Identifier
+An Internationalized Resource Identifier
(<tdef><abbr title="Internationalized Resource Identifier">IRI</abbr></tdef>),
-as described in [[!RFC3987]], is a mechanism for representing unique
-identifiers on the web. In <tref>Linked Data</tref>, an IRI is commonly
-used for expressing a <tref>subject</tref>, a <tref>property</tref> or an
+as described in [[!RFC3987]], is a mechanism for representing unique
+identifiers on the web. In <tref>Linked Data</tref>, an IRI is commonly
+used for expressing a <tref>subject</tref>, a <tref>property</tref> or an
<tref>object</tref>.
</p>
-<p>JSON-LD defines a mechanism to map JSON terms, i.e., keys and values, to IRIs. This does not mean
+<p>JSON-LD defines a mechanism to map JSON terms, i.e., keys and values, to IRIs. This does not mean
that JSON-LD requires every key or value to be an IRI, but rather ensures that
keys and values can be mapped to IRIs if the developer desires to transform
-their data into Linked Data. There are a few techniques that can ensure
-that developers will generate good Linked Data for the Web. JSON-LD
+their data into Linked Data. There are a few techniques that can ensure
+that developers will generate good Linked Data for the Web. JSON-LD
formalizes those techniques.
</p>
@@ -542,17 +542,15 @@
<section>
<h3>The Context</h3>
-<p>In JSON-LD, a context is used to map
- <tref>term</tref>
- s, i.e., keys and values in an JSON document,
-to
+<p>In JSON-LD, a context is used to map <tref>term</tref>s, i.e., keys and values
+ in an JSON document, to
<tref>IRI</tref>s. A <tdef>term</tdef> is a short word that MAY be expanded
-to an <tref>IRI</tref>. The semantic web, just like the document-based
-web, uses IRIs for unambiguous identification. The idea is that these
+to an <tref>IRI</tref>. The semantic web, just like the document-based
+web, uses IRIs for unambiguous identification. The idea is that these
<tref>term</tref>
s mean something that may be of use to other developers.
-For example, the term <code>name</code> may map directly to the IRI
-<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to
+For example, the term <code>name</code> may map directly to the IRI
+<code>http://xmlns.com/foaf/0.1/name</code>. This allows JSON-LD documents to
be constructed using the common JSON practice of simple name/value pairs while
ensuring that the data is useful outside of the page, API or database in which it
resides.
@@ -585,12 +583,12 @@
<p>The addition above transforms the previous JSON document into a JSON document
with added semantics because the <code>@context</code> specifies how the
-<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong>
-terms map to IRIs.
-Mapping those keys to IRIs gives the data global context. If two
+<strong>name</strong>, <strong>homepage</strong>, and <strong>avatar</strong>
+terms map to IRIs.
+Mapping those keys to IRIs gives the data global context. If two
developers use the same IRI to describe a property, they are more than likely
expressing the same concept. This allows both developers to re-use each others
-data without having to agree to how their data will inter-operate on a
+data without having to agree to how their data will inter-operate on a
site-by-site basis. Contexts may also contain datatype information
for certain <tref>term</tref>s as well as other processing instructions for
the JSON-LD processor.</p>
@@ -618,7 +616,7 @@
fashion. This is described later in this document. </p>
<p>
- The semantic web uses a special type of document called a
+ The semantic web uses a special type of document called a
<em>Web Vocabulary</em> to define <tref>term</tref>s.
Typically, these Web Vocabulary documents have <tref>prefix</tref>es associated
with them and contain a number of <tref>term</tref> declarations. A
@@ -626,35 +624,35 @@
to a Web Vocabulary base IRI. <tref>Prefix</tref>es are helpful when a developer
wants to mix multiple vocabularies together in a context, but does not want
to go to the trouble of defining every single term in every single vocabulary.
- Some Web Vocabularies may have dozens of terms defined. If a developer wants to use
- 3-4 different vocabularies, the number of terms that
- would have to be declared in a single context could become quite large. To
- reduce the number of different terms that must be defined, JSON-LD also allows
+ Some Web Vocabularies may have dozens of terms defined. If a developer wants to use
+ 3-4 different vocabularies, the number of terms that
+ would have to be declared in a single context could become quite large. To
+ reduce the number of different terms that must be defined, JSON-LD also allows
prefixes to be used to compact IRIs.
<p>
-<p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code>
+<p>For example, the IRI <code>http://xmlns.com/foaf/0.1/</code>
specifies a Web Vocabulary which may be represented using the
<code>foaf</code> <tref>prefix</tref>. The <code>foaf</code> Web Vocabulary
-contains a term called <strong>name</strong>. If you join the
-<code>foaf</code> <tref>prefix</tref> with the <strong>name</strong> suffix,
+contains a term called <strong>name</strong>. If you join the
+<code>foaf</code> <tref>prefix</tref> with the <strong>name</strong> suffix,
you can build a compact IRI that will expand out into an absolute IRI for the
<code>http://xmlns.com/foaf/0.1/name</code> vocabulary term.
-That is, the compact IRI, or short-form, is <code>foaf:name</code> and the
-expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary
+That is, the compact IRI, or short-form, is <code>foaf:name</code> and the
+expanded-form is <code>http://xmlns.com/foaf/0.1/name</code>. This vocabulary
term is used to specify a person's name.
</p>
<p>Developers, and machines, are able to use this IRI (plugging it
-directly into a web browser, for instance) to go to the term and get a
-definition of what the term means. Much like we can use <a href="http://wordnet.princeton.edu/">WordNet</a> today to
+directly into a web browser, for instance) to go to the term and get a
+definition of what the term means. Much like we can use <a href="http://wordnet.princeton.edu/">WordNet</a> today to
see the definition
-of words in the English language. Developers and machines need the same sort of
+of words in the English language. Developers and machines need the same sort of
definition of terms. IRIs provide a way to ensure that these terms
are unambiguous.
</p>
-<p>The context provides a collection of vocabulary <tref>term</tref>s and
+<p>The context provides a collection of vocabulary <tref>term</tref>s and
<tref>prefix</tref>es that can be used to expand JSON keys and values into
<tref>IRI</tref>s.</p>
@@ -663,10 +661,10 @@
<section>
<h3>From JSON to JSON-LD</h3>
-<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>,
+<p>If a set of terms such as, <strong>name</strong>, <strong>homepage</strong>,
and <strong>avatar</strong>,
are defined in a context, and that context is used to resolve the
-names in JSON objects, machines are able to automatically expand the terms to
+names in JSON objects, machines are able to automatically expand the terms to
something meaningful and unambiguous, like this:</p>
<pre class="example" data-transform="updateExample">
@@ -693,7 +691,7 @@
<section>
<h1>Basic Concepts</h1>
-<p>JSON-LD is designed to ensure that Linked Data concepts can be marked
+<p>JSON-LD is designed to ensure that Linked Data concepts can be marked
up in a way that is simple to understand and author by Web developers. In many
cases, regular JSON markup can become Linked Data with the simple addition
of a context. As more JSON-LD features are used, more semantics are added
@@ -702,22 +700,22 @@
<section>
<h2>IRIs</h2>
-<p>Expressing IRIs are fundamental to Linked Data as that is how most
-<tref>subject</tref>s and many <tref>object</tref> are named. IRIs can be
+<p>Expressing IRIs are fundamental to Linked Data as that is how most
+<tref>subject</tref>s and many <tref>object</tref> are named. IRIs can be
expressed in a variety of different ways in JSON-LD.</p>
<ol>
- <li>In general, <tref>term</tref>s in the key position in
+ <li>In general, <tref>term</tref>s in the key position in
a <tref>JSON object</tref> that have a mapping to an IRI or another key in the context are
- expanded to an IRI by JSON-LD processors. There are special rules for
- processing keys in <code>@context</code> and when dealing with keys that
+ expanded to an IRI by JSON-LD processors. There are special rules for
+ processing keys in <code>@context</code> and when dealing with keys that
start with the <code>@subject</code> character.</li>
- <li>An IRI is generated for the value specified using <code>@subject</code>,
+ <li>An IRI is generated for the value specified using <code>@subject</code>,
if it is a <tref>string</tref>.</li>
<li>An IRI is generated for the value specified using <code>@type</code>.</li>
- <li>An IRI is generated for the value specified using the <code>@iri</code>
+ <li>An IRI is generated for the value specified using the <code>@iri</code>
keyword.</li>
- <li>An IRI is generated when there are <code>@coerce</code> rules in
+ <li>An IRI is generated when there are <code>@coerce</code> rules in
effect for a key named <code>@iri</code>.</li>
</ol>
@@ -734,11 +732,11 @@
-->
</pre>
-<p>In the example above, the key
-<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as
+<p>In the example above, the key
+<code>http://xmlns.com/foaf/0.1/name</code> is interpreted as an IRI, as
opposed to being interpreted as a string.</p>
-<p>Term expansion occurs for IRIs if a term is defined within the
+<p>Term expansion occurs for IRIs if a term is defined within the
<tref>active context</tref>:</p>
<pre class="example" data-transform="updateExample">
@@ -768,7 +766,7 @@
<p><code>foaf:name</code> above will automatically expand out to the IRI
<code>http://xmlns.com/foaf/0.1/name</code>.</p>
-<p>An IRI is generated when a value is associated with a key using
+<p>An IRI is generated when a value is associated with a key using
the <code>@iri</code> keyword:</p>
<pre class="example" data-transform="updateExample">
@@ -787,10 +785,10 @@
<pre class="example" data-transform="updateExample">
<!--
{****
- "@context":
+ "@context":
{
...
- "@coerce":
+ "@coerce":
{
"@iri": "homepage"
}
@@ -812,8 +810,8 @@
<h2>Identifying the Subject</h2>
<p>
- <tref>To be able to externally reference nodes, it is important that each node has an unambiguous identifier. IRI</tref>
- s are a fundamental concept of Linked Data, and nodes should have a de-referencable
+ To be able to externally reference nodes, it is important that each node has an unambiguous identifier.
+ <tref>IRI</tref>s are a fundamental concept of Linked Data, and nodes should have a de-referencable
identifier used to name and locate them. For nodes to be truely linked, de-referencing the identifier
should result in a representation of that node. Associating an IRI with a node tells an application
that the returned document contains a description of the node requested.
@@ -837,7 +835,7 @@
-->
</pre>
-<p>The example above would set the subject to the IRI
+<p>The example above would set the subject to the IRI
<code>http://example.org/people#joebob</code>.
</p>
@@ -846,11 +844,11 @@
<section>
<h2>Specifying the Type</h2>
-<p>The type of a particular subject can be specified using the
-<code>@type</code> key. Specifying the type in this way will generate a
+<p>The type of a particular subject can be specified using the
+<code>@type</code> key. Specifying the type in this way will generate a
triple of the form (subject, type, type-iri).</p>
-<p>To be Linked Data, types MUST be uniquely identified by an
+<p>To be Linked Data, types MUST be uniquely identified by an
<tref>IRI</tref>.</p>
<pre class="example" data-transform="updateExample">
@@ -864,12 +862,12 @@
-->
</pre>
-<p>The example above would generate the following triple if the JSON-LD
+<p>The example above would generate the following triple if the JSON-LD
document is mapped to RDF (in N-Triples notation):</p>
<pre class="example" data-transform="updateExample">
<!--
-<http://example.org/people#joebob>
+<http://example.org/people#joebob>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .
-->
@@ -880,7 +878,7 @@
<section>
<h2>Strings</h2>
-<p>Regular text strings, also referred to as <tdef>plain literal</tdef>s, are
+<p>Regular text strings, also referred to as <tdef>plain literal</tdef>s, are
easily expressed using regular JSON <tref>string</tref>s.</p>
<pre class="example" data-transform="updateExample">
@@ -898,9 +896,9 @@
<section>
<h2>String Internationalization</h2>
-<p>JSON-LD makes an assumption that strings with associated language encoding
-information are not very common when used in JavaScript and Web Services.
-Thus, it takes a little more effort to express strings with associated
+<p>JSON-LD makes an assumption that strings with associated language encoding
+information are not very common when used in JavaScript and Web Services.
+Thus, it takes a little more effort to express strings with associated
language information.</p>
<pre class="example" data-transform="updateExample">
@@ -917,8 +915,8 @@
-->
</pre>
-<p>The example above would generate a <tref>plain literal</tref> for
-<em>花澄</em> and associate the <code>ja</code> language code with the triple
+<p>The example above would generate a <tref>plain literal</tref> for
+<em>花澄</em> and associate the <code>ja</code> language code with the triple
that is generated. Languages MUST be expressed in [[!BCP47]] format.</p>
</section>
@@ -927,9 +925,9 @@
<h2>Datatypes</h2>
<p>
- A value with an associated datatype, also known as a
+ A value with an associated datatype, also known as a
<tdef>typed literal</tdef>, is indicated by associating a literal with
- an IRI which indicates the literal's datatype. Typed literals may be
+ an IRI which indicates the literal's datatype. Typed literals may be
expressed in JSON-LD in three ways:
</p>
@@ -945,11 +943,11 @@
<pre class="example" data-transform="updateExample">
<!--
{****
- "@context":
+ "@context":
{
"modified": "http://purl.org/dc/terms/modified",
"dateTime": "http://www.w3.org/2001/XMLSchema#dateTime"
- "@coerce":
+ "@coerce":
{
"dateTime": "modified"
}
@@ -981,9 +979,8 @@
<code>2010-05-29T14:17:39+02:00</code> and the datatype of
<code>http://www.w3.org/2001/XMLSchema#dateTime</code>.</p>
-<p>The third form uses a built-in native JSON type, a
- <tref>number</tref>, to
-express a datatype:</p>
+<p>The third form uses a built-in native JSON type, a
+ <tref>number</tref>, to express a datatype:</p>
<pre class="example" data-transform="updateExample">
<!--
@@ -1000,8 +997,8 @@
<pre class="example" data-transform="updateExample">
<!--
-<http://example.org/people#joebob>
- <http://xmlns.com/foaf/0.1/age>
+<http://example.org/people#joebob>
+ <http://xmlns.com/foaf/0.1/age>
"31"^^<http://www.w3.org/2001/XMLSchema#integer> .
-->
</pre>
@@ -1035,13 +1032,13 @@
<pre class="example" data-transform="updateExample">
<!--
-<http://example.org/people#joebob>
+<http://example.org/people#joebob>
<http://xmlns.com/foaf/0.1/nick>
"joe" .
-<http://example.org/people#joebob>
+<http://example.org/people#joebob>
<http://xmlns.com/foaf/0.1/nick>
"bob" .
-<http://example.org/people#joebob>
+<http://example.org/people#joebob>
<http://xmlns.com/foaf/0.1/nick>
"jaybee" .
-->
@@ -1080,10 +1077,10 @@
<pre class="example" data-transform="updateExample">
<!--
-<http://example.org/articles/8>
+<http://example.org/articles/8>
<http://purl.org/dc/terms/modified>
"2010-05-29T14:17:39+02:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-<http://example.org/articles/8>
+<http://example.org/articles/8>
<http://purl.org/dc/terms/modified>
"2010-05-30T09:21:28-04:00"^^http://www.w3.org/2001/XMLSchema#dateTime .
-->
@@ -1094,9 +1091,9 @@
<section>
<h2>Expansion</h2>
-<p>Expansion is the process of taking a JSON-LD document and applying a
+<p>Expansion is the process of taking a JSON-LD document and applying a
context such that all IRI, datatypes, and literal values are expanded so
-that the context is no longer necessary. JSON-LD document expansion
+that the context is no longer necessary. JSON-LD document expansion
is typically used as a part of the <a href="#normalization">Normalization</a>
process.</p>
@@ -1105,11 +1102,11 @@
<pre class="example" data-transform="updateExample">
<!--
{
- "@context":
+ "@context":
{
"name": "http://xmlns.com/foaf/0.1/name",
"homepage": "http://xmlns.com/foaf/0.1/homepage",
- "@coerce":
+ "@coerce":
{
"@iri": "homepage"
}
@@ -1120,14 +1117,14 @@
-->
</pre>
-<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document
+<p>Running the JSON-LD Expansion algorithm against the JSON-LD input document
provided above would result in the following output:</p>
<pre class="example" data-transform="updateExample">
<!--
{
"http://xmlns.com/foaf/0.1/name": "Manu Sporny",
- "http://xmlns.com/foaf/0.1/homepage":
+ "http://xmlns.com/foaf/0.1/homepage":
{
"@iri": "http://manu.sporny.org/"
}
@@ -1135,12 +1132,12 @@
-->
</pre>
-</section>
+</section>
<section>
<h2>Compaction</h2>
-<p>Compaction is the process of taking a JSON-LD document and applying a
+<p>Compaction is the process of taking a JSON-LD document and applying a
context such that the most compact form of the document is generated. JSON
is typically expressed in a very compact, key-value format. That is, full
IRIs are rarely used as keys. At times, a JSON-LD document may be received
@@ -1154,7 +1151,7 @@
<!--
{
"http://xmlns.com/foaf/0.1/name": "Manu Sporny",
- "http://xmlns.com/foaf/0.1/homepage":
+ "http://xmlns.com/foaf/0.1/homepage":
{
"@iri": "http://manu.sporny.org/"
}
@@ -1169,7 +1166,7 @@
{
"name": "http://xmlns.com/foaf/0.1/name",
"homepage": "http://xmlns.com/foaf/0.1/homepage",
- "@coerce":
+ "@coerce":
{
"@iri": "homepage"
}
@@ -1177,18 +1174,18 @@
-->
</pre>
-<p>Running the JSON-LD Compaction algorithm given the context supplied above
+<p>Running the JSON-LD Compaction algorithm given the context supplied above
against the JSON-LD input document provided above would result in the following
output:</p>
<pre class="example" data-transform="updateExample">
<!--
{
- "@context":
+ "@context":
{
"name": "http://xmlns.com/foaf/0.1/name",
"homepage": "http://xmlns.com/foaf/0.1/homepage",
- "@coerce":
+ "@coerce":
{
"@iri": "homepage"
}
@@ -1200,7 +1197,7 @@
</pre>
<p>The compaction algorithm also enables the developer to map any expanded
-format into an application-specific compacted format. While the context
+format into an application-specific compacted format. While the context
provided above mapped <code>http://xmlns.com/foaf/0.1/name</code> to
<strong>name</strong>, it could have also mapped it to any arbitrary string
provided by the developer.
@@ -1214,14 +1211,14 @@
<p>A JSON-LD document is a representation of a directed graph. A single
directed graph can have many different serializations, each expressing
exactly the same information. Developers typically work with trees, represented as
-<tref>JSON object</tref>s. While mapping a graph to
-a tree can be done, the layout of the end result must be specified in advance.
-A <tdef>Frame</tdef> can be used by a developer on a JSON-LD document to
+<tref>JSON object</tref>s. While mapping a graph to
+a tree can be done, the layout of the end result must be specified in advance.
+A <tdef>Frame</tdef> can be used by a developer on a JSON-LD document to
specify a deterministic layout for a graph.
</p>
<p>Framing is the process of taking a JSON-LD document, which expresses a
-graph of information, and applying a specific graph layout
+graph of information, and applying a specific graph layout
(called a <tref>Frame</tref>).
</p>
@@ -1238,24 +1235,24 @@
"description": "http://purl.org/dc/terms/description"
"Library": "http://example.org/vocab#Library",
"title": "http://purl.org/dc/terms/title",
- "@coerce":
+ "@coerce":
{
"@iri": "contains"
},
},
- "@subject":
+ "@subject":
[{
"@subject": "http://example.com/library",
"@type": "Library",
"contains": "http://example.org/library/the-republic"
- },
+ },
{
"@subject": "http://example.org/library/the-republic",
"@type": "Book",
"creator": "Plato",
"title": "The Republic",
"contains": "http://example.org/library/the-republic#introduction"
- },
+ },
{
"@subject": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
@@ -1294,7 +1291,7 @@
-->
</pre>
-<p>When the framing algorithm is run against the previously defined
+<p>When the framing algorithm is run against the previously defined
JSON-LD document, paired with the <tref>frame</tref> above, the following
JSON-LD document is the end result:</p>
@@ -1347,24 +1344,23 @@
<section>
<h2>CURIEs</h2>
<p>
- Vocabulary terms in Linked Data documents may draw from a number of
+ Vocabulary terms in Linked Data documents may draw from a number of
different Web vocabularies. At times, declaring every single term that
- a document uses can require the developer to declare tens, if not
- hundreds of potential vocabulary terms that may be used across an
+ a document uses can require the developer to declare tens, if not
+ hundreds of potential vocabulary terms that may be used across an
application. This is a concern for at least three reasons; the
first is the cognitive load on the developer, the second is
the serialized size of the context, the third is future-proofing
- application contexts. In order to address these issues, the concept of a
+ application contexts. In order to address these issues, the concept of a
<em>Compact URI Expression</em> (CURIE) mechanism is introduced.</p>
<p>
- A <tdef>CURIE</tdef> is a compact way of describing an <tref>IRI</tref>.
- Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em>
- separated by a colon (<code>:</code>).
- The prefix is a short string that identifies a particular Web vocabulary.
+ A <tdef>CURIE</tdef> is a compact way of describing an <tref>IRI</tref>.
+ Generally, a CURIE is composed of a <em>prefix</em> and a <em>suffix</em>
+ separated by a colon (<code>:</code>).
+ The prefix is a short string that identifies a particular Web vocabulary.
For example, the prefix <code>foaf</code> may be used as a short
hand for the Friend-of-a-Friend Web Vocabulary, which is identified using
- the IRI
- <code>http://xmlns.com/foaf/0.1/</code>. A developer may append any of
+ the IRI <code>http://xmlns.com/foaf/0.1/</code>. A developer may append any of
the FOAF Vocabulary terms to the end of the prefix to specify a short-hand
version of the full IRI for the vocabulary term. For example,
<code>foaf:name</code> would be the CURIE for the IRI
@@ -1375,15 +1371,15 @@
<p>
The ability to use CURIEs reduces the need for developers to declare
every vocabulary term that they intend to use in
- the JSON-LD context. This reduces document serialization size because
- every vocabulary term need not be declared in the context. CURIEs also
+ the JSON-LD context. This reduces document serialization size because
+ every vocabulary term need not be declared in the context. CURIEs also
reduce the cognitive load on the developer. It is far easier to
remember <code>foaf:name</code> than it is to remember
<code>http://xmlns.com/foaf/0.1/name</code>. The use of CURIEs also
ensures that a context document does not have to be updated in lock-step
with an externally defined Web Vocabulary. Without CURIEs, a developer
would need to keep their application context terms in lock-step with an
- externally defined Web Vocabulary. Rather, by just declaring the
+ externally defined Web Vocabulary. Rather, by just declaring the
Web Vocabulary CURIE prefix, one can use new terms as they're declared
without having to update the application's JSON-LD context.
</p>
@@ -1413,15 +1409,15 @@
-->
</pre>
<p>
- In this example, two different vocabularies are identified with
- CURIE prefixes, and used as type and property values using the CURIE
+ In this example, two different vocabularies are identified with
+ CURIE prefixes, and used as type and property values using the CURIE
notation.
</p>
<p>
- CURIEs are defined more formally in RDFa Core 1.1,
- <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">Section 6
- "CURIE Syntax Definition"</a></cite> [[RDFA-CORE]].
- JSON-LD does not support the square-bracketed CURIE syntax as the
+ CURIEs are defined more formally in RDFa Core 1.1,
+ <cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">Section 6
+ "CURIE Syntax Definition"</a></cite> [[RDFA-CORE]].
+ JSON-LD does not support the square-bracketed CURIE syntax as the
mechanism is not required to disambiguate IRIs in a JSON-LD document like
it is in HTML documents.
</p>
@@ -1430,8 +1426,8 @@
<section>
<h2>Automatic Typing</h2>
-<p>Since JSON is capable of expressing typed information such as doubles,
-integers, and boolean values. As demonstrated below, JSON-LD utilizes that
+<p>Since JSON is capable of expressing typed information such as doubles,
+integers, and boolean values. As demonstrated below, JSON-LD utilizes that
information to create <tref>typed literal</tref>s:</p>
<pre class="example" data-transform="updateExample">
@@ -1456,18 +1452,18 @@
</pre>
<p class="note">When dealing with a number of modern programming languages,
-including JavaScript ECMA-262, there is no distinction between
-<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is,
-the <tref>number</tref> <code>5.3</code> and the <tref>number</tref>
-<code>5.3e0</code> are treated as if they were the same. When converting from
-JSON-LD to a language-native format and back, datatype information is lost in a
-number of these languages. Thus, one could say that <code>5.3</code> is a
-<strong>xsd:decimal</strong> and <code>5.3e0</code> is an
-<strong>xsd:double</strong> in JSON-LD, but when both values are
-converted to a language-native format the datatype difference between the two
-is lost because the machine-level representation will almost always be a
-<strong>double</strong>.
-Implementers should be aware of this potential round-tripping issue between
+including JavaScript ECMA-262, there is no distinction between
+<strong>xsd:decimal</strong> and <strong>xsd:double</strong> values. That is,
+the <tref>number</tref> <code>5.3</code> and the <tref>number</tref>
+<code>5.3e0</code> are treated as if they were the same. When converting from
+JSON-LD to a language-native format and back, datatype information is lost in a
+number of these languages. Thus, one could say that <code>5.3</code> is a
+<strong>xsd:decimal</strong> and <code>5.3e0</code> is an
+<strong>xsd:double</strong> in JSON-LD, but when both values are
+converted to a language-native format the datatype difference between the two
+is lost because the machine-level representation will almost always be a
+<strong>double</strong>.
+Implementers should be aware of this potential round-tripping issue between
<strong>xsd:decimal</strong> and <strong>xsd:double</strong>. Specifically
objects with a datatype of <strong>xsd:decimal</strong> MUST NOT be converted
to a language native type.
@@ -1478,20 +1474,20 @@
<section>
<h2>Type Coercion</h2>
-<p>JSON-LD supports the coercion of values to particular data types.
-Type coercion allows someone deploying JSON-LD to coerce the incoming or
-outgoing types to the proper data type based on a mapping of data type IRIs to
-property types. Using type coercion, one may convert simple JSON data to
+<p>JSON-LD supports the coercion of values to particular data types.
+Type coercion allows someone deploying JSON-LD to coerce the incoming or
+outgoing types to the proper data type based on a mapping of data type IRIs to
+property types. Using type coercion, one may convert simple JSON data to
properly typed RDF data.</p>
-<p>The example below demonstrates how a JSON-LD author can coerce values to
+<p>The example below demonstrates how a JSON-LD author can coerce values to
<tref>plain literal</tref>s, <tref>typed literal</tref>s and IRIs.</p>
<pre class="example" data-transform="updateExample">
<!--
{
- "@context":
- {
+ "@context":
+ {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"name": "http://xmlns.com/foaf/0.1/name",
@@ -1531,12 +1527,12 @@
<section>
<h2>Chaining</h2>
<p>
- Object <tdef>chaining</tdef> is a JSON-LD feature that allows an author to
- use the definition of JSON-LD objects as <tref>property</tref> values. This
- is a commonly used mechanism for creating a parent-child relationship
+ Object <tdef>chaining</tdef> is a JSON-LD feature that allows an author to
+ use the definition of JSON-LD objects as <tref>property</tref> values. This
+ is a commonly used mechanism for creating a parent-child relationship
between two <tref>subject</tref>s.
</p>
- <p>The example shows an two subjects related by a property from the first
+ <p>The example shows an two subjects related by a property from the first
subject:</p>
<pre class="example" data-transform="updateExample">
@@ -1552,9 +1548,9 @@
}
-->
</pre>
-
+
<p>
- An object definition, like the one used above, MAY be used as a
+ An object definition, like the one used above, MAY be used as a
JSON value at any point in JSON-LD.
</p>
</section>
@@ -1564,10 +1560,10 @@
<p>At times, it becomes necessary to be able to express information without
being able to specify the subject. Typically, this type of node is called
-an unlabeled node or a blank node. In JSON-LD, unlabeled node identifiers are
-automatically created if a subject is not specified using the
+an unlabeled node or a blank node. In JSON-LD, unlabeled node identifiers are
+automatically created if a subject is not specified using the
<code>@subject</code> keyword. However, authors may provide identifiers for
-unlabeled nodes by using the special <code>_</code> (underscore) <tref>CURIE</tref>
+unlabeled nodes by using the special <code>_</code> (underscore) <tref>CURIE</tref>
prefix. This allows to reference the node locally within the document but not in an external document.</p>
<pre class="example" data-transform="updateExample">
@@ -1581,7 +1577,7 @@
</pre>
<p>The example above would set the subject to <code>_:foo</code>, which can
-then be used later on in the JSON-LD markup to refer back to the
+then be used later on in the JSON-LD markup to refer back to the
unlabeled node. This practice, however, is usually frowned upon when
generating Linked Data. If a developer finds that they refer to the unlabeled
node more than once, they should consider naming the node using a resolve-able
@@ -1594,15 +1590,15 @@
<h2>Aliasing Keywords</h2>
<p>JSON-LD allows all of the syntax keywords, except for <code>@context</code>,
-to be aliased. This feature allows more legacy JSON content to be supported
-by JSON-LD. It also allows developers to design domain-specific implementations
+to be aliased. This feature allows more legacy JSON content to be supported
+by JSON-LD. It also allows developers to design domain-specific implementations
using only the JSON-LD context.</p>
<pre class="example" data-transform="updateExample">
<!--
{
- "@context":
- {
+ "@context":
+ {
****"url": "@subject"****,
****"a": "@type"****,
"name": "http://schema.org/name"
@@ -1614,8 +1610,8 @@
-->
</pre>
-<p>In the example above, the <code>@subject</code> and <code>@type</code>
-keywords have been given the aliases <strong>url</strong> and
+<p>In the example above, the <code>@subject</code> and <code>@type</code>
+keywords have been given the aliases <strong>url</strong> and
<strong>a</strong>, respectively.
</p>
@@ -1624,19 +1620,19 @@
<section>
<h2>Normalization</h2>
-<p>Normalization is the process of taking <tref>JSON-LD input</tref> and
-performing a deterministic transformation on that input that results in a
-<tref>JSON-LD output</tref> that any conforming JSON-LD processor would have
-generated given the same input. The problem is a fairly difficult technical
-problem to solve because it requires a directed graph to be ordered into a
-set of nodes and edges in a deterministic way. This is easy to do when all of
-the nodes have unique names, but very difficult to do when some of the nodes
+<p>Normalization is the process of taking <tref>JSON-LD input</tref> and
+performing a deterministic transformation on that input that results in a
+<tref>JSON-LD output</tref> that any conforming JSON-LD processor would have
+generated given the same input. The problem is a fairly difficult technical
+problem to solve because it requires a directed graph to be ordered into a
+set of nodes and edges in a deterministic way. This is easy to do when all of
+the nodes have unique names, but very difficult to do when some of the nodes
are not labeled.
</p>
<p>Normalization is useful when comparing two graphs against one another,
when generating a detailed list of differences between two graphs, and
-when generating a cryptographic digital signature for information contained
+when generating a cryptographic digital signature for information contained
in a graph or when generating a hash of the information contained in a graph.
</p>
@@ -1645,12 +1641,12 @@
<pre class="example" data-transform="updateExample">
<!--
{
- "@context":
+ "@context":
{
"name": "http://xmlns.com/foaf/0.1/name",
"homepage": "http://xmlns.com/foaf/0.1/homepage",
"xsd": "http://www.w3.org/2001/XMLSchema#",
- "@coerce":
+ "@coerce":
{
"@iri": ["homepage"]
}
@@ -1664,17 +1660,17 @@
<p>The example below is the normalized form of the JSON-LD document above:</p>
<p class="note">Whitespace is used below to aid readability. The normalization
-algorithm for JSON-LD removes all unnecessary whitespace in the fully
+algorithm for JSON-LD removes all unnecessary whitespace in the fully
normalized form.</p>
<pre class="example" data-transform="updateExample">
<!--
[{
- "@subject":
+ "@subject":
{
"@iri": "_:c14n0"
},
- "http://xmlns.com/foaf/0.1/homepage":
+ "http://xmlns.com/foaf/0.1/homepage":
{
"@iri": "http://manu.sporny.org/"
},
@@ -1684,7 +1680,7 @@
</pre>
<p>Notice how all of the <tref>term</tref>s have been expanded and sorted in
-alphabetical order. Also, notice how the <tref>subject</tref> has been
+alphabetical order. Also, notice how the <tref>subject</tref> has been
labeled with a <tref>blank node identifier</tref>. Normalization ensures that any arbitrary
graph containing exactly the same information would be normalized to exactly
the same form shown above.</p>
@@ -1696,9 +1692,9 @@
<section>
<h2>The Application Programming Interface</h2>
-<p>This API provides a clean mechanism that enables developers to convert
-JSON-LD data into a a variety of output formats that are easier to work with in
-various programming languages. If an API is provided in a programming
+<p>This API provides a clean mechanism that enables developers to convert
+JSON-LD data into a a variety of output formats that are easier to work with in
+various programming languages. If an API is provided in a programming
environment, the entire API MUST be implemented.
</p>
@@ -1747,7 +1743,7 @@
<dd><a href="#framing">Frames</a> the given <code>input</code>
using the <code>frame</code> according to the steps in the
<a href="#framing-algorithm">Framing Algorithm</a>. The
- <code>input</code> is used to build the framed output and is returned if
+ <code>input</code> is used to build the framed output and is returned if
there are no errors. Exceptions are thrown if there are errors.
<div class="issue">Define what the exceptions are. We need to specify
whether or not we want exceptions thrown, or errors returned to the
@@ -1783,7 +1779,7 @@
</dd>
<dt>object triples()</dt>
- <dd>Processes the <code>input</code> according to the
+ <dd>Processes the <code>input</code> according to the
<a href="#rdf-conversion-algorithm">RDF Conversion Algorithm</a>, calling
the provided <code>tripleCallback</code> for each triple generated.
<dl class="parameters">
@@ -1792,7 +1788,7 @@
<dt>JsonLDTripleCallback tripleCallback</dt>
<dd>A callback that is called whenever a processing error occurs on
the given <code>input</code>.
- <div class="issue">This callback should be aligned with the
+ <div class="issue">This callback should be aligned with the
RDF API.</div></dd>
<dt>object optional? context</dt>
<dd>An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</dd>
@@ -1807,10 +1803,10 @@
<section>
<h3>JsonLDProcessorCallback</h3>
-<p>The JsonLDProcessorCallback is called whenever a processing error occurs
+<p>The JsonLDProcessorCallback is called whenever a processing error occurs
while processing the <tref>JSON-LD input</tref>.</p>
-<dl title="[NoInterfaceObject Callback] interface JsonLDProcessorCallback"
+<dl title="[NoInterfaceObject Callback] interface JsonLDProcessorCallback"
class="idl">
<dt>void error()</dt>
@@ -1828,7 +1824,7 @@
<p>The JsonLDTripleCallback is called whenever the processor generates a
triple during the <code>triple()</code> call.</p>
-<dl title="[NoInterfaceObject Callback] interface JsonLDTripleCallback"
+<dl title="[NoInterfaceObject Callback] interface JsonLDTripleCallback"
class="idl">
<dt>void triple()</dt>
@@ -1860,15 +1856,15 @@
<p>All algorithms described in this section are intended to operate on
language-native data structures. That is, the serialization to a text-based
-JSON document isn't required as input or output to any of these algorithms and
+JSON document isn't required as input or output to any of these algorithms and
language-native data structures MUST be used where applicable.</p>
<section>
<h2>Syntax Tokens and Keywords</h2>
-
+
<p>JSON-LD specifies a number of syntax tokens and keywords that are using
in all algorithms described in this section:</p>
-
+
<dl>
<dt><code>@context</code></dt><dd>Used to set the <tref>local context</tref>.</dd>
<dt><code>@base</code></dt><dd>Used to set the base IRI for all object IRIs affected by the <tref>active context</tref>.</dd>
@@ -1893,12 +1889,12 @@
</dd>
<dt><tdef>active subject</tdef></dt>
<dd>
- the currently active subject that the processor should use when
+ the currently active subject that the processor should use when
processing.
</dd>
<dt><tdef>active property</tdef></dt>
<dd>
- the currently active property that the processor should use when
+ the currently active property that the processor should use when
processing.
</dd>
<dt><tdef>active object</tdef></dt>
@@ -1909,7 +1905,7 @@
<dt><tdef>active context</tdef></dt>
<dd>
a context that is used to resolve <tref>CURIE</tref>s while the processing
- algorithm is running. The <tref>active context</tref> is the context
+ algorithm is running. The <tref>active context</tref> is the context
contained within the <tref>processor state</tref>.
</dd>
<dt><tdef>local context</tdef></dt>
@@ -1920,10 +1916,10 @@
<dt><tdef>processor state</tdef></dt>
<dd>
the <tref>processor state</tref>, which includes the <tref>active
- context</tref>, <tref>current subject</tref>, and
+ context</tref>, <tref>current subject</tref>, and
<tref>current property</tref>. The <tref>processor state</tref> is managed
as a stack with elements from the previous <tref>processor state</tref>
- copied into a new <tref>processor state</tref> when entering a new
+ copied into a new <tref>processor state</tref> when entering a new
<tref>JSON object</tref>.
</dd>
<dt><tdef>JSON-LD input</tdef></dt>
@@ -1998,13 +1994,13 @@
<tref>active context</tref> overwriting any duplicate values.
</li>
</ol>
-
+
<section>
<h3>Coerce</h3>
<p>
Map each key-value pair in the <tref>local context</tref>'s
<code>@coerce</code> mapping into the <tref>active context</tref>'s
- <code>@coerce</code> mapping, overwriting any duplicate values in
+ <code>@coerce</code> mapping, overwriting any duplicate values in
the <tref>active context</tref>'s <code>@coerce</code> mapping.
The <code>@coerce</code> mapping has either a single <tref>CURIE</tref> or an
<tref>array</tref> of CURIEs. When merging with an existing mapping in the <tref>active context</tref>,
@@ -2063,24 +2059,24 @@
<section>
<h2>IRI Compaction</h2>
- <p>Some keys and values are expressed using IRIs. This section defines an
+ <p>Some keys and values are expressed using IRIs. This section defines an
algorithm for transforming an IRI to a compact IRI using the
- <tref>term</tref>s and <tref>prefix</tref>es specified in the
+ <tref>term</tref>s and <tref>prefix</tref>es specified in the
<tref>local context</tref>.</p>
<p>The algorithm for generating a compacted IRI is:
<ol class="algorithm">
<li>Search every key-value pair in the <tref>active context</tref> for
- a <tref>term</tref> that is a complete match
+ a <tref>term</tref> that is a complete match
against the IRI. If a complete match is found, the resulting compacted
- IRI is the <tref>term</tref> associated with the IRI in the
+ IRI is the <tref>term</tref> associated with the IRI in the
<tref>active context</tref>.</li>
<li>If a complete match is not found, search for a partial match from
the beginning of the IRI. For all matches that are found, the resulting
compacted IRI is the <tref>prefix</tref> associated with the partially
- matched IRI in the <tref>active context</tref> concatenated with a
+ matched IRI in the <tref>active context</tref> concatenated with a
colon (:) character and the unmatched part of the string. If there is
- more than one compacted IRI produced, the final value is the
+ more than one compacted IRI produced, the final value is the
shortest and lexicographically least value of the entire set of compacted IRIs.</li>
</ol>
</p>
@@ -2103,7 +2099,7 @@
and the value is the expanded IRI according to the
<a href="#iri-expansion">IRI Expansion</a> rules.</li>
<li>If the coercion target is a typed literal, expand the value
- by adding two new key-value pairs. The first key-value pair
+ by adding two new key-value pairs. The first key-value pair
will be <code>@literal</code> and the unexpanded value. The second
key-value pair will be <code>@datatype</code> and the associated
coercion datatype expanded according to the
@@ -2117,7 +2113,7 @@
<section>
<h2>Value Compaction</h2>
<p>Some values, such as IRIs and typed literals, may be expressed in an
- expanded form in JSON-LD. These values are required to be compacted at
+ expanded form in JSON-LD. These values are required to be compacted at
times when processing JSON-LD documents.
</p>
@@ -2129,7 +2125,7 @@
<ol class="algorithm">
<li>If the coercion target is an <code>@iri</code>, the compacted
value is the value associated with the <code>@iri</code> key,
- processed according to the
+ processed according to the
<a href="#iri-compaction">IRI Compaction</a> steps.</li>
<li>If the coercion target is a typed literal, the compacted
value is the value associated with the <code>@literal</code> key.
@@ -2146,9 +2142,9 @@
<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-<p>As stated previously, expansion is the process of taking a JSON-LD
-input and expanding all IRIs and typed literals to their fully-expanded form.
-The output will not contain a single context declaration and will have all IRIs
+<p>As stated previously, expansion is the process of taking a JSON-LD
+input and expanding all IRIs and typed literals to their fully-expanded form.
+The output will not contain a single context declaration and will have all IRIs
and typed literals fully expanded.
</p>
@@ -2156,22 +2152,22 @@
<h3>Expansion Algorithm</h3>
<ol class="algorithm">
- <li>If the top-level item in the <tref>JSON-LD input</tref> is an <tref>array</tref>,
+ <li>If the top-level item in the <tref>JSON-LD input</tref> is an <tref>array</tref>,
process each item in the <tref>array</tref> recursively using this algorithm.</li>
- <li>If the top-level item in the <tref>JSON-LD input</tref> is an object,
+ <li>If the top-level item in the <tref>JSON-LD input</tref> is an object,
update the <tref>local context</tref> according to the steps outlined in
- the <a href="#context">context</a> section. Process each key, expanding
+ the <a href="#context">context</a> section. Process each key, expanding
the key according to the <a href="#iri-expansion">IRI Expansion</a> rules.</li>
<ol class="algorithm">
<li>Process each value associated with each key:
<ol class="algorithm">
- <li>If the value is an <tref>array</tref>, process each item in the <tref>array</tref>
+ <li>If the value is an <tref>array</tref>, process each item in the <tref>array</tref>
recursively using this algorithm.</li>
<li>If the value is an object, process the object recursively
using this algorithm.</li>
- <li>Otherwise, check to see the associated key has an associated
- coercion rule. If the value should be coerced, expand the value
- according to the <a href="#value-expansion">Value Expansion</a> rules.
+ <li>Otherwise, check to see the associated key has an associated
+ coercion rule. If the value should be coerced, expand the value
+ according to the <a href="#value-expansion">Value Expansion</a> rules.
If the value does not need to be coerced, leave the value as-is.
</li>
</ol>
@@ -2187,7 +2183,7 @@
<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-<p>As stated previously, compaction is the process of taking a JSON-LD
+<p>As stated previously, compaction is the process of taking a JSON-LD
input and compacting all IRIs using a given context. The output
will contain a single top-level context declaration and will only use
<tref>term</tref>s and <tref>prefix</tref>es and will ensure that all
@@ -2198,14 +2194,14 @@
<h3>Compaction Algorithm</h3>
<ol class="algorithm">
- <li>Perform the <a href="#expansion-algorithm">Expansion Algorithm</a> on
+ <li>Perform the <a href="#expansion-algorithm">Expansion Algorithm</a> on
the <tref>JSON-LD input</tref>. This removes any existing context to allow the given context to be cleanly applied.</li>
<li>Set the <tref>active context</tref> to the given context.
- <li>If the top-level item is an <tref>array</tref>, process each item in the <tref>array</tref>
+ <li>If the top-level item is an <tref>array</tref>, process each item in the <tref>array</tref>
recursively, starting at this step.
<li>If the top-level item is an object, compress each key using the steps
defined in <a href="#iri-compaction">IRI Compaction</a> and compress each
- value using the steps defined in
+ value using the steps defined in
<a href="#value-compaction">Value Compaction</a>.</li>
</li>
</ol>
@@ -2222,9 +2218,9 @@
<p>A JSON-LD document is a representation of a directed graph. A single
directed graph can have many different serializations, each expressing
exactly the same information. Developers typically don't work directly with
-graphs, but rather, prefer trees when dealing with JSON. While mapping a graph
-to a tree can be done, the layout of the end result must be specified in
-advance. This section defines an algorithm for mapping a graph to
+graphs, but rather, prefer trees when dealing with JSON. While mapping a graph
+to a tree can be done, the layout of the end result must be specified in
+advance. This section defines an algorithm for mapping a graph to
a tree given a <tref>frame</tref>.
</p>
@@ -2238,7 +2234,7 @@
<dt><tdef>framing context</tdef></dt>
<dd>
a context containing the <tref>object embed flag</tref>, the
- <tref>explicit inclusion flag</tref> and the
+ <tref>explicit inclusion flag</tref> and the
<tref>omit default flag</tref>.
</dd>
<dt><tdef>object embed flag</tdef></dt>
@@ -2253,7 +2249,7 @@
</dd>
<dt><tdef>omit missing properties flag</tdef></dt>
<dd>
- a flag specifying that properties that are missing from the
+ a flag specifying that properties that are missing from the
<tref>JSON-LD input</tref> should be omitted from the output.
</dd>
<dt><tdef>match limit</tdef></dt>
@@ -2273,12 +2269,12 @@
<section>
<h3>Framing Algorithm</h3>
-<p>The framing algorithm takes <tref>JSON-LD input</tref> that has been
-normalized according to the
-<a href="#normalization-algorithm">Normalization Algorithm</a>
-(<strong>normalized input</strong>), an
+<p>The framing algorithm takes <tref>JSON-LD input</tref> that has been
+normalized according to the
+<a href="#normalization-algorithm">Normalization Algorithm</a>
+(<strong>normalized input</strong>), an
<tref>input frame</tref> that has been expanded according to the
-<a href="#expansion-algorithm">Expansion Algorithm</a>
+<a href="#expansion-algorithm">Expansion Algorithm</a>
(<strong>expanded frame</strong>), and a number of options and produces
<tref>JSON-LD output</tref>. The following series of steps is the recursive
portion of the framing algorithm:
@@ -2286,16 +2282,16 @@
<ol class="algorithm">
<li>Initialize the <tref>framing context</tref> by setting the
- <tref>object embed flag</tref>, clearing the
+ <tref>object embed flag</tref>, clearing the
<tref>explicit inclusion flag</tref>, and clearing the
<tref>omit missing properties flag</tref>. Override these values
based on input options provided to the algorithm by the application.
</li>
- <li>Generate a <tdef>list of frames</tdef> by processing the
+ <li>Generate a <tdef>list of frames</tdef> by processing the
<strong>expanded frame</strong>:
<ol class="algorithm">
- <li>If the <strong>expanded frame</strong> is not an <tref>array</tref>, set
- <tref>match limit</tref> to 1, place the
+ <li>If the <strong>expanded frame</strong> is not an <tref>array</tref>, set
+ <tref>match limit</tref> to 1, place the
<strong>expanded frame</strong> into the <tref>list of frames</tref>,
and set the <tref>JSON-LD output</tref> to <code>null</code>.</li>
<li>If the <strong>expanded frame</strong> is an empty <tref>array</tref>, place an
@@ -2303,60 +2299,60 @@
set the <tref>JSON-LD output</tref> to an <tref>array</tref>, and set
<tref>match limit</tref> to -1.</li>
<li>If the <strong>expanded frame</strong> is a non-empty <tref>array</tref>, add
- each item in the <strong>expanded frame</strong> into the
+ each item in the <strong>expanded frame</strong> into the
<tref>list of frames</tref>, set the <tref>JSON-LD output</tref> to an
<tref>array</tref>, and set <tref>match limit</tref> to -1.</li>
</ol></li>
- <li>Create a <tdef>match array</tdef> for each <strong>expanded frame</strong>
- in the <tref>list of frames</tref> halting when either the
- <tref>match limit</tref> is zero or the end of the
- <tref>list of frames</tref> is reached. If an
- <strong>expanded frame</strong> is
- not an object, the processor MUST throw a <code>Invalid Frame Format</code>
+ <li>Create a <tdef>match array</tdef> for each <strong>expanded frame</strong>
+ in the <tref>list of frames</tref> halting when either the
+ <tref>match limit</tref> is zero or the end of the
+ <tref>list of frames</tref> is reached. If an
+ <strong>expanded frame</strong> is
+ not an object, the processor MUST throw a <code>Invalid Frame Format</code>
exception. Add each matching item from the <strong>normalized input</strong>
- to the <tref>matches array</tref> and decrement the
+ to the <tref>matches array</tref> and decrement the
<tref>match limit</tref> by 1 if:
<ol class="algorithm">
- <li>The <strong>expanded frame</strong> has an <code>rdf:type</code>
- that exists in the item's list of <code>rdf:type</code>s. Note:
- the <code>rdf:type</code> can be an <tref>array</tref>, but only one value needs
- to be in common between the item and the
+ <li>The <strong>expanded frame</strong> has an <code>rdf:type</code>
+ that exists in the item's list of <code>rdf:type</code>s. Note:
+ the <code>rdf:type</code> can be an <tref>array</tref>, but only one value needs
+ to be in common between the item and the
<strong>expanded frame</strong> for a match.</li>
- <li>The <strong>expanded frame</strong> does not have an
- <code>rdf:type</code> property, but every property in the
+ <li>The <strong>expanded frame</strong> does not have an
+ <code>rdf:type</code> property, but every property in the
<strong>expanded frame</strong> exists in the item.</li>
</ol></li>
<li>Process each item in the <tref>match array</tref> with its associated
<tdef>match frame</tdef>:
<ol class="algorithm">
<li>If the <tref>match frame</tref> contains an <code>@embed</code>
- keyword, set the <tref>object embed flag</tref> to its value.
+ keyword, set the <tref>object embed flag</tref> to its value.
If the <tref>match frame</tref> contains an <code>@explicit</code>
- keyword, set the <tref>explicit inclusion flag</tref> to its value.
+ keyword, set the <tref>explicit inclusion flag</tref> to its value.
Note: if the keyword exists, but the value is neither
- <code>true</code> or <code>false</code>, set the associated flag to
+ <code>true</code> or <code>false</code>, set the associated flag to
<code>true</code>.</li>
<li>If the <tref>object embed flag</tref> is cleared and the item has
the <code>@subject</code> property, replace the item with the value
of the <code>@subject</code> property.</li>
<li>If the <tref>object embed flag</tref> is set and the item has
- the <code>@subject</code> property, and its IRI is in the
+ the <code>@subject</code> property, and its IRI is in the
<tref>map of embedded subjects</tref>, throw a
<code>Duplicate Embed</code> exception.</li>
<li>If the <tref>object embed flag</tref> is set and the item has
the <code>@subject</code> property and its IRI is not in the
<tref>map of embedded subjects</tref>:
<ol class="algorithm">
- <li>If the <tref>explicit inclusion flag</tref> is set,
+ <li>If the <tref>explicit inclusion flag</tref> is set,
then delete any key from the item that does not exist in the
<tref>match frame</tref>, except <code>@subject</code>.</li>
<li>For each key in the <tref>match frame</tref>, except for
keywords and <code>rdf:type</code>:
<ol class="algorithm">
- <li>If the key is in the item, then build a new
- <tdef>recursion input list</tdef> using the object or objects
+ <li>If the key is in the item, then build a new
+ <tdef>recursion input list</tdef> using the object or objects
associated with the key. If any object contains an
- <code>@iri</code> value that exists in the
+ <code>@iri</code> value that exists in the
<tref>normalized input</tref>, replace the object in the
<tref>recusion input list</tref> with a new object containing
the <code>@subject</code> key where the value is the value of
@@ -2368,13 +2364,13 @@
<tref>recursion match frame</tref> as input.</li>
<li>If the key is not in the item, add the key to the item and
set the associated value to an empty array if the
- <tref>match frame</tref> key's value is an array
+ <tref>match frame</tref> key's value is an array
or <code>null</code> otherwise.</li>
<li>If value associated with the item's key is <code>null</code>,
process the <tref>omit missing properties flag</tref>:
<ol class="algorithm">
- <li>If the value associated with the key in the
- <tref>match frame</tref> is an array, use the first frame
+ <li>If the value associated with the key in the
+ <tref>match frame</tref> is an array, use the first frame
from the array as the <tdef>property frame</tdef>, otherwise
set the <tref>property frame</tref> to an empty object.</li>
<li>If the <tref>property frame</tref> contains an
@@ -2385,7 +2381,7 @@
flag to <code>true</code>.</li>
<li>If the <tref>omit missing properties flag</tref> is set,
delete the key in the item. Otherwise, if the
- <code>@default</code> keyword is set in the
+ <code>@default</code> keyword is set in the
<tref>property frame</tref> set the item's value to the value
of <code>@default</code>.</li>
</ol></li>
@@ -2396,11 +2392,11 @@
<tref>JSON-LD output</tref>.
</ol>
<li>Return the <tref>JSON-LD output</tref>.</li>
-</ol>
-
-The final, non-recursive step of the framing algorithm requires the
-<tref>JSON-LD output</tref> to be compacted according to the
-<a href="#compaction-algorithm">Compaction Algorithm</a> by using the
+</ol>
+
+The final, non-recursive step of the framing algorithm requires the
+<tref>JSON-LD output</tref> to be compacted according to the
+<a href="#compaction-algorithm">Compaction Algorithm</a> by using the
context provided in the <tref>input frame</tref>. The resulting value is the
final output of the compaction algorithm and is what should be returned to the
application.
@@ -2414,20 +2410,20 @@
<p class="issue">This algorithm is a work in progress, do not implement it.</p>
-<p>Normalization is the process of taking <tref>JSON-LD input</tref> and
+<p>Normalization is the process of taking <tref>JSON-LD input</tref> and
performing a deterministic transformation on that input that results in all
-aspects of the graph being fully expanded and named in the
-<tref>JSON-LD output</tref>. The normalized output is generated in such a way
-that any conforming JSON-LD processor will generate identical output
-given the same input. The problem is a fairly difficult technical
-problem to solve because it requires a directed graph to be ordered into a
-set of nodes and edges in a deterministic way. This is easy to do when all of
-the nodes have unique names, but very difficult to do when some of the nodes
+aspects of the graph being fully expanded and named in the
+<tref>JSON-LD output</tref>. The normalized output is generated in such a way
+that any conforming JSON-LD processor will generate identical output
+given the same input. The problem is a fairly difficult technical
+problem to solve because it requires a directed graph to be ordered into a
+set of nodes and edges in a deterministic way. This is easy to do when all of
+the nodes have unique names, but very difficult to do when some of the nodes
are not labeled.
</p>
<p>In time, there may be more than one normalization algorithm that will need
-to be identified. For identification purposes, this algorithm is named
+to be identified. For identification purposes, this algorithm is named
<abbr title="Universal Graph Normalization Algorithm 2011">UGNA2011</abbr>.
</p>
@@ -2438,7 +2434,7 @@
<dd>
The subject IRI associated with a graph node. The subject IRI is expressed
using a key-value pair in a <tref>JSON object</tref> where the key is
- <code>@subject</code> and the value is a string that is an IRI or
+ <code>@subject</code> and the value is a string that is an IRI or
a <tref>JSON object</tref> containing the key <code>@iri</code> and
a value that is a string that is an IRI.
</dd>
@@ -2456,7 +2452,7 @@
</dd>
<dt><tdef>renaming counter</tdef></dt>
<dd>
- A counter that is used during the
+ A counter that is used during the
<a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. The
counter typically starts at one (1) and counts up for every node that is
relabeled. There will be two such renaming counters in an implementation
@@ -2468,7 +2464,7 @@
<dd>
An identifier that is created to aid in the normalization process in the
<a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a>. The
- value typically takes the form of <code>s<NUMBER></code> or
+ value typically takes the form of <code>s<NUMBER></code> or
<code>c<NUMBER></code>.
</dd>
</dl>
@@ -2477,7 +2473,7 @@
<section>
<h3>Normalization State</h3>
-<p>When performing the steps required by the normalization algorithm,
+<p>When performing the steps required by the normalization algorithm,
it is helpful to track the many pieces of information in a
data structure called the <tdef>normalization state</tdef>. Many of these
pieces simply provide indexes into the graph. The information
@@ -2509,7 +2505,7 @@
<dt><tdef>incoming list</tdef></dt>
<dd>
Lists the <tref>label</tref>s for all nodes in the graph for which
- the <tref>node reference</tref> is a property. This list is
+ the <tref>node reference</tref> is a property. This list is
initialized to an empty list.
</dd>
<dt><tdef>outgoing serialization map</tdef></dt>
@@ -2579,7 +2575,7 @@
<dd>
A map containing a representation of all nodes in the graph where the
key is a node <tref>label</tref> and the value is a single
- <tref>JSON object</tref> that has no nested sub-objects
+ <tref>JSON object</tref> that has no nested sub-objects
and has had all properties for the same node merged into a single
<tref>JSON object</tref>.
</dd>
@@ -2603,27 +2599,27 @@
the <a href="#expansion-algorithm">Expansion Algorithm</a> and store the
result as the <strong>expanded input</strong>.</li>
<li>Create a <tref>normalization state</tref>.</li>
-<li>Initialize the <tref>map of flattened nodes</tref> by recursively
-processing every <tdef>expanded node</tdef> in the
+<li>Initialize the <tref>map of flattened nodes</tref> by recursively
+processing every <tdef>expanded node</tdef> in the
<strong>expanded input</strong> in depth-first order:
<ol class="algorithm">
- <li>If the <tref>expanded node</tref> is an unlabeled node, add a
+ <li>If the <tref>expanded node</tref> is an unlabeled node, add a
new key-value pair to the <tref>expanded node</tref>
- where the key is <code>@subject</code> and the value is the
- concatenation of the <tref>labeling prefix</tref>
+ where the key is <code>@subject</code> and the value is the
+ concatenation of the <tref>labeling prefix</tref>
and the string value of the <tref>labeling counter</tref>.
Increment the <tref>labeling counter</tref>.</li>
- <li>Add the <tref>expanded node</tref> to the
+ <li>Add the <tref>expanded node</tref> to the
<tref>map of flattened nodes</tref>:
<ol class="algorithm">
- <li>If the <tref>expanded node</tref>'s <tref>label</tref> is already
- in the
- <tref>map of flattened nodes</tref> merge all properties from the
- entry in the <tref>map of flattened nodes</tref> into the
+ <li>If the <tref>expanded node</tref>'s <tref>label</tref> is already
+ in the
+ <tref>map of flattened nodes</tref> merge all properties from the
+ entry in the <tref>map of flattened nodes</tref> into the
<tref>expanded node</tref>.</li>
- <li>Go through every property associated with an array in the
+ <li>Go through every property associated with an array in the
<tref>expanded node</tref> and remove any duplicate IRI entries from
- the array. If the resulting array only has one IRI entry, change it
+ the array. If the resulting array only has one IRI entry, change it
from an array to an object.</li>
<li>Set the entry for the <tref>expanded node</tref>'s <tref>label</tref>
in the <tref>map of flattened nodes</tref> to the
@@ -2643,11 +2639,11 @@
by iterating over every node in the graph and adding its <tref>label</tref>
to the <tref>incoming list</tref> associated with each node found in its
properties.</li>
-<li>For every entry in the <tref>node state map</tref> that has a
+<li>For every entry in the <tref>node state map</tref> that has a
<tref>label</tref> that begins with <code>_:c14n</code>, relabel the node
using the <a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>.
<li>Label all of the nodes that contain a <code>@subject</code> key associated
-with a value starting with <code>_:</code> according to the steps in the
+with a value starting with <code>_:</code> according to the steps in the
<a href="#deterministic-labeling-algorithm">Deterministic Labeling Algorithm</a>.
</li>
</ol>
@@ -2656,7 +2652,7 @@
<section>
<h4>Node Relabeling Algorithm</h4>
-<p>This algorithm renames a node by generating a unique
+<p>This algorithm renames a node by generating a unique
<tdef>new label</tdef> and updating all references to that <tref>label</tref>
in the <tref>node state map</tref>. The <tdef>old label</tdef> and the
<tref>normalization state</tref> must be given as an input to the
@@ -2671,7 +2667,7 @@
the node has already been renamed.
</li>
<li>Generate the <tdef>new label</tdef> by concatenating the
- <tref>labeling prefix</tref> with the string value of the
+ <tref>labeling prefix</tref> with the string value of the
<tref>labeling counter</tref>. Increment the <tref>labeling counter</tref>.
</li>
<li>For the <tref>node state</tref> associated with the
@@ -2679,7 +2675,7 @@
by changing all the properties that reference the <tref>old label</tref> to
the <tref>new label</tref>.
</li>
- <li>Change the <tref>old label</tref> key in the <tref>node state map</tref>
+ <li>Change the <tref>old label</tref> key in the <tref>node state map</tref>
to the <tref>new label</tref> and set the associated
<tref>node reference</tref>'s <tref>label</tref> to the
<tref>new label</tref>.
@@ -2690,7 +2686,7 @@
<section>
<h4>Deterministic Labeling Algorithm</h4>
-<p>The deterministic labeling algorithm takes the
+<p>The deterministic labeling algorithm takes the
<tref>normalization state</tref>
and produces a <tdef>list of finished nodes</tdef> that is sorted and
contains deterministically named and expanded nodes from the graph.
@@ -2716,8 +2712,8 @@
the remainder of the <tref>list of unfinished nodes</tref> until it is
empty:
<ol class="algorithm">
- <li>Sort the <tref>list of unfinished nodes</tref> in descending order
- according to the
+ <li>Sort the <tref>list of unfinished nodes</tref> in descending order
+ according to the
<a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
determine the sort order.</li>
<li>Create a <tdef>list of labels</tdef> and initialize it to an
@@ -2739,7 +2735,7 @@
<tref>list of nodes to label</tref>.
</li></ol></li>
<li>For each <tref>label</tref> in the <tref>list of labels</tref>,
- relabel the associated node according to the
+ relabel the associated node according to the
<a href="#node-relabeling-algorithm">Node Relabeling Algorithm</a>. If
any <tref>outgoing serialization map</tref> contains a key that
matches the <tref>label</tref>, clear the map and set the associated
@@ -2755,8 +2751,8 @@
</li>
</ol>
</li>
- <li>Sort the <tref>list of finished nodes</tref> in descending order
- according to the
+ <li>Sort the <tref>list of finished nodes</tref> in descending order
+ according to the
<a href="#deep-comparison-algorithm">Deep Comparison Algorithm</a> to
determine the sort order.</li>
</ol>
@@ -2774,7 +2770,7 @@
</p>
<ol class="algorithm">
- <li>Compare the total number of node properties. The node with fewer
+ <li>Compare the total number of node properties. The node with fewer
properties is first.</li>
<li>Lexicographically sort the property IRIs for each node and compare
the sorted lists. If an IRI is found to be lexicographically smaller, the
@@ -2783,20 +2779,20 @@
<ol class="algorithm">
<li>The node associated with fewer property values is first.
</li>
- <li>Create an <tdef>alpha list</tdef> by adding all values associated
+ <li>Create an <tdef>alpha list</tdef> by adding all values associated
with the <tref>alpha</tref> property that are not unlabeled nodes.
</li>
- <li>Create a <tdef>beta list</tdef> by adding all values associated
+ <li>Create a <tdef>beta list</tdef> by adding all values associated
with the <tref>beta</tref> property that is not an unlabeled node.
</li>
- <li>Compare the length of <tref>alpha list</tref> and
+ <li>Compare the length of <tref>alpha list</tref> and
<tref>beta list</tref>. The node associated with the list containing
the fewer number of items is first.</li>
<li>Sort <tref>alpha list</tref> and <tref>beta list</tref> according to
the
<a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
For each offset into the <tref>alpha list</tref>, compare the item
- at the offset against the item at the same offset in the
+ at the offset against the item at the same offset in the
<tref>beta list</tref> according to the
<a href="#object-comparison-algorithm">Object Comparison Algorithm</a>.
The node associated with the lesser item is first.
@@ -2809,7 +2805,7 @@
and then incoming <tref>label</tref>.
<li>The node associated with the fewest number of incoming nodes is
first.</li>
- <li>For each offset into the <tref>incoming list</tref>s,
+ <li>For each offset into the <tref>incoming list</tref>s,
compare the associated properties and <tref>label</tref>s:
<ol class="algorithm">
<li>The node associated with a <tref>label</tref> that does not begin with
@@ -2828,7 +2824,7 @@
<li>The node with the lexicographically lesser <tref>label</tref>
is first.
</li>
- </ol>
+ </ol>
</ol></li>
<li>Otherwise, the nodes are equivalent.</li>
</section>
@@ -2837,7 +2833,7 @@
<h4>Object Comparison Algorithm</h4>
<p>
-The object comparison algorithm is designed to compare two graph node
+The object comparison algorithm is designed to compare two graph node
property values, <tref>alpha</tref> and <tref>beta</tref>, against the other.
The algorithm is useful when sorting two lists of graph node properties.
</p>
@@ -2854,19 +2850,19 @@
</li>
<li>If both values are literals:
<ol class="algorithm">
- <li>The lexicographically lesser string associated with
+ <li>The lexicographically lesser string associated with
<code>@literal</code> is first.
</li>
- <li>The lexicographically lesser string associated with
+ <li>The lexicographically lesser string associated with
<code>@datatype</code> is first.
</li>
- <li>The lexicographically lesser string associated with
+ <li>The lexicographically lesser string associated with
<code>@language</code> is first.
</li>
</ol>
</li>
- <li>If both values are expanded IRIs, the
- lexicographically lesser string associated with <code>@iri</code>
+ <li>If both values are expanded IRIs, the
+ lexicographically lesser string associated with <code>@iri</code>
is first.</li>
<li>Otherwise, the two values are equivalent.</li>
</ol>
@@ -2878,9 +2874,9 @@
<p>
The deep comparison algorithm is used to compare the difference between two
-nodes, <tref>alpha</tref> and <tref>beta</tref>.
+nodes, <tref>alpha</tref> and <tref>beta</tref>.
A deep comparison takes the incoming and outgoing node edges in
-a graph into account if the number of properties and value of those properties
+a graph into account if the number of properties and value of those properties
are identical. The algorithm is helpful when sorting a list of nodes and will
return whichever node should be placed first in a list if the two nodes are
not truly equivalent.
@@ -2943,35 +2939,35 @@
</dl>
<p>The deep comparison algorithm is as follows:</p>
-
+
<ol class="algorithm">
<li>Perform a comparison between <tref>alpha</tref> and <tref>beta</tref>
- according to the
+ according to the
<a href="#shallow-comparison-algorithm">Shallow Comparison Algorithm</a>.
- If the result does not show that the two nodes are equivalent, return
+ If the result does not show that the two nodes are equivalent, return
the result.
</li>
<li>Compare incoming and outgoing edges for each node, updating their
associated <tref>node state</tref> as each node is processed:
<ol class="algorithm">
<li>If the <tref>outgoing serialization map</tref> for <tref>alpha</tref>
- is empty, generate the serialization according to the
+ is empty, generate the serialization according to the
<a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
Provide <tref>alpha</tref>'s <tref>node state</tref>, a new
<tref>mapping state</tref>,
- <code>outgoing direction</code> to the algorithm as inputs.
+ <code>outgoing direction</code> to the algorithm as inputs.
<li>If the <tref>outgoing serialization map</tref> for <tref>beta</tref>
- is empty, generate the serialization according to the
+ is empty, generate the serialization according to the
<a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
Provide <tref>beta</tref>'s <tref>node state</tref>, a new
<tref>mapping state</tref>, and
<code>outgoing direction</code> to the algorithm as inputs.
<li>If <tref>alpha</tref>'s <tref>outgoing serialization</tref> is
- lexicographically less than <tref>beta</tref>'s, then
+ lexicographically less than <tref>beta</tref>'s, then
<tref>alpha</tref> is first. If it is greater, then <tref>beta</tref>
is first.</li>
<li>If the <tref>incoming serialization map</tref> for <tref>alpha</tref>
- is empty, generate the serialization according to the
+ is empty, generate the serialization according to the
<a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
Provide <tref>alpha</tref>'s <tref>node state</tref>, a new
<tref>mapping state</tref> with its <tref>serialized labels map</tref>
@@ -2979,7 +2975,7 @@
<tref>outgoing serialization map</tref>, and
<code>incoming direction</code> to the algorithm as inputs.
<li>If the <tref>incoming serialization map</tref> for <tref>beta</tref>
- is empty, generate the serialization according to the
+ is empty, generate the serialization according to the
<a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
Provide <tref>beta</tref>'s <tref>node state</tref>, a new
<tref>mapping state</tref> with its <tref>serialized labels map</tref>
@@ -2987,7 +2983,7 @@
<tref>outgoing serialization map</tref>, and
<code>incoming direction</code> to the algorithm as inputs.
<li>If <tref>alpha</tref>'s <tref>incoming serialization</tref> is
- lexicographically less than <tref>beta</tref>'s, then
+ lexicographically less than <tref>beta</tref>'s, then
<tref>alpha</tref> is first. If it is greater, then <tref>beta</tref>
is first.</li>
</ol></li>
@@ -3006,14 +3002,14 @@
</p>
<ol class="algorithm">
-<li>If the <tref>label</tref> exists in the
- <tref>processed labels map</tref>, terminate the algorithm as the
+<li>If the <tref>label</tref> exists in the
+ <tref>processed labels map</tref>, terminate the algorithm as the
<tref>serialization label</tref> has already been created.
</li>
<li>Set the value associated with the <tref>label</tref> in the
<tref>processed labels map</tref> to <code>true</code>.
</li>
-<li>Generate the next <tdef>serialization label</tdef> for the
+<li>Generate the next <tdef>serialization label</tdef> for the
<tref>label</tref> according to the
<a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>.
</li>
@@ -3030,17 +3026,17 @@
<tref>incoming list</tref> otherwise, if the <tref>label</tref> starts with
<code>_:</code>, it is the <tdef>target node label</tdef>:
<ol class="algorithm">
- <li>Look up the <tref>target node label</tref> in the
+ <li>Look up the <tref>target node label</tref> in the
<tref>processed labels map</tref> and if a mapping exists,
update the <tref>adjacent serialized labels map</tref> where the key is
the value in the <tref>serialization map</tref> and the value is the
<tref>target node label</tref>.</li>
- <li>Otherwise, add the <tref>target node label</tref> to the
+ <li>Otherwise, add the <tref>target node label</tref> to the
<tref>adjacent unserialized labels list</tref>.
</ol>
-</li>
-<li>Set the <tdef>maximum serialization combinations</tdef> to
- <code>1</code> or the length of the
+</li>
+<li>Set the <tdef>maximum serialization combinations</tdef> to
+ <code>1</code> or the length of the
<tref>adjacent unserialized labels list</tref>, whichever is greater.</li>
<li>While the <tref>maximum serialization combinations</tref> is greater than
<code>0</code>, perform the
@@ -3060,7 +3056,7 @@
<h4>Serialization Label Generation Algorithm</h4>
<p>
-The algorithm generates a <tref>serialization label</tref> given a
+The algorithm generates a <tref>serialization label</tref> given a
<tref>label</tref> and a <tref>mapping state</tref> and returns the
<tref>serialization label</tref>.
</p>
@@ -3075,7 +3071,7 @@
<tref>label</tref>.
</li>
<li>Otherwise, the <tref>serialization label</tref> is the
- letter <code>s</code> followed by the string value of
+ letter <code>s</code> followed by the string value of
<tref>mapping count</tref>. Increment the <tref>mapping count</tref> by
<code>1</code>.
</li>
@@ -3101,18 +3097,18 @@
<ol class="algorithm">
<li>If the <tref>adjacent unserialized labels list</tref> is not empty:
<ol class="algorithm">
- <li>Copy the <tref>adjacent serialized labels map</tref> to the
+ <li>Copy the <tref>adjacent serialized labels map</tref> to the
<tdef>adjacent serialized labels map copy</tdef>.</li>
<li>Remove the first <tref>unserialized label</tref> from the
- <tref>adjacent unserialized labels list</tref> and create a new
+ <tref>adjacent unserialized labels list</tref> and create a new
<tdef>new serialization label</tdef> according to the
<a href="#serialization-label-generation-algorithm">Serialization Label Generation Algorithm</a>.
- <li>Create a new key-value mapping in the
- <tref>adjacent serialized labels map copy</tref>
+ <li>Create a new key-value mapping in the
+ <tref>adjacent serialized labels map copy</tref>
where the key is the <tref>new serialization label</tref> and the value
is the <tref>unserialized label</tref>.
- <li>Set the <tdef>maximum serialization rotations</tdef> to
- <code>1</code> or the length of the
+ <li>Set the <tdef>maximum serialization rotations</tdef> to
+ <code>1</code> or the length of the
<tref>adjacent unserialized labels list</tref>, whichever is greater.
</li>
<li>While the <tref>maximum serialization rotations</tref> is greater than
@@ -3162,7 +3158,7 @@
<tref>directed serialization</tref> according to the
<a href="#mapping-serialization-algorithm">Serialization Comparison Algorithm</a>.
If the <tref>serialization string</tref> is less than or equal to
- the <tref>directed serialization</tref>:
+ the <tref>directed serialization</tref>:
<ol class="algorithm">
<li>For each value in the <tref>list of keys</tref>, run the
<a href="#node-serialization-algorithm">Node Serialization Algorithm</a>.
@@ -3221,13 +3217,13 @@
<li>Pop the <tdef>serialization key info</tdef> off of the
<tref>key stack</tref>.
</li>
- <li>For each <tdef>serialization key</tdef> in the
+ <li>For each <tdef>serialization key</tdef> in the
<tref>serialization key info</tref> array, starting at
the <tdef>serialization key index</tdef> from the
<tref>serialization key info</tref>:
<ol class="algorithm">
<li>If the <tref>serialization key</tref> is not in the
- <tref>adjacent info map</tref>, push the
+ <tref>adjacent info map</tref>, push the
<tref>serialization key info</tref> onto the
<tref>key stack</tref> and exit from this loop.
</li>
@@ -3240,7 +3236,7 @@
related node by performing the following steps:
<ol class="algorithm">
<li>Mark the <tref>serialization key</tref> as having
- been processed by adding a new key-value pair to
+ been processed by adding a new key-value pair to
<tref>serialized keys</tref> where the key
is the <tref>serialization key</tref> and the value is
<code>true</code>.
@@ -3297,17 +3293,17 @@
<ol class="algorithm">
<li>Initialize the <tref>label serialization</tref> to an empty string.</li>
- <li>Append the <code>[</code> character to the
+ <li>Append the <code>[</code> character to the
<tref>label serialization</tref>.</li>
- <li>Append all properties to the <tref>label serialization</tref> by
- processing each key-value pair in the <tref>node reference</tref>,
+ <li>Append all properties to the <tref>label serialization</tref> by
+ processing each key-value pair in the <tref>node reference</tref>,
excluding the
<code>@subject</code> property. The keys should be processed in
lexicographical order and their associated values should be processed
in the order produced by the
<a href="#object-comparison-algorithm">Object Comparison Algorithm</a>:
<ol class="algorithm">
- <li>Build a string using the pattern <code><</code><strong>KEY</strong><code>></code>
+ <li>Build a string using the pattern <code><</code><strong>KEY</strong><code>></code>
where <strong>KEY</strong> is the current key. Append string to the
<tref>label serialization</tref>.</li>
<li>The value may be a single object or an array of objects.
@@ -3318,47 +3314,47 @@
value that starts
with <code>_:</code>, set the <tref>object string</tref> to
the value <code>_:</code>. If the value does not
- start with <code>_:</code>, build the <tref>object string</tref>
- using the pattern
- <code><</code><strong>IRI</strong><code>></code>
+ start with <code>_:</code>, build the <tref>object string</tref>
+ using the pattern
+ <code><</code><strong>IRI</strong><code>></code>
where <strong>IRI</strong> is the value associated with the
<code>@iri</code> key.</li>
<li>If the object contains a <code>@literal</code> key and a
- <code>@datatype</code> key, build the <tref>object string</tref>
- using the pattern
+ <code>@datatype</code> key, build the <tref>object string</tref>
+ using the pattern
<code>"</code><strong>LITERAL</strong><code>"^^<</code><strong>DATATYPE</strong><code>></code>
where <strong>LITERAL</strong> is the value associated with the
<code>@literal</code> key and <strong>DATATYPE</strong> is the
value associated with the <code>@datatype</code> key.</li>
<li>If the object contains a <code>@literal</code> key and a
- <code>@language</code> key, build the <tref>object string</tref>
- using the pattern
+ <code>@language</code> key, build the <tref>object string</tref>
+ using the pattern
<code>"</code><strong>LITERAL</strong><code>"@</code><strong>LANGUAGE</strong>
where <strong>LITERAL</strong> is the value associated with the
<code>@literal</code> key and <strong>LANGUAGE</strong> is the
value associated with the <code>@language</code> key.</li>
- <li>Otherwise, the value is a string. Build the
- <tref>object string</tref> using the pattern
- <code>"</code><strong>LITERAL</strong><code>"</code>
+ <li>Otherwise, the value is a string. Build the
+ <tref>object string</tref> using the pattern
+ <code>"</code><strong>LITERAL</strong><code>"</code>
where <strong>LITERAL</strong> is the value associated with the
current key.</li>
<li>If this is the second iteration of the loop,
append a <code>|</code> separator character to the
<tref>label serialization</tref>.</li>
- <li>Append the <tref>object string</tref> to the
+ <li>Append the <tref>object string</tref> to the
<tref>label serialization</tref>.</li>
</ol>
</ol>
</li>
- <li>Append the <code>]</code> character to the
+ <li>Append the <code>]</code> character to the
<tref>label serialization</tref>.</li>
- <li>Append the <code>[</code> character to the
+ <li>Append the <code>[</code> character to the
<tref>label serialization</tref>.</li>
<li>Append all incoming references for the current
- <tref>label</tref> to the <tref>label serialization</tref> by
+ <tref>label</tref> to the <tref>label serialization</tref> by
processing all of the items associated with the <tref>incoming list</tref>:
<ol class="algorithm">
- <li>Build a <tdef>reference string</tdef>
+ <li>Build a <tdef>reference string</tdef>
using the pattern <code><</code><strong>PROPERTY</strong><code>></code><code><</code><strong>REFERER</strong><code>></code>
where <strong>PROPERTY</strong> is the property associated with the
incoming reference and <strong>REFERER</strong> is either the subject of
@@ -3368,18 +3364,18 @@
<li>If this is the second iteration of the loop,
append a <code>|</code> separator character to the
<tref>label serialization</tref>.</li>
- <li>Append the <tref>reference string</tref> to the
+ <li>Append the <tref>reference string</tref> to the
<tref>label serialization</tref>.</li>
</ol>
- <li>Append the <code>]</code> character to the
+ <li>Append the <code>]</code> character to the
<tref>label serialization</tref>.</li>
<li>Append all <tref>adjacent node labels</tref> to the
<tref>label serialization</tref> by concatenating the string value
- for all of them, one after the other, to the
+ for all of them, one after the other, to the
<tref>label serialization</tref>.</li>
- <li>Push the <tref>adjacent node labels</tref> onto the
+ <li>Push the <tref>adjacent node labels</tref> onto the
<tref>key stack</tref> and append the result of the
- <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>
+ <a href="#mapping-serialization-algorithm">Mapping Serialization Algorithm</a>
to the <tref>label serialization</tref>.
</ol>
@@ -3398,7 +3394,7 @@
<strong>"%1.6e"</strong> is the string formatter and <strong>value</strong>
is the value to be converted.</p>
-<p>To convert the a double value in JavaScript, implementers can use the
+<p>To convert the a double value in JavaScript, implementers can use the
following snippet of code:</p>
<pre class="example" data-transform="updateExample">
@@ -3413,12 +3409,12 @@
to the lossy nature of <strong>xsd:double</strong> values.</p>
<p class="issue">Round-tripping data can be problematic if we mix and
-match @coerce rules with JSON-native datatypes, like integers. Consider the
+match @coerce rules with JSON-native datatypes, like integers. Consider the
following code example:</p>
<pre class="example" data-transform="updateExample">
<!--
-var myObj = { "@context" : {
+var myObj = { "@context" : {
"number" : "http://example.com/vocab#number",
"@coerce": {
"xsd:nonNegativeInteger": "number"
@@ -3438,7 +3434,7 @@
values for the "number" value. myObj will be the number 42, while
myObj2 will be the string "42". This type of data round-tripping
error can bite developers. We are currently wondering if having a
-"coerce validation" phase in the parsing/normalization phases would be a
+"coerce validation" phase in the parsing/normalization phases would be a
good idea. It would prevent data round-tripping issues like the
one mentioned above.</p>
@@ -3452,15 +3448,15 @@
<p>
The JSON-LD Processing Model describes processing rules for extracting RDF
- from a JSON-LD document. Note that many uses of JSON-LD may not require
+ from a JSON-LD document. Note that many uses of JSON-LD may not require
generation of RDF.
</p>
<p>
The processing algorithm described in this section is provided in
-order to demonstrate how one might implement a JSON-LD to RDF processor.
+order to demonstrate how one might implement a JSON-LD to RDF processor.
Conformant implementations are only required to produce the same type and
-number of triples during the output process and are not required to
+number of triples during the output process and are not required to
implement the algorithm exactly as described.
</p>
@@ -3584,7 +3580,7 @@
the following steps:
<ol class="algorithm">
<li>
- If the key is <code>@type</code>, set the <tref>active property</tref>
+ If the key is <code>@type</code>, set the <tref>active property</tref>
to <code>rdf:type</code>.
</li>
<li>Otherwise, set the <tref>active property</tref> to the result of performing
@@ -3616,7 +3612,7 @@
</li>
</ol>
</li>
-
+
<li>
If a <tref>string</tref> is detected:
<ol class="algorithm">
@@ -3639,7 +3635,7 @@
triple representing the <tref>active subject</tref>, the <tref>active property</tref> and the
<tref>active object</tref>.
</li>
-
+
<li>
If a <tref>number</tref> is detected, generate a <tref>typed literal</tref> using a string representation of
the value with datatype set to either <code>xsd:integer</code> or
@@ -3647,7 +3643,7 @@
fractional and/or an exponential component. Generate a triple using the <tref>active
subject</tref>, <tref>active property</tref> and the generated typed literal.
</li>
-
+
<li>
Otherwise, if <strong>true</strong> or <strong>false</strong> is detected,
generate a triple using the <tref>active subject</tref>, <tref>active property</tref>
@@ -3657,29 +3653,29 @@
</ol>
</section>
-<!-- THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT
+<!-- THIS SHOULD BE SPLIT OUT INTO A SEPARATE DOCUMENT
<section>
<h1>Best Practices</h1>
<p>The nature of Web programming allows one to use basic technologies, such as
JSON-LD, across a variety of systems and environments. This section attempts to
-describe some of those environments and the way in which JSON-LD can be
+describe some of those environments and the way in which JSON-LD can be
integrated in order to help alleviate certain development headaches.
</p>
<section>
<h2>JavaScript</h2>
-<p class="issue">It is expected that JSON-LD will be used quite a bit in
+<p class="issue">It is expected that JSON-LD will be used quite a bit in
JavaScript environments, however, features like the expanded form for
-object values mean that using JSON-LD directly in JavaScript may be
-annoying without a middleware layer such as a simple library that
+object values mean that using JSON-LD directly in JavaScript may be
+annoying without a middleware layer such as a simple library that
converts JSON-LD markup before JavaScript uses it. One could say that JSON-LD
is a good fit for the RDF API, which enables a variety of RDF-based
-Web Applications, but some don't want to require that level of functionality
-just to use JSON-LD. The group is still discussing the best way to proceed,
-so input on how JSON-LD could more easily be utilized in JavaScript
+Web Applications, but some don't want to require that level of functionality
+just to use JSON-LD. The group is still discussing the best way to proceed,
+so input on how JSON-LD could more easily be utilized in JavaScript
environments would be very much appreciated.
</p>
</section>
@@ -3690,7 +3686,7 @@
<p class="issue">Databases such as CouchDB and MongoDB allow the creation of
schema-less data stores. RDF is a type of schema-less data model and thus
lends itself to databases such as CouchDB and MongoDB. Both of these databases
-can use JSON-LD as their storage format. The group needs feedback from
+can use JSON-LD as their storage format. The group needs feedback from
CouchDB and MongoDB experts regarding the usefulness of JSON-LD in those
environments.</p>
@@ -3710,10 +3706,10 @@
<section class="appendix">
<h1>Experimental Concepts</h1>
-<p class="issue">There are a few advanced concepts where it is not clear
-whether or not the JSON-LD specification is going to support the complexity
-necessary to support each concept. The entire section on Advanced Concepts
-should be considered as discussion points; it is merely a list of
+<p class="issue">There are a few advanced concepts where it is not clear
+whether or not the JSON-LD specification is going to support the complexity
+necessary to support each concept. The entire section on Advanced Concepts
+should be considered as discussion points; it is merely a list of
possibilities where all of the benefits and drawbacks have not been explored.
</p>
@@ -3731,10 +3727,10 @@
<pre class="example" data-transform="updateExample">
<!--
-<http://example.org/people#john>
+<http://example.org/people#john>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .
-<http://example.org/people#jane>
+<http://example.org/people#jane>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .
-->
@@ -3743,7 +3739,7 @@
<p>Since the two subjects are entirely disjoint with one another, it is
impossible to express the RDF graph above using a single <tref>JSON object</tref>.</p>
-<p>In JSON-LD, one can use the subject to express disjoint graphs as a
+<p>In JSON-LD, one can use the subject to express disjoint graphs as a
single graph:</p>
<pre class="example" data-transform="updateExample">
@@ -3752,7 +3748,7 @@
"@context": {
"Person": "http://xmlns.com/foaf/0.1/Person"
},
- "@subject":
+ "@subject":
[
{
"@subject": "http://example.org/people#john",
@@ -3784,10 +3780,8 @@
-->
</pre>
-<p>Warning: This serialisation format does not allow to specify a <code>@context</code> because the document's data
- structure is an array and not an object as in most other cases.</p>
-<p class="note">.
-</p>
+<p class="note">Warning: Using this serialisation format it is impossible to include <code>@context</code>
+ given that the document's data structure is an array and not an object.</p>
</section>
@@ -4021,13 +4015,13 @@
<p>The representation of the hCard expresses the Microformat terms in the
context and uses them directly for the <code>url</code> and <code>fn</code>
-properties. Also note that the Microformat to JSON-LD processor has
+properties. Also note that the Microformat to JSON-LD processor has
generated the proper URL type for <code>http://tantek.com</code>.</p>
<pre class="example" data-transform="updateExample">
<!--
{
- "@context":
+ "@context":
{
"vcard": "http://microformats.org/profile/hcard#vcard",
"url": "http://microformats.org/profile/hcard#url",
@@ -4091,7 +4085,7 @@
"@type": "http://purl.org/vocab/frbr/core#Work",
"http://purl.org/dc/terms/title": "Just a Geek",
"http://purl.org/dc/terms/creator": "Whil Wheaton",
- "http://purl.org/vocab/frbr/core#realization":
+ "http://purl.org/vocab/frbr/core#realization":
["http://purl.oreilly.com/products/9780596007683.BOOK", "http://purl.oreilly.com/products/9780596802189.EBOOK"]
},
{
@@ -4114,7 +4108,7 @@
<h3>Mashing Up Vocabularies</h3>
<p>Developers would also benefit by allowing other vocabularies to be used
-automatically with their JSON API. There are over 200
+automatically with their JSON API. There are over 200
Vocabulary Documents that are available for use on the Web today. Some
of these vocabularies are:
</p>
@@ -4146,8 +4140,8 @@
-->
</pre>
-<p>Developers can also specify their own Vocabulary documents by modifying the
-<tref>active context</tref> in-line using the <code>@context</code> keyword,
+<p>Developers can also specify their own Vocabulary documents by modifying the
+<tref>active context</tref> in-line using the <code>@context</code> keyword,
like so:</p>
<pre class="example" data-transform="updateExample">
@@ -4167,7 +4161,7 @@
<p>The <code>@context</code> keyword is used to change how the JSON-LD
processor evaluates key-value pairs. In this case, it was used to
map one string ('myvocab') to another string, which is interpreted as
-a <tref>IRI</tref>. In the example above, the <code>myvocab</code> string is replaced
+a <tref>IRI</tref>. In the example above, the <code>myvocab</code> string is replaced
with "<code>http://example.org/myvocab#</code>" when it
is detected. In the example above, "<code>myvocab:personality</code>" would
expand to "<code>http://example.org/myvocab#personality</code>".</p>
@@ -4195,14 +4189,14 @@
<dd>
<dl>
<dt><code>form</code></dt>
- <dd>Determines the serialization form for the JSON-LD document. Valid
- values include; <code>compact</code>, <code>expand</code>,
+ <dd>Determines the serialization form for the JSON-LD document. Valid
+ values include; <code>compact</code>, <code>expand</code>,
<code>frame</code>, and <code>normalize</code>. Other values are
allowed, but must be pre-pended with a <code>x-</code> string until
they are clearly defined by a stable specification. If no format
is specified in an HTTP request header to a responding application,
- such as a Web server, the application MAY choose any format. If no
- format is specified for a receiving application, the format MUST NOT
+ such as a Web server, the application MAY choose any format. If no
+ format is specified for a receiving application, the format MUST NOT
be assumed to take any particular form.</dd>
<div class="issue">It is currently <a href="https://github.com/json-ld/json-ld.org/issues/14"> being discussed to remove form=frame</a> from this specification as there are several issues with it.</div>
</dl>
@@ -4222,7 +4216,7 @@
<dd>The <a href="http://json-ld/spec/latest/">JSON-LD</a> specification.</dd>
<dt>Applications that use this media type:</dt>
<dd>Any programming environment that requires the exchange of
- directed graphs. Implementations of JSON-LD have been created for
+ directed graphs. Implementations of JSON-LD have been created for
JavaScript, Python, Ruby, PHP and C++.
</dd>
<dt>Additional information:</dt>
@@ -4253,20 +4247,19 @@
<section class="appendix">
<h1>Acknowledgements</h1>
-<p>The editors would like to thank Mark Birbeck, who provided a great deal of
-the initial push behind the JSON-LD work via his work on RDFj,
-Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and
-performed several implementations of the specification, and Ian Davis, who
+<p>The editors would like to thank Mark Birbeck, who provided a great deal of
+the initial push behind the JSON-LD work via his work on RDFj,
+Dave Longley, Dave Lehn and Mike Johnson who reviewed, provided feedback, and
+performed several implementations of the specification, and Ian Davis, who
created RDF/JSON. Thanks also to Nathan Rixham, Bradley P. Allen,
Kingsley Idehen, Glenn McDonald, Alexandre Passant, Danny Ayers, Ted
-Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard
+Thibodeau Jr., Olivier Grisel, Niklas Lindström, Markus Lanthaler, and Richard
Cyganiak for their input on the specification. Another huge thank you goes out
to Dave Longley who designed many of the algorithms used in this specification,
-including the normalization algorithm which was a monumentally difficult
+including the normalization algorithm which was a monumentally difficult
design challenge.
</p>
</section>
</body>
</html>
-