Print

Print


Thanks Frankie, that's useful. Interesting that there isn't a kind of 
global thing which covers all "structured data" bases...

tt

Mike



_____________________________


*Mike Ellis *

Thirty8 Digital: a small but perfectly formed digital 
agency:http://thirty8.co.uk <http://thirty8.co.uk/>

* My book: http://heritageweb.co.uk <http://heritageweb.co.uk/> *



Frankie Roberto wrote:
> Mike said:
>
>> Is there a standard notation / way of flagging up on a web page that there is programmatic / structured data available for that page?
>>
>> AFAIK this doesn't exist as a thing - and it seems odd that it doesn't - not just our sector but for anyone. I suppose the nearest analogy I can think of is something like RSS which has an "alternate" rel tag which basically says "go here for a structured version".
>
> You can use the same syntax as for RSS / Atom autodiscovery: the<link>  tag with rel=alternate. (see https://developers.whatwg.org/links.html#rel-alternate<https://developers.whatwg.org/links.html#rel-alternate>)
>
> ie:
>
> <link rel="alternate" type="application/json" href="http://www.vam.ac.uk/api/json/museumobject/O12345">
>
>
> There aren't tons of tools which recognise that though, so I'd also recommend putting a link to the JSON / XML representation somewhere on each page (footer?) if you want it to be more discoverable (by humans).
>
>
> Another alternative is to serve both the HTML and JSON representations from the same URL, using content-negotiation to determine which representation to serve (based upon the 'Accept' header in the HTTP request). See https://en.wikipedia.org/wiki/Content_negotiation<https://en.wikipedia.org/wiki/Content_negotiation>
>
>
> Finally there's an emerging convention that the JSON / XML representations be served at a URL equal to the regular HTML page but with ".json" or ".xml" added to the end (as if it were a filename extension).
>
> Frankie
> ****************************************************************
>         website:  http://museumscomputergroup.org.uk/
>         Twitter:  http://www.twitter.com/ukmcg
>        Facebook:  http://www.facebook.com/museumscomputergroup
>   [un]subscribe:  http://museumscomputergroup.org.uk/email-list/
> ****************************************************************


****************************************************************
       website:  http://museumscomputergroup.org.uk/
       Twitter:  http://www.twitter.com/ukmcg
      Facebook:  http://www.facebook.com/museumscomputergroup
 [un]subscribe:  http://museumscomputergroup.org.uk/email-list/
****************************************************************