hcard-zh: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
No edit summary
m (Replace <entry-title> with {{DISPLAYTITLE:}})
 
(19 intermediate revisions by one other user not shown)
Line 1: Line 1:
<entry-title>hCard 1.0</entry-title>
{{DISPLAYTITLE:hCard 1.0}}
<dfn style="font-style:normal;font-weight:bold">hCard</dfn>是一種用來表現人、公司、組織及地點的簡單、開放、分佈式的格式,它在[[semantic-xhtml|語義的HTML或XHTML]]使用vCard ([[rfc-2426|RFC2426]])以1:1實現,hCard是幾個適合嵌入HTML、XHTML、Atom、RSS跟任意的XML文件的開放標準之一。
<dfn style="font-style:normal;font-weight:bold">hCard</dfn>是一種用來表現人、公司、組織及地點的簡單、開放、分佈式的格式,它在[[semantic-xhtml|語義的HTML或XHTML]]使用vCard ([[rfc-2426|RFC2426]])以1:1實現,hCard是幾個適合嵌入HTML、XHTML、Atom、RSS跟任意的XML文件的開放標準之一。


Line 31: Line 31:
此外,很多部落客會用名字來識別自己並且跟他們的朋友及家人討論,只需一點點的結構,部落客可以用這樣一種方式在他們的部落格內跟人討論,這種方式網路蜘蛛跟其他的聚合器可以取得這個資訊,並且自動地將它們轉換到vCards,然後在任何vCard的應用程式或服務使用他們。
此外,很多部落客會用名字來識別自己並且跟他們的朋友及家人討論,只需一點點的結構,部落客可以用這樣一種方式在他們的部落格內跟人討論,這種方式網路蜘蛛跟其他的聚合器可以取得這個資訊,並且自動地將它們轉換到vCards,然後在任何vCard的應用程式或服務使用他們。


這個規格介紹了'''hCard'''格式,hCard使用了前面提到的vCard標準的屬性和值 format, which uses a 1:1 representation of the properties and values of the aforementioned vCard standard, in semantic HTML.  Bloggers can both embed hCards directly in their web pages, and style them with CSS to make them appear as desired.  In addition, hCard enables applications to retrieve information directly from web pages without having to reference a separate file.
這個規格介紹了'''hCard'''格式,hCard在語義的HTML裡使用了前面提到的vCard標準的屬性和值來1:1的實現,部落客也可以直接用內嵌的hCards在他們的網頁裡,並且用CSS來設計樣式來使他們可以如預期顯示,此外,hCard允許應用程式直接從網頁來取得訊息而不需參考一個單獨的檔案來做。


Use the [http://microformats.org/code/hcard/creator hCard creator] and copy the HTML code it generates to your blog or website to publish your contact info.
使用[http://microformats.org/code/hcard/creator hCard產生器]並且複製它產生的HTML原始碼到你的部落格或網站來公佈你的聯絡資訊。


{{rfc-2119-intro}}
{{rfc-2119-intro}}


== Format ==
== 格式 ==
=== In General ===
=== 一般來說 ===
The vCard standard ([[rfc-2426|RFC2426]]) forms the basis of hCard.
vCard標準([[rfc-2426|RFC2426]])構成了hCard基礎。


The basic format of hCard is to use vCard object/property names in lower-case for class names, and to map the nesting of vCard objects directly into nested HTML elements.
hCard的基本格式的類別名稱以小寫的vCaard物件/屬性名稱來使用,並且直接對應巢狀的vCard物件到巢狀的HTML元素裡。


=== Root Class Name ===
=== 根類別名稱 ===
The root class name for an hCard is "vcard".  An element with a class name of "vcard" is itself called an ''hCard''.
一個hCard的根類別名稱是"vcard",一個"vcard"類別名稱的元素就是它自己稱作''hCard''


=== Properties and Sub-properties ===
=== 屬性跟子屬性 ===
The properties of an hCard are represented by elements inside the hCard.  Elements with class names of the listed properties represent the values of those properties.  Some properties have sub-properties, and those are represented by elements inside the elements for properties.
一個hCard的屬性是由hCard內的元素來表現,有下列屬性的類別名稱的元素表現那些屬性的值,某些屬性有子屬性,並且對該屬性來說是由元素內的元素來表現。


=== Property List ===
=== 屬性列表 ===
hCard properties (sub-properties in parentheses like this)
hCard屬性(子屬性會像這樣括號起來)


'''Required:'''
'''需求:'''
* '''fn'''
* '''fn'''
* <span id="property-list-n">'''n'''<sup style="font-size:smaller">[[#note1|1]]</sup> (family-name, given-name, additional-name, honorific-prefix, honorific-suffix)</span>
* <span id="property-list-n">'''n'''<sup style="font-size:smaller">[[#note1|1]]</sup> (family-name, given-name, additional-name, honorific-prefix, honorific-suffix)</span>
Optional:
可選擇的:
* adr (post-office-box, extended-address, street-address, locality, region, postal-code, country-name, type, value)
* adr (post-office-box, extended-address, street-address, locality, region, postal-code, country-name, type, value)
* agent
* agent
Line 81: Line 81:
* url
* url


=== Property Notes ===
=== 屬性備註 ===
<span id="note1">[[#property-list-n|1. ^]]</span>: The 'n' property is {{optional}} if any [[hcard#Implied_.22n.22_Optimization|implied 'n' optimization rules]] are in effect.<br />
<span id="note1">[[#property-list-n|1. ^]]</span>:假如任意的[[hcard-zh#Implied_.22n.22_Optimization|隱藏的'n'最佳化規則]]是有效的話,'n'屬性是''可選擇的''。<br />
<span id="note2">[[#property-list-tel|2. ^]]</span>: tel - Authors {{may}} follow the [http://en.wikipedia.org/wiki/E.123 E.123] standard for writing values of telephone numbers. Letter values (e.g. +1-555-FORMATS) {{must}} be converted to numbers. Use an <code>abbr</code> to display letters and provide a numerical value simultaneously, e.g. <code><nowiki><abbr title="+15553676287">+1-555-FORMATS</abbr></nowiki></code>.
<span id="note2">[[#property-list-tel|2. ^]]</span>: tel - 作者''可能''會遵循[http://en.wikipedia.org/wiki/E.123 E.123]標準來書寫電話號碼的值,字母值(+1-555-格式) ''必須''轉換為數字,使用<code>abbr</code>來顯示字母並同時提供一個數值的值,例<code><nowiki><abbr title="+15553676287">+1-555-格式</abbr></nowiki></code>


=== Singular vs. Plural Properties ===
=== 單一屬性 vs 多重屬性 ===
Singular properties: 'fn', 'n', 'bday', 'tz', 'geo', 'sort-string', 'uid', 'class', 'rev'.  For properties which are singular, the first descendant element with that class {{should}} take effect, any others being ignored.
單一屬性:'fn', 'n', 'bday', 'tz', 'geo', 'sort-string', 'uid', 'class', 'rev',對單一屬性來說,有類別的第一代元素''應該''開始作用,而其他的會被忽略。


All other properties {{may}} be plural. Each class instance of such properties creates a new instance of that property.
所有其他的屬性''可能''是多重的,像這樣屬性的每個類別實體會產生那個屬性的一個新實體。


=== Human vs. Machine readable ===
=== 人們可讀的 vs 機器可讀的 ===
The human visible text contents of an element for a property represents the value of that property, with a few exceptions:
一個屬性元素的人類可見的文字內容表現該屬性的值,只有一些例外:


If an <code>&lt;abbr&gt;</code> element is used for a property, then the '<code>title</code>' attribute (if present) of the <code>&lt;abbr></code> element is the value of the property, instead of the contents of the element, which instead provide a more human presentable version of the value.
假如<code>&lt;abbr&gt;</code>元素被用作一個特性,那麼<code>&lt;abbr></code>元素的'<code>title</code>'屬性(如果存在的話) 就是這個特性的值,而不是元素的內容,取代的是一個更像樣的版本值。


If an <code>&lt;a&gt;</code> element is used for one or more properties, it {{must}} be treated as follows:
假如一個<code>&lt;a&gt;</code>元素用於一個或多個特性,''必須''按照下列處理:
# For the 'photo' property and any other property that takes a URL as its value, the <code>href="..."</code> attribute provides the property value.
# 對於把URL作為它的值的'photo'特性跟任何其它特性,<code>href="..."</code>屬性提供了特性值。
# For other properties, the element's content is the value of the property.
# 對其它的特性來說,元素的內容就是特性值。


If an <code>&lt;img&gt;</code> element is used for one or more properties, it {{must}} be treated as follows:
假如一個<code>&lt;img&gt;</code>元素用於一個或多個特性,''必須''按照下列處理:
# For the 'photo' property and any other property that takes a URL as its value, the <code>src="..."</code> attribute provides the property value.
# 對於把URL作為它的值的'photo'特性及任何其它的特性來說,<code>src="..."</code>屬性提供了特性值。
# For other properties, the <code>&lt;img></code> element's '<code>alt</code>' attribute is the value of the property.
# 對其它特性來說,<code>&lt;img></code>元素的'<code>alt</code>'屬性就是特性值。


If an <code>&lt;object&gt;</code> element is used for one or more properties, it {{must}} be treated as follows:
假如一個<code>&lt;object&gt;</code>元素用於一個或多個特性,''必須''按照下列處理:
# For the 'photo' property and any other property that takes a URL as its value, the <code>data="..."</code> attribute provides the property value.
# 對於把URL作為它的值的'photo'特性及任何其它的特性來說,<code>data="..."</code>屬性提供了特性值。
# For other properties, the element's content is the value of the property.
# 對其它的特性來說,元素的內容就是特性值。


=== Value excerpting ===
=== 值的篩選 ===
Sometimes only part of an element which is the equivalent for a property is used for the value of the property.  This typically occurs when a property has a subtype, like 'tel'. For this purpose, the special class name "<code>value</code>" is used to excerpt out the subset of the element that is the value of the property. E.g. here is an hCard fragment for marking up a home phone number:<br />
有時候只有部份的元素有等同的特性用於特性值,這通常發生在特性有子型別,像'tel',為此,這特別的類別名稱"<code>value</code>"用來篩選元素子行別的特性值,例如,這裡有一個hCard片段用來標記一個家用電話號碼:<br />


vCard:
vCard:
Line 123: Line 123:
</source>
</source>


This hCard fragment could be displayed as:
hCard片段可以顯示成:


<div style="border: thin dashed black; width: 95%; padding: .5em 1em;">
<div style="border: thin dashed black; width: 95%; padding: .5em 1em;">
Line 134: Line 134:
<!-- note for Tantek: review/edit property casing from here on -->
<!-- note for Tantek: review/edit property casing from here on -->


=== Property Exceptions ===
=== 特性的例外 ===
vCard has several properties which either do not make sense on, or are already implied within the context of a web page.  This section explains what to (not) do with them.
vCard有幾個特性不是沒有意義的,就是已經隱含在網頁中的上下文,這一節會說明如何(不)處理他們。


# vCard's '''NAME''', '''PROFILE''', '''SOURCE''', '''PRODID''', '''VERSION''' properties are defined in Sections 2.1.2, 2.1.3, 2.1.4, 3.6.3, 3.6.9 of [[rfc-2426|RFC2426]].  Content publishers {{must-not}} use these properties in their hCards, and as such, hCard consumers/parsers {{must}} IGNORE these properties if they are found within an hCard. Instead. hCard to vCard converters {{should}} use the title of the page where the hCard is found (e.g. the <code><title></code> element in HTML documents) to construct the NAME property, {{may}} output a PROFILE value of "<code>VCARD</code>" per [[rfc-2426|RFC2426]], {{should}} use the URL of the page where the hCard is found to construct the SOURCE property (e.g. perhaps as a parameter to a URL/service that converts hCards to vCards), for an output vCard stream (e.g. a .vcf file). Only services/applications that output actual vCards should write the PRODID property, with the product identifier for said service/application. Similarly, only such services/applications should write the VERSION property, with the value "3.0" (without quotes) per [[rfc-2426|RFC2426]] Section 3.6.9.
# vCard的'''NAME''''''PROFILE''''''SOURCE''''''PRODID''''''VERSION'''特性定義在[[rfc-2426|RFC2426]]的2.1.2、2.1.3、2.1.4、3.6.3、3.6.9等小節,內容發佈者''不得''使用這些特性在他們的hCard裡,因此,hCard用戶/剖析器''必須'' 忽略這些特性假如在hCard中有發現這些特性的話,相反地,hCard到vCard的轉換器''應該''使用hCard被找到的頁面title(例如,HTML文件中的<code><title></code>元素)來建構NAME特性,''可能''由[[rfc-2426|RFC2426]]輸出一個"<code>VCARD</code>"的PROFILE值,''應該''使用hCard被找到的頁面URL來建構SOURCE特性(例如可能是一個參數轉換hCard到VCard的URL/服務),對一個輸出的vCard串流來說(例如一個.vcf檔),只有輸出真正的cVard的服務/應用程式應該寫PRODID特性,就上述的服務/應用程式的產品識別器來說,同樣地,只有這樣的服務/應用程式應該寫VERSION特性,由[[rfc-2426|RFC2426]]的3.6.9節的"3.0"值 (沒有引號)。


=== Organization Contact Info ===
=== 組織機構的聯繫方式 ===
If the "FN" and "ORG" (organization) properties have the exact same value (typically because they are set on the same element, e.g. class="fn org"), then the hCard represents contact information for a company, organization or place and {{should}} be treated as such. In this case the author also {{must-not}} set the "N" property, or set it (and any sub-properties) explicitly to the empty string "". Thus parsers {{should}} handle the missing "N" property, in this case by implying empty values for all the "N" sub-properties.
假如"FN""ORG" (organization)特性有完全相同的值(通常是因為他們設為想同的元素,如class="fn org"),那麼hCard表示公司、組織霍地方的資訊''應該''這樣來處理,在這個例子中作者也''不得''設定"N"特性,或明確地設成(以及任何的子特性)空字串"",因此剖析器''應該''處理這個錯誤的"N"特性,在這個例子中可以藉由隱藏所有"N"的子特性的空值來完成。


=== Implied "n" Optimization ===
=== 隱藏的"n"最佳化 ===
Although vCard requires that the "N" property be present, the authors of the vCard specification ([[rfc-2426|RFC2426]]) themselves do not include "N" properties in their vCards near the end of the spec (p.38).  This apparent contradiction can be resolved by simply allowing the "FN" property to imply "N" property values in typical cases provided in the spec. We do so explicitly in hCard.
雖然vCard需要"N"特性存在,在vCard規格([[rfc-2426|RFC2426]])靠近尾端(p.38)那邊他們自己的authors卻不包含"N"特性在他們的vCard裡,這種明顯的矛盾可以在規格提供的一般案例裡只要允許"FN"特性暗指"N"特性值就可解決,我們可以明確地在hCard裡這樣做。


If "FN" and "ORG" are not the same (see previous section), and the value of the "FN" property is exactly two words (separated by whitespace), and there is no explicit "N" property, then the "N" property is inferred from the "FN" property.  For "FN"s with either one word see below, and for three or more, the author {{must}} explicitly markup the "N", except for the organization contact info case, [http://microformats.org/wiki/hcard#Organization_Contact_Info see above] for that.
假如"FN""ORG"不相同(見前一節),而且"FN"特性的值剛好是兩個字(空白字元分隔),沒有明顯的"N"特性,那麼"N"特性可以由"FN"特性來推測,對於任意字的"FN"見下面,三個或以上的,author ''必須''明確標記"N",除了組織機構的聯繫方式例子,[[#組織機構的聯繫方式|詳見前述]]


# The content of "FN" is broken into two "words" separated by whitespace.
# "FN"的內容用空格分成兩個""
# The ''first'' word of the "FN" is interpreted as the "given-name" for the "N" property.
# "FN"的''第一個''字被解譯為"N"特性的"給定名稱"
# The ''second/last'' word of the "FN" is interpreted as the "family-name" for the "N" property.
# "FN"''第二個/最後一個''字被解譯為"N"特性的"家系名稱"
# Exception: If the first word ends in a "," comma, then the first word (minus the comma at the end) is interpreted as the "family-name" and the second word is interpreted as the "given-name".
# 例外:假如第一個字結尾是","逗號,那麼第一個字(扣掉結尾的逗號)會被解譯為"家系名稱"而第二個字被解譯為"給定名稱"


This allows simplification in the typical case of people stating:
這允許在人們敘述的典型案例中簡化:
* given-name (space) family-name
* 給定名稱(空格)家系名稱
* family-name (comma) given-name
* 家系名稱(逗號)給定名稱


=== Implied "nickname" Optimization ===
=== 隱藏的"nickname"最佳化 ===
Due to the prevalence of the use of nicknames/handles/usernames in actual content published on the Web (e.g. authors of [[hReview|reviews]]), hCard also has an implied "nickname" optimization to handle this.
由於普遍的使用nicknames/handles/usernames在Web上發佈的實際內容(例如[[hReview|reviews]]的authors),hCard也有隱藏的"nickname"最佳化要處理。


Similar to the implied "n" optimization, if "FN" and "ORG" are not the same, and the value of the "FN" property is exactly one word, and there is no explicit "N" property, then:
跟隱藏的"n"最佳化類似,假如"FN""ORG"不相同,且"FN"特性值只有一個字,而且沒有明確的"N"特性,那麼:


# The content of the "FN" {{must}} be treated as a "nickname" property value.
# "FN"的內容''必須''被處理成"nickname"特性值。
# Parsers {{should}} handle the missing "N" property by implying empty values for all the "N" sub-properties.
# 剖析器''應該''對所有的"N"的子特性來指涉空值以處理遺失的"N"特性。


Though parsers {{must}} follow the implied nickname optimization, publishers {{should}} explicitly indicate the "nickname" even in this case, e.g.:
雖然剖析器''必須''遵照隱藏的nickname最佳化,發佈者即使在這例子中也''應該''明確地指示"nickname",例如:


<source lang=html4strict>
<source lang=html4strict>
Line 172: Line 172:
</source>
</source>


The hCard {{may}} have additional explicit "nickname" property values in addition to the implied nickname.
hCard''可能''有額外明確的"nickname"特性值除了隱藏的nickname之外。


=== Implied "organization-name" Optimization ===
=== 隱藏的"organization-name"最佳化 ===
The "ORG" property has two subproperties, organization-name and organization-unit. Very often authors only publish the organization-name.  Thus if an "ORG" property has no "organization-name" inside it, then its entire contents {{must}} be treated as the "organization-name".
"ORG"特性有兩個子特性,organization-name跟organization-unit,作者一般只會公佈organization-name,因此假如"ORG"特性沒有"organization-name"在裡面,那麼它的整個內容''必須''處理為"organization-name"


=== Tags as Categories ===
=== 標籤的分類 ===
Categories in hCard {{may}} be represented by tags with [[rel-tag]]. When a category property is a rel-tag, the tag (as defined by rel-tag) is used for that category.
hCard的分類''可以''使用[[rel-tag]]標籤來表示,當一個分類特性是rel-tag時。標籤(用rel-tag定義)用於那個分類。


=== type subproperty values ===
=== type子特性值 ===
The 'type' subproperty in particular takes different values depending on which property it is a subproperty of.  These 'type' subproperty values are case-INSENSITIVE, meaning "Home" is the same as "home", as well as multivalued, e.g. a tel can be home and preferred:
'type'子特性有什麼值特別取決於它是那個特性的子特性,這些'type'子特性值不分大小寫,也就是說"Home""home"一樣,以及多值,例如,tel可以是home跟preferred的子特性:


vCard:
vCard:
Line 195: Line 195:
</source>
</source>


This could be displayed as:
也可以這樣顯示:


<div style="border: thin dashed black; width: 95%; padding: .5em 1em; ">
<div style="border: thin dashed black; width: 95%; padding: .5em 1em; ">
Line 203: Line 203:
</div>
</div>


==== type with unspecified value ====
==== 沒有特定值的type ====
When the type of a property is specified, and there is no explicit value specified, then everything in the property except for the type is considered the value of the property. E.g.
當一個特性的type被指定,且沒有明確值被指定,那麼除了type以外的特性每件事會被認為是特性值,例如,


<source lang=html4strict>
<source lang=html4strict>
Line 210: Line 210:
</source>
</source>


is equivalent to:
等同於:


<source lang=html4strict>
<source lang=html4strict>
Line 216: Line 216:
</source>
</source>


And thus the type is "home" and the value is "+1.415.555.1212".
因此type是"home"且值為"+1.415.555.1212"


==== adr tel email types ====
==== adr tel email型別 ====
The following lists are ''informative''. See [[rfc-2426|RFC2426]] sections 3.2.1 ADR, 3.3.1 TEL, and 3.3.2 EMAIL respectively for normative type values.  They are repeated here for convenience. Default type subproperty value(s) is(are) first in each list and indicated in ALL CAPS.  types may be multivalued.
下面的列表是''有用的訊息'',分別見[[rfc-2426|RFC2426]]的3.2.1 ADR、3.3.1 TEL及3.3.2 EMAIL等節的有用的type值,為了方便他們會重複出現,預設的type子特性值會出現在每個列表前,並且用ALL CAPS表示,types可以是多值的。


* adr type: INTL, POSTAL, PARCEL, WORK, dom, home, pref
* adr type:INTL、POSTAL、PARCEL、WORK、dom、home、pref
* tel type: VOICE, home, msg, work, pref, fax, cell, video, pager, bbs, modem, [http://flickr.com/photos/tags/carcellphone/ car], isdn, pcs
* tel type:VOICE、home、msg、work、pref、fax、cell、video、pager、bbs、modem、[http://flickr.com/photos/tags/carcellphone/ car]、isdn、pcs
* email type: INTERNET, x400, pref
* email type:INTERNET、x400、pref


=== Profile ===
=== Profile ===
The hCard <span id="XMDP_Profile">XMDP profile</span> is at http://microformats.org/profile/hcard
hCard的<span id="XMDP_Profile">XMDP profile</span>在http://microformats.org/profile/hcard


Content that uses hCard {{should}} reference this profile, e.g.
使用hCard的內容''應該''參考這個profile,例如:
<source lang=html4strict>
<source lang=html4strict>
<head profile="http://microformats.org/profile/hcard">
<head profile="http://microformats.org/profile/hcard">
</source>
</source>
or
<source lang=html4strict>
<source lang=html4strict>
<link rel="profile" href="http://microformats.org/profile/hcard">
<link rel="profile" href="http://microformats.org/profile/hcard">
</source>
</source>
or
<source lang=html4strict>
<source lang=html4strict>
This content uses <a rel="profile" href="http://microformats.org/profile/hcard">hCard</a>.
This content uses <a rel="profile" href="http://microformats.org/profile/hcard">hCard</a>.
</source>
</source>
Content may combine the above methods as well.
內容也可以結合上述的方法。


=== Parsing Details ===
=== 詳細解析 ===


See [[hcard-parsing|hCard parsing]].
[[hcard-parsing|hCard parsing]]


== Examples ==
== 範例 ==


This section is informative.
這一節的資訊是有用的。


=== Sample vCard ===
=== vCard範例 ===


Here is a sample vCard:
vCard的範例:


<pre><nowiki>
<pre><nowiki>
Line 263: Line 263:
</nowiki></pre>
</nowiki></pre>


and an equivalent in hCard with various elements optimized appropriately.  See [[hcard-example1-steps| hCard Example 1]] for the derivation.
在hCard有同樣的範例適當地使用不同優化的元素,見[[hcard-example1-steps| hCard Example 1]]的推導。


<source lang=html4strict>
<source lang=html4strict>
Line 271: Line 271:
</source>
</source>


This hCard might be displayed as:
hCard也可以這樣顯示:
<div style="border: thin dashed black; width: 95%; padding: .5em 1em;">
<div style="border: thin dashed black; width: 95%; padding: .5em 1em;">
[http://tantek.com/ Tantek Çelik]
[http://tantek.com/ Tantek Çelik]
</div>
</div>


Note: The version information is unnecessary in hCard markup directly since the version will be defined by the profile of hCard that is used/referred to in the 'profile' attribute of the <head> element.
注意:在hCard標記裡版本的資訊不需要因為版本會定義在hCard的profile而這profile用於/參考於<head>元素的'profile'屬性>


===Live example===
===例子===


Here is [http://www.commerce.net/ Commercenet]'s contact details, as a live hCard which will be detected, on this page, by microformat parsing tools:
這裡有[http://www.commerce.net/ Commercenet]的聯絡資料,可以用這一頁微格式的解析工具來偵測範例的hCard:


<div class="vcard">
<div class="vcard">
Line 295: Line 295:
</div>
</div>


The mark-up, emboldening omitted for clarity, with the following semantic improvements:
下列的語義改善標記為了清晰省略了強調的顯示:
* <code>abbr</code> to expand abbreviations
* <code>abbr</code>是abbreviations縮寫
* hyperlinking the org name with the url
* 將org名稱用url表示


<source lang=html4strict>
<source lang=html4strict>
Line 322: Line 322:
</source>
</source>


=== More Examples ===
=== 更多的例子 ===
See [[hcard-examples|hCard examples]] for more examples, including all examples from vCard [[rfc-2426|RFC2426]] converted into hCard.
[[hcard-examples|hCard examples]]有更多例子,包括vCard [[rfc-2426|RFC2426]]轉換到hCard的所有例子。


== Examples in the wild ==
== 站外的例子 ==
This section is '''informative'''. The number of hCard examples in the wild has expanded far beyond the capacity of being kept inline in this specification. They have been moved to a [[hcard-examples-in-wild|separate page]].
這一節的資訊是'''有用的''',站外的hCard範例數已經大到無法在這個規格裡維護,他們已經移至[[hcard-examples-in-wild|另一頁]]


See [[hcard-examples-in-wild|hCard Examples in the wild]].
[[hcard-examples-in-wild|站外的hCard範例]]


== Implementations ==
== 實作 ==
This section is '''informative'''. The number of hCard implementations has also expanded beyond the capacity of keeping them inline. They have been moved to a [[hcard-implementations|separate page]].
這一節的資訊是'''很有用的''',有很多的hCard實作已經擴展到無法在這裡維護,他們的資訊已經移到[[hcard-implementations|另一頁]]


See [[hcard-implementations|hCard Implementations]].
[[hcard-implementations|hCard實作]]


== Articles ==
== 文章 ==
This section is <strong>informative</strong>. For <span id="Further_Reading">further reading</span> on hCard see [[hcard-articles]].
這一節的<strong>資訊很有用</strong><span id="Further_Reading">進一步閱讀</span>hCard的文章見[[hcard-articles]]


==Buttons==
==按鈕==
You can use these buttons on pages with hCards. See [[buttons#hCard]] for any recent additions.
你可以在網頁上用hCards來使用這些按鈕,見[[buttons#hCard|hCard按鈕]]有最近增加的資料。


* http://www.crowley.nl/images/hcard.png (mirror: http://www.davidjanes.com/images/mf_hcard.png)
* http://www.crowley.nl/images/hcard.png (mirror: http://www.davidjanes.com/images/mf_hcard.png)
* http://rbach.priv.at/2006/buttons/hcard.png
* http://rbach.priv.at/2006/buttons/hcard.png
* http://www.boogdesign.com/images/buttons/microformat_hcard.png
* http://www.boogdesign.com/images/buttons/microformat_hcard.png
* CSS-powered button, as evidenced at [http://re-run.com/about/microformat-badges microformat badges @ re-run]
* CSS很有威力的按鈕,在[http://re-run.com/about/microformat-badges microformat badges @ re-run]這裡可以證明


== Copyright ==
== 版權 ==
Per the public domain release on the authors' user pages ([[User:Tantek|Tantek Çelik]], [[User:Brian|Brian Suda]]) this specification is released into the public domain.
每個公有領域的發表在作者的使用者頁面上([[User:Tantek|Tantek Çelik]][[User:Brian|Brian Suda]]) 這個規格發表在公有領域中。


{{MicroFormatPublicDomainContributionStatement}}
{{MicroFormatPublicDomainContributionStatement}}


== Patents ==
== 專利權 ==
{{MicroFormatPatentStatement}}
{{MicroFormatPatentStatement}}


== References ==
== 參考 ==
=== Normative References ===
=== 引用標準 ===
* [http://www.w3.org/TR/2002/REC-xhtml1-20020801/ XHTML 1.0 SE]
* [http://www.w3.org/TR/2002/REC-xhtml1-20020801/ XHTML 1.0 SE]
* [http://www.ietf.org/rfc/rfc2426.txt vCard RFC2426]
* [http://www.ietf.org/rfc/rfc2426.txt vCard RFC2426]
* [http://www.itu.int/rec/T-REC-E.123-200102-I/en ITU recommendation E.123] format of telephone numbers (chargeable document)
* 電話號碼的[http://www.itu.int/rec/T-REC-E.123-200102-I/en ITU recommendation E.123]格式(收費文件)
* [[rfc-2119|RFC 2119]]
* [[rfc-2119|RFC 2119]]


=== Informative References ===
=== 參考性文獻 ===
This section is '''informative'''.
這一節是'''很有知識的'''
* [[hcard-history|hCard history]]
* [[hcard-history|hCard歷史]]
** [http://wiki.oreillynet.com/foocamp04/index.cgi?SimpleSemanticFormats FOO Camp 2004 Simple Semantic Formats presentation, 2004-09-10]
** [http://wiki.oreillynet.com/foocamp04/index.cgi?SimpleSemanticFormats FOO Camp 2004 Simple Semantic Formats presentation, 2004-09-10]
** [http://tantek.com/log/2004/09.html#hcard hCard term introduced and defined on the Web, 2004-09-30]
** [http://tantek.com/log/2004/09.html#hcard 2004-09-30網站上的hCard名詞的介紹跟定義]
** Contributed from http://developers.technorati.com/wiki/hCard 2005-06-20
** http://developers.technorati.com/wiki/hCard 2005-06-20的貢獻
* [http://www.dante.net/np/ds/osi/9594-6-X.520.A4.ps X.520 in Postscript] ([http://72.14.253.104/search?q=cache:FjqzsFu4h20J:www.dante.net/np/ds/osi/9594-6-X.520.A4.ps HTMLization courtesy of Google Cache]) - vCard refers to ROLE as being "based on the X.520 Business Category explanatory attribute".
* [http://www.dante.net/np/ds/osi/9594-6-X.520.A4.ps X.520 in Postscript] ([http://72.14.253.104/search?q=cache:FjqzsFu4h20J:www.dante.net/np/ds/osi/9594-6-X.520.A4.ps HTMLization courtesy of Google Cache]) - vCard是指ROLE作為"X.520業務分類屬性說明的基礎".
* [http://www.w3.org/2002/12/cal/rfc2426 HTML reformatted version of RFC2426]
* [http://www.w3.org/2002/12/cal/rfc2426 RFC2426的HTML格式化版本]
* [http://w3.org/TR/REC-CSS1 CSS1]
* [http://w3.org/TR/REC-CSS1 CSS1]
* [http://www.w3.org/TR/xhtml11 XHTML 1.1]
* [http://www.w3.org/TR/xhtml11 XHTML 1.1]
Line 375: Line 375:
* [[iso-8601|ISO8601]]
* [[iso-8601|ISO8601]]


==== Specifications That Use hCard ====
==== 使用hCard的規格 ====
* [[adr]]
* [[adr]]
* [[geo]]
* [[geo]]
Line 381: Line 381:
* [[hreview|hReview]]
* [[hreview|hReview]]


==== Similar Work ====
==== 類似的工作 ====
This section is '''informative'''.
這一節是'''很有知識的'''
* [http://www.intertwingly.net/wiki/pie/PaceBetterPersonElement Atom PaceBetterPersonElement]
* [http://www.intertwingly.net/wiki/pie/PaceBetterPersonElement Atom PaceBetterPersonElement]
* [http://www.jabber.org/jeps/jep-0054.html JEP-0054: vcard-temp]
* [http://www.jabber.org/jeps/jep-0054.html JEP-0054: vcard-temp]


== Inspiration and Acknowledgments ==
== 啟發靈感的人和感謝 ==
This section is '''informative'''.
這一節是'''很有知識的'''
Thanks to: my good friend [http://vadim.com/ Vadim] who introduced me to vCard ''many'' years ago, and if I'd only paid more attention then, perhaps I could have helped a lot of people avoid wasting a lot of time reinventing various standards wheels.
感謝: 我的好友[http://vadim.com/ Vadim]他在''很多''年前介紹給我vCard,假如我當時只是注意更多點,或許我可以幫助更多人避免浪費更多的時間在重塑各種標準的巨輪。


== Notes on derivation from vCard ==
== 注意vCard的延伸 ==
This section is ''informative''.
這一節是''很有知識的''


<div id="Semantic_XHTML_Design_Principles">See: [[hcard-design-methodology]].</div>
<div id="Semantic_XHTML_Design_Principles">見:[[hcard-design-methodology]]</div>


=== More Semantic Equivalents ===
=== 更多語義上相同的事物 ===
For some properties there are HTML elements which better match and convey their semantics.  The following properties SHOULD be encoded with the following HTML:
對有些屬性來說會有更適合且更能傳達他們的語義的HTML元素,下面的屬性應該用下面的HTML來編碼:
* <code>URL</code> in vCard becomes  <code><a class="url" href="...">...</a></code> inside the element with <code>class="vcard"</code> in hCard.
* vCard的<code>URL</code>變成在hCard裡用<code>class="vcard"</code>的元素裡的<code><a class="url" href="...">...</a></code>
* Similarly, <code>EMAIL</code> in vCard becomes <code><nowiki><a class="email" href="mailto:...">...</a></nowiki></code>
* 同樣地,vCard的<code>EMAIL</code>變成<code><nowiki><a class="email" href="mailto:...">...</a></nowiki></code>
* <code>PHOTO</code> in vCard becomes <code><img class="photo" src="..." alt="Photo of ..." /></code> or <code><object class="photo" data="..." type="...">Photo of ...</object></code>
* vCard的<code>PHOTO</code>變成<code><img class="photo" src="..." alt="Photo of ..." /></code> 或是<code><object class="photo" data="..." type="...">Photo of ...</object></code>
* <code>UID</code> in vCard simply becomes another semantic applied to a specific URL (or EMAIL) for an hCard.
* vCard的<code>UID</code>簡單地變成另一個語義應用到hCard的一個特定的URL (或EMAIL)


=== Singular and Plural derivations ===
=== 單一和多數的延伸 ===
The [[hcard#Singular_vs._Plural_Properties|lists of singular and plural properties]] have been derived by analyzing the semantics of the individual properties in vCard RFC2426 and determining logically that they MUST be singular per their semantics.  See [[hcard-singular-properties]] for explanations.
[[hcard-zh#Singular_vs._Plural_Properties|單一和多重屬性列表]]裡有藉著分析vCard RFC2426裡單一屬性的語義和邏輯地確定他們的每一個語義必須是單一的延伸,見[[hcard-singular-properties]]有更多說明。


==== Plural Properties Singularized ====
==== 多重屬性單一化 ====
Since plural property names become their singular equivalents, even if the original plural property permitted only a single value with multiple components, those multiple components are represented each with their own singularly named property and the the property is effectively multivalued and subject to the above treatment of multivalued properties.
由於多重屬性名稱變成他們單一的相等物,即使原始的多重性只允許多重組件有一單一的值,那些多重組件用他們自己的單一名稱的屬性來表現,這個屬性是多重值屬性的跟上述多重值屬性的處理主題。


== Related Pages ==
== 相關的網頁 ==
{{hcard-related-pages}}
{{hcard-related-pages}}



Latest revision as of 16:26, 18 July 2020

hCard是一種用來表現人、公司、組織及地點的簡單、開放、分佈式的格式,它在語義的HTML或XHTML使用vCard (RFC2426)以1:1實現,hCard是幾個適合嵌入HTML、XHTML、Atom、RSS跟任意的XML文件的開放標準之一。

想要開始寫一個hCard嗎? 使用hCard產生器來寫一些聯絡資料然後發佈,或是照著hCard創作技巧來新增hCard標記到你目前的聯絡頁面。

編輯
Tantek Çelik (http://tantek.com/,之前在Technorati, Inc.服務,現在於Microsoft Corporation服務)
作者:Tantek Çelik (背景同上)
Brian Suda (http://suda.co.uk/)
致謝: 見 致謝

版權專利聲明的申請。

狀態

hCard 1.0是一個microformats.org的規格,hCard公開討論在hcard-feedback、irc.freenode.net上的#microformats irc頻道跟microformats-discuss郵件列表

可用語言

這個規格的英文版本是唯一正式的版本,文件的翻譯見翻譯這節。

錯誤及更新

這個規格已知的錯誤及問題在解決結案這裡被修正,在報告問題前請先檢查那裡。

hCard 1.0.1更新正在開發並且已知的錯誤也會結合進來修正,還有值類模式

前言

vCard標準(RFC2426),和hCard的互相操作性已廣泛地實作(例如Apple的"Address Book"應用程式已內建於MacOSX)。

此外,很多部落客會用名字來識別自己並且跟他們的朋友及家人討論,只需一點點的結構,部落客可以用這樣一種方式在他們的部落格內跟人討論,這種方式網路蜘蛛跟其他的聚合器可以取得這個資訊,並且自動地將它們轉換到vCards,然後在任何vCard的應用程式或服務使用他們。

這個規格介紹了hCard格式,hCard在語義的HTML裡使用了前面提到的vCard標準的屬性和值來1:1的實現,部落客也可以直接用內嵌的hCards在他們的網頁裡,並且用CSS來設計樣式來使他們可以如預期顯示,此外,hCard允許應用程式直接從網頁來取得訊息而不需參考一個單獨的檔案來做。

使用hCard產生器並且複製它產生的HTML原始碼到你的部落格或網站來公佈你的聯絡資訊。

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

格式

一般來說

vCard標準(RFC2426)構成了hCard基礎。

hCard的基本格式的類別名稱以小寫的vCaard物件/屬性名稱來使用,並且直接對應巢狀的vCard物件到巢狀的HTML元素裡。

根類別名稱

一個hCard的根類別名稱是"vcard",一個"vcard"類別名稱的元素就是它自己稱作hCard

屬性跟子屬性

一個hCard的屬性是由hCard內的元素來表現,有下列屬性的類別名稱的元素表現那些屬性的值,某些屬性有子屬性,並且對該屬性來說是由元素內的元素來表現。

屬性列表

hCard屬性(子屬性會像這樣括號起來)

需求:

  • fn
  • n1 (family-name, given-name, additional-name, honorific-prefix, honorific-suffix)

可選擇的:

  • adr (post-office-box, extended-address, street-address, locality, region, postal-code, country-name, type, value)
  • agent
  • bday
  • category
  • class
  • email (type, value)
  • geo (latitude, longitude)
  • key
  • label
  • logo
  • mailer
  • nickname
  • note
  • org (organization-name, organization-unit)
  • photo
  • rev
  • role
  • sort-string
  • sound
  • tel2 (type, value)
  • title
  • tz
  • uid
  • url

屬性備註

1. ^:假如任意的隱藏的'n'最佳化規則是有效的話,'n'屬性是可選擇的
2. ^: tel - 作者可能會遵循E.123標準來書寫電話號碼的值,字母值(例 +1-555-格式) 必須轉換為數字,使用abbr來顯示字母並同時提供一個數值的值,例<abbr title="+15553676287">+1-555-格式</abbr>

單一屬性 vs 多重屬性

單一屬性:'fn', 'n', 'bday', 'tz', 'geo', 'sort-string', 'uid', 'class', 'rev',對單一屬性來說,有類別的第一代元素應該開始作用,而其他的會被忽略。

所有其他的屬性可能是多重的,像這樣屬性的每個類別實體會產生那個屬性的一個新實體。

人們可讀的 vs 機器可讀的

一個屬性元素的人類可見的文字內容表現該屬性的值,只有一些例外:

假如<abbr>元素被用作一個特性,那麼<abbr>元素的'title'屬性(如果存在的話) 就是這個特性的值,而不是元素的內容,取代的是一個更像樣的版本值。

假如一個<a>元素用於一個或多個特性,必須按照下列處理:

  1. 對於把URL作為它的值的'photo'特性跟任何其它特性,href="..."屬性提供了特性值。
  2. 對其它的特性來說,元素的內容就是特性值。

假如一個<img>元素用於一個或多個特性,必須按照下列處理:

  1. 對於把URL作為它的值的'photo'特性及任何其它的特性來說,src="..."屬性提供了特性值。
  2. 對其它特性來說,<img>元素的'alt'屬性就是特性值。

假如一個<object>元素用於一個或多個特性,必須按照下列處理:

  1. 對於把URL作為它的值的'photo'特性及任何其它的特性來說,data="..."屬性提供了特性值。
  2. 對其它的特性來說,元素的內容就是特性值。

值的篩選

有時候只有部份的元素有等同的特性用於特性值,這通常發生在特性有子型別,像'tel',為此,這特別的類別名稱"value"用來篩選元素子行別的特性值,例如,這裡有一個hCard片段用來標記一個家用電話號碼:

vCard:

TEL;TYPE=HOME:+1.415.555.1212

hCard:

<span class="tel">
 <span class="type">home</span>:
 <span class="value">+1.415.555.1212</span>
</span>

hCard片段可以顯示成:

home: +1.415.555.1212


特性的例外

vCard有幾個特性不是沒有意義的,就是已經隱含在網頁中的上下文,這一節會說明如何(不)處理他們。

  1. vCard的NAMEPROFILESOURCEPRODIDVERSION特性定義在RFC2426的2.1.2、2.1.3、2.1.4、3.6.3、3.6.9等小節,內容發佈者不得使用這些特性在他們的hCard裡,因此,hCard用戶/剖析器必須 忽略這些特性假如在hCard中有發現這些特性的話,相反地,hCard到vCard的轉換器應該使用hCard被找到的頁面title(例如,HTML文件中的<title>元素)來建構NAME特性,可能RFC2426輸出一個"VCARD"的PROFILE值,應該使用hCard被找到的頁面URL來建構SOURCE特性(例如可能是一個參數轉換hCard到VCard的URL/服務),對一個輸出的vCard串流來說(例如一個.vcf檔),只有輸出真正的cVard的服務/應用程式應該寫PRODID特性,就上述的服務/應用程式的產品識別器來說,同樣地,只有這樣的服務/應用程式應該寫VERSION特性,由RFC2426的3.6.9節的"3.0"值 (沒有引號)。

組織機構的聯繫方式

假如"FN"及"ORG" (organization)特性有完全相同的值(通常是因為他們設為想同的元素,如class="fn org"),那麼hCard表示公司、組織霍地方的資訊應該這樣來處理,在這個例子中作者也不得設定"N"特性,或明確地設成(以及任何的子特性)空字串"",因此剖析器應該處理這個錯誤的"N"特性,在這個例子中可以藉由隱藏所有"N"的子特性的空值來完成。

隱藏的"n"最佳化

雖然vCard需要"N"特性存在,在vCard規格(RFC2426)靠近尾端(p.38)那邊他們自己的authors卻不包含"N"特性在他們的vCard裡,這種明顯的矛盾可以在規格提供的一般案例裡只要允許"FN"特性暗指"N"特性值就可解決,我們可以明確地在hCard裡這樣做。

假如"FN"跟"ORG"不相同(見前一節),而且"FN"特性的值剛好是兩個字(空白字元分隔),沒有明顯的"N"特性,那麼"N"特性可以由"FN"特性來推測,對於任意字的"FN"見下面,三個或以上的,author 必須明確標記"N",除了組織機構的聯繫方式例子,詳見前述

  1. "FN"的內容用空格分成兩個"字"。
  2. "FN"的第一個字被解譯為"N"特性的"給定名稱"。
  3. "FN"的第二個/最後一個字被解譯為"N"特性的"家系名稱"。
  4. 例外:假如第一個字結尾是","逗號,那麼第一個字(扣掉結尾的逗號)會被解譯為"家系名稱"而第二個字被解譯為"給定名稱"。

這允許在人們敘述的典型案例中簡化:

  • 給定名稱(空格)家系名稱
  • 家系名稱(逗號)給定名稱

隱藏的"nickname"最佳化

由於普遍的使用nicknames/handles/usernames在Web上發佈的實際內容(例如reviews的authors),hCard也有隱藏的"nickname"最佳化要處理。

跟隱藏的"n"最佳化類似,假如"FN"跟"ORG"不相同,且"FN"特性值只有一個字,而且沒有明確的"N"特性,那麼:

  1. "FN"的內容必須被處理成"nickname"特性值。
  2. 剖析器應該對所有的"N"的子特性來指涉空值以處理遺失的"N"特性。

雖然剖析器必須遵照隱藏的nickname最佳化,發佈者即使在這例子中也應該明確地指示"nickname",例如:

<span class="vcard">
 <span class="fn nickname">daveman692</span>
</span>

hCard可能有額外明確的"nickname"特性值除了隱藏的nickname之外。

隱藏的"organization-name"最佳化

"ORG"特性有兩個子特性,organization-name跟organization-unit,作者一般只會公佈organization-name,因此假如"ORG"特性沒有"organization-name"在裡面,那麼它的整個內容必須處理為"organization-name"。

標籤的分類

hCard的分類可以使用rel-tag標籤來表示,當一個分類特性是rel-tag時。標籤(用rel-tag定義)用於那個分類。

type子特性值

'type'子特性有什麼值特別取決於它是那個特性的子特性,這些'type'子特性值不分大小寫,也就是說"Home"跟"home"一樣,以及多值,例如,tel可以是home跟preferred的子特性:

vCard:

TEL;TYPE=HOME,PREF:+1.415.555.1212

hCard:

<span class="tel"><span class="type">Home</span> (<span class="type">pref</span>erred):
 <span class="value">+1.415.555.1212</span>
</span>

也可以這樣顯示:

Home (preferred): +1.415.555.1212

沒有特定值的type

當一個特性的type被指定,且沒有明確值被指定,那麼除了type以外的特性每件事會被認為是特性值,例如,

<span class="tel"><span class="type">Home</span> +1.415.555.1212</span>

等同於:

<span class="tel"><span class="type">Home</span><span class="value"> +1.415.555.1212</span></span>

因此type是"home"且值為"+1.415.555.1212"。

adr tel email型別

下面的列表是有用的訊息,分別見RFC2426的3.2.1 ADR、3.3.1 TEL及3.3.2 EMAIL等節的有用的type值,為了方便他們會重複出現,預設的type子特性值會出現在每個列表前,並且用ALL CAPS表示,types可以是多值的。

  • adr type:INTL、POSTAL、PARCEL、WORK、dom、home、pref
  • tel type:VOICE、home、msg、work、pref、fax、cell、video、pager、bbs、modem、car、isdn、pcs
  • email type:INTERNET、x400、pref

Profile

hCard的XMDP profile在http://microformats.org/profile/hcard

使用hCard的內容應該參考這個profile,例如:

<head profile="http://microformats.org/profile/hcard">

<link rel="profile" href="http://microformats.org/profile/hcard">

This content uses <a rel="profile" href="http://microformats.org/profile/hcard">hCard</a>.

內容也可以結合上述的方法。

詳細解析

hCard parsing

範例

這一節的資訊是有用的。

vCard範例

vCard的範例:

BEGIN:VCARD
VERSION:3.0
N:Çelik;Tantek
FN:Tantek Çelik
URL:http://tantek.com/
END:VCARD

在hCard有同樣的範例適當地使用不同優化的元素,見 hCard Example 1的推導。

<div class="vcard">
 <a class="url fn" href="http://tantek.com/">Tantek Çelik</a>
</div>

hCard也可以這樣顯示:

Tantek Çelik

注意:在hCard標記裡版本的資訊不需要因為版本會定義在hCard的profile而這profile用於/參考於<head>元素的'profile'屬性>。

例子

這裡有Commercenet的聯絡資料,可以用這一頁微格式的解析工具來偵測範例的hCard:

CommerceNet
http://www.commerce.net/
Work:
169 University Avenue

Palo Alto, CA  94301

USA
Work +1-650-289-4040
Fax +1-650-289-4041
Email

下列的語義改善標記為了清晰省略了強調的顯示:

  • abbr是abbreviations縮寫
  • 將org名稱用url表示
<div class="vcard">
  <a class="fn org url" href="http://www.commerce.net/">CommerceNet</a>
  <div class="adr">
    <span class="type">Work</span>:
    <div class="street-address">169 University Avenue</div>
    <span class="locality">Palo Alto</span>,  
    <abbr class="region" title="California">CA</abbr>&nbsp;&nbsp;
    <span class="postal-code">94301</span>
    <div class="country-name">USA</div>
  </div>
  <div class="tel">
   <span class="type">Work</span> +1-650-289-4040
  </div>
  <div class="tel">
    <span class="type">Fax</span> +1-650-289-4041
  </div>
  <div>Email: 
   <span class="email">info@commerce.net</span>
  </div>
</div>

更多的例子

hCard examples有更多例子,包括vCard RFC2426轉換到hCard的所有例子。

站外的例子

這一節的資訊是有用的,站外的hCard範例數已經大到無法在這個規格裡維護,他們已經移至另一頁

站外的hCard範例

實作

這一節的資訊是很有用的,有很多的hCard實作已經擴展到無法在這裡維護,他們的資訊已經移到另一頁

hCard實作

文章

這一節的資訊很有用進一步閱讀hCard的文章見hcard-articles

按鈕

你可以在網頁上用hCards來使用這些按鈕,見hCard按鈕有最近增加的資料。

版權

每個公有領域的發表在作者的使用者頁面上(Tantek ÇelikBrian Suda) 這個規格發表在公有領域中。

Public Domain Contribution Requirement. Since the author(s) released this work into the public domain, in order to maintain this work's public domain status, all contributors to this page agree to release their contributions to this page to the public domain as well. Contributors may indicate their agreement by adding the public domain release template to their user page per the Voluntary Public Domain Declarations instructions. Unreleased contributions may be reverted/removed.

專利權

This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy, and IETF RFC3667 & RFC3668.

參考

引用標準

參考性文獻

這一節是很有知識的

使用hCard的規格

類似的工作

這一節是很有知識的

啟發靈感的人和感謝

這一節是很有知識的。 感謝: 我的好友Vadim他在很多年前介紹給我vCard,假如我當時只是注意更多點,或許我可以幫助更多人避免浪費更多的時間在重塑各種標準的巨輪。

注意vCard的延伸

這一節是很有知識的

更多語義上相同的事物

對有些屬性來說會有更適合且更能傳達他們的語義的HTML元素,下面的屬性應該用下面的HTML來編碼:

  • vCard的URL變成在hCard裡用class="vcard"的元素裡的<a class="url" href="...">...</a>
  • 同樣地,vCard的EMAIL變成<a class="email" href="mailto:...">...</a>
  • vCard的PHOTO變成<img class="photo" src="..." alt="Photo of ..." /> 或是<object class="photo" data="..." type="...">Photo of ...</object>
  • vCard的UID簡單地變成另一個語義應用到hCard的一個特定的URL (或EMAIL)。

單一和多數的延伸

單一和多重屬性列表裡有藉著分析vCard RFC2426裡單一屬性的語義和邏輯地確定他們的每一個語義必須是單一的延伸,見hcard-singular-properties有更多說明。

多重屬性單一化

由於多重屬性名稱變成他們單一的相等物,即使原始的多重性只允許多重組件有一單一的值,那些多重組件用他們自己的單一名稱的屬性來表現,這個屬性是多重值屬性的跟上述多重值屬性的處理主題。

相關的網頁

The hCard specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added. These thoughts, issues, and questions are kept in separate pages.

Translations

Read the hCard specification in additional languages: