An http Header for Metadata
Schema Negotiation
Lars G. Svensson
| 12 | An http Header for Metadata Schema Negotiation | Dc...
2
Why is Profile Negotiation Necessary?
| 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
PhotobyEr...
3 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
– Profile in Accept-/Content-Type-headers (RFC ...
4 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
GET /some/resource HTTP/1.1
Accept: text/turtle...
5 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
HEAD /some/other/resource HTTP/1.1
Accept: text...
| 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
GET /another/thing HTTP/1.1
Accept: application/x...
7 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
HEAD /this/or/that HTTP/1.1
Accept: application...
8 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
GET /final/resource
Accept: application/rdf+xml...
9 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
Pro Con
Accept/Content-Type
+ Profile
 No head...
10 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
Pro Con
Prefer/Preference-
Applied
 No header...
11 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
– None of the options is perfect (features vs ...
12 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016
And now I look forward to the discussion!
Phot...
Nächste SlideShare
Wird geladen in …5
×

An http Header for Metadata Schema Negotiation

433 Aufrufe

Veröffentlicht am

In http, media types are often used in content negotiation, but those can often only say something about the format of the data, not about the semantics used within the data. This is particularly an issue with data in RDF where the same resource can be described in several different ways using different RDF vocabularies (e. g. DublinCore, foaf or schema,org). This presentation and the accompanying position paper (https://www.w3.org/2016/11/sdsvoc/SDSVoc16_paper_14) presented at SDSVoc in Amsterdam, I suggest a new http header to resolve this problem.

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

An http Header for Metadata Schema Negotiation

  1. 1. An http Header for Metadata Schema Negotiation Lars G. Svensson | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 20161
  2. 2. 2 Why is Profile Negotiation Necessary? | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 PhotobyEricKilby(CCBY-SA):https://flic.kr/p/6qrXw3 Photobymario(CCBY):https://flic.kr/p/ceSRwU The profile you expected The profile you got
  3. 3. 3 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 – Profile in Accept-/Content-Type-headers (RFC 7231) – Link-header with rel=“profile” (RFC 6906) – Link-header with profile-parameter (RFC 5988) – Prefer-/Preference-Applied-headers (RFC 7240) – Accept-Schema-/Schema-headers (yet to be specified) I have looked at five options
  4. 4. 4 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 GET /some/resource HTTP/1.1 Accept: text/turtle;q=0.9;profile=”urn:example:profile-1”, text/turtle;q=0.7;profile=”urn:example:profile-2” HTTP/1.1 200 OK Content-Type: text/turtle; profile=”urn:example:profile-2” Profile in Accept-/Content-Type-headers (RFC 7231)
  5. 5. 5 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 HEAD /some/other/resource HTTP/1.1 Accept: text/turtle;q=0.9,application/rdf+xml;q=0.5 Link: <http://example.com/profile-1>; rel=”profile” HTTP/1.1 200 OK Content-type: text/turtle Link: <http://example.com/profile-1>; rel=”profile” Link-header with rel=“profile” (RFC 6906)
  6. 6. | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 GET /another/thing HTTP/1.1 Accept: application/xml Link: <urn:example:profiles:schema-2>; rel=”profile” HTTP/1.1 200 OK Link: <http://example.org/another/thing>; rel=”self”; type=”application/xml” profile=”urn:example:profiles:schema-2” Link-header (RFC 5988 with new parameter “profile”) 6
  7. 7. 7 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 HEAD /this/or/that HTTP/1.1 Accept: application/xml Prefer: profile=<urn:example:some:schema> HTTP/1.1 200 OK Content-Type: application/xml Preference-Applied: profile=<urn:example:some:schema> Prefer- and Preference-Applied-headers
  8. 8. 8 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 GET /final/resource Accept: application/rdf+xml; q=0.9, text/turtle; q=0.5 Accept-Schema: <http://example.org/shacl/shape-1>; q=0.9, <http://example.org/shacl/shape-2>; q=0.5 HTTP/1.1 200 OK Content-Type: application/rdf+xml Schema: <http://example.org/shacl/shape-2> Accept-Schema- and Schema-headers
  9. 9. 9 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 Pro Con Accept/Content-Type + Profile  No header registration necessary  Requires registration of profile parameter for each content-type  q-value only available for each combination of content-type and profile Link: rel=”profile” (RFC 6906)  No header, parameter or relation type registration necessary  q-values not supported  does not support multiple combinations of namespace+profile Link: profile=”…” (RFC 5988)  No header registration necessary  q-values not supported  different use in request and response  does not support multiple combinations of namespace+profile in request Now we can look at the consequences
  10. 10. 10 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 Pro Con Prefer/Preference- Applied  No header registration necessary  Supports combination of multiple namespace+profile- combinations  q-values not supported  not clear if absence of “Preference-Applied” was because server does not understand “Prefer” or because it did not honour the preference stated  requires registration of “profile” preference Accept- Schema/Schema  Supports q-values  fits nicely into content negotiation framework  supports combination of multiple namespace+profile- combinations   Requires registration of new http-headers … and more consequences
  11. 11. 11 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 – None of the options is perfect (features vs work) – In order to perform proper content negotiation, we need q- values – In any case we need to figure out, how to deal with multiple profiles and with combinations of namespaces and schemas My recommendation is a new header
  12. 12. 12 | 12 | An http Header for Metadata Schema Negotiation | Dcember 01, 2016 And now I look forward to the discussion! Photobystevensim(CCBY-SA):https://flic.kr/p/8AnKhp

×