Re: [dxwg] Profile negotiation [RPFN]

The test implementation of the Media Types Linked Data API I just set up implements both QSA & HTTP format & language negotiation within QSA & HTTP profile negotiation, e.g.:

Entry for in RDF (turtle), default profile:  
`curl -L -H "Accept: text/turtle"`

Entry for in HTML, ‘alternates’ profile (‘view’ as the API calls it) requested using the URI
`curl -L -H "Accept-Profile: <>"`

As above but in RDF (JSON-LD):  
`curl -L -H "Accept-Profile: <>" -H "Accept: application/rdf+json"`

Demo of weighted profile neg with not available view being ignored (not receiving HTTP 406):  
`curl -L -H "Accept-Profile: <>, <>; q=0.5" -H "Accept: application/rdf+json"`

Entry for, alternates’ profile indicated by QSA using token & Media Type also indicated by QSA:  
`curl -L\?_view=alternates\&_format=application/rdf+xml`

Entry for default profile with format indicated by QSA using token overriding HTTP Accept header:  
`curl -L -H "Accept: application/rdf+xml"\?_format=text/turtle`

A Media Type, default view, HTML, in Polish:  

A Media Type, default view, HTML, in Polish (preferred), using HTTP headers  
`curl -L -H "Accept: text/html" -H "Accept-Language: pl, en"`

In this configuration, both the *format* and *language* dimensions of the resource are dependent on (configured for a particular) *profile*. The alternates view of a Media Type shows all the options:  


Note that the alternates view itself is only available in English and that the non-HTML serialisations of the “mt” view, while supposedly bing in Polish actually are not. This is an error for the dataset implementer (me) to fix with RDF lang mappings but the API is operating correctly now with both format & lang within profile QSA and HTTP-based negotiation.

GitHub Notification of comment by nicholascar
Please view or discuss this issue at using your GitHub account

Received on Tuesday, 19 June 2018 02:45:57 UTC