微数据,一天内多次开通 [英] Microdata and multiple opening in a day
问题描述
假设一个地方不提供全天开放.因此,我们一天有两个开放.如何使用 schema.org/OpeningHoursSpecification 定义微数据?我想应该创建两个分离的 schema.org/OpeningHoursSpecification 实例,如下所示:
营业时间:<div itemprop="openingHoursSpecification" itemscopeitemtype="http://schema.org/OpeningHoursSpecification">Mo,<link itemprop="dayOfWeek"href="http://purl.org/goodrelations/v1#Monday"/><meta itemprop="opens" content="08:00:00">8:00 a.m. -<meta itemprop="closes" content="12:00:00">12:00 a.m.
<div itemprop="openingHoursSpecification" itemscopeitemtype="http://schema.org/OpeningHoursSpecification">Mo,<link itemprop="dayOfWeek"href="http://purl.org/goodrelations/v1#Monday"/><meta itemprop="opens" content="16:00:00">4:00 a.m. -<meta itemprop="closes" content="20:00:00">晚上 8:00
我说得对吗?
是的,你说得对!
如果你想了解模式,你也可以使用(有点过时的)GoodRelations Annotator 工具
http://www.ebusiness-unibw.org/tools/goodrelations-annotator/en/
它将为基于表单的输入生成相应的 RDFa 标记.
请注意,在 schema.org 中,元素的命名可能与原始命名空间中的命名略有不同,如下所述:
http://wiki.goodrelations-vocabulary.org/Cookbook/Schema.org#Naming_Differences
最好的祝福
马丁·赫普
Suppose that a place does not offer the all-day-opening. Hence, we have two opening in one day. How one should define the Microdata with schema.org/OpeningHoursSpecification? I suppose that one should create two separated instances of schema.org/OpeningHoursSpecification as follows:
Opening hours:
<div itemprop="openingHoursSpecification" itemscope
itemtype="http://schema.org/OpeningHoursSpecification">Mo,
<link itemprop="dayOfWeek"
href="http://purl.org/goodrelations/v1#Monday" />
<meta itemprop="opens" content="08:00:00">8:00 a.m. -
<meta itemprop="closes" content="12:00:00">12:00 a.m.
</div>
<div itemprop="openingHoursSpecification" itemscope
itemtype="http://schema.org/OpeningHoursSpecification">Mo,
<link itemprop="dayOfWeek"
href="http://purl.org/goodrelations/v1#Monday" />
<meta itemprop="opens" content="16:00:00">4:00 a.m. -
<meta itemprop="closes" content="20:00:00">8:00 p.m.
</div>
Am I right?
Yes, you are exactly right!
If you want to understand the pattern, you can also play with the (kind of outdated) GoodRelations Annotator tool at
http://www.ebusiness-unibw.org/tools/goodrelations-annotator/en/
It will generate respective RDFa markup for form-based input.
Note that in schema.org, the naming of elements may differ slightly from the naming in the original namespace, as documented here:
http://wiki.goodrelations-vocabulary.org/Cookbook/Schema.org#Naming_Differences
Best wishes
Martin Hepp
这篇关于微数据,一天内多次开通的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!