Difference between revisions of "xfolk"

From Microformats Wiki
xfolk
Jump to navigation Jump to search
m (Replace <entry-title> with {{DISPLAYTITLE:}})
 
(189 intermediate revisions by 38 users not shown)
Line 1: Line 1:
=Under Construction=
+
{{DISPLAYTITLE:xFolk RC1}}
 +
{{DraftSpecification}}
  
The xFolk page is under construction. The official page is still [http://thecommunityengine.com/home/archives/2005/05/xfolk_entry_04.html here].
+
'''xFolk''' (from "xFolksomony") is a simple and open format for publishing collections of bookmarks. It better enables services for improving user experience and sharing data in web-based bookmarking software. xFolk may be embedded in HTML or XHTML, Atom, RSS, and arbitrary XML. It is one of several open [[microformats|microformat]] standards.
  
= hCard =
 
 
hCard is a simple, open, distributed contact information format for people, companies, and organizations, which is suitable for embedding in (X)HTML, Atom, RSS, and arbitrary XML. hCard is a 1:1 representation of the vCard standard ([http://www.ietf.org/rfc/rfc2426.txt RFC2426]) in XHTML, one of several open [[microformats|microformat]] standards.
 
 
__TOC__
 
__TOC__
  
 
== Draft Specification ==
 
== Draft Specification ==
  
=== Editor ===
+
=== Editor/Author ===
[http://tantek.com/ Tantek Çelik], [http://technorati.com Technorati, Inc.]
+
[http://thecommunityengine.com/ Bud Gibson] ([http://thecommunityengine.com The Community Engine])
 
 
=== Authors ===
 
* [http://tantek.com/ Tantek Çelik], [http://technorati.com Technorati, Inc]
 
* [http://suda.co.uk/ Brian Suda]
 
  
 
=== Copyright ===
 
=== Copyright ===
{{MicroFormatCopyrightStatement2004}}
+
{{MicroFormatCopyrightStatement2005}}
  
 
=== Patents ===
 
=== Patents ===
Line 24: Line 18:
  
 
=== Inspiration and Acknowledgments ===
 
=== Inspiration and Acknowledgments ===
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.
+
Thanks to: [http://www.cnbc.cmu.edu/~plaut/ David Plaut] who introduced me to the idea that items may partially belong to many categories at once.  More recently, thanks to: [http://tantek.com/ Tantek Çelik], [http://epeus.blogspot.com/ Kevin Marks], [http://steve.osdir.com/ Steve Mallet], [http://hybernaut.com/ Brian DelVecchio], and [http://blogmarks.net François Hodierne] who have contributed to the development of xFolk with thoughtful critiques and implementations.
  
 
== Introduction ==
 
== Introduction ==
The vCard standard ([http://www.ietf.org/rfc/rfc2426.txt RFC2426]), has been broadly interoperably implemented (e.g. Apple's "Address Book" application built into MacOSX).
+
Social bookmarking services let users save and tag bookmarks to share with other users.  Over the past year, the number of these services has mushroomed to [http://en.wikipedia.org/wiki/Social_bookmarking over 20], with popular examples including: [http://del.icio.us del.icio.us], [http://furl.net furl], [http://de.lirio.us de.lirio.us], [http://jots.com jots], and [http://blogmarks.net blogmarks].
  
In addition, many bloggers identify themselves by name and discuss their friends and familyWith just a tad bit of structure, bloggers can discuss people in their blog(s) in such a way that spiders and other aggregators can retrieve this information, automatically convert them to vCards, and use them in any vCard application or service.
+
Lack of an open, interoperable data standard is a major issue in using social bookmarking services. An open standard would make it possible to easily collect social bookmark data and remix it to invent new services along the lines of  [http://gataga.com gataga]'s experimental bookmark search engineAn open standard would also make it possible to write javascripts that work across services [http://johnvey.com/features/deliciousdirector/ as some currently do for del.icio.us], enabling across-the-board improvements in user experience.
  
This specification introduces the '''hCard''' format, which is a 1:1 representation of the aforementioned vCard standard, in semantic XHTML. Bloggers can both embed vCards directly in their web pages, and style them with CSS to make them appear as desired. In addition, hCard enables applications to retrieve information about such vCards directly from web pages without having to reference a separate file.
+
xFolk is an open social bookmarking standard that aims to achieve both benefits. Social bookmarking services that adopt xFolk will continue to differentiate themselves with data services. But, the data itself will be easy to manipulate by third party scripts and easy to share. As a result, bookmarking services will be able to offer a wider array of options to their users at low cost and focus on what truly differentiates them. Individuals or groups operating standalone bookmark repositories will have access to a wider array of functionality than they can produce on their own.
  
 
== Semantic XHTML Design Principles ==
 
== Semantic XHTML Design Principles ==
{{SemanticXHTMLDesignPrinciples}}
+
{{semantic-xhtml-design-principles}}
  
 
== Format ==
 
== Format ==
=== In General ===
+
Extensive analysis of social bookmarking services and linkblogs, reported on [http://thecommunityengine.com/home/archives/xfolk elsewhere], reveals that the data published by both bookmarking services and '''many''' different linkblogs are described by the following implied schema:
The vCard standard ([http://www.ietf.org/rfc/rfc2426.txt RFC2426]) forms the basis of 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 XHTML elements.
+
* A bookmarked or tagged link.
 +
* A title for the entry.
 +
* Tags for the link.
 +
* An extended description or summary of the link.
  
=== More Semantic Equivalents ===
+
As demonstrated in early iterations of the xFolk standard, this general schema can be translated into markup by:
However, for some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:
 
* <code>URL</code> in vCard becomes  <code><a class="url" href="...">...</a></code> inside the element with <code>class="vcard"</code> in hCard.
 
* Similarly, <code>EMAIL</code> in vCard becomes <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>
 
  
=== Singular vs. Plural Properties ===
+
# creating a container element for each entry of class <code>xfolkentry</code>,
 +
# using an <a> element for the bookmarked or tagged link of class <code>taggedlink</code>,
 +
# using title attribute for the tagged link <a> element, if it exists, as the entry title, otherwise using the element value,
 +
# using [[rel-tag]] for the tags, and
 +
# using a container element of class <code>description</code>, such as &lt;p>, for any extended description or summary.
  
For properties which are singular (e.g. "N" and "FN"), the first descendant element with that class should take effect, any others being ignored.
+
A given xFolk entry will always contain a tagged link including a title with all other elements optional. Entries may have more than one tag as well as more than one element of class <code>description</code>. Multiple elements of class <code>description</code> are ordered by default document order. Semantic elements within xFolk entries may be nested at arbitray depths.
  
For properties which can be plural (e.g. "TEL"), each class instance should create a instance of that propertyPlural properties with subtypes (e.g. TEL with WORK, HOME, CELL) can be optimized to share a common element for the property itself, with each instance of subtype being an appropriately classed descendant of the property element.  
+
Many social bookmarking systems exist, each with its own markup conventions. Further, many people are already publishing personal link blogsxFolk is designed with ease of adapting to these current practices as a primary goal. Therefore, few assumptions are made as to the exact kinds of elements used for an xFolk entry.  Rather, the work of defining semantics is left entirely to the class and rel (in the case of [[rel-tag]]) attribute values.
  
=== Human vs. Machine readable ===
+
It is expected that developers will use [http://www.w3.org/TR/xpath XPath] or equivalent syntax in accessing xFolk entry elements.  a requirement for XPath is that the HTML document be well-formed but not necessarily valid.  Thus, while not optimal, it is possible to serviceably use xFolk in an HTML document that does not validate.
  
If an <code><abbr></code> element is used for a property, then the '<code>title</code>' attribute of the <code><abbr></code> element is the value of the property, instead of the contents of the element, which instead provide a human presentable version of the value. 
+
=== XMDP Profile ===
  
Similarly, if an <code><img></code> element is used for one or more properties, it must be treated as follows:
+
See the [[xfolk-profile|xFolk profile]] for the [http://gmpg.org/xmdp XMDP] profile of xFolk.
# For the "PHOTO" property and any other property that takes a URL as its value, the <code>src="..."</code> attribute provides the property value.
 
# For other properties, the <code><img></code> element's '<code>alt</code>' attribute is the value of the property.
 
  
=== Property Exceptions ===
+
== Example ==
 
+
Here is a sample bookmark as displayed in [http://del.icio.us del.icio.us]'s standard markupLines where the value of elements' class attributes must change to conform to xFolk are marked with a comment at the end.
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.
+
<pre>&lt;div class="post"&gt; <!--will change-->
 
+
  &lt;div&gt;
# '''NAME''', '''PROFILE''', '''SOURCE''', '''PRODID''' properties as defined in Sections 2.1.2, 2.1.3, 2.1.4, 3.6.3 of RFC 2426Content 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 (X)HTML documents) to construct the NAME property, MAY output a PROFILE value of "<code>VCARD</code>" per RFC 2426, SHOULD use the URL of the page where the hCard is found to construct the SOURCE property (e.g. perhaps as a parameter to URL that converts hCards to vCards), for an output vCard stream (e.g. a .vcf file).
+
    &lt;a class="delLink" href="http://www.sifry.com/alerts/archives/000306.html"&gt; <!--will change-->
 
+
      Sifry's Alerts: Technorati launches Related Tags
=== Implied "N" Optimization ===
+
    &lt;/a&gt;
 
+
  &lt;/div&gt;
Although vCard requires that the "N" property be present, the authors of the vCard specification (RFC 2426) 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.
+
  &lt;div class="extended"&gt; <!--will change-->
 
+
    Ever wanted to see what posts are related to other posts, what tags
If 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 or three or more, then the author MUST explicitly markup the "N".
+
    are related to others? Now you can! Just check under the Tag
 +
    description on most tag pages, like this one, or this one, and you'll
 +
    see the patterns. Can you smell the emergence?
 +
  &lt;/div&gt;
 +
  &lt;div class="meta"&gt;
 +
    to
 +
    &lt;a class="delNav" href="/fpgibson/folksonomy"&gt;folksonomy&lt;/a&gt; <!--will change-->
 +
    &lt;a class="delNav" href="/fpgibson/technorati"&gt;technorati&lt;/a&gt; <!--will change-->
 +
    ... &lt;a class="delNav" href="/url/cbcabf7de070fdb46598ee679367be49"&gt;
 +
    and 1 other person
 +
    &lt;/a&gt;
 +
    ... on 2005-04-09
 +
  &lt;/div&gt;
 +
&lt;/div&gt;</pre>
  
# The content of "FN" is broken into two "words" separated by whitespace.
+
The equivalent in xFolk is as follows.  Comments are placed at the end of lines where class attribute changes were required.
# The ''first'' word of the "FN" is interpreted as the "Given Name" for the "N" property.
+
<pre><nowiki>
# The ''second/last'' word of the "FN" is interpreted as the "Family Name" for the "N" property.
+
&lt;div class="xfolkentry"&gt; <!-- changed -->
# Exception: If the first word ends in a "," comma OR if the second word is a single character (optionally followed by a period "."), then the first word (minus the comma at the end if any) is interpreted as the "Family Name" and the second word is interpreted as the "Given Name".
+
  &lt;div&gt;
 +
    &lt;a class="taggedlink" href="http://www.sifry.com/alerts/archives/000306.html"&gt; <!-- changed -->
 +
      Sifry's Alerts: Technorati launches Related Tags
 +
    &lt;/a&gt;
 +
  &lt;/div&gt;
 +
  &lt;div class="description"&gt; <!-- changed -->
 +
    Ever wanted to see what posts are related to other posts, what tags
 +
    are related to others? Now you can! Just check under the Tag
 +
    description on most tag pages, like this one, or this one, and you'll
 +
    see the patterns. Can you smell the emergence?
 +
  &lt;/div&gt;
 +
  &lt;div class="meta"&gt;
 +
    to
 +
    &lt;a rel="tag" href="/fpgibson/folksonomy"&gt;folksonomy&lt;/a&gt; <!-- changed -->
 +
    &lt;a rel="tag" href="/fpgibson/technorati"&gt;technorati&lt;/a&gt; <!-- changed -->
 +
    ... &lt;a class="delNav" href="/url/cbcabf7de070fdb46598ee679367be49"&gt;
 +
    and 1 other person
 +
    &lt;/a&gt;
 +
    ... on 2005-04-09
 +
  &lt;/div&gt;
 +
&lt;/div&gt;
 +
</nowiki></pre>
  
This allows simplification in the typical case of people stating their firstname space lastname.
+
Converting markup to be conformant with xFolk is almost always this easy.  The advantage of xFolk is that it provides one set of class attributes that can be reused across all services and link blogs, almost always with no loss of granularity.  The next section presents several more examples to illustrate this point.
  
=== Implied "organization-name" Optimization ===
+
Another simple example (using lists markup) :
 +
<pre>
 +
<nowiki>
 +
<ul><!--xfolk is about *collections* of bookmarks-->
 +
  <li>
 +
    <ul class="xfolkentry">
 +
      <li><a class="taggedlink" href="http://microformats.org/wiki/Main_Page">microformats wiki</a></li>
 +
      <li class="description">The main place for understanding microformats and playing with...</li>
 +
      <li class="description">Community driven wiki</li>
 +
      <li class="meta">
 +
Tags :
 +
<a rel="tag" href="http://del.icio.us/tag/microformats">microformats</a>
 +
<a rel="tag" href="http://del.icio.us/tag/websocial">websocial</a>
 +
<a rel="tag" href="http://del.icio.us/tag/semantics">semantics</a>
 +
      </li>
 +
    </ul>
 +
  </li>
 +
 +
  <li>
 +
  <!--Another xfolkentry as above, and so on...-->
 +
  </li>
  
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".
+
</ul>
 +
</nowiki>
 +
</pre>
  
=== XMDP Profile ===
+
== Many more examples ==
  
See [[hcard-profile]] for the [http://gmpg.org/xmdp XMDP] profile of hCard.
+
We have numerous examples to help developers incorporate xFolk into their sites.
  
== Example ==
+
=== In the wild ===
Here is a sample vCard:
 
  
<code><pre><nowiki>
+
These are real live examples of functioning systems that publish bookmarks in xFolk. These are a great place to start for anyone looking for examples "in the wild" to try parsing, indexing, organizing etc.  If you publish using xFolk, feel free to add it to the top of this list.  Once the list grows too big, we'll make a separate wiki page.
BEGIN:VCARD
 
VERSION:3.0
 
N:Çelik;Tantek
 
FN:Tantek Çelik
 
URL:http://tantek.com
 
ORG:Technorati
 
END:VCARD
 
</nowiki></pre></code>
 
  
and an equivalent in hCard with various elements optimized appropriately. See [[hcard-example1-steps| hCard Example 1]] for the derivation.  
+
* [http://greenvoice.com Greenvoice] has a user-generated environmental news link list, which is marked up with xFolk.
 +
* [http://www.idoneos.com Idoneos.com] , a conceptually networked collection of information pages (mostly spanish), is tagging bookmarks with xFolk.
 +
* [http://ashaszin.lautre.net/ Ashaszin] - Small blog running with [http://spip.net SPIP] : del.icio.us links and web feeds tagged with xFolk .
 +
* [http://www.rolandinsh.lv/blog/ Rolands Umbrovskis - blog] all blog posts are marked up with xFolk.
 +
* [http://www.bbc.co.uk/worldservice/bangladeshboat BBC World Service Bangladesh River Journey] a social network mashup, uses basic xFolk for bookmarking hAtom entries. See [http://dharmafly.com/blog/bangladeshboat Dharmafly blog discussion].
 +
* [http://waferbaby.com/hussy waferbaby's Hussy] currently publishes links using xFolk.
 +
* [http://smarking.com/ Smarking] currently publishes all shared links (including search results) using xFolk.
 +
* [http://unalog.com unalog] currently publishes all shared links (including search results) using xFolk.
 +
* [http://de.lirio.us de.lirio.us] currently publishes its bookmarks using xFolk (with the deprecated class attribute <code>extended</code> in place of <code>description</code>, see [[xfolk-profile | the XMDP]]).
 +
* [http://dev.blogmarks.net/wiki/BlogSync blogmarks] currently exports bookmarks to blogs in xFolk (scroll down to the export example on the page; the deprecated class attribute <code>extended</code> is used in place of <code>description</code>, see [[xfolk-profile | the XMDP]]).
 +
* [http://thecommunityengine.com The Community Engine] uses xFolk (with the deprecated class attribute <code>extended</code> in place of <code>description</code>, see [[xfolk-profile | the XMDP]]) for its [http://thecommunityengine.com/home main entries] and for its [http://thecommunityengine.com/webcites republished bookmarks].
 +
* [http://groovymother.com/links/ Groovy Links] is a link blog which is marked up with xFolk.
 +
* [http://tommorris.org/blog/ Tom Morris] - daily del.icio.us links are marked up with xFolk, [[hCard]] and [[vote-links]].
  
<code><pre><nowiki>
+
=== Additional social bookmarking services ===
<div class="vcard">
 
<a class="url fn" href="http://tantek.com/">
 
  Tantek Çelik
 
</a>
 
<div class="org">Technorati</div>
 
</div>
 
</nowiki></pre></code>
 
  
This hCard might be displayed as::
+
This example illustrates how xFolk may be applied to one additional service:
  
[http://tantek.com/ Tantek Çelik]<br />
+
* [[xfolk-scuttle | scuttle]]
Technorati
 
  
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.
+
=== Link blogs ===
  
== Examples in the wild ==
+
Social bookmarking services are only the most recent examples of people publishing links.  Link blogs have been around almost since the beginning of blogging. They represent somewhat more of a challenge for xFolk because their markup tends to be less semantic from the outset. The following examples illustrate some particular challenges and how they can be overcome.
This section is '''informative'''.
 
  
The following sites have published hCards, and thus are a great place to start for anyone looking for examples "in the wild" to try parsing, indexing, organizing etc.  If you have an hCard on your own page, feel free to add it to the top of this list.  Once the list grows too big, we'll make a separate wiki page.
+
* [[xfolk-kottke | kottke]]
 +
* [[xfolk-pollas | pollas]]
 +
* [[xfolk-jacobian | jacobian]]
 +
* [[xfolk-julian-bez | julian-bez]]
  
* [http://cinematreasures.org Cinema Treasures] uses hCard to markup venue information for 10,000+ movie theaters.
+
=== Spam ===
* [http://thedredge.org Andy Hume] uses the hcard format to mark-up the names and URLs of commentors on his blog.
+
Some spammers are adding xFolk tags to their link farms. (It's probably a bad idea to actually link to these sites.) For example,
* [http://www.wolfsreign.com Steven Ametjan] has published his hCard on [http://www.wolfsreign.com/about/ his about page].
+
* phontron.info
* [http://evdb.com EVDB], the Events and Venues Database, publishes all venue detail pages with embedded hCards.
 
* [http://paulschreiber.com/blog/ Paul Schreiber]'s [http://concerts.shrub.ca/ Sunnyvale House Concerts] site publishes hCards for upcoming artists, as well as an hCard for the page itself.  In addition the [http://concerts.shrub.ca/shows Past Shows] page contains hCards for all past artists.
 
* [http://zooibaai.nl/ Rob Mientjes] has published his hCard on [http://zooibaai.nl/about his about page].
 
* [http://doncrowley.blogspot.com/ Don Crowley] has published [http://www.crowley.nl/hcard.html his hCard] as well as a nifty hCard button: http://www.crowley.nl/images/hcard.png
 
* [http://technorati.com/ Technorati]'s [http://www.technorati.com/about/ About page] lists their '''Media Contact''', and their [http://www.technorati.com/about/news.html Press page] also lists their '''Press Contact''', both as inline hCards.
 
* [http://tantek.com/log Tantek's Thoughts] includes an inline author hCard at the bottom of the page.
 
  
 
== Implementations ==
 
== Implementations ==
This section is '''informative'''.
 
  
The following implementations have been developed which either generate or parse hCards. If you have an hCard implementation, feel free to add it to the top of this list. Once the list grows too big, we'll make a separate wiki page.
+
The following implementations have been developed which generate or use xFolk. If you have an xFolk implementation, feel free to add it to the top of this list. Once the list grows too big, we'll make a separate wiki page.
  
* The [http://tantek.com/microformats/hcard-creator.html hCard creator] is a very simple, yet illustrative, open source user interface / form / script which creates an hCard in real-time as you type in a set of contact information.  
+
* [http://sourceforge.net/projects/semanticscuttle SemanticScuttle], your own social bookmarking software, supports xfolk natively
* [http://greenbytes.de/tech/webdav/rfc2629.xslt rfc2629.xslt] now attempts to generate hCard information ([http://ietf.org/rfc/rfc2629 RFC2629] is an XML format for authoring RFCs and Internet Drafts, see [http://greenbytes.de/tech/webdav/rfc2629xslt/rfc2629xslt.html example document])
+
* [http://buzka.com Buzka], a social bookmarking service, now supports xFolk
* [http://tantek.com/microformats/buddylist2hcards.html iChat buddy list to hCards] - Open source AppleScript to automatically convert one's buddy list in the MacOSX iChat AIM client into a valid XHTML 1.0 Strict list of hCards.  
+
* [http://blip.tv Blip.tv], a video hosting site, now [http://blog.blip.tv/blog/2006/08/19/blip-supports-xfolk/ supports xFolk].
* [http://suda.co.uk/projects/X2V/ X2V] is a bookmarklet that parses hCard and produces a .vcf (vCard) stream. Note: needs to be updated as the spec is refined
+
* [http://www.s9y.org/ Serendipity], a PHP-powered, flexible Blogging/CMS application, now has a [http://www.numblog.de/archives/241-Social-Bookmarks-Plugin-for-Serendipity.html social bookmarks plugin] that supports xFolk.
 +
* [http://claimid.com claimID] has implemented xFolk for people's links.
 +
* [http://ma.gnolia.com ma.gnolia] now supports xFolk.
 +
* [http://smarking.com/ Smarking.com] (a social bookmarking service) marks up their tagged links with xFolk! Hat tip: [http://3spots.blogspot.com/2006/05/social-bookmarking-smarking.html 3spots: Social + bookMARKING = Smarking] which itself is an [[hreview|hReview]].
 +
* [http://blog.codeeg.com/2006/03/20/flock-tails-flocktails/ Flocktails] - port of Tails extension for Flock 0.5.12 that looks for hCards, hCalendar, xFolk and hReview and tosses them into a handy topbar
 +
* [http://blog.codeeg.com/tails-firefox-extension/ Tails is a Firefox Extension] that will display the presence of microformats ([[hcard|hCard]], [[hcalendar|hCalendar]], [[hreview|hReview]], [[xfolk|xFolk]]) on a webpage.
 +
* Bud Gibson and Mike Migurski [http://thecommunityengine.com/home/archives/2005/09/vegomatic_an_al.html have written] [http://thecommunityengine.com/veg-o-matic veg-o-matic], an xFolk reblogging tool and service.
 +
* [http://inside.glnetworks.de/ Martin Rehfeld] has updated the work of [http://blogmatrix.blogmatrix.com/ David Janes] and produced a [[Greasemonkey]] [http://inside.glnetworks.de/2006/06/05/microformats-have-arrived-in-firefox-15-greasemonkey-06/ script] that finds many microformat elements, including xFolk and [http://blog.davidjanes.com/mtarchives/2005_08.html#003379 provides a popup menu of actions]. ''This will work with FireFox 1.5+/GreaseMonkey 0.6.4+ now.''
 +
* [http://www.midgard-project.org/midcom-permalink-6416db7e1f0e297b4cf3dcc285702a8d net.nemein.bookmarks], the bookmark manager in [http://www.midgard-project.org/ Midgard CMS] uses xFolk as the native output format, with added <code>abbr class=posted</code> for publication date and <code>abbr class=poster</code> for user who added the bookmark. See [http://bergie.iki.fi/links/ example]
 +
* [http://de.lirio.us de.lirio.us] currently publishes its bookmarks using xFolk 0.4 (the class attribute <code>extended</code> is used in place of description).
 +
* [http://dev.blogmarks.net/wiki/BlogSync blogmarks] currently exports bookmarks to blogs in xFolk 0.4 (scroll down to the export example on the page; the class attribute <code>extended</code> is used in place of <code>description</code>).
 +
* [http://pokkari.com/microformat/javadoc/ Sivitols] is a Java library for microformats. Currently only the xFolk RC1 standard is implemented, but additional microformat support is planned. (adapted from [http://blog.blip.tv/blog/microformats/])
 +
* [http://bildu.net Bildu] a social bookmarking service in Basque that supports xFolk (an also rel-tag).
 +
* [http://bookmarks.excite.co.uk/ Excite Bookmarks] a social bookmarking service that supports xFolk and rel-tag.
  
 
== References ==
 
== References ==
 
=== Normative 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]
+
* [[rel-tag]]
  
 
=== Informative References ===
 
=== Informative References ===
* [http://w3.org/TR/REC-CSS1 CSS1]
+
* [http://thecommunityengine.com/home/archives/xfolk articles about xFolk]
* [http://tantek.com/log/2004/09.html#hcard hCard term introduced and defined on the Web, 20040930]
+
* [http://thecommunityengine.com/home/archives/tags/microformats articles about the business value of microformats]
* [http://wiki.oreillynet.com/foocamp04/index.cgi?SimpleSemanticFormats FOO Camp 2004 Simple Semantic Formats presentation, 20040910]
+
* [http://gataga.com gataga social bookmark search engine]
* Contributed from http://developers.technorati.com/wiki/hCard.
+
* [http://johnvey.com/features/deliciousdirector/ an ajax based interface for del.icio.us]
* [http://www.w3.org/TR/xhtml11 XHTML 1.1]
+
* [http://en.wikipedia.org/wiki/Social_bookmarking social bookmarking defined at wikipedia]
  
 
=== Similar Work ===
 
=== Similar Work ===
* [[hcalendar]]
+
* [[hreview | hReview]]
* [[XOXO]]
 
* [http://www.intertwingly.net/wiki/pie/PaceBetterPersonElement Atom PaceBetterPersonElement]
 
  
 
== Work in progress ==
 
== Work in progress ==
This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added. There is a separate document where we are keeping our brainstorms and other explorations relating to hCard:
+
Although this specification has recently begun to stabilize as indicated by the version RC1, it is still a work in progress. If warranted, I am prepared to go through multiple release candidates to achieve the narrow purpose of making bookmark entries more genrally accessible with as with as light weight a format as possible. All changes since the last iteration have been motivated by the implementation experience of developers attempting to achieve this narrow aim.  Further changes will also most likely be motivated by implementation concerns.  See "future directions" below for additional microformat possibilities.
  
* [[hcard-brainstorming|hCard Brainstorming]]
+
=== Changes since xFolk 0.4 ===
 +
The class attribute value <code>extended</code> was deprecated in favor <code>description</code> to better conform with other microformat usage and some requests during implementation.  The other change has been to allow use of multiple elements of class <code>extended</code> based on some use cases discovered in implementation.
 +
 
 +
=== Future directions ===
 +
There are several extensions one might imagine for xFolk. Frequently, these extensions are best achieved by combining xFolk with another microformat. For instance, one might want to indicate his or her evaluation of the bookmarked item. This might be achieved by using [[vote-links | Vote Links]] or [[hreview | hReview]] with xFolk.
 +
 
 +
One can also imagine extending xFolk to provide data conformant with various social bookmarking service APIs, for instance to provide all bookmarks by tag. These APIs are currently too fluid for specification in any kind of standard. The APIs and the functionality they provide represent one way social bookmarking services and meta services can differentiate themselves.
 +
 
 +
A companion format called "xFolk definition" is under development. xFolk definition will provide a means of explicitly defining the tags used in social bookmarks.
 +
 
 +
=== Brainstorming ===
 +
* [[xfolk-brainstorming|xFolk brainstorming]]
  
 
== Discussions ==
 
== Discussions ==
 
* See [http://www.technorati.com/cosmos/referer.html blogs discussing this page].
 
  
 
=== Q&A ===
 
=== Q&A ===
* If you have any questions about hCard, check the [[hcard-faq|hCard FAQ]], and if you don't find answers, add your questions!
+
* If you have any questions about xFolk, check the [[xfolk-faq|xFolk FAQ]], and if you don't find answers, add your questions!
  
 
=== Issues ===
 
=== Issues ===
* Please add any issues with the specification to the separate [[hcard-issues|hCard issues]] document.
+
* Please add any issues with the specification to the separate [[xfolk-issues|xFolk issues]] document.
 +
 
 +
==Related pages==
 +
{{template:xfolk-related-pages}}
 +
 
 +
[[Category:Draft Specifications]]
 +
[[Category:xFolk]]

Latest revision as of 16:35, 18 July 2020

This document represents a draft microformat specification. Although drafts are somewhat mature in the development process, the stability of this document cannot be guaranteed, and implementers should be prepared to keep abreast of future developments and changes. Watch this wiki page, or follow discussions on the #microformats Freenode IRC channel to stay up-to-date.

xFolk (from "xFolksomony") is a simple and open format for publishing collections of bookmarks. It better enables services for improving user experience and sharing data in web-based bookmarking software. xFolk may be embedded in HTML or XHTML, Atom, RSS, and arbitrary XML. It is one of several open microformat standards.

Draft Specification

Editor/Author

Bud Gibson (The Community Engine)

Copyright

This specification is (C) 2005-2021 by the authors. However, the authors intend to submit (or already have submitted, see details in the spec) this specification to a standards body with a liberal copyright/licensing policy such as the GMPG, IETF, and/or W3C. Anyone wishing to contribute should read their copyright principles, policies and licenses (e.g. the GMPG Principles) and agree to them, including licensing of all contributions under all required licenses (e.g. CC-by 1.0 and later), before contributing.

Patents

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

Inspiration and Acknowledgments

Thanks to: David Plaut who introduced me to the idea that items may partially belong to many categories at once. More recently, thanks to: Tantek Çelik, Kevin Marks, Steve Mallet, Brian DelVecchio, and François Hodierne who have contributed to the development of xFolk with thoughtful critiques and implementations.

Introduction

Social bookmarking services let users save and tag bookmarks to share with other users. Over the past year, the number of these services has mushroomed to over 20, with popular examples including: del.icio.us, furl, de.lirio.us, jots, and blogmarks.

Lack of an open, interoperable data standard is a major issue in using social bookmarking services. An open standard would make it possible to easily collect social bookmark data and remix it to invent new services along the lines of gataga's experimental bookmark search engine. An open standard would also make it possible to write javascripts that work across services as some currently do for del.icio.us, enabling across-the-board improvements in user experience.

xFolk is an open social bookmarking standard that aims to achieve both benefits. Social bookmarking services that adopt xFolk will continue to differentiate themselves with data services. But, the data itself will be easy to manipulate by third party scripts and easy to share. As a result, bookmarking services will be able to offer a wider array of options to their users at low cost and focus on what truly differentiates them. Individuals or groups operating standalone bookmark repositories will have access to a wider array of functionality than they can produce on their own.

Semantic XHTML Design Principles

Note: the Semantic XHTML Design Principles were written primarily within the context of developing hCard and hCalendar, thus it may be easier to understand these principles in the context of the hCard design methodology (i.e. read that first). Tantek

XHTML is built on XML, and thus XHTML based formats can be used not only for convenient display presentation, but also for general purpose data exchange. In many ways, XHTML based formats exemplify the best of both HTML and XML worlds. However, when building XHTML based formats, it helps to have a guiding set of principles.

  1. Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference. Avoid restating constraints expressed in the source standard. Informative mentions are ok.
    1. For types with multiple components, use nested elements with class names equivalent to the names of the components.
    2. Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited.
  2. Use the most accurately precise semantic XHTML building block for each object etc.
  3. Otherwise use a generic structural element (e.g. <span> or <div>), or the appropriate contextual element (e.g. an <li> inside a <ul> or <ol>).
  4. Use class names based on names from the original schema, unless the semantic XHTML building block precisely represents that part of the original schema. If names in the source schema are case-insensitive, then use an all lowercase equivalent. Components names implicit in prose (rather than explicit in the defined schema) should also use lowercase equivalents for ease of use. Spaces in component names become dash '-' characters.
  5. Finally, if the format of the data according to the original schema is too long and/or not human-friendly, use <abbr> instead of a generic structural element, and place the literal data into the 'title' attribute (where abbr expansions go), and the more brief and human readable equivalent into the element itself. Further informative explanation of this use of <abbr>: Human vs. ISO8601 dates problem solved

Format

Extensive analysis of social bookmarking services and linkblogs, reported on elsewhere, reveals that the data published by both bookmarking services and many different linkblogs are described by the following implied schema:

  • A bookmarked or tagged link.
  • A title for the entry.
  • Tags for the link.
  • An extended description or summary of the link.

As demonstrated in early iterations of the xFolk standard, this general schema can be translated into markup by:

  1. creating a container element for each entry of class xfolkentry,
  2. using an <a> element for the bookmarked or tagged link of class taggedlink,
  3. using title attribute for the tagged link <a> element, if it exists, as the entry title, otherwise using the element value,
  4. using rel="tag" for the tags, and
  5. using a container element of class description, such as <p>, for any extended description or summary.

A given xFolk entry will always contain a tagged link including a title with all other elements optional. Entries may have more than one tag as well as more than one element of class description. Multiple elements of class description are ordered by default document order. Semantic elements within xFolk entries may be nested at arbitray depths.

Many social bookmarking systems exist, each with its own markup conventions. Further, many people are already publishing personal link blogs. xFolk is designed with ease of adapting to these current practices as a primary goal. Therefore, few assumptions are made as to the exact kinds of elements used for an xFolk entry. Rather, the work of defining semantics is left entirely to the class and rel (in the case of rel="tag") attribute values.

It is expected that developers will use XPath or equivalent syntax in accessing xFolk entry elements. a requirement for XPath is that the HTML document be well-formed but not necessarily valid. Thus, while not optimal, it is possible to serviceably use xFolk in an HTML document that does not validate.

XMDP Profile

See the xFolk profile for the XMDP profile of xFolk.

Example

Here is a sample bookmark as displayed in del.icio.us's standard markup. Lines where the value of elements' class attributes must change to conform to xFolk are marked with a comment at the end.

<div class="post"> <!--will change-->
  <div>
    <a class="delLink" href="http://www.sifry.com/alerts/archives/000306.html"> <!--will change-->
      Sifry's Alerts: Technorati launches Related Tags
    </a> 
  </div>
  <div class="extended"> <!--will change-->
    Ever wanted to see what posts are related to other posts, what tags 
    are related to others? Now you can! Just check under the Tag 
    description on most tag pages, like this one, or this one, and you'll
    see the patterns. Can you smell the emergence?
  </div>
  <div class="meta">
    to
    <a class="delNav" href="/fpgibson/folksonomy">folksonomy</a> <!--will change-->
    <a class="delNav" href="/fpgibson/technorati">technorati</a> <!--will change-->
    ... <a class="delNav" href="/url/cbcabf7de070fdb46598ee679367be49">
    and 1 other person
    </a>
    ... on 2005-04-09
  </div>
</div>

The equivalent in xFolk is as follows. Comments are placed at the end of lines where class attribute changes were required.

<div class="xfolkentry"> <!-- changed -->
  <div>
    <a class="taggedlink" href="http://www.sifry.com/alerts/archives/000306.html"> <!-- changed -->
      Sifry's Alerts: Technorati launches Related Tags
    </a> 
  </div>
  <div class="description"> <!-- changed -->
    Ever wanted to see what posts are related to other posts, what tags 
    are related to others? Now you can! Just check under the Tag 
    description on most tag pages, like this one, or this one, and you'll
    see the patterns. Can you smell the emergence?
  </div>
  <div class="meta">
    to
    <a rel="tag" href="/fpgibson/folksonomy">folksonomy</a> <!-- changed -->
    <a rel="tag" href="/fpgibson/technorati">technorati</a> <!-- changed -->
    ... <a class="delNav" href="/url/cbcabf7de070fdb46598ee679367be49">
    and 1 other person
    </a>
    ... on 2005-04-09
  </div>
</div>

Converting markup to be conformant with xFolk is almost always this easy. The advantage of xFolk is that it provides one set of class attributes that can be reused across all services and link blogs, almost always with no loss of granularity. The next section presents several more examples to illustrate this point.

Another simple example (using lists markup) :


<ul><!--xfolk is about *collections* of bookmarks-->
  <li>
    <ul class="xfolkentry"> 
      <li><a class="taggedlink" href="http://microformats.org/wiki/Main_Page">microformats wiki</a></li>
      <li class="description">The main place for understanding microformats and playing with...</li>
      <li class="description">Community driven wiki</li>
      <li class="meta">
	Tags :
	<a rel="tag" href="http://del.icio.us/tag/microformats">microformats</a>
	<a rel="tag" href="http://del.icio.us/tag/websocial">websocial</a>
	<a rel="tag" href="http://del.icio.us/tag/semantics">semantics</a>
      </li>
    </ul>
  </li>
	
  <li>
   <!--Another xfolkentry as above, and so on...-->
  </li>

</ul>

Many more examples

We have numerous examples to help developers incorporate xFolk into their sites.

In the wild

These are real live examples of functioning systems that publish bookmarks in xFolk. These are a great place to start for anyone looking for examples "in the wild" to try parsing, indexing, organizing etc. If you publish using xFolk, feel free to add it to the top of this list. Once the list grows too big, we'll make a separate wiki page.

Additional social bookmarking services

This example illustrates how xFolk may be applied to one additional service:

Link blogs

Social bookmarking services are only the most recent examples of people publishing links. Link blogs have been around almost since the beginning of blogging. They represent somewhat more of a challenge for xFolk because their markup tends to be less semantic from the outset. The following examples illustrate some particular challenges and how they can be overcome.

Spam

Some spammers are adding xFolk tags to their link farms. (It's probably a bad idea to actually link to these sites.) For example,

  • phontron.info

Implementations

The following implementations have been developed which generate or use xFolk. If you have an xFolk implementation, feel free to add it to the top of this list. Once the list grows too big, we'll make a separate wiki page.

References

Normative References

Informative References

Similar Work

Work in progress

Although this specification has recently begun to stabilize as indicated by the version RC1, it is still a work in progress. If warranted, I am prepared to go through multiple release candidates to achieve the narrow purpose of making bookmark entries more genrally accessible with as with as light weight a format as possible. All changes since the last iteration have been motivated by the implementation experience of developers attempting to achieve this narrow aim. Further changes will also most likely be motivated by implementation concerns. See "future directions" below for additional microformat possibilities.

Changes since xFolk 0.4

The class attribute value extended was deprecated in favor description to better conform with other microformat usage and some requests during implementation. The other change has been to allow use of multiple elements of class extended based on some use cases discovered in implementation.

Future directions

There are several extensions one might imagine for xFolk. Frequently, these extensions are best achieved by combining xFolk with another microformat. For instance, one might want to indicate his or her evaluation of the bookmarked item. This might be achieved by using Vote Links or hReview with xFolk.

One can also imagine extending xFolk to provide data conformant with various social bookmarking service APIs, for instance to provide all bookmarks by tag. These APIs are currently too fluid for specification in any kind of standard. The APIs and the functionality they provide represent one way social bookmarking services and meta services can differentiate themselves.

A companion format called "xFolk definition" is under development. xFolk definition will provide a means of explicitly defining the tags used in social bookmarks.

Brainstorming

Discussions

Q&A

  • If you have any questions about xFolk, check the xFolk FAQ, and if you don't find answers, add your questions!

Issues

  • Please add any issues with the specification to the separate xFolk issues document.

Related pages