VIE icon indicating copy to clipboard operation
VIE copied to clipboard

Add support for Microdata

Open bergie opened this issue 13 years ago • 9 comments

Due to the efforts of search engines (see http://schema.org/), it appears HTML5 microdata will become a rather important way of publishing machine-readable data on the web. Because of this, VIE should support it.

Reading and writing semantic data with the DOM is now handled in the VIE.RDFa object. We could implement an API-compatible VIE.Microdata object that systems could use instead as needed.

bergie avatar Jun 03 '11 16:06 bergie

See microdata / RDFa mappings: http://schema.org/docs/datamodel.html

bergie avatar Jun 03 '11 16:06 bergie

Here is the first test for Microdata reading. Obviously fails now: https://github.com/bergie/VIE/commit/3c1afcb29a4b4433f9699c4200f49014f8b992e6

bergie avatar Jun 08 '11 01:06 bergie

This http://gitorious.org/microdatajs and its live version at http://foolip.org/microdatajs/live/ might be of help to not fail ;-)

andresgruber avatar Jun 08 '11 15:06 andresgruber

We are currently working on a Microdata reader/writer for rdfQuery. For the client-side version of VIE this will give immediately support for Microdata as it can use rdfQuery. We have to inspect if we can use that parser for node.js as well.

neogermi avatar Sep 26 '11 13:09 neogermi

untested so far, but please have a look at commit a2148563e7fd23931135abc7cf850c2db2c10afd

neogermi avatar Nov 29 '11 13:11 neogermi

Hi, is the implementation in mentioned commit a214856 working in node.js? If so, could you please provide some example how to parse html document for microdata items?

ladariha avatar Feb 11 '12 17:02 ladariha

You might also want to look at termi's Microdata shim, which is apparently browser tested as far back as IE6. I haven't used it myself, though.

https://github.com/termi/Microdata-JS

Microdata parsers are a lot simpler than RDFa parsers, so you could probably create and maintain your own if you wanted to. If the Drupal folks who are super excited about CreateJS get enough time to add stable support for it in Drupal, then I could help with this issue as well.

linclark avatar Apr 04 '12 03:04 linclark

A discussion is taking place in the W3C HTML5 WG if it makes sense to have a microdata standard in addition to RDFa: http://manu.sporny.org/2012/microdata-cr/

I agree with Manu Sporny and therefore suggest to ignore HTML5 microdata and to concentrate on RDFa instead.

akuckartz avatar Dec 18 '12 15:12 akuckartz

@akuckartz Microdata might not make sense in VIE as a default, but given that the services are abstracted anyway, I'd love to have a Microdata (and even Microformats!) service out there.

Here is an example of a custom DOM service for VIE (this one using data attributes): https://github.com/wimleers/edit-createjs/blob/7.x-1.x/js/SparkEditService.js

bergie avatar Dec 19 '12 14:12 bergie