Re: Examples Re: Modelling Course and CourseOffering

is this an identity, or is there value in comparing parsed example output
as (sorted) text in turtle/N3? this may be helpful for validating examples:

from collections import OrderedDict
jsonld_odict=OrderedDict(jsonld)
ttl1 = rdfa2ttl(
  jinja2.template.render(
   '#rdfa-tmpl.jinja',
   context=jsonld_odict))
ttl2 = jsonld2ttl(jsonld_odict)
assertEqual(ttl1, ttl2)

s/ttl/n3/
On Feb 16, 2016 7:56 AM, "Phil Barker" <phil.barker@hw.ac.uk> wrote:

>
>
> On 16/02/2016 13:40, Dan Brickley wrote:
>
>> Can I put in a vote for JSON-LD or Microdata/RDFa in those examples; I'm
>> afraid Turtle/N3 remains a relatively esoteric skill, and it would be good
>> to keep examples close to the form that will be in eventual use in the
>> wider Web (and on schema.org). Dan
>>
>
> Yep, that's where I'm heading. The copies I am working on have RDFa, the
> N3 is generated automatically by rdf-translator.appspot.com So you can
> view source on
> <http://www.icbl.hw.ac.uk/~philb/temp/schCExt/FifeAccounting.html> for
> the RDFa
>
> In the past I've used rdf-translator to generate JSON-LD, but the output
> needs simplifying before it can be used for schema.org examples.
> see <
> http://rdf-translator.appspot.com/convert/rdfa/json-ld/http%3A%2F%2Fwww.icbl.hw.ac.uk%2F~philb%2Ftemp%2FschCExt%2FFifeAccounting.html
> >
>
> It's pretty easy to generate microdata examples from the RDFa
>
> Phil
>
> --
> Phil Barker           @philbarker
> LRMI, Cetis, ICBL     http://people.pjjk.net/phil
> Heriot-Watt University
>
> Workflow: http://www.icbl.hw.ac.uk/~philb/workflow/
>
>
>
> ----- We invite research leaders and ambitious early career researchers to
> join us in leading and driving research in key inter-disciplinary themes.
> Please see www.hw.ac.uk/researchleaders for further information and how
> to apply.
>
> Heriot-Watt University is a Scottish charity
> registered under charity number SC000278.
>
>
>

Received on Tuesday, 16 February 2016 17:59:33 UTC