xFolk 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 (X)HTML, Atom, RSS, and arbitrary XML. It is one of several open microformat standards.
- 1 xFolk (RC1)
- 1.1 Draft Specification
- 1.2 Introduction
- 1.3 Semantic XHTML Design Principles
- 1.4 Format
- 1.5 Example
- 1.6 Many more examples
- 1.7 Implementations
- 1.8 References
- 1.9 Work in progress
- 1.10 Discussions
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.
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.
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.
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.
- 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.
- For types with multiple components, use nested elements with class names equivalent to the names of the components.
- Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited.
- Use the most accurately precise semantic XHTML building block for each object etc.
- Otherwise use a generic structural element (e.g.
<div>), or the appropriate contextual element (e.g. an
- 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.
- 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:
- 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:
- creating a container element for each entry of class
- using an <a> element for the bookmarked or tagged link of class
- using title attribute for the tagged link <a> element, if it exists, as the entry title, otherwise using the element value,
- using RelTag for the tags, and
- 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 (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.
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>
Many more examples
We have numerous examples to help developers incorporate xFolk into their sites.
In the wild
- waferbaby's Hussy currently publishes links using xFolk.
- Smarking currently publishes all shared links (including search results) using xFolk.
- unalog currently publishes all shared links (including search results) using xFolk.
- de.lirio.us currently publishes its bookmarks using xFolk (with the deprecated class attribute
extendedin place of
description, see the XMDP).
- blogmarks currently exports bookmarks to blogs in xFolk (scroll down to the export example on the page; the deprecated class attribute
extendedis used in place of
description, see the XMDP).
- The Community Engine uses xFolk (with the deprecated class attribute
extendedin place of
description, see the XMDP) for its main entries and for its republished bookmarks.
This example illustrates how xFolk may be applied to one additional service:
- claimID has implemented xFolk for people's links.
- ma.gnolia now supports xFolk.
- Smarking.com (a social bookmarking service) marks up their tagged links with xFolk! Hat tip: 3spots: Social + bookMARKING = Smarking which itself is an hReview.
- 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
- Tails is a Firefox Extension that will display the presence of microformats (hCard, hCalendar, hReview, xFolk) on a webpage.
- Bud Gibson and Mike Migurski have written veg-o-matic, an xFolk reblogging tool and service.
- Martin Rehfeld has updated the work of David Janes and produced a greasemonkey script that finds many microformat elements, including xFolk and provides a popup menu of actions. This will work with FireFox 1.5+/GreaseMonkey 0.6.4+ now.
- net.nemein.bookmarks, the bookmark manager in Midgard CMS uses xFolk as the native output format, with added
abbr class=postedfor publication date and
abbr class=posterfor user who added the bookmark. See example
- de.lirio.us currently publishes its bookmarks using xFolk 0.4 (the class attribute
extendedis used in place of description).
- blogmarks currently exports bookmarks to blogs in xFolk 0.4 (scroll down to the export example on the page; the class attribute
extendedis used in place of
- articles about xFolk
- articles about the business value of microformats
- gataga social bookmark search engine
- an ajax based interface for del.icio.us
- social bookmarking defined at wikipedia
Work in progress
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.
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.
- If you have any questions about xFolk, check the xFolk FAQ, and if you don't find answers, add your questions!
- Please add any issues with the specification to the separate xFolk issues document.