86
1. If thevaluep680
of the property is anitemp677
, then skip this property.
2. Append a U+003B SEMICOLON character (;) tovalue.
3. Append the result ofescaping the vCard text stringp696
given by thevaluep680
of the property to
value.
If the property'svaluep680
is anitemp677
subitemwith theitem typep677
http://microformats.org/profile/
hcardp683
andnameisrelatedp689
1. Letvaluebe the empty string.
2. If there is a property namedurlp689
insubitem, and its element is aURL property elementp681
, then
append the result ofescaping the vCard text stringp696
given by thevaluep680
of the first such property to
value, and add a parameter with the name "VALUE" and the value "URI" toparameters.
3. If there is a property namedrelp689
insubitem, and the first such property has avaluep680
that is not an
itemp677
and whose value consists only ofalphanumeric ASCII charactersp64
, then add a parameter named
"RELATION" whose value is thevaluep680
of that property toparameters.
If the property'svaluep680
is anitemp677
andnameis none of the above
1. Letvaluebe the result ofcollecting the first vCard subpropertyp695
namedvalueinsubitem.
2. If there is a property namedtypeinsubitem, and the first such property has avaluep680
that is not an
itemp677
and whose value consists only ofalphanumeric ASCII charactersp64
, then add a parameter named
"TYPE" whose value is thevaluep680
of that property toparameters.
If the property'svaluep680
is not anitemp677
and itsnameissexp685
If this is the first such property to be found, setsexto the property'svaluep680
.
If the property'svaluep680
is not anitemp677
and itsnameisgender-identityp685
If this is the first such property to be found, setgender-identityto the property'svaluep680
.
Otherwise (the property'svaluep680
is not anitemp677
)
1. Letvaluebe the property'svaluep680
.
2. Ifelementis one of theURL property elementsp681
, add a parameter with the name "VALUE" and the value
"URI" toparameters.
3. Otherwise, ifnameisbdayp684
oranniversaryp685
and thevalueis avalid date stringp72
, add a
parameter with the name "VALUE" and the value "DATE" toparameters.
4. Otherwise, ifnameisrevp690
and thevalueis avalid global date and time stringp77
, add a parameter with
the name "VALUE" and the value "DATE-TIME" toparameters.
5. Prefix every U+005C REVERSE SOLIDUS character (\) invaluewith another U+005C REVERSE
SOLIDUS character (\).
6. Prefix every U+002C COMMA character (,) invaluewith a U+005C REVERSE SOLIDUS character (\).
7. Unlessnameisgeop688
, prefix every U+003B SEMICOLON character (;) invaluewith a U+005C
REVERSE SOLIDUS character (\).
8. Replace every U+000D CARRIAGE RETURN U+000A LINE FEED character pair (CRLF) invaluewith a
U+005C REVERSE SOLIDUS character (\) followed by a U+006E LATIN SMALL LETTER N character (n).
9. Replace every remaining U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF) character in
valuewith a U+005C REVERSE SOLIDUS character (\) followed by a U+006E LATIN SMALL LETTER N
character (n).
3. Add a vCard linep695
with the typename, the parametersparameters, and the valuevaluetooutput.
12. If eithersexorgender-identityhas a value that is not the empty string,add a vCard linep695
with the type "GENDER" and the value
consisting of the concatenation ofsex, a U+003B SEMICOLON character (;), andgender-identitytooutput.
694
48
13. Add a vCard linep695
with the type "END" and the value "VCARD" tooutput.
When the above algorithm says that the user agent is toadd a vCard lineconsisting of a typetype, optionally some parameters, and a valuevalue
to a stringoutput, it must run the following steps:
1. Letlinebe an empty string.
2. Appendtype,converted to ASCII uppercasep63
, toline.
3. If there are any parameters, then for each parameter, in the order that they were added, run these substeps:
1. Append a U+003B SEMICOLON character (;) toline.
2. Append the parameter's name toline.
3. Append a U+003D EQUALS SIGN character (=) toline.
4. Append the parameter's value toline.
4. Append a U+003A COLON character (:) toline.
5. Appendvaluetoline.
6. Letmaximum lengthbe 75.
7. If and whilelineis longer thanmaximum lengthUnicode code points long, run the following substeps:
1. Append the firstmaximum lengthUnicode code points oflinetooutput.
2. Remove the firstmaximum lengthUnicode code points fromline.
3. Append a U+000D CARRIAGE RETURN character (CR) tooutput.
4. Append a U+000A LINE FEED character (LF) tooutput.
5. Append a U+0020 SPACE character tooutput.
6. Letmaximum lengthbe 74.
8. Append (what remains of)linetooutput.
9. Append a U+000D CARRIAGE RETURN character (CR) tooutput.
10. Append a U+000A LINE FEED character (LF) tooutput.
When the steps above require the user agent to obtain the result ofcollecting vCard subpropertiesnamedsubnameinsubitem, the user agent
must run the following steps:
1. Letvaluebe the empty string.
2. For each property namedsubnamein the itemsubitem, run the following substeps:
1. If thevaluep680
of the property is itself anitemp677
, then skip this property.
2. If this is not the first property namedsubnameinsubitem(ignoring any that were skipped by the previous step), then append
a U+002C COMMA character (,) tovalue.
3. Append the result ofescaping the vCard text stringp696
given by thevaluep680
of the property tovalue.
3. Returnvalue.
When the steps above require the user agent to obtain the result ofcollecting the first vCard subpropertynamedsubnameinsubitem, the user
agent must run the following steps:
1. If there are no properties namedsubnameinsubitem, then abort these substeps, returning the empty string.
2. If thevaluep680
of the first property namedsubnameinsubitemis anitemp677
, then abort these substeps, returning the empty string.
3. Return the result ofescaping the vCard text stringp696
given by thevaluep680
of the first property namedsubnameinsubitem.
695
55
When the above algorithms say the user agent is toescape the vCard text stringvalue, the user agent must use the following steps:
1. Prefix every U+005C REVERSE SOLIDUS character (\) invaluewith another U+005C REVERSE SOLIDUS character (\).
2. Prefix every U+002C COMMA character (,) invaluewith a U+005C REVERSE SOLIDUS character (\).
3. Prefix every U+003B SEMICOLON character (;) invaluewith a U+005C REVERSE SOLIDUS character (\).
4. Replace every U+000D CARRIAGE RETURN U+000A LINE FEED character pair (CRLF) invaluewith a U+005C REVERSE SOLIDUS
character (\) followed by a U+006E LATIN SMALL LETTER N character (n).
5. Replace every remaining U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF) character invaluewith a U+005C REVERSE
SOLIDUS character (\) followed by a U+006E LATIN SMALL LETTER N character (n).
6. Return the mutatedvalue.
5.3.1.2 Examples
This section is non-normative.
This algorithm can generate invalid vCard output, if the input does not conform to the rules described for the
http://microformats.org/profile/hcardp683
item typep677
anddefined property namesp679
.
Note
Here is a long example vCard for a fictional character called "Jack Bauer":
<section id="jack" itemscope itemtype="http://microformats.org/profile/hcard">
<h1 itemprop="fn">
<span itemprop="n" itemscope>
<span itemprop="given-name">Jack</span>
<span itemprop="family-name">Bauer</span>
</span>
</h1>
<img itemprop="photo" alt="" src="jack-bauer.jpg">
<p itemprop="org" itemscope>
<span itemprop="organization-name">Counter-Terrorist Unit</span>
(<span itemprop="organization-unit">Los Angeles Division</span>)
</p>
<p>
<span itemprop="adr" itemscope>
<span itemprop="street-address">10201 W. Pico Blvd.</span><br>
<span itemprop="locality">Los Angeles</span>,
<span itemprop="region">CA</span>
<span itemprop="postal-code">90064</span><br>
<span itemprop="country-name">United States</span><br>
</span>
<span itemprop="geo">34.052339;-118.410623</span>
</p>
<h2>Assorted Contact Methods</h2>
<ul>
<li itemprop="tel" itemscope>
<span itemprop="value">+1 (310) 597 3781</span> <span itemprop="type">work</span>
<meta itemprop="type" content="voice">
</li>
<li><a itemprop="url" href="https://en.wikipedia.org/wiki/Jack_Bauer">I'm on Wikipedia</a>
so you can leave a message on my user talk page.</li>
<li><a itemprop="url" href="http://www.jackbauerfacts.com/">Jack Bauer Facts</a></li>
<li itemprop="email"><a
href="mailto:j.bauer@la.ctu.gov.invalid">j.bauer@la.ctu.gov.invalid</a></li>
<li itemprop="tel" itemscope>
<span itemprop="value">+1 (310) 555 3781</span> <span>
Example
696
52
An item with theitem typep677
http://microformats.org/profile/hcalendar#veventrepresents an event.
This vocabulary does notsupport global identifiers for itemsp677
.
The following are the type'sdefined property namesp679
. They are based on the vocabulary defined in the iCalendar specification, where more
information on how to interpret the values can be found.[RFC5545]p1162
<meta itemprop="type" content="cell">mobile phone</span>
</li>
</ul>
<ins datetime="2008-07-20 21:00:00+01:00">
<meta itemprop="rev" content="2008-07-20 21:00:00+01:00">
<p itemprop="tel" itemscope><strong>Update!</strong>
My new <span itemprop="type">home</span> phone number is
<span itemprop="value">01632 960 123</span>.</p>
</ins>
</section>
The odd line wrapping is needed because newlines are meaningful in microdata: newlines would be preserved in a conversion to, for
example, the vCard format.
This example shows a site's contact details (using theaddressp173
element) containing an address with two street components:
<address itemscope itemtype="http://microformats.org/profile/hcard">
<strong itemprop="fn"><span itemprop="n" itemscope><span itemprop="given-name">Alfred</span>
<span itemprop="family-name">Person</span></span></strong> <br>
<span itemprop="adr" itemscope>
<span itemprop="street-address">1600 Amphitheatre Parkway</span> <br>
<span itemprop="street-address">Building 43, Second Floor</span> <br>
<span itemprop="locality">Mountain View</span>,
<span itemprop="region">CA</span> <span itemprop="postal-code">94043</span>
</span>
</address>
Example
The vCard vocabulary can be used to just mark up people's names:
<span itemscope itemtype="http://microformats.org/profile/hcard"
><span itemprop=fn><span itemprop="n" itemscope><span itemprop="given-name"
>George</span> <span itemprop="family-name">Washington</span></span
></span></span>
This creates a single item with a two name-value pairs, one with the name "fn" and the value "George Washington", and the other with
the name "n" and a second item as its value, the second item having the two name-value pairs "given-name" and "family-name" with the
values "George" and "Washington" respectively. This is defined to map to the following vCard:
BEGIN:VCARD
PROFILE:VCARD
VERSION:4.0
SOURCE:document's address
FN:George Washington
N:Washington;George;;;
END:VCARD
Example
Only the parts of the iCalendar vocabulary relating to events are used here; this vocabulary cannot express a complete iCalendar instance.
Note
5.3.2 vEvent
697
65
attach
Gives the address of an associated document for the event.
Thevaluep680
must be anabsolute URL
.
Any number of properties with the nameattachp698
may be present within eachitemp677
with the typehttp://microformats.org/
profile/hcalendar#veventp697
.
categories
Gives the name of a category or tag that the event could be classified as.
Thevaluep680
must be text.
Any number of properties with the namecategoriesp698
may be present within eachitemp677
with the typehttp://microformats.org/
profile/hcalendar#veventp697
.
class
Gives the access classification of the information regarding the event.
Thevaluep680
must be text with one of the following values:
• public
• private
• confidential
A single property with the nameclassp698
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
.
comment
Gives a comment regarding the event.
Thevaluep680
must be text.
Any number of properties with the namecommentp698
may be present within eachitemp677
with the typehttp://microformats.org/
profile/hcalendar#veventp697
.
description
Gives a detailed description of the event.
Thevaluep680
must be text.
A single property with the namedescriptionp698
may be present within eachitemp677
with the typehttp://microformats.org/
profile/hcalendar#veventp697
.
geo
Gives the geographical position of the event.
Thevaluep680
must be text and must match the following syntax:
1. Optionally, either a U+002B PLUS SIGN character (+) or a U+002D HYPHEN-MINUS character (-).
2. One or moreASCII digitsp64
.
3. Optionally*, a U+002E FULL STOP character (.) followed by one or moreASCII digitsp64
.
4. A U+003B SEMICOLON character (;).
5. Optionally, either a U+002B PLUS SIGN character (+) or a U+002D HYPHEN-MINUS character (-).
6. One or moreASCII digitsp64
.
This is merely advisory and cannot be considered a confidentiality measure.
⚠Warning!
698
80
7. Optionally*, a U+002E FULL STOP character (.) followed by one or moreASCII digitsp64
.
The optional components marked with an asterisk (*) should be included, and should have six digits each.
A single property with the namegeop698
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
.
location
Gives the location of the event.
Thevaluep680
must be text.
A single property with the namelocationp699
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
.
resources
Gives a resource that will be needed for the event.
Thevaluep680
must be text.
Any number of properties with the nameresourcesp699
may be present within eachitemp677
with the typehttp://microformats.org/
profile/hcalendar#veventp697
.
status
Gives the confirmation status of the event.
Thevaluep680
must be text with one of the following values:
• tentative
• confirmed
• cancelled
A single property with the namestatusp699
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
.
summary
Gives a short summary of the event.
Thevaluep680
must be text.
User agents should replace U+000A LINE FEED (LF) characters in thevaluep680
by U+0020 SPACE characters when using the value.
A single property with the namesummaryp699
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
.
dtend
Gives the date and time by which the event ends.
If the property with the namedtendp699
is present within anitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
that has a property with the namedtstartp700
whose value is avalid date stringp72
, then thevaluep680
of the
property with the namedtendp699
must be text that is avalid date stringp72
also. Otherwise, thevaluep680
of the property must be text that is a
valid global date and time stringp77
.
In either case, thevaluep680
be later in time than the value of thedtstartp700
property of the sameitemp677
.
The value specifies latitude and longitude, in that order (i.e., "LAT LON" ordering), in decimal degrees. The longitude represents the
location east and west of the prime meridian as a positive or negative real number, respectively. The latitude represents the location
north and south of the equator as a positive or negative real number, respectively.
Note
The time given by thedtendp699
property is not inclusive. For day-long events, therefore, thedtendp699
property'svaluep680
will be
the dayafterthe end of the event.
Note
699
80
A single property with the namedtendp699
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
, so long as thathttp://microformats.org/profile/hcalendar#veventp697
does not have a property with
the namedurationp700
.
dtstart
Gives the date and time at which the event starts.
Thevaluep680
must be text that is either avalid date stringp72
or avalid global date and time stringp77
.
Exactly one property with the namedtstartp700
must be present within eachitemp677
with the typehttp://microformats.org/
profile/hcalendar#veventp697
.
duration
Gives the duration of the event.
Thevaluep680
must be text that is avalid vevent duration stringp701
.
The duration represented is the sum of all the durations represented by integers in the value.
A single property with the namedurationp700
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
, so long as thathttp://microformats.org/profile/hcalendar#veventp697
does not have a property with
the namedtendp699
.
transp
Gives whether the event is to be considered as consuming time on a calendar, for the purpose of free-busy time searches.
Thevaluep680
must be text with one of the following values:
• opaque
• transparent
A single property with the nametranspp700
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
.
contact
Gives the contact information for the event.
Thevaluep680
must be text.
Any number of properties with the namecontactp700
may be present within eachitemp677
with the typehttp://microformats.org/
profile/hcalendar#veventp697
.
url
Gives aURL
for the event.
Thevaluep680
must be anabsolute URL
.
A single property with the nameurlp700
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
.
uid
Gives a globally unique identifier corresponding to the event.
Thevaluep680
must be text.
A single property with the nameuidp700
may be present within eachitemp677
with the typehttp://microformats.org/profile/
hcalendar#veventp697
.
exdate
Gives a date and time at which the event does not occur despite the recurrence rules.
Thevaluep680
must be text that is either avalid date stringp72
or avalid global date and time stringp77
.
700
Documents you may be interested
Documents you may be interested