lawrencewoodman / mida

A Microdata parser/extractor library for Ruby
http://lawrencewoodman.github.io/mida
Other
77 stars 18 forks source link

Support for schema.org extensions #4

Open lawrencewoodman opened 13 years ago

lawrencewoodman commented 13 years ago

At the moment there is no for schema.org extensions. Thanks to Paxa for the heads-up.

Currently if you have: itemtype="http://schema.org/WebPageElement/ItemType"

Mida ignores this item, and push name attributes to parents' item.

lawrencewoodman commented 13 years ago

I think that the regexp should be changed for each vocabulary to recognize the extension as being of the vocabulary extended as opposed to being a separate GenericVocabulary.

Paxa commented 13 years ago

No, I was mistaken (invalid layout). It works well

I test it on http://microdata.realitysimple.com/projects

doc.items[0].properties['mentions'][0].type
"http://schema.org/WebPageElement/ItemType"
doc.items[0].properties['mentions'][0].vocabulary
Mida::SchemaOrg::WebPageElement

But If I add new property to extended item it will be ignored, because extended item is validating as known found (http://schema.org/WebPageElemen in my case)