Re: Content negotiation for DQV

Dear Phil,

I have just uploaded the  RDF/XML and json-ld encodings for DQV in github.
These encodings have been generated automatically using Jena RIOT.

Regarding the DQV landing page, the solution adopted by DCAT is one of the
possibilities, ...  it  works decently.

However, If you want to have the  HTML for a  DCAT class or property
starting from its URI, e.g.,  by putting
https://www.w3.org/ns/dcat#class-distribution  in your browser,
You  get to that fairly generic landing page and you  have to do a couple
of extra clicks to get to the most specific  HTML fragment, i.e.,
https://www.w3.org/TR/vocab-dcat/#class-distribution.

I am aware that I am probably less patient than the average internet user
(I beg the group pardon for that :) ), but I find  slightly annoying  be
forced to doing that  couple of extra clicks, also because, there are days
in which I am forced to do these "extra clicks" plenty of times and for
more than one vocabulary..

 In order to get rid of such extra clicks and also to adhere more closely
to the  "Linked data best practice",  we were considering to add some extra
rules in the W3C .htaccess, so that,
If we browse a DQV URI   e.g. https://www.w3.org/ns/dqv#QualityMeasurement
we can get directly to the most specific DQV HTML landing fragment, i.e,
https://www.w3.org/TR/vocab-dqv/#dqv:QualityMeasurement

That does not cost much work, but it assumes that we can play with the W3C
 server .htaccess , which I do not know if is practical or allowed.
Said that, I know that  at this stage there are more pressing issues to
deal with, and I can perfectly live with any solution.

Cheers,
Riccardo





On 24 November 2016 at 16:22, Phil Archer <phila@w3.org> wrote:

> Conneg is readily set up for a vocab, no problem. And the HTML page
> doesn't *need* to list all the terms. See, for example,
>
> https://www.w3.org/ns/dcat
>
> and
>
> curl -I -H "Accept: text/turtle" https://www.w3.org/ns/dcat#
>
> All I need is the files and I can put those in  place easily enough.
>
> Phil
>
>
>
> On 24/11/2016 15:00, Antoine Isaac wrote:
>
>> Hi everyone
>>
>> Riccardo and I had a discussion that I'm going to continue here, as
>> there's not much time to inform you and get your feedback!
>>
>>
>> Riccardo wrote:
>>
>>>
>>>
>>> About the content negotiation, I think there are a couple of things
>>> which won't require much effort and we might consider to do in  a
>>> DWBP/ "eat your own dog food"  perspective:
>>>
>>> 1) Add some other RDF encoding for DQV.  I have  generated  the rdf/xml
>>>   and json-ld, if you want to take a look about how they look like,
>>> see [1]  [2].
>>> Shall we ask phil to include them and to change the  content
>>> negotiation accordingly?
>>> In that way, the
>>>
>>>    curl -I -H "Accept: application/rdf+xml"
>>> https://www.w3.org/ns/dqv#QualityMeasurement
>>> <https://www.w3.org/ns/dqv#QualityMeasurement>
>>>
>>> would  return the rdf/xml encoding, instead  the current  ttl.
>>>
>>>
>>> 2) Add the HTTP content negotiation on html,
>>>
>>> A  dereferenciation to the right  HTML  snippet  can be obtained with
>>> a negotiation rule similar to the following
>>>
>>> #https://www.w3.org/ns/dqv
>>> RewriteCond %{HTTP_ACCEPT} ^.*text/html.*
>>> RewriteRule ^(.*)$ https://www.w3.org/TR/vocab-dqv/#dqv:$1
>>> <https://www.w3.org/TR/vocab-dqv/#dqv:$1> [R=303,NE,L]
>>>
>>> That would solve any call like this
>>>   curl -I -H "Accept: text/html" https://www.w3.org/ns/dqv#
>>> <https://www.w3.org/ns/dqv#QualityMeasurement>TERMYOULIKE
>>>
>>> Into
>>> https://www.w3.org/TR/vocab-dqv/#dqv:TERMYOULIKE
>>>
>>> For example, https://www.w3.org/ns/dqv#QualityMeasurement
>>> <https://www.w3.org/ns/dqv#QualityMeasurement>  would be turn into
>>> https://www.w3.org/TR/vocab-dqv/#dqv:QualityMeasurement
>>>
>>>
>>
>> This is great!
>> This is receipe #3 at
>> https://www.w3.org/TR/swbp-vocab-pub/#recipe3
>> isn't it? (sorry I have a meeting in 10 min and no time to check further
>> right now)
>>
>>
>> What would be the point of creating a brand new HTML page where
>>> collecting  DQV terms?
>>> In my opinion, the definitions  that are in  working note are a quite
>>> good  HTML representation for DQV terms, to use them instead of a
>>> brand new HTML page, that would just copy them,  is not  just a back
>>> up solution, that  we might want to deploy due to the lack of time and
>>> interest in providing a new HTML page, but it is an opportunity to
>>> land the user to the official DQV reference.
>>>   Moreover I have always found a little disturbing to  get landed  on
>>> an intermediate  and often not so informative document when I want to
>>> check the meaning of a vocabulary term. I can understand that is
>>> required  in case of complex vocabulary recommendation, where
>>> Vocabulary specification is kept separate from example in the primer,
>>> but  for DQV,  we have  provided  definitions and examples as a whole
>>> in our working note and to point straightly to  the working note does
>>> not seem to me as awkward as it might seem for other Vocabularies.
>>> What do you think?
>>>
>>>
>>
>> Yes your suggestion is perfectly fine for me. Anyway any
>> discussion/change for adding another HTML representation can be
>> postponed to a next version. Not this W3C Note.
>> Note that I think it doesn't need to be addressed right on Friday (as it
>> doesn't change the Note per se), but I prefer to raise it now in front
>> of everyone.
>>
>> Cheers,
>>
>> Antoine
>>
>>>
>>> [1] https://github.com/riccardoAlbertoni/dwbp/blob/gh-pages/dqv.rdf
>>> [2] https://github.com/riccardoAlbertoni/dwbp/blob/gh-pages/dqv.jsonld
>>> <https://github.com/riccardoAlbertoni/dwbp/blob/gh-pages/dqv.jsonld>
>>>
>>>
>>>
>>
> --
>
>
> Phil Archer
> Data Strategist, W3C
> http://www.w3.org/
>
> http://philarcher.org
> +44 (0)7887 767755
> @philarcher1
>
>


-- 
----------------------------------------------------------------------------
Riccardo Albertoni
Istituto per la Matematica Applicata e Tecnologie Informatiche "Enrico
Magenes"
Consiglio Nazionale delle Ricerche
via de Marini 6 - 16149 GENOVA - ITALIA
tel. +39-010-6475624 - fax +39-010-6475660
e-mail: Riccardo.Albertoni@ge.imati.cnr.it
Skype: callto://riccardoalbertoni/
LinkedIn: http://www.linkedin.com/in/riccardoalbertoni
www: *http://www.imati.cnr.it/ <http://www.imati.cnr.it/>*
http://purl.oclc.org/NET/riccardoAlbertoni
FOAF:http://purl.oclc.org/NET/RiccardoAlbertoni/foaf

Received on Thursday, 24 November 2016 18:21:27 UTC