Skip to content

Commit

Permalink
Update syntax for term definition as NCName, and use of Compact IRI o…
Browse files Browse the repository at this point in the history
…r absolute IRI on the LHS of context.
  • Loading branch information
gkellogg committed Apr 9, 2012
1 parent 1dec2a1 commit d3c4996
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions spec/latest/json-ld-syntax/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,8 @@ <h3>The Context</h3>
<p>In JSON-LD, a <tdef>context</tdef> is used to map <tref>term</tref>s, i.e., keys with associated 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>. A <tref>term</tref> MUST have the lexical form of <cite><a
href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite> (see [[XML-NAMES]]),
an '@' followed by an NCName (other than <code>@context</code>), <tref>compact IRI</tref>, <tref>absolute IRI</tref>, or
be an empty string.</p>
href="http://www.w3.org/TR/2009/REC-xml-names-20091208/#NT-NCName">NCName</a></cite>
(see [[XML-NAMES]]).</p>
<p>The Web uses <tref title="IRI">IRIs</tref> for unambiguous identification. The
idea is that these <tref>term</tref>s mean something that may be of use to other developers and that it is useful to
give them an unambiguous identifier. That is, it is useful for <tref>term</tref>s to expand to IRIs so that
Expand Down Expand Up @@ -1798,7 +1797,7 @@ <h3>IRI Expansion Within a Context</h3>
</pre>

<p>
<tref>Term</tref>s MAY also be used on the left-hand side of a definition.
<tref>Term</tref>s, <tref title="compact iri">Compact IRIs</tref> and <tref title="iri">IRIs</tref> MAY also be used on the left-hand side of a definition.
</p>

<pre class="example" data-transform="updateExample">
Expand All @@ -1825,7 +1824,7 @@ <h3>IRI Expansion Within a Context</h3>
</pre>

<p>
Note that in this example, the <tref>compact IRI</tref> form is used in two different ways.
In this example, the <tref>compact IRI</tref> form is used in two different ways.
The first way, as shown with <code>foaf:age</code> declares both the
<tref>IRI</tref> for the term (using short-form) as well as the
<code>@type</code> associated with the <tref>term</tref>. The second way, only
Expand All @@ -1836,7 +1835,7 @@ <h3>IRI Expansion Within a Context</h3>
</p>

<p>
Full IRIs MAY also be used on the left-hand side of a <tref>context</tref>:
<tref title="absolute iri">Absolute IRIs</tref> MAY also be used on the left-hand side of a <tref>context</tref>:
</p>

<pre class="example" data-transform="updateExample">
Expand All @@ -1863,7 +1862,7 @@ <h3>IRI Expansion Within a Context</h3>
</pre>

<p>
Note that in order for the full IRI to match above, the full IRI MUST also
In order for the <tref>absolute IRI</tref> to match above, the <tref>absolute IRI</tref> MUST also
be used in the JSON-LD document. Also note that <code>foaf:homepage</code>
will not use the <code>{ "@type": "@id" }</code> declaration because
<code>foaf:homepage</code> is not the same as
Expand Down

1 comment on commit d3c4996

@lanthaler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terms can be any valid JSON string, updated it in 6a827ba.

Please sign in to comment.