Browsing through Drupal website I encountered the Microdata module. Which seems does a similar task Schema.org does. I was wondering how do the two modules differ and when should one be used instead of the other.

Comments

scor’s picture

Status: Active » Fixed

Check out the schema.org module description (specifically the "syntax" and "known incompatibilities" sections) where I've explained that this module uses the core RDFa syntax. In a nutshell, schema.org is a vocabulary (set of types and properties) that you can embed in your HTML via one of the HTML data syntaxes: Microdata of RDFa. Schema.org initially launched with support for only microdata but they've since then extended their support to RDFa. As for the difference between the two syntaxes, there are a lot of discussions online about this topic, here are a few links:
http://www.w3.org/TR/html-data-guide/
http://manu.sporny.org/2011/uber-comparison-rdfa-md-uf/

cesareaugusto’s picture

Would it be possible to use both simultaneously?

scor’s picture

I've never tried, but I know that technically both syntaxes can be used simultaneously, though I'm not sure why you would want to do that?

Anonymous’s picture

Microdata module will strip out RDFa from HTML output.

This is the desired functionality, since there is no way to have RDF enabled on a site while turning off RDFa output (something that will hopefully change in D8)... this is important for use cases that go beyond the common ones.

Thus, if you use Microdata module, there probably aren't any incompatibilities with Schema.org module. However, it would for the most part make Schema.org module's configuration useless, since it is removing the RDFa which this module uses.

cesareaugusto’s picture

By the links scor posted I deduce the RDFa is the most powerful... I asked about Microdata as I use mostly addressfields and fivestars (building a roaster of revisioned local businesses) wich seem not to be reckon by Shema.org. More cause Schema.org still marks all my nodes as type website (using Panels to display nodes/taxonomy terms)...

Anonymous’s picture

There is no difference in power between RDFa and Microdata. There are some minor differences that only really matter to people who are using something besides Schema.org.

Schema.org module will not currently work with Panels displays, AddressFields, or Fivestar. Microdata module might. You will need to apply a patch for AddressFields to work.

If you have any issues with Microdata, you can post the issues there.

cesareaugusto’s picture

Thanks for the explain linclark! From what I read Drupal natively support RDFa, which - I deduce - would make the Schema.org approach (RDFa) the more Drupal-like? Right?

I tried both modules and Schema.org seems the user friendlier, all the properties are already in.

Anyway... at present I must elige which module to use. Will Schema.org support (in the near future) such features (address fields, fivestars, panels)? Or should I better move to Microdata?

scor’s picture

Microdata currently has the best support for these advanced fields. I'm planning to add support for this via the RDFa module but not sure yet when it'll be available.

cesareaugusto’s picture

Thanks again for the info scor! What about the Panels issue (which is the most important to me)? Any plan there?

Anonymous’s picture

At the very least, the Panels issue should be cleared up in RDFa as part of Drupal 8. There is an issue for it, #1777688: RDFa output incorrect when not using entity template (Views, Panels, etc) or when render array is altered.

It should be reasonably easy to implement that in D7 as well, but I don't know the plans.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.