Re: some questions on metadata examples...

> On Oct 28, 2014, at 9:05 PM, Axel Polleres <axel@polleres.net> wrote:
> 
> Looking at
> 
> http://w3c.github.io/csvw/csv2rdf/#example-1
> 
> The example in Section 3 does not seem to be valid JSON (i.e. some ',' too many).
> 
> Likewise, Example 3, misses some ',' (after the ']')
> 
> 
> Plus, Example 3, even if I fix the ',' issue seems to only generate one single triple when converting into RDF:
> 
> <http://www.example.org/tree-ops.csv> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <file:///Users/apollere/Table> .
> 
> ... looking for help, or does that indicate that we're not operating in valid JSON-LD grounds?

It is indeed invalid JSON, and non-productive JSON-LD. Obviously, these things should be improved. In this case, besides the missing comma, none of the terms used are mapped to anything, as there’s no context included.

Cleanest thing for the examples would be to use the context we defined <http://www.w3.org/ns/csvw>, or something similar, and put a simple context there, containing at least the following:

{
  “@context”: {
    "@vocab": "http://www.w3.org/ns/csvw#",
    "dc": "http://purl.org/dc/terms/",
    "xsd": "http://www.w3.org/2001/XMLSchema#",

    "title": "dc:title",
    "description": "dc:description",
    "license": "dc:license",
    "modified": {"@id": "dc:modified", "@type": "xsd:date"},
    "columns": {"@container": "@list"}
  }
}

This could, of course, be put inline, but I think it’s cleaner if we reference it. Of course, it should return a content-type of application/ld+json as well.

This is what it might look like in the playground: http://tinyurl.com/pu5hbdl

Gregg

> Axel
> 
> --
> Prof. Dr. Axel Polleres
> Institute for Information Business, WU Vienna
> url: http://www.polleres.net/  twitter: @AxelPolleres
> 
> 

Received on Wednesday, 29 October 2014 04:31:17 UTC