linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
565 stars 143 forks source link

Support the Microdata format #345

Open dantman opened 5 years ago

dantman commented 5 years ago

I'd like to revive the request in #34 which has been languishing uncommented for 5 years.

A significant portion of the linked data on the web today is exposed as Microdata.

rdflib.js appears to be the "best" linked data parser available for Node.js, however it's missing parsers for 2 of the most common linked data formats (this and #344). So it does not appear there is any linked data parser in JS suitable for use today, meaning anyone wanting to parse linked data on the web now must ditch Node.js and use libraries in other languages.

dantman commented 5 years ago

For a starting idea, does anyone with better knowledge of rdf/microdata know how well microdata-node does?

It does appear it can convert microdata to JsonLD which could be passed to the JSON-LD parser, just like how currently the JSON-LD parser converts to n-quad data that is passed to the n-quad parser.

However the parser is cheerio based, which may warrant rewriting to use whatever dom parser is already present in the rdflib tree to parse RDFa. Also the library hasn't been updated in a year.