HTML5 Guidelines for Web Developers

(coco) #1
11.1 The Syntax of Microdata 267

SUMMARY:Orchestrion
END:VEVENT
END:VCALENDAR


The conversion of microdata to the iCal format is based on Philip Jägenstedt’s
JavaScript library microdatajs, which is also the core of the microdata viewer.
You can download it from http://gitorious.org/microdatajs.


On this occasion we can also write the license for this library as a microdata
structure. The rules for the vocabulary are in the WHATWG version of the mi-
crodata specification in the section Licensing works and require as an itemtype
the URL http://n.whatwg.org/work plus the keywords work, title, author, and
license as itemprop attributes:



The next example shows how microdata dialects can be used in combination. As
part of a concert review, it makes sense to code the event as vEvent and the au-
thor of the review as vCard. The technique for nesting dialects is quite simple. If
we want to define the itemProp attribute reviewer in the hReview dialect as vCard,
we just have to add an itemScope attribute with the itemType of the vCard dialect
to the same element and then add the desired entries of the vCard. The same
applies for embedding vEvent into hReview and can be tested with the following
code fragment in the microdata viewer:


<article itemscope
itemtype=http://microformats.org/wiki/hreview>
<div
itemprop=item itemscope
itemtype=http://microformats.org/profile/hcalendar#vevent>
Orchestrion,
<time itemprop=dtstart
datetime="2010-10-09T20:30:00-04:00">October 9th 2010
:



A fascinating evening
rated with 5 stars out of 5 stars.
itemtype=http://microformats.org/profile/hcard>
Nicos Thassofilakas,
Free download pdf