hcalendar-example1-steps-fr

From Microformats Wiki
Revision as of 22:36, 22 June 2006 by ChristopheDucamp (talk | contribs) (hcalendar-example1 : translation in progess)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

hCalendar : Démaches Exemple 1

Ceci est une étape vers l'explicatin étape du premier exemple dans la spécification hCalendar.

Exemple

Voilà un échantillon d'événements dans iCalendar :

BEGIN:VCALENDAR
PRODID:-//XYZproduct//EN
VERSION:2.0
BEGIN:VEVENT
URL:http://www.web2con.com/
DTSTART:20051005
DTEND:20051008
SUMMARY:Web 2.0 Conference
LOCATION:Argent Hotel, San Francisco, CA
END:VEVENT
END:VCALENDAR

et un équivalent dans hCalendar :

<span class="vcalendar">
 <span class="vevent">
  <a class="url" href="http://www.web2con.com/">
   <span class="summary">Web 2.0 Conference</span>:
   <span class="dtstart">20051005</span>-
   <span class="dtend">20051008</span>, 
   at the <span class="location">Argent Hotel, San Francisco, CA</span>
  </a>
 </span>
</span>

qui pourrait être affiché comme :

Web 2.0 Conference: 20051005-20051007, at the Argent Hotel, San Francisco, CA


Note 1 : L'information produit n'est pas nécessaire parce que hCalendar est un format interchange. Au moment de tranformer hCalendar en iCalendar, le moteur de transformation devrait aussi ajouter son propre ID produit. Note 2 : A surrounding element is optional, and can be left out as such. It is optional since the context of a vcalendar is implied when a vevent is encountered. The implied context/scope is that of the document. Authors may explicitly use elements with class="vcalendar" to wrap sets of vevents that all belong to the same calendar, e.g. when publishing multiple calendars on the same page.

Note 3 : The version information is unnecessary in hCalendar markup directly since the version will be defined by the profile of hCalendar that is used/referred to in the 'profile' attribute of the <head> element.

Note 4 : ISO8601 dates are however not very human friendly. Not only that, in the case of the end datetime (DTEND), the date must be specified as a whole day after the last day since DTEND is exclusive! In addition, the year is often understood implicitly by humans from the context. Thus this example could be improved by using <abbr> to make the date information more human readable and friendly, e.g.

<span class="vevent">
 <a class="url" href="http://www.web2con.com/">
  <span class="summary">Web 2.0 Conference</span>: 
  <abbr class="dtstart" title="20051005">October 5</abbr>-
  <abbr class="dtend" title="20051008">7</abbr>,
 at the <span class="location">Argent Hotel, San Francisco, CA</span>
 </a>
</span>

qui pourrait être affiché sous :

Web 2.0 Conference: October 5-7, at the Argent Hotel, San Francisco, CA


Retour à la spécifiaction hcalendar-fr.