h-event

(Difference between revisions)

Jump to: navigation, search
(Added BC notes from mf2 page)
(move backward compatiblity to its own section)
Line 29: Line 29:
== Properties ==
== Properties ==
Inside an element with class '''h-event''':
Inside an element with class '''h-event''':
-
 
* '''<code>p-name</code>''' - event name (or title)
* '''<code>p-name</code>''' - event name (or title)
* '''<code>p-summary</code>''' - short summary of the event
* '''<code>p-summary</code>''' - short summary of the event
Line 45: Line 44:
Experimental properties currently in use in the wild but not (yet) part of the official h-entry spec:
Experimental properties currently in use in the wild but not (yet) part of the official h-entry spec:
* '''<code>p-attendee</code>''' - a person attending the event, optionally a nested [[h-card]]
* '''<code>p-attendee</code>''' - a person attending the event, optionally a nested [[h-card]]
-
 
-
For backward compatibility, you may wish to use classic [[hCalendar]] classnames in addition to the more future-proof h-event properties, for example:
 
-
 
-
<source lang=html4strict>
 
-
<div class="h-event vevent">
 
-
  <h1 class="p-name summary">Some great event</h1>
 
-
</div>
 
-
</div>
 
-
</source>
 
-
 
-
Microformats 2 parsers {{should}} detect the following root class name and property names. A microformats 2 parser may use existing microformats [[parsers]] to extract these properties. If an "h-event" is found, don't look for a "vevent" on the same element.
 
-
 
-
Compat root class name: <code id="vevent">vevent</code><br/>
 
-
Properties: (parsed as '''p-''' plain text unless otherwise specified)
 
-
* <code>summary</code> - parse as '''<code>p-name</code>'''
 
-
* <code>dtstart</code> - parse as '''<code>dt-start</code>'''
 
-
* <code>dtend</code> - parse as '''<code>dt-end</code>'''
 
-
* <code>duration</code> - parse as '''<code>dt-duration</code>'''
 
-
* <code>description</code>
 
-
* <code>url</code> - parse as '''u-'''
 
-
* <code>category</code>
 
-
* <code>location</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>, and compat root <code>adr</code> in the absence of <code>h-adr</code>
 
-
* <code>geo</code> - parse as '''<code>p-geo h-geo</code>''' including compat root <code>geo</code>
 
-
* <code>latitude</code>
 
-
* <code>longitude</code>
 
== Status ==
== Status ==
Line 104: Line 78:
See [[microformats2#Examples_in_the_wild|microformats2 examples in the wild]] for more
See [[microformats2#Examples_in_the_wild|microformats2 examples in the wild]] for more
 +
 +
== Backward Compatiblity ==
 +
=== Publisher Compatibility ===
 +
For backward compatibility, you may wish to use classic [[hCalendar]] classnames in addition to the more future-proof h-event properties, for example:
 +
 +
<source lang=html4strict>
 +
<div class="h-event vevent">
 +
  <h1 class="p-name summary">Some great event</h1>
 +
</div>
 +
</div>
 +
</source>
 +
 +
=== Parser Compatibility ===
 +
Microformats 2 parsers {{should}} detect the following root class name and property names. A microformats 2 parser may use existing microformats [[parsers]] to extract these properties. If an "h-event" is found, don't look for a "vevent" on the same element.
 +
 +
Compat root class name: <code id="vevent">vevent</code><br/>
 +
Properties: (parsed as '''p-''' plain text unless otherwise specified)
 +
* <code>summary</code> - parse as '''<code>p-name</code>'''
 +
* <code>dtstart</code> - parse as '''<code>dt-start</code>'''
 +
* <code>dtend</code> - parse as '''<code>dt-end</code>'''
 +
* <code>duration</code> - parse as '''<code>dt-duration</code>'''
 +
* <code>description</code>
 +
* <code>url</code> - parse as '''u-'''
 +
* <code>category</code>
 +
* <code>location</code> - including compat root <code>vcard</code> in the absence of <code>h-card</code>, and compat root <code>adr</code> in the absence of <code>h-adr</code>
 +
* <code>geo</code> - parse as '''<code>p-geo h-geo</code>''' including compat root <code>geo</code>
 +
* <code>latitude</code>
 +
* <code>longitude</code>
== Background ==
== Background ==
Line 109: Line 111:
== Design Principles ==
== Design Principles ==
-
 
(stub, expand)
(stub, expand)

Revision as of 23:42, 14 June 2013

Tantek Çelik (Editor)


h-event is a simple, open format for publishing events on the web. h-event is one of several open microformat draft standards suitable for embedding data in HTML/HTML5.

h-event is the microformats-2 update for hCalendar.

Contents

Example

Here is a simple event example:

<div class="h-event">
  <h1 class="p-name">Microformats Meetup</h1>
  <p>From 
    <time class="dt-start" datetime="2013-06-30 12:00">30<sup>th</sup> June 2013, 12:00</time>
    to <time class="dt-end" datetime="2013-06-30 18:00">18:00</time>
    at <span class="p-location">Some bar in SF</span></p>
  <p class="p-summary">Get together and discuss all things microformats-related.</p>
</div>

Get started

The class h-event is a root class name that indicates the presence of an h-event.

p-name, dt-start, dt-end, p-location, p-summary, and the other h-event property class names listed below define properties of the h-event.

See microformats-2-parsing to learn more about property class names.

Properties

Inside an element with class h-event:

Experimental properties currently in use in the wild but not (yet) part of the official h-entry spec:

Status

h-event is a microformats.org draft specification. Public discussion on h-event takes place on h-event-feedback, the #microformats irc channel on irc.freenode.net, and microformats-new mailing list.

h-event is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-events up as classic hCalendar events.

Property Details

(stub, to be expanded)

p-location is typically a physical address, optionally marked up with h-adr, for example:

<p class="p-adr h-adr">
  <span class="p-street-address">17 Austerstræti</span>
  <span class="p-locality">Reykjavík</span>
  <span class="p-country-name">Iceland</span>
</p>

hCalendar-specific implementations that perform custom display or translation (e.g. to iCalendar .ics) SHOULD prefer p-name over p-summary, and use p-summary value(s) as a fallback if there is no p-name.

Examples in the wild

Real world in the wild examples:

See microformats2 examples in the wild for more

Backward Compatiblity

Publisher Compatibility

For backward compatibility, you may wish to use classic hCalendar classnames in addition to the more future-proof h-event properties, for example:

<div class="h-event vevent">
  <h1 class="p-name summary">Some great event</h1>
</div>
</div>

Parser Compatibility

Microformats 2 parsers SHOULD detect the following root class name and property names. A microformats 2 parser may use existing microformats parsers to extract these properties. If an "h-event" is found, don't look for a "vevent" on the same element.

Compat root class name: vevent
Properties: (parsed as p- plain text unless otherwise specified)

Background

This work is based on the existing hCalendar and iCalendar specifications.

Design Principles

(stub, expand)

See Also

Categories

h-event was last modified: Wednesday, December 31st, 1969

Views