Microdata and multiple opening in a day

て烟熏妆下的殇ゞ 提交于 2020-01-15 02:36:28

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/14051258/microdata-and-multiple-opening-in-a-day

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