From 33c503ab656ec8291fa5211a57f59479f27170b9 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Fri, 21 Dec 2018 12:09:30 -0800 Subject: [PATCH 1/7] Define additional profile URIs, and the interpretation of an unspecified URL for specifying context or frame. For #19. --- index.html | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index d5d3aba0..8d84d5ac 100644 --- a/index.html +++ b/index.html @@ -10469,16 +10469,30 @@

application/ld+json

It is RECOMMENDED that profile URIs are dereferenceable and provide useful documentation at that URI. For more information and background please refer to [[RFC6906]].

-

This specification defines three values for the profile parameter. - To request or specify expanded JSON-LD document form, - the URI http://www.w3.org/ns/json-ld#expanded SHOULD be used. - To request or specify compacted JSON-LD document form, - the URI http://www.w3.org/ns/json-ld#compacted SHOULD be used. - To request or specify flattened JSON-LD document form, - the URI http://www.w3.org/ns/json-ld#flattened SHOULD be used. - Please note that, according [[HTTP11]], the value of the profile - parameter has to be enclosed in quotes (") because it contains - special characters and, if multiple profiles are combined, whitespace.

+

This specification defines four values for the profile parameter.

+
+
http://www.w3.org/ns/json-ld#expanded
+
To request or specify expanded JSON-LD document form.
+
http://www.w3.org/ns/json-ld#compacted
+
To request or specify compacted JSON-LD document form.
+
http://www.w3.org/ns/json-ld#flattened
+
To request or specify flattened JSON-LD document form.
+
http://www.w3.org/ns/json-ld#framed
+
To request or specify framed JSON-LD document form.
+
+

+ When used as a media type paramter [[RFC2048]] + in an HTTP Accept header [[RFC7231]], + the value of the profile parameter MUST be enclosed in quotes (") if it contains + special characters such as whitespace, when multiple profiles are combined.

+

In addition to the profile values described above, + the profile parameter MAY include one additional URL, which is interpreted as + the location of either a context or frame, depending on the other profile + parameters included. When used without an defined profile URI, such a URL + is interpreted as the location of a context.

+

JSON-LD processors MAY place restrictions on supported profiles, + MAY provide defaults for context and frame URLs, + and MAY restrict client-provided URLs for contexts and frames.

When processing the "profile" media type parameter, it is important to 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,9 +10502,9 @@

application/ld+json

Encoding considerations:
-
See RFC 6839, section 3.1.
+
See RFC 8259, section 11.
Security considerations:
-
See [[RFC8259]] +
See RFC 8259, section 12 [[RFC8259]]

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 eval() From f6ea3ebb9398d64b58023ae0313e4371fc810247 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Thu, 27 Dec 2018 11:00:22 -0800 Subject: [PATCH 2/7] Fix duplicate "when a" in section 3.1. Fixes #112. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 8d84d5ac..d3395599 100644 --- a/index.html +++ b/index.html @@ -770,7 +770,7 @@

The Context

either be a simple string, mapping the term to an IRI, or a dictionary.

-

When a when a member with a term key has a dictionary value, the dictionary is called +

When a member with a term key has a dictionary value, the dictionary is called an expanded term definition. The example above specifies that the values of image and homepage, if they are strings, are to be interpreted as From 2646290098acb11c9ae6cb9e58622a1986286185 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Thu, 3 Jan 2019 15:29:32 -0800 Subject: [PATCH 3/7] Add examples of using the `profile` Mime parameter. --- index.html | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/index.html b/index.html index d3395599..5a28dc0a 100644 --- a/index.html +++ b/index.html @@ -10566,6 +10566,72 @@

application/ld+json

are treated as in RDF syntaxes, as per RDF 1.1 Concepts and Abstract Syntax [[RDF11-CONCEPTS]].

+ +
+

Examples

+

The following examples illustrate different ways in which the profile parameter may be used + to describe different acceptable responses.

+ +
+    
+    
+

Requests the server to return the requested resource as JSON-LD + in expanded document form.

+ +
+    
+    
+

Requests the server to return the requested resource as JSON-LD + in compacted document form. + As no explicit context resource is specified, the server compacts + using an application-specific default context.

+ +
+    
+    
+

Requests the server to return the requested resource as JSON-LD + in compacted document form + and specifies the location of a context to use for compaction. + Note that as whitespace is used to separate the two URIs, they + are enclosed in double quotes (").

+ +
+    
+    
+

Requests the server to return the requested resource as JSON-LD + in framed document form + and specifies the location of a frame to use. + Note that as whitespace is used to separate the two URIs, they + are enclosed in double quotes (").

+
From cd91bb9f0118a7a66029fcf963d3ee5bc0f4af4f Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Thu, 3 Jan 2019 15:33:15 -0800 Subject: [PATCH 4/7] Update RFC2048#section-2.2.3 to RFC4288#section4.3. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5a28dc0a..9bbca65c 100644 --- a/index.html +++ b/index.html @@ -10481,7 +10481,7 @@

application/ld+json

To request or specify framed JSON-LD document form.

- When used as a media type paramter [[RFC2048]] + When used as a media type paramter [[RFC4288]] in an HTTP Accept header [[RFC7231]], the value of the profile parameter MUST be enclosed in quotes (") if it contains special characters such as whitespace, when multiple profiles are combined.

From 4ffa364b191dfbd360a4603f86bb74630a990435 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Fri, 4 Jan 2019 11:30:13 -0800 Subject: [PATCH 5/7] Separates the URLs for context and link from the `profile` parameter to the `Link` header. --- index.html | 89 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 71 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index 9bbca65c..4edfcee8 100644 --- a/index.html +++ b/index.html @@ -10484,15 +10484,12 @@

application/ld+json

When used as a media type paramter [[RFC4288]] in an HTTP Accept header [[RFC7231]], the value of the profile parameter MUST be enclosed in quotes (") if it contains - special characters such as whitespace, when multiple profiles are combined.

-

In addition to the profile values described above, - the profile parameter MAY include one additional URL, which is interpreted as - the location of either a context or frame, depending on the other profile - parameters included. When used without an defined profile URI, such a URL - is interpreted as the location of a context.

-

JSON-LD processors MAY place restrictions on supported profiles, - MAY provide defaults for context and frame URLs, - and MAY restrict client-provided URLs for contexts and frames.

+ special characters such as whitespace, which is required when multiple profile URIs are combined.

+

Relevant contextual information, such as URLs to provide contexts or frames + associated with the http://www.w3.org/ns/json-ld#compacted + and http://www.w3.org/ns/json-ld#framed profiles + are described in the published specification.

+

JSON-LD processors MAY place restrictions on supported profiles.

When processing the "profile" media type parameter, it is important to 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 @@ -10511,7 +10508,7 @@

application/ld+json

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.

-

When processing JSON-LD documents, links to remote contexts are +

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 @@ -10551,7 +10548,7 @@

application/ld+json

Person & email address to contact for further information:
-
Manu Sporny <msporny@digitalbazaar.com>
+
Ivan Herman <ivan@w3.org>
Intended usage:
Common
Restrictions on usage:
@@ -10567,6 +10564,48 @@

application/ld+json

RDF 1.1 Concepts and Abstract Syntax [[RDF11-CONCEPTS]].

+

Examples

The following examples illustrate different ways in which the profile parameter may be used @@ -10607,15 +10646,30 @@

Examples

Requests the server to return the requested resource as JSON-LD - in compacted document form - and specifies the location of a context to use for compaction. + in both compacted document form + and flattened document form. Note that as whitespace is used to separate the two URIs, they are enclosed in double quotes (").

+
+    
+    
+

Requests the server to return the requested resource as JSON-LD + in compacted document form. + As no explicit context resource is specified, the server compacts + using an application-specific default context.

+
Examples
     
     

Requests the server to return the requested resource as JSON-LD in framed document form - and specifies the location of a frame to use. - Note that as whitespace is used to separate the two URIs, they - are enclosed in double quotes (").

+ and specifies the location of a frame to use.

From 9fd5387623dc99daa021bf9021e591024200c0d5 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Fri, 11 Jan 2019 15:48:38 -0800 Subject: [PATCH 6/7] Update to remove normative discussion of the Link header in requests per resolution. --- index.html | 79 ++---------------------------------------------------- 1 file changed, 2 insertions(+), 77 deletions(-) diff --git a/index.html b/index.html index 4edfcee8..ce8365a0 100644 --- a/index.html +++ b/index.html @@ -10480,16 +10480,13 @@

application/ld+json

http://www.w3.org/ns/json-ld#framed
To request or specify framed JSON-LD document form.
+

Other specifications may publish additional profile parameter + URIs with their own defined sematics.

When used as a media type paramter [[RFC4288]] in an HTTP Accept header [[RFC7231]], the value of the profile parameter MUST be enclosed in quotes (") if it contains special characters such as whitespace, which is required when multiple profile URIs are combined.

-

Relevant contextual information, such as URLs to provide contexts or frames - associated with the http://www.w3.org/ns/json-ld#compacted - and http://www.w3.org/ns/json-ld#framed profiles - are described in the published specification.

-

JSON-LD processors MAY place restrictions on supported profiles.

When processing the "profile" media type parameter, it is important to 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 @@ -10564,48 +10561,6 @@

application/ld+json

RDF 1.1 Concepts and Abstract Syntax [[RDF11-CONCEPTS]].

-

Examples

The following examples illustrate different ways in which the profile parameter may be used @@ -10654,36 +10609,6 @@

Examples

and flattened document form. Note that as whitespace is used to separate the two URIs, they are enclosed in double quotes (").

- -
-    
-    
-

Requests the server to return the requested resource as JSON-LD - in compacted document form. - As no explicit context resource is specified, the server compacts - using an application-specific default context.

- -
-    
-    
-

Requests the server to return the requested resource as JSON-LD - in framed document form - and specifies the location of a frame to use.

From c212913f1e69f1b736fe3976cd56c282844dd6e5 Mon Sep 17 00:00:00 2001 From: Gregg Kellogg Date: Sat, 12 Jan 2019 12:28:52 -0800 Subject: [PATCH 7/7] Update common terms. --- common/terms.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/terms.html b/common/terms.html index 62f5aa19..d3aa9851 100644 --- a/common/terms.html +++ b/common/terms.html @@ -335,5 +335,5 @@ A value object is a dictionary that has an @value member.
vocabulary mapping
The vocabulary mapping is set in the context using the @vocab key - whose value MUST be an absolute IRI or null.
+ whose value MUST be an IRI or null.