hcalendar-faq: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
= hCalendar FAQ =
= hCalendar FAQ =


This page is for documenting Q&A about [[hCalendar].
This page is for documenting Q&A about [[hcalendar|hCalendar]].


* Q: ''How do I use a class inside <span class="vcalendar"> when I don't want the element I use it on to be a property of the calendar?''<br />A: Use a class name that isn't a defined iCalendar property name.
* Q: ''How do I use a class inside <span class="vcalendar"> when I don't want the element I use it on to be a property of the calendar?''
** A: Use a class name that isn't a defined iCalendar property name.


* Q: ''What happens if the class is used both inside and outside <span class="vcalendar">?''<br />A: That works fine.
* Q: ''What happens if the class is used both inside and outside <span class="vcalendar">?''
** A: That works fine.


* Q: ''What do I do if I want to add styling to a group of calendar events, especially if the calendar contains dynamic content? ''<br />A: 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.:<code>ol.group .vevent { /* insert common styling here */ } </code>
* Q: ''What do I do if I want to add styling to a group of calendar events, especially if the calendar contains dynamic content? ''
** A: 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.:<code>ol.group .vevent { /* insert common styling here */ } </code>


* Q: ''What do you do if you don't want the calendar or card to be displayed?''<br />A: If you don't want the calendar or card to be displayed, why are you publishing it on the Web?
* Q: ''What do you do if you don't want the calendar or card to be displayed?''
** A: If you don't want the calendar or card to be displayed, why are you publishing it on the Web?


* Q: ''What if you don't want specific properties to show up?''<br />A: 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: <code> .vevent .location { display:none } </code>
* Q: ''What if you don't want specific properties to show up?''
** A: 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: <code> .vevent .location { display:none } </code>


* Q: ''If we use <abbr> title for the ISODate, how do we specify a different tooltip?''<br />A: 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. <code> <abbr title="20050221"><span title="tooltip text">Feb. 21st</span></abbr></code>
* Q: ''If we use <abbr> title for the ISODate, how do we specify a different tooltip?''
** A: 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. <code> <abbr title="20050221"><span title="tooltip text">Feb. 21st</span></abbr></code>


* Q: ''Would the use of <acronym> for DTSTART be just as good as <abbr>?''<br />  A: 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]].
* Q: ''Would the use of <acronym> for DTSTART be just as good as <abbr>?''
** A: 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|hCalendar]].


* Q: ''What happens if a browser doesn't support <abbr>?''<br />  A: Then the human readable contents inside the element are displayed, which is the desirable behavior.
* Q: ''What happens if a browser doesn't support <abbr>?''
** A: Then the human readable contents inside the element are displayed, which is the desirable behavior.


* Q: ''Doesn't hCalendar duplicate IETF's xCal?''<br />  A: There is no such thing as "IETF" xCal.
* Q: ''Doesn't hCalendar duplicate IETF's xCal?''
** A: There is no such thing as "IETF" xCal.


* Q:" Can hCalendar be used like this? A little more accurate location data for an event would be really great..."<code>&lt;span class="location" lat="51.499009" long="0.080481">Argent Hotel, San Francisco, CA&lt;/span></code>
* Q: ''Can you provide more accurate location data for an hCalendar event? E.g. <code>&lt;span class="location" lat="51.499009" long="0.080481"&gt;Argent Hotel, San Francisco, CA&lt;/span&gt;</code> ..or this.. <code>&lt;span class="location" placename="Yorkshire" region="GB"&gt;The Ee bah gum festival...&lt;/span&gt;<code> - tom at othermedia dot com''
..or this..
** A: Yes, it is possible, by overlaying an [[hcard|hCard]] with the location markup, e.g. using your lat long example (taking the values as given, someone feel free to fix these to be the real values). This code examples are presumed to be inside an element with a class name of "vevent".
<code>&lt;span class="location" placename="Yorkshire" region="GB">The Ee bah gum festival...&lt;/span><code>
<pre>
tom@othermedia.com
...
<span class="location vcard"><span class="fn n org">
<abbr class="geo" title="51.499009;0.080481">Argent Hotel</abbr></span>,
<span class="adr">
  <span class="locality">San Francisco</span>, <span class="region">CA</span>
</span>
</span>
...
</pre>
For more discussions of location data, geographic data, and research into current and potential future formats, see the [[location-formats|location formats]] page.

Revision as of 23:24, 25 June 2005

hCalendar FAQ

This page is for documenting Q&A about hCalendar.

  • Q: 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?
    • A: Use a class name that isn't a defined iCalendar property name.
  • Q: What happens if the class is used both inside and outside ?
    • A: That works fine.
  • Q: What do I do if I want to add styling to a group of calendar events, especially if the calendar contains dynamic content?
    • A: 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 */ }
  • Q: What do you do if you don't want the calendar or card to be displayed?
    • A: If you don't want the calendar or card to be displayed, why are you publishing it on the Web?
  • Q: What if you don't want specific properties to show up?
    • A: 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 }
  • Q: If we use title for the ISODate, how do we specify a different tooltip?
    • A: 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
  • Q: Would the use of <acronym> for DTSTART be just as good as ?
    • A: It could be, but there is no need. The 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.
  • Q: What happens if a browser doesn't support ?
    • A: Then the human readable contents inside the element are displayed, which is the desirable behavior.
  • Q: Doesn't hCalendar duplicate IETF's xCal?
    • A: There is no such thing as "IETF" xCal.
  • Q: Can you provide more accurate location data for an hCalendar event? E.g. <span class="location" lat="51.499009" long="0.080481">Argent Hotel, San Francisco, CA</span> ..or this.. <span class="location" placename="Yorkshire" region="GB">The Ee bah gum festival...</span> - tom at othermedia dot com
    • A: Yes, it is possible, by overlaying an hCard with the location markup, e.g. using your lat long example (taking the values as given, someone feel free to fix these to be the real values). This code examples are presumed to be inside an element with a class name of "vevent".
...
<span class="location vcard"><span class="fn n org">
 <abbr class="geo" title="51.499009;0.080481">Argent Hotel</abbr></span>, 
 <span class="adr">
  <span class="locality">San Francisco</span>, <span class="region">CA</span>
 </span>
</span>
...

For more discussions of location data, geographic data, and research into current and potential future formats, see the location formats page.