hcalendar-faq

From Microformats Wiki
Revision as of 02:12, 11 May 2006 by Tantek (talk | contribs) (link to hcard locations in brainstorming)
Jump to navigation Jump to search

hCalendar FAQ

This page is for documenting Q&A about hCalendar. If you have a new question to ask, Please consider first asking your question on the microformats-discuss list.

Q&A

  1. How do I use a class inside when I don't want the element I use it on to be a property of the calendar?
    • Use a class name that isn't a defined iCalendar property name.
  2. What happens if the class is used both inside and outside ?
    • That works fine.
  3. What do I do if I want to add styling to a group of calendar events, especially if the calendar contains dynamic content?
    • You can write style rules that incorporate both the context of said group (say it is in an ordered list with class name "group" for example) and the events, e.g.:ol.group .vevent { /* insert common styling here */ }
  4. What do you do if you don't want the calendar or card to be displayed?
    • If you don't want the calendar or card to be displayed, why are you publishing it on the Web?
  5. What if you don't want specific properties to show up?
    • You can trivially use CSS to hide (or otherwise alter the display) of certain properties. E.g. if you want to hide the "location" from all your VEVENTs you would write a rule like this: .vevent .location { display:none } . This won't, however, keep the properties from being read in the HTML source.
  6. If we use <abbr> title for the ISODate, how do we specify a different tooltip?
    • For reasons of metadata transparency and visibility, it is recommended that you DO NOT specify a different tooltip. However, if in your particular content or application you must, you can do so with a nested span e.g. Feb. 21st
  7. Would the use of <acronym> for DTSTART be just as good as ?
    • It could be, but there is no need. The <abbr> element is also preferred as it is better defined. The <acronym> element, and in particular, the term "acronym" means different things to different people, and thus we are not using it in hCalendar.
  8. What happens if a browser doesn't support <abbr>?
    • Then the human readable contents inside the element are displayed, which is the desirable behavior.
  9. How is hCalendar different from xCalendar, i.e. draft iCalendar XML guidelines submitted to the IETF?
    • hCalendar and xCalendar are actually very similar in that they are both based on iCalendar standard, RFC2445. However, xCalendar is a way of representing iCalendar files using non-standard XML element names and attributes. This is inadequate and unwieldly for serving on web pages. xCalendar is still a separate, encapsulated document in the context of the web, that requires yet another namespace. Nobody would ever look at an xCalendar XML file in the context of their ordinary browsing, unless it's XSLTed into something else, e.g. hCalendar. On the other hand, hCalendar is easily embeddable into normal XHTML web pages, easily stylable with CSS, cleanly separates human presentable date information vs. machine parsable ISO-8601 dates, etc. With hCalendar, calendar and events content appears both to the human user *and* to hCalendar-aware machine implementations, parsers, indexers, etc., on *today's* web.
  10. Can you provide more precise location data for an hCalendar event such as latitude and longitude?
    • Yes, it is possible, by overlaying an hCard with the location markup (see the brainstorming on hCard locations), e.g. using your lat long example (taking the values as given, someone feel free to fix these to be the real values). The code example(s) are presumed to be inside an element with a class name of "vevent". See the hcalendar-location-hcard-example page for details. For more discussions of location data, geographic data, and research into current and potential future formats, see the location formats page.
  11. When transforming an hCalendar to a .ics file, do I have to convert the time to UTC?
    • Yes. The iCalendar format does not permit the time to be published with an offset. hCalendars can be published with offsets, because this promotes accuracy, as it can more easily be verified (timezone math is hard), but tools which transform hCalendar to iCalendar must transformat times to UTC.
  12. How are recurring events represented?
    • If you take a look at Example 3, there is a proposed means using an RRULE property along with a freq sub-property. It's a start - more brainstorming at hcalendar-brainstorming.
  13. How does one markup just the year as opposed to an entire date? e.g. to represent age, or discussing "the past year" ?
    • Depends on the context. If by "the past year", you mean the past *calendar* year, then mark it up as January 1st through December 31st. If you mean the past 365 days, then mark it up according to whatever date it is relative to. Etc.
  14. Are there any programs of services that convert from iCalendar to hCalender?
    • At the moment there are no plans to create a program. There are several issues when converting, mainly HOW the information is represented in HTML. Since you can use just about any element which could the converter choose. This is not to say a converter shouldn't be built, but it is out of the scope of microformats.
  15. Is the list of possible types for an ADR and TEL case sensitive?
    • No, enumerated values are case-INsensitive, therefore Home, home, HOME, etc are all equivalent
  16. Why won't Outlook import my ics file
    • Outlook is picky about some properties. With outlook, UID, DTSTAMP and METHOD are mandatory. Be sure you have marked-up your hCalendar with a class="uid" and a class="dtstamp" in a class="vevent"
  17. Can I use YYYY-MM-DD dates or do I have to use the YYYYMMDD format?
    • hCalendar specifies ISO8601 datetime format, and both examples are valid, so you can use either one.
  18. Why do i have to use a 'T' between the date and time in ISO Dates?
    • You can NOT use a white-space character, the 'T' is mandatory to separate the date from the time.
  19. Use in tables. I currently have events in table layout, using the format:
 <tr class="X">
 <th scope="row">Sunday 12 February 2006</th>
 <td><strong><a href="http://www.rspb.org.uk/reserves/guide/c/conwy/index.asp">RSPB Conwy</a>*/ Llanfairfechan</strong>.</td>
 <td><p>A sea watch with potential for divers and sea ducks and a visit to a prime seaside reserve.</p></td>
 </tr>

How would I include the code:

 <div class="vevent">
 <a class="url" href="http://www.westmidlandbirdclub.com/birmingham/field.htm">
 <abbr class="dtstart" title="20060212">February 12 2006</abbr> 
 <abbr class="dtend" title="20060213"> </abbr>
 <span class="summary">Birmingham Branch Field Trip</span> - at
 <span class="location">RSPB Conwy/ Llanfairfechan.</span>
 </a>
 <div class="description">A sea watch with potential for divers and sea ducks and a visit to a prime seaside reserve.</div>
 </div>

in that? It seems to me that to loose the semantic table mark (column and row headers, for example) up would be a bad thing; not least for people whose lints don't understand hCal. Is the use of a non-breaking space in the dtend OK?PigsOTWing 12:12, 6 Feb 2006 (PST)