-
Notifications
You must be signed in to change notification settings - Fork 23
Define additional profile URIs #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
33c503a
f6ea3eb
2646290
cd91bb9
4ffa364
9fd5387
c212913
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -770,7 +770,7 @@ <h2>The Context</h2> | |
either be a simple string, mapping the <a>term</a> to an <a>IRI</a>, | ||
or a <a>dictionary</a>.</p> | ||
|
||
<p>When a when a <a>member</a> with a <a>term</a> key has a <a>dictionary</a> value, the <a>dictionary</a> is called | ||
<p>When a <a>member</a> with a <a>term</a> key has a <a>dictionary</a> value, the <a>dictionary</a> is called | ||
an <a>expanded term definition</a>. The example above specifies that | ||
the values of <code>image</code> and <code>homepage</code>, if they are | ||
strings, are to be interpreted as | ||
|
@@ -10469,16 +10469,24 @@ <h3>application/ld+json</h3> | |
It is RECOMMENDED that profile URIs are dereferenceable and provide | ||
useful documentation at that URI. For more information and background | ||
please refer to [[RFC6906]].</p> | ||
<p>This specification defines three values for the <code>profile</code> parameter. | ||
To request or specify <a href="#expanded-document-form">expanded JSON-LD document form</a>, | ||
the URI <code>http://www.w3.org/ns/json-ld#expanded</code> SHOULD be used. | ||
To request or specify <a href="#compacted-document-form">compacted JSON-LD document form</a>, | ||
the URI <code>http://www.w3.org/ns/json-ld#compacted</code> SHOULD be used. | ||
To request or specify <a href="#flattened-document-form">flattened JSON-LD document form</a>, | ||
the URI <code>http://www.w3.org/ns/json-ld#flattened</code> SHOULD be used. | ||
Please note that, according [[HTTP11]], the value of the <code>profile</code> | ||
parameter has to be enclosed in quotes (<code>"</code>) because it contains | ||
special characters and, if multiple profiles are combined, whitespace.</p> | ||
<p>This specification defines four values for the <code>profile</code> parameter.</p> | ||
<dl> | ||
<dt><code>http://www.w3.org/ns/json-ld#expanded</code></dt> | ||
<dd>To request or specify <a href="#expanded-document-form">expanded JSON-LD document form</a>.</dd> | ||
<dt><code>http://www.w3.org/ns/json-ld#compacted</code></dt> | ||
<dd>To request or specify <a href="#compacted-document-form">compacted JSON-LD document form</a>.</dd> | ||
<dt><code>http://www.w3.org/ns/json-ld#flattened</code></dt> | ||
<dd>To request or specify <a href="#flattened-document-form">flattened JSON-LD document form</a>.</dd> | ||
<dt><code>http://www.w3.org/ns/json-ld#framed</code></dt> | ||
<dd>To request or specify <a href="#framed-document-form">framed JSON-LD document form</a>.</dd> | ||
</dl> | ||
<p class="note">Other specifications may publish additional profile parameter | ||
URIs with their own defined sematics.</p> | ||
<p> | ||
When used as a <a data-cite="RFC4288#section-4.3">media type paramter</a> [[RFC4288]] | ||
in an <a data-cite="rfc7231#section-5.3.2">HTTP Accept header</a> [[RFC7231]], | ||
the value of the <code>profile</code> parameter MUST be enclosed in quotes (<code>"</code>) if it contains | ||
special characters such as whitespace, which is required when multiple profile URIs are combined.</p> | ||
<p>When processing the "profile" media type parameter, it is important to | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. " ... MAY provide defaults for context and frame URLs, and MAY restrict client-provided URLs for contexts and frames . " That seems to be a possibly major new feature. Was this discussed and adopted in an issue (if yes, and I just do not remember, my apologies)? I guess this is a feature that schema.org processors may declare: they use schema.org as a default profile. But that would mean that users of schema.org may then decide, en masse, not to declare their own context by any means, which means that their data become unusable for others than schema.org. This may have dire consequences... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @iherman this is why the "limit profile parameter use to URI’s" of our resolution text is important, and why it suggests creating a new issue for that URL dereferencing approach--which Gregg's has fleshed out a bit in the API PR w3c/json-ld-api#56 (uses |
||
note that its value contains one or more URIs and not IRIs. In some cases | ||
it might therefore be necessary to convert between IRIs and URIs as specified in | ||
|
@@ -10488,16 +10496,16 @@ <h3>application/ld+json</h3> | |
</dl> | ||
</dd> | ||
<dt>Encoding considerations:</dt> | ||
<dd>See <a data-cite="RFC6839#section-3.1">RFC 6839, section 3.1</a>.</dd> | ||
<dd>See <a data-cite="RFC8259#section-11">RFC 8259, section 11</a>.</dd> | ||
<dt>Security considerations:</dt> | ||
<dd>See [[RFC8259]] | ||
<dd>See <a data-cite="RFC8259#section-12">RFC 8259, section 12</a> [[RFC8259]] | ||
<p>Since JSON-LD is intended to be a pure data exchange format for | ||
directed graphs, the serialization SHOULD NOT be passed through a | ||
code execution mechanism such as JavaScript's <code>eval()</code> | ||
function to be parsed. An (invalid) document may contain code that, | ||
when executed, could lead to unexpected side effects compromising | ||
the security of a system.</p> | ||
<p>When processing JSON-LD documents, links to remote contexts are | ||
<p>When processing JSON-LD documents, links to remote contexts and frames are | ||
typically followed automatically, resulting in the transfer of files | ||
without the explicit request of the user for each one. If remote | ||
contexts are served by third parties, it may allow them to gather | ||
|
@@ -10537,7 +10545,7 @@ <h3>application/ld+json</h3> | |
</dl> | ||
</dd> | ||
<dt>Person & email address to contact for further information:</dt> | ||
<dd>Manu Sporny <[email protected]></dd> | ||
<dd>Ivan Herman <[email protected]></dd> | ||
<dt>Intended usage:</dt> | ||
<dd>Common</dd> | ||
<dt>Restrictions on usage:</dt> | ||
|
@@ -10552,6 +10560,56 @@ <h3>application/ld+json</h3> | |
are treated as in RDF syntaxes, as per | ||
<a data-cite="RDF11-CONCEPTS#section-fragID">RDF 1.1 Concepts and Abstract Syntax</a> | ||
[[RDF11-CONCEPTS]].</p> | ||
|
||
<section id="iana-examples" class="informative"> | ||
<h3>Examples</h3> | ||
<p>The following examples illustrate different ways in which the profile parameter may be used | ||
to describe different acceptable responses.</p> | ||
|
||
<pre class="example" data-transform="updateExample" | ||
data-content-type="http" | ||
data-ignore | ||
title="HTTP Request with profile requesting an expanded document"> | ||
<!-- | ||
GET /ordinary-json-document.json HTTP/1.1 | ||
Host: example.com | ||
Accept: application/ld+json;****profile=http://www.w3.org/ns/json-ld#expanded**** | ||
--> | ||
</pre> | ||
<p>Requests the server to return the requested resource as JSON-LD | ||
in <a href="#expanded-document-form">expanded document form</a>.</p> | ||
|
||
<pre class="example" data-transform="updateExample" | ||
data-content-type="http" | ||
data-ignore | ||
title="HTTP Request with profile requesting a compacted document"> | ||
<!-- | ||
GET /ordinary-json-document.json HTTP/1.1 | ||
Host: example.com | ||
Accept: application/ld+json;****profile=http://www.w3.org/ns/json-ld#compacted**** | ||
--> | ||
</pre> | ||
<p>Requests the server to return the requested resource as JSON-LD | ||
in <a href="#compacted-document-form">compacted document form</a>. | ||
As no explicit context resource is specified, the server compacts | ||
using an application-specific default context.</p> | ||
|
||
<pre class="example" data-transform="updateExample" | ||
data-content-type="http" | ||
data-ignore | ||
title="HTTP Request with profile requesting a compacted document with a reference to a compaction context"> | ||
<!-- | ||
GET /ordinary-json-document.json HTTP/1.1 | ||
Host: example.com | ||
Accept: application/ld+json;****profile="http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted"**** | ||
--> | ||
</pre> | ||
<p>Requests the server to return the requested resource as JSON-LD | ||
in both <a href="#compacted-document-form">compacted document form</a> | ||
and <a href="#flattened-document-form">flattened document form</a>. | ||
Note that as whitespace is used to separate the two URIs, they | ||
are enclosed in double quotes (<code>"</code>).</p> | ||
</section> | ||
</section> | ||
|
||
<section id="security" class="appendix"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paramter -> parameter