Using Microdata with schema.org/OpeningHoursSpecification

£可爱£侵袭症+ 提交于 2019-12-09 18:00:53

问题


I'm looking at http://schema.org/OpeningHoursSpecification Microdata schema for places (and more). I'm a little bit confused on the value to be used for DayOfWeek.

Both classes (OpeningHoursSpecification and DayOfWeek) are derived from the GoodRelations Vocabulary for E-Commerce and I'm not confident with this vocabulary.

Please, can you post a full example?


回答1:


The enumerations (list of predefined values) of the GoodRelations model remain in the GoodRelations namespace, i.e. for Mondays, use

http://purl.org/goodrelations/v1#Monday

Here is a full example:

<div itemscope itemtype="http://schema.org/Place" itemid="#store">
  <span itemprop="name">Hepp's Happy Burger Restaurant</span>
  <div itemprop="openingHoursSpecification" itemscope 
       itemtype="http://schema.org/OpeningHoursSpecification">
Opening hours: Mo-Fri,
     <link itemprop="dayOfWeek" 
           href="http://purl.org/goodrelations/v1#Monday" />
     <link itemprop="dayOfWeek" 
           href="http://purl.org/goodrelations/v1#Tuesday" />
     <link itemprop="dayOfWeek" 
           href="http://purl.org/goodrelations/v1#Wednesday" />
     <link itemprop="dayOfWeek" 
           href="http://purl.org/goodrelations/v1#Thursday" />
     <link itemprop="dayOfWeek" 
           href="http://purl.org/goodrelations/v1#Friday" />
     <meta itemprop="opens" content="08:00:00">8:00 a.m. -
     <meta itemprop="closes" content="20:00:00">8:00 p.m.
  </div>
</div>

Hope that helps!



来源:https://stackoverflow.com/questions/14039803/using-microdata-with-schema-org-openinghoursspecification

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