label - use to specify a delivery address label, such as you might put on a package for mailing.
This property can include a "type" subproperty, whose values are the same as the type subproperty in
adr -- dom (domestic delivery address), parcel, home, work, pref (preferred delivery address).
Example: markup this HTML text using the hCard properties:
These properties are used to provide telecommunications addressing information:
tel (telephone)
email
mailer (email software being used)
tel Property
tel - use to specify the person's telephone number. The "type" subproperty is used to specify the
intended use of the telephone number. Here are the values for the type subproperty:
home
msg (indicates the telephone number has an answering machine)
work
pref (indicates that this is the preferred number)
voice (indicates that this is a voice number)
fax
cell
video (indicates the number is for a video conferencing system)
pager
bbs (indicates the number is for a bulletin board system)
tel Property
type subproperty values (continued):
modem
isdn
pcs (indicates a personal communication services number)
If no "type" subproperty is specified it defaults to "voice"
Example: markup this HTML text:
John Q. Smith's home telephone number is: 617-555-1234
Use Brian Suda's xhtml2vcard.xsl tool to extract the hCard and generate a vCard (.vcf file). In the
lab 2 folder is run.bat. Double click on it, and it will invoke Brian's tool.
hCard and Microsoft Outlook
If you use Outlook for email then you can automatically create contacts from documents that contain hCards.
Suppose an HTML document contains an hCard of a person. You can generate a vCard from the document by
using Brian Suda's xhtml2vcard.xsl tool.
Then you can install the vCard as a contact in Outlook by following these steps:
Open Outlook
Click on the Contacts button
Under File select Import and Export then select: Import a VCARD file (.vcf)
Lab 3
Add Stephen Hawking to your Outlook contacts (import the .vcf file from Lab 1).
Add Robert Williams and Marie Fredericks to your Outlook contacts (import the .vcf file from Lab 2).
email Property
email - use to specify the email address of a person
A "type" subproperty can be used to specify the
format or preference of the email address:
internet (indicates it is an internet email address)
x400 (indicates it is an X.400 address)
pref (indicates the preferred email address when more than one is specified)
mailer - use to specify the type of email software that is used by the person.
Example: markup this HTML text:
The emailing software that he uses is: Microsoft Outlook
Here is the marked up text:
The emailing software that
<div class="vcard">
<abbr class="fn" title="John Q. Smith">he</abbr>
uses is:
<span class="mailer">Microsoft Outlook</span>
</div>
Geographical Properties
These properties are used to provide geographical position information:
tz (time zone)
geo (lat, lon)
tz Property
tz - use to specify the time zone where the person resides.
Example: markup this HTML text:
He lives in the EST time zone.
Here is the marked up text:
He lives in the
<abbr class="tz" title="-05:00">EST</abbr>
time zone
Note: use a utc-offset to specify the time zone.
geo Property
geo - use to specify the global position of the person. It has two subproperties - latitude and longitude.
latitude: use a positive number to specify a location north of the equator; use a negative number to specify a
location south of the equator.
longitude: use a negative number to specify a location west of the prime meridian; use a positive number to specify a
location east of the prime meridian.
The latitude and longitude values must be specified as a decimal value, and should be specified to six decimal places.
This will allow for granularity to within a meter of the geographical position.
geo Property
Example: markup this HTML text:
His home GPS location is: 41.537063, -90.561585 (lat/lon)
Here is the marked up text:
His home GPS location is:
<div class="geo">
<span class="latitude">41.537063</span>,
<span class="longitude">-90.561585</span>
</div>
(lat/lon)
geo Property
Typically the creator of HTML text has no interest in displaying lat/lon decimal values on the browser screen. He
just wants to display human-oriented text, e.g.,
His home is a big, brown house.
But he does want to make lat/lon geo info available to aggregators (Web tools).
The HTML text can be extended (without impact to what is seen on the browser screen) to incorporate the geo location
information
Here is the marked up text:
<abbr class="geo" title="41.537063;-90.561585">His home</abbr> is a big, brown house.
geo Property
<abbr class="geo" title="41.537063;-90.561585">His home</abbr> is a big, brown house.
Note that the value of the lat/lon is encoded within the title attribute of the abbr element: latitude semicolon longitude.
Also note that we have extended the original HTML text with additional information (lat/lon information).
geo Best Practice
Example: which part of this hCard should you wrap with geo?
Here's the KML of the hCard displayed in Google Earth:
Lab 4
Markup this HTML text using the hCard properties. Enhance the information in this document with the
lat/lon coordinates of Trump Tower (Lat: 40.762458, Lon: -73.974385).
<body>
<h1>Donald Trump</h1>
<p>Donald John Trump was born on June 14, 1946 (in Queens, New York) to Mary MacLeod Trump,
a native of Scotland, and the soon-to-be millionaire Fred Trump. Trump is an American
business executive, entrepreneur and author. He is the CEO of Trump Organization,
an American-based real estate developer in the real estate market and the founder of
Trump Entertainment, which operates gambling casinos. He enjoyed a great deal of
publicity following the success of his reality television show, The Apprentice
(in which he serves as both executive producer and host for the show).
He resides in Trump Tower at 725 Fifth Avenue at 56th Street in New York City, NY.
Use the hCard2kml.xsl tool to extract the hCard and generate a KML file. In the
lab 4 folder is run.bat. Double click on it, and it will invoke the xhtml2kml.xsl tool tool.