本文介绍了如何使用 Schema.org + Microdata 进行新扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在帖子中看到斜杠不再适用于在 Schema.org 中创建新扩展.

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?

例如,我想在 Travel Agency 类别下为 MedicalTourism 创建一个新扩展.之前是

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 

什么是新方法?

代码是什么样的?

推荐答案

可能仍然使用 Schema.org 的 "基于斜杠的"扩展机制.它过时",但并非无效.

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.

在某些情况下,您可以使用 Schema.org 的 Role 类型,它允许你可以提供一些关于属性的额外数据,而不是关于类型.

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.

  • 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):

  • 或者不是 Schema.org,

  • Either instead of Schema.org,

或者除了 Schema.org(虽然这与 RDFa 配合得很好,但微数据非常有限:您必须使用 Schema.org 的 additionalType 属性 来获取其他类型和完整 URI其他属性).

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).

这篇关于如何使用 Schema.org + Microdata 进行新扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 21:39