How to do a new extension with Schema.org + Microdata?

旧城冷巷雨未停 提交于 2019-12-31 03:04:08

问题


I have seen in a post that the slash is no longer up to date for creating new extensions in Schema.org.

I am using Microdata and would prefer to stick to it across my site.

What is the new way to create a new extension?

For example I want to create a new extension for MedicalTourism under the category Travel Agency. Before it would have been

http://schema.org/TravelAgency/MedicalTourism 

What is the new way?

And what would the code look like?


回答1:


You may still use Schema.org’s "slash-based" extension mechanism. It’s "outdated", but not invalid.

But it’s not (and never was) a good idea to use this mechanism if you want other consumers to understand or make special use of your extensions.

In some cases you could use Schema.org’s Role type, which allows you to give some additional data about a property, but not about types.

Alternatives

  • Propose new types/properties: If they are useful and the sponsors agree, they might get added to the Schema.org vocabulary at some point.

  • Use an existing vocabulary that defines types/properties for your use case (or create a new vocabulary if you don’t find one):

    • Either instead of Schema.org,

    • or in addition to Schema.org (while this works nicely with RDFa, Microdata is pretty limited: you’d have to use Schema.org’s additionalType property for additional types and full URIs for additional properties).



来源:https://stackoverflow.com/questions/27962228/how-to-do-a-new-extension-with-schema-org-microdata

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!