Re: [dxwg] Differentiate profile parameter and Accept-Profile header (#662)

What I took home from the meeting in Lyon was that the profile _parameter_ used with the `Accept` header is used for profiles (or profile URIs) that are tied to specific media types, such as "flattened" (http://www.w3.org/ns/json-ld#flattened) or "compacted" (http://www.w3.org/ns/json-ld#compacted) in [JSON-LD](https://www.w3.org/TR/json-ld/#iana-considerations). `Accept-Profile` and `Content-Profile` are used when the profile is media-type independent, e. g. application profiles defining which RDFS classes and properties are used in a document that can be returned in Turtle, N-Triples or JSON-LD.
This way an http request can contain both a profile parameter in the `Accept` header _and_ an `Accept-Profile` header field specifying the application profile of the payload:
```
GET /a/resource HTTP/1.1
Accept: application/ld+json;profile="http://www.w3.org/ns/json-ld#compacted"
Accept-Profile: urn:example:profile1

---------------------
HTTP/1.1 200 OK
Content-Type: application/ld+json;profile="http://www.w3.org/ns/json-ld#compacted"
Content-Profile: urn:example:1

{
    "@context" : "https://example.org/context" ,
    {
        "title" : "A document"
    }
}
```
@gkellogg scripsit:
> Of course, the profile URI could, itself, be used to returned the context or frame.

Yes, in an ideal DXWG world, the profile URI (the one used in `Accept-Profile`/`Content-Profile`) is an http URI that resolves to a profile description using content-negotiation to serve html, RDF etc., where the RDF representation uses the [profile ontology ^H^H vocabulary](https://w3c.github.io/dxwg/profilesont/) and all the best practices from the [profile guidance document](https://w3c.github.io/dxwg/profiles/).

Does this address your feedback, @gkellogg?

-- 
GitHub Notification of comment by larsgsvensson
Please view or discuss this issue at https://github.com/w3c/dxwg/issues/662#issuecomment-468726819 using your GitHub account

Received on Friday, 1 March 2019 16:36:23 UTC