Jump to: navigation, search

xFolk (RC1)

xFolk é um formato simples e aberto para a publicação de listas de bookmarks. Ele possibilita a criação de serviços que melhoram a experiência do usuário e a maneira de compartilhar dados em uma aplicação web de bookmarking. xFolk pode ser aplicado em (X)HTML, Atom, RSS, e XML arbitrário. É um dos muitos padrões de microformatos.


Draft Specification


Bud Gibson, The Community Engine


This specification is (C) 2005-2017 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.


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

Inspiration and Acknowledgments

Agradecimentos para: David Plaut que apresentou-me à ideia que itens podem pertencer parcialmente a muitas categorias ao mesmo tempo. Mais recentemente, agradeço a: Tantek Çelik, Kevin Marks, Steve Mallet, Brian DelVecchio, e François Hodierne por contribuirem ao desenvolvimento do xFolk com implementações e críticas construtivas.


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


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:

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 RelTag 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 reltag) 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 (X)HTML document be well-formed but not necessarily valid. Thus, while undesirable, it is possible to serviceably use xFolk in an (X)HTML document that does not validate.

XMDP Profile

See the xFolk profile for the XMDP profile of xFolk.


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-->
    <a class="delLink" href="http://www.sifry.com/alerts/archives/000306.html"> <!--will change-->
      Sifry's Alerts: Technorati launches Related Tags
  <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 class="meta">
    <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
    ... on 2005-04-09

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 -->
    <a class="taggedlink" href="http://www.sifry.com/alerts/archives/000306.html"> <!-- changed -->
      Sifry's Alerts: Technorati launches Related Tags
  <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 class="meta">
    <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
    ... on 2005-04-09

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.

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.


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.


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.





xfolk-pt-br was last modified: Tuesday, August 16th, 2011