问题
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