Skip to content

Commit 920f9d9

Browse files
committed
Remove "Using an HTML document as a Context section.
This reverts w3c/json-ld-api#66, which we can do because of #204.
1 parent 636eeca commit 920f9d9

File tree

1 file changed

+0
-145
lines changed

1 file changed

+0
-145
lines changed

index.html

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -11385,147 +11385,6 @@ <h3>Graph Containers</h3>
1138511385
</pre>
1138611386
</aside>
1138711387
</section>
11388-
11389-
<section><h3>Using an HTML document as a Context</h3>
11390-
<p>A JSON-LD document, whether embedded in HTML or otherwise,
11391-
may reference a <a>context document</a> by using a string value to <code>@context</code>.
11392-
This string is interpreted as a URL to an external document from which
11393-
the context is loaded. In JSON-LD 1.1, this external document may also
11394-
be HTML containing a <a data-cite="HTML/scripting.html#the-script-element">script element</a>
11395-
with the <code>type</code> attribute set to
11396-
<code>application/ld+json;profile=http://www.w3.org/ns/json-ld#context</code>.</p>
11397-
11398-
<p>A processor processing a remote context which results in an HTML document
11399-
MUST locate the first <a data-cite="HTML/scripting.html#the-script-element">script element</a>
11400-
with the <code>type</code> attribute set to
11401-
<code>application/ld+json;profile=http://www.w3.org/ns/json-ld#context</code>,
11402-
or a specific script element targeted using a fragment identifier,
11403-
or the first script element of type <code>application/ld+json</code>
11404-
if no other is found.</p>
11405-
11406-
<p>Including a context definition within an HTML document provides a means
11407-
of documenting the context content, along with other information
11408-
such as the vocabulary definition.</p>
11409-
11410-
<p>For example, a context may be defined within an HTML file as follows
11411-
(a subset of the <em>Person</em> context published at <code><a href="https://json-ld.org/contexts/person.html">https://json-ld.org/contexts/person.html</a></code>):</p>
11412-
11413-
<pre class="example context"
11414-
title="Context defined in an HTML document"
11415-
data-content-type="text/html"
11416-
data-transform="updateExample">
11417-
<!--
11418-
<!DOCTYPE html>
11419-
<html lang="en">
11420-
<head>
11421-
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
11422-
<title>Context definition of a person</title>
11423-
<script ****type="application/ld+json;profile=http://www.w3.org/ns/json-ld#context"****>
11424-
{
11425-
"@context":
11426-
{
11427-
"foaf": "http://xmlns.com/foaf/0.1/",
11428-
"schema": "http://schema.org/",
11429-
"vcard": "http://www.w3.org/2006/vcard/ns#",
11430-
"xsd": "http://www.w3.org/2001/XMLSchema#",
11431-
"Address": "vcard:Address"####,
11432-
...####
11433-
}
11434-
}
11435-
</script>
11436-
</head>
11437-
<body>
11438-
<h1>The Person context</h1>
11439-
<p>The Person context is based on a combination of <a href="http://xmlns.com/foaf/0.1/">FOAF</a>,
11440-
<a href="http://schema.org/">schema.org </a>,
11441-
and <a href="http://www.w3.org/2006/vcard/ns#">vcard</a> vocabularies. It defines the following terms:</p>
11442-
11443-
<dl>
11444-
<dt>foaf</dt><dd><code>http://xmlns.com/foaf/0.1/</code></dd>
11445-
<dt>schema</dt><dd><code>http://schema.org/</code></dd>
11446-
<dt>vcard</dt><dd><code>http://www.w3.org/2006/vcard/ns#</code></dd>
11447-
<dt>xsd</dt><dd><code>http://www.w3.org/2001/XMLSchema#</code></dd>
11448-
<dt>Address</dt><dd><code>vcard:Address</code></dd>
11449-
####...####
11450-
</dl>
11451-
</body>
11452-
</html>
11453-
-->
11454-
</pre>
11455-
11456-
<p>Using a previous example, we can reference <code>https://json-ld.org/contexts/person.html</code>
11457-
instead of <code>https://json-ld.org/contexts/person.jsonld</code>
11458-
and a JSON-LD processor will look for the context within the referenced HTML file.</p>
11459-
11460-
<aside class="example ds-selector-tabs"
11461-
title="Referencing a Context in an HTML document">
11462-
<div class="selectors">
11463-
<button class="selected" data-selects="compacted">Compacted (Input)</button>
11464-
<button data-selects="expanded">Expanded (Result)</button>
11465-
<button data-selects="statements">Statements</button>
11466-
<button data-selects="turtle">Turtle</button>
11467-
<a class="playground" target="_blank"></a>
11468-
</div>
11469-
<pre class="compacted input selected nohighlight" data-transform="updateExample">
11470-
<!--
11471-
{
11472-
"@context": ****"https://json-ld.org/contexts/person.html"****,
11473-
"@id": "http://dbpedia.org/resource/John_Lennon",
11474-
"name": "John Lennon",
11475-
"born": "1940-10-09",
11476-
"spouse": "http://dbpedia.org/resource/Cynthia_Lennon"
11477-
}
11478-
-->
11479-
</pre>
11480-
<pre class="expanded result"
11481-
data-transform="updateExample"
11482-
data-result-for="Referencing a Context in an HTML document-compacted">
11483-
<!--
11484-
[{
11485-
"@id": "http://dbpedia.org/resource/John_Lennon",
11486-
"http://xmlns.com/foaf/0.1/name": [{"@value": "John Lennon"}],
11487-
"http://schema.org/birthDate": [
11488-
{"@value": "1940-10-09", "@type": "http://www.w3.org/2001/XMLSchema#date"}
11489-
],
11490-
"http://schema.org/spouse": [
11491-
{"@id": "http://dbpedia.org/resource/Cynthia_Lennon"}
11492-
]
11493-
}]
11494-
-->
11495-
</pre>
11496-
<table class="statements"
11497-
data-result-for="Referencing a Context in an HTML document-expanded"
11498-
data-to-rdf>
11499-
<thead><tr><th>Subject</th><th>Property</th><th>Value</th><th>Value Type</th></tr></thead>
11500-
<tbody>
11501-
<tr><td>http://dbpedia.org/resource/John_Lennon</td><td>foaf:name</td><td>John Lennon</td><td>&nbsp;</td></tr>
11502-
<tr><td>http://dbpedia.org/resource/John_Lennon</td><td>schema:birthDate</td><td>1940-10-09</td><td>xsd:date</td></tr>
11503-
<tr><td>http://dbpedia.org/resource/John_Lennon</td><td>schema:spouse</td><td>http://dbpedia.org/resource/Cynthia_Lennon</td><td>&nbsp;</td></tr>
11504-
</tbody>
11505-
</table>
11506-
<pre class="turtle"
11507-
data-content-type="text/turtle"
11508-
data-transform="updateExample"
11509-
data-result-for="Referencing a Context in an HTML document-expanded"
11510-
data-to-rdf>
11511-
<!--
11512-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
11513-
@prefix schema: <http://schema.org/> .
11514-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
11515-
11516-
<http://dbpedia.org/resource/John_Lennon> foaf:name "John Lennon";
11517-
schema:birthDate "1940-10-09"^^xsd:date;
11518-
schema:spouse <http://dbpedia.org/resource/Cynthia_Lennon> .
11519-
-->
11520-
</pre>
11521-
</aside>
11522-
11523-
<p>In addition to using the type profile above, a context may be referenced using
11524-
a fragment identifier,
11525-
as described in <a href="#locating-a-specific-json-ld-script-element" class="sectionRef"></a>.
11526-
Otherwise, the first <a data-cite="HTML/scripting.html#the-script-element">script element</a>
11527-
of type <code>application/ld+json</code> will be used to find a context.</p>
11528-
</section>
1152911388
</section>
1153011389

1153111390
<section class="normative">
@@ -13519,10 +13378,6 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
1351913378
<li><a>Term definitions</a> with keys which are of the form of a <a>compact IRI</a> or <a>absolute IRI</a> MUST NOT
1352013379
expand to an <a>IRI</a> other than the expansion of the key itself.</li>
1352113380
<li>Define different processor modes: <a>pure JSON Processor</a>, <a>event-based JSON processor</a>, and <a>full Processor</a>.</li>
13522-
<li>For a <a>full Processor</a>, if a retrieved context URL returns an HTML document, the first script element
13523-
of type <code>application/ld+json;profile=http://www.w3.org/ns/json-ld#context</code>,
13524-
or <code>application/ld+json</code> is used as the context for further processing.
13525-
This allows a mechanism for documenting the content of a context using HTML.</li>
1352613381
<li>A <a>frame</a> may also be located within an HTML document, identified
1352713382
using type <code>application/ld+json;profile=http://www.w3.org/ns/json-ld#frame</code>.</li>
1352813383
<li>Term definitions can now be <a href="#protected-term-definitions">protected</a>,

0 commit comments

Comments
 (0)