Skip to content

Commit c2bea5f

Browse files
committed
Add example showing use of compact IRIs in contexts
Added an example which shows how compact IRIs can be used in a context. This addresses #74. I'll leave the issue open as long as the API spec hasn't been updated.
1 parent 1bac5d3 commit c2bea5f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

spec/latest/json-ld-syntax/index.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,26 @@ <h2>Compact IRIs</h2>
13761376
are referred to using prefixes. Those prefixes are then used as type and
13771377
property values using the compact IRI <code>prefix:suffix</code> notation.
13781378
</p>
1379+
<p>It's also possible to use compact IRIs within the context as shown in the
1380+
following example:<p>
1381+
<pre class="example" data-transform="updateExample">
1382+
<!--
1383+
{
1384+
"@context":
1385+
{
1386+
"xsd": "http://www.w3.org/2001/XMLSchema#",
1387+
"foaf": "http://xmlns.com/foaf/0.1/",
1388+
****"foaf:homepage"****: { "@type": "@id" },
1389+
"picture": { "@id": ****"foaf:depiction"****, "@type": "@id" }
1390+
},
1391+
"@subject": "http://me.markus-lanthaler.com/",
1392+
"@type": "foaf:Person",
1393+
"foaf:name": "Markus Lanthaler",
1394+
"foaf:homepage": "http://www.markus-lanthaler.com/",
1395+
"picture": "http://twitter.com/account/profile_image/markuslanthaler"
1396+
}
1397+
-->
1398+
</pre>
13791399
<p>
13801400
<tref title="compact_iri">Compact IRIs</tref>, also known as CURIEs, are defined more formally in RDFa Core 1.1,
13811401
<cite><a href="http://www.w3.org/TR/rdfa-core/#s_curies">Section 6

0 commit comments

Comments
 (0)