xoxo: Difference between revisions
No edit summary |
(→Informative References: previously was at "xhtmloutlines") |
||
(15 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:XOXO 1.0: Extensible Open XHTML Outlines}} | |||
XOXO is a simple, open outline format written in standard XHTML and suitable for embedding in (X)HTML, Atom, RSS, and arbitrary XML. XOXO is one of several [[microformats|microformat]] open standards. | |||
__TOC__ | |||
== Draft Specification 2004-10-01 == | |||
=== Editor === | |||
[http://tantek.com/ Tantek Çelik] | |||
=== Authors === | |||
* [http://epeus.blogspot.com/ Kevin Marks] | |||
* [http://tantek.com/ Tantek Çelik] | |||
* Mark Pilgrim | |||
* [http://www.blogologue.com/ Morten W. Petersen] | |||
=== Copyright === | |||
{{MicroFormatCopyrightStatement2003}} | |||
* [[User:Tantek|Tantek]]: I release all my contributions to this specification into the public domain and I encourage the other authors to do so as well. | |||
** When all authors/editors have done so, we can remove the MicroFormatCopyrightStatement template reference and replace it with the MicroFormatPublicDomainContributionStatement. | |||
=== Patents === | |||
{{MicroFormatPatentStatement}} | |||
== Preamble == | |||
When we were discussing [https://web.archive.org/web/20071017054844/http://developers.technorati.com:80/wiki/attentionxml Attention.xml], Tantek pointed out that XHTML has everything necessary for semantically expressing outlines and blogroll-like subscriptions in an XML format that is both interactively renderable by browsers and parsable by strict XML engines. This page is here to discuss this idea. | |||
=== Name === | |||
XOXO stands for eXtensible Open XHTML Outlines, and is pronounced variously as 'ecks oh ecks oh', 'zho-zho', or 'sho-sho'. | |||
== Abstract == | |||
XOXO is one of several [[microformats]]. This specification defines a new XHTML document type that is based upon the module framework and modules defined in Modularization of XHTML ([http://www.w3.org/TR/xhtml-modularization XHTMLMOD]). The purpose of the XOXO document type is to serve as the basis for XHTML friendly outlines for processing by XML engines and for easy interactive rendering by browsers. | |||
== The XOXO Document Type == | |||
The XOXO document type is made up of the following XHTML modules. The elements, attributes, and minimal content models associated with these modules are defined in "Modularization of XHTML" ([http://www.w3.org/TR/xhtml-modularization XHTMLMOD]). The elements are listed here for information purposes, but the definitions in "Modularization of XHTML" should be considered definitive. In the on-line version of this document, the module names in the list below link into the definitions of the modules within the current version of "Modularization of XHTML". | |||
[http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_structuremodule Structure Module] | |||
body, head, html, title | |||
[http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_hypertextmodule Hypertext Module] | |||
a | |||
[http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_listmodule List Module] | |||
dl, dt, dd, ol, ul, li | |||
[http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_metamodule Metainformation Module] | |||
meta | |||
[http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_stylemodule Stylesheet Module] | |||
style element | |||
[http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_styleattributemodule Style Attribute Module] | |||
style attribute | |||
[http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_linkmodule Link Module] | |||
link | |||
[http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_legacymodule Legacy Module] | |||
Attribute compact on ol and ul | |||
=== The XOXO Profile === | |||
See [[xoxo-profile]] for the [http://gmpg.org/xmdp XMDP] profile of XOXO which defines the XOXO values for the class attribute. | |||
== Simple XOXO Fragment == | |||
=== Markup === | |||
<pre><nowiki><ol class='xoxo'> | |||
<li>Subject 1 | |||
<ol> | |||
<li>subpoint a</li> | |||
<li>subpoint b</li> | |||
</ol> | |||
</li> | |||
<li>Subject 2 | |||
<ol compact="compact"> | |||
<li>subpoint c</li> | |||
<li>subpoint d</li> | |||
</ol> | |||
</li> | |||
<li>Subject 3 | |||
<ol> | |||
<li>subpoint e</li> | |||
</ol> | |||
</li> | |||
</ol> | |||
</nowiki></pre> | |||
=== Sample Rendering === | |||
<pre><nowiki> | |||
1. Subject 1 | |||
a. subpoint a | |||
b. subpoint b | |||
2. Subject 2 | |||
3. Subject 3 | |||
a. subpoint e | |||
</nowiki></pre> | |||
=== Usage of 'compact' attribute === | |||
Note the use of the 'compact' attribute to indicate that the subpoints of the headline "Subject 2" are not in an expanded state. The absence of the 'compact' attribute elsewhere indicates that the other headlines are in an expanded state. | |||
=== Possible Default Style Rules for Sample Rendering === | |||
<pre><nowiki> | |||
ol.xoxo { list-style:decimal; } | |||
ol.xoxo ol { list-style:lower-latin; } | |||
ol[compact="compact"] { display:none; } | |||
</nowiki></pre> | |||
== More Simple Examples == | |||
MarkP has a set of examples that demonstrates both the simplicity of the markup and the presentational richness that is possible: | |||
* [http://diveintomark.org/public/2004/01/xo-flat.xo simple XO file that can be embedded directly into an XHTML page] | |||
* [http://diveintomark.org/public/2004/01/xo-embeddable.xo XO with nested groups, also directly embeddedable in XHTML] | |||
* [http://diveintomark.org/public/2004/01/xo-standalone.xo XO as a standalone XHTML page] ([http://validator.w3.org/check?uri=http%3A%2F%2Fdiveintomark.org%2Fpublic%2F2004%2F01%2Fxo-standalone.xo valid XHTML]) | |||
* [http://diveintomark.org/public/2004/01/xo-with-style.xo XO as a standalone XHTML page, styled with CSS] ([http://validator.w3.org/check?uri=http%3A%2F%2Fdiveintomark.org%2Fpublic%2F2004%2F01%2Fxo-with-style.xo also valid XHTML]) | |||
* [http://homepage.mac.com/ctholland/thelab/outlines/ Chris Holland Outline Helper]: tweaked one of above samples, yanked CSS for simplicity, added reference to [http://homepage.mac.com/ctholland/thelab/outlines/outlines.css outlines.css] and [http://homepage.mac.com/ctholland/thelab/outlines/outlines.js outlines.js], pasted a few different combinations of ul/ol/li with the compact attribute. | |||
** in trying to comply with semantic principles the "compact" attribute to ol and ul elements is what drives the display state. Via scripting, i'm setting classes on containing li element for added styling flexibility, though CSS Gurus might be able to replace "li.expanded" in outlines.css with some other CSS selector that says "select an li node that contains an ol node with a 'compact' attribute set". | |||
*** The CSS selector for "an li node that contains an ol node with a 'compact' attribute set" would be 'li ol[compact="compact"]'. | |||
== Properties of Outline Items == | |||
Outlines typically consist of a hierarchy of points and subpoints. Each of those points (outline items) itself may have some properties (AKA attributes or metadata) that need to be represented. Perhaps the most common additional property on outline items in practice is the URL as demonstrated in Mark Pilgrim's examples above. Even the text label/title of an outline item could be considered a common property. A few such common properties: | |||
* text | |||
* description | |||
* url (often called xmlurl or htmlurl; sometimes called permalink) | |||
* title | |||
* type (hint of the MIME type of the resource indicated by the URL) | |||
In general, properties on an outline item <code><nowiki><li></nowiki></code> are represented by a nested definition list <code><nowiki><dl></nowiki></code>. Strictly speaking, it is the first <code><nowiki><dl></nowiki></code> inside the <code><nowiki><li></nowiki></code> and before any following <code><nowiki><ol></nowiki></code>, <code><nowiki><ul></nowiki></code>, or <code><li></code>, e.g. here is an item "item 1" with a description property (the subpoints are there purely as a point of reference to an earlier example). | |||
<pre><nowiki> | |||
<ol class='xoxo'> | |||
<li>item 1 | |||
<dl> | |||
<dt>description</dt> | |||
<dd>This item represents the main point we're trying to make.</dd> | |||
</dl> | |||
<ol> | |||
<li>subpoint a</li> | |||
<li>subpoint b</li> | |||
</ol> | |||
</li> | |||
</nowiki></pre> | |||
=== Special Properties === | |||
There are a handful of special properties which we are able to represent more directly and conveniently with the semantic XHTML building blocks that we have included, instead of terms in a definition list. Mostly taken from the above list of common properties, these are: | |||
* text, url, title, type, and rel (short for relationship) | |||
If we were to represent them simply as definition terms (including the "description" property from the previous example), they might look something like this: | |||
Example for the sake of discussion only / not a canonical XOXO example: | |||
<pre><nowiki> | |||
<ol class='xoxo'> | |||
<li> | |||
<dl> | |||
<dt>text</dt> | |||
<dd>item 1</dd> | |||
<dt>description</dt> | |||
<dd> This item represents the main point we're trying to make.</dd> | |||
<dt>url</dt> | |||
<dd>http://example.com/more.xoxo</dd> | |||
<dt>title</dt> | |||
<dd>title of item 1</dd> | |||
<dt>type</dt> | |||
<dd>text/xml</dd> | |||
<dt>rel</dt> | |||
<dd>help</dd> | |||
</dl> | |||
</li> | |||
</nowiki></pre> | |||
However, by taking advantage of the semantic <code><a href></code> element, we are able to dramatically simplify the common cases that utilize these properties. From a parser's perspective, this applies to the first <code><a href></code> element directly inside the <code><nowiki><li></nowiki></code>. | |||
Actual XOXO Example: | |||
<pre><nowiki> | |||
<ol class='xoxo'> | |||
<li><a href="http://example.com/more.xoxo" | |||
title="title of item 1" | |||
type="text/xml" | |||
rel="help">item 1</a> | |||
<!-- note how the "text" property is simply the contents of the <a> element --> | |||
<dl> | |||
<dt>description</dt> | |||
<dd>This item represents the main point we're trying to make.</dd> | |||
</dl> | |||
</li> | |||
</nowiki></pre> | |||
Any other properties are simply added to the definition list in the same way as the "description" property. | |||
=== Multi-value Properties === | |||
Properties that have multiple values are added using a list, nested inside of the corresponding <code>dl</code> element: | |||
<pre><nowiki> | |||
<ol class='xoxo'> | |||
<li>item 1 | |||
<dl> | |||
<dt>multivalproperty1</dt> | |||
<dd><ul> | |||
<li>value-a</li> | |||
<li>value-b</li> | |||
</ul></dd> | |||
</dl> | |||
</li> | |||
</ol> | |||
</nowiki></pre> | |||
== Publishing XOXO == | |||
XOXO may be published in two forms, valid XHTML, and simple well-formed XML. | |||
=== Valid XHTML XOXO === | |||
A valid XHTML XOXO page is a complete XHTML document. | |||
<pre><nowiki> | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||
<head> | |||
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |||
<title>XOXO page</title> | |||
</head> | |||
<body> | |||
<ol class="xoxo"> | |||
<li><a href="URL-one">TEXT-one</a></li> | |||
<li><a href="URL-two">TEXT-two</a></li> | |||
... | |||
</ol> | |||
</body> | |||
</html> | |||
</nowiki></pre> | |||
=== Simple well-formed XML XOXO === | |||
The root element of a simple well-formed XML XOXO page is either an <code>ol</code> or <code>ul</code> with class name of "xoxo". This variant is ideal for syndication and transclusion into (X)HTML pages with [[rest/ahah|AHAH]]. | |||
<pre><nowiki> | |||
<ol class="xoxo"> | |||
<li><a href="URL-one">TEXT-one</a></li> | |||
<li><a href="URL-two">TEXT-two</a></li> | |||
... | |||
</ol> | |||
</nowiki></pre> | |||
=== Content-Type === | |||
Valid or well-formed XHTML XOXO SHOULD be served with this Content-Type header for maximum browser compatibility. | |||
<pre><nowiki> | |||
Content-Type: text/html; charset=utf-8 | |||
</nowiki></pre> | |||
It MUST be served with one of these Content-Type headers: | |||
<pre><nowiki> | |||
Content-Type: text/html; charset=utf-8 | |||
Content-Type: application/xhtml+xml | |||
Content-Type: application/xml | |||
</nowiki></pre> | |||
== Examples in the Wild == | |||
This section is '''informative'''. | |||
There are many wild examples. Nearly every blogroll on the Web can be parsed as XOXO, since they are typically an unordered list of list items of hyperlinks, which is within the XOXO profile. List examples here, when the list becomes too long we can move to a dedicated page. | |||
* [http://api.talis.com/bf/stores/ukbib/services/facet?query=feynman&fields=title%2Csubject&top=10&output=html HTML output from a faceting service for book data] | |||
== Implementations == | |||
This section is '''informative'''. | |||
* CVarious [[s5-tools|S5 tools]] | |||
* [http://chneukirchen.org/blog/ Christian Neukirchen] has [http://chneukirchen.org/blog/archive/2006/01/xoxo-rb-0-1-released.html written a xoxo.rb, a XOXO parser and generator for Ruby] | |||
* [http://odeo.com Odeo] publishes users' subscription lists in XOXO. See Ryan King's list [http://odeo.com/profile/RyanKing/xoxo here]. | |||
* [http://www.decafbad.com/blog/ Les Orchard] has [http://www.decafbad.com/blog/2005/07/12/xoxo_outliner_experiment written] a [http://www.decafbad.com/2005/07/map-test/tree2.html nice XOXO outline editor in javascript]. | |||
* http://homepage.mac.com/ctholland/thelab/outlines/ is a great demonstration of dynamic interactive XOXO with use of "compact" and DHTML to collapse/expand. | |||
* http://tool-man.org/examples/sorting.html is a great demonstration of drag and drop sortable XOXO lists with javascript and CSS. | |||
* http://www.opendarwin.org/~drernie/xoxo-datatypes.html Mapping XOXO to [http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Concepts/XMLPListsConcept.html Mac OS X property lists] | |||
* [http://weblog.techno-weenie.net/2005/9/30/if_i_had_a_tumblelog single line of rails to convert XOXO to HTML] | |||
=== Sample Code === | |||
* See the [[xoxo-sample-code]] page for open source sample code to read and write XOXO files. | |||
* See also the [[xoxo-compact-sample]] page with source for CSS and JS that alters the look and feel of some very plain XOXO to have twiddlable triangles for nested lists that respect the compact attribute as well. | |||
== XOXO Schemas == | |||
This section is informative. | |||
Note: these may be out of date and require updating to reflect the use of <dl> for annotating XOXO items with arbitrary properties. | |||
* [[DTDs]] | |||
* [http://www.nidelven-it.no/projects/XOXO/xoxo-0.1.tgz Schemas (Relax NG and DTDs)] | |||
== References == | |||
=== Normative References === | |||
* [http://www.w3.org/TR/xhtml1 XHTML 1.0] | |||
* [http://www.w3.org/TR/xhtml-modularization XHTMLMOD] | |||
* [http://gmpg.org/xmdp/ XMDP] | |||
* [http://gmpg.org/xfn/ XFN] | |||
=== Informative References === | |||
This section is '''informative'''. | |||
* [https://web.archive.org/web/20071017054844/http://developers.technorati.com:80/wiki/attentionxml Attention.xml] | |||
* [[VoteLinks]] | |||
* [http://www.w3.org/TR/xhtml11 XHTML 1.1] | |||
* [http://opml.scripting.com/spec OPML 1.0] | |||
* Contributed from <nowiki>http://developers.technorati.com/wiki/XOXO</nowiki> ([https://web.archive.org/web/20050330023331/http://developers.technorati.com:80/wiki/XOXO 2005-03-30 Internet Archive version]) | |||
** and previously <nowiki>http://developers.technorati.com/wiki/xhtmloutlines</nowiki> ([https://web.archive.org/web/20040229152334/http://developers.technorati.com/wiki/xhtmloutlines 2004-02-29 Internet Archive version]) | |||
=== Similar Work === | |||
* [http://dannyayers.com/archives/001961.html XHTML Outlines] - DannyAyers independently came up with idea in 2003 October (just a month or two before Kevin and Tantek independently came up with XOXO) to use a simple profile of XHTML to semantically represent outlines using existing building blocks from XHTML. | |||
* [http://semtext.org/2004-02/ XOW] - making them editable, producing RDF and bookmark lists from them (DannyAyers) | |||
* [http://en.wikipedia.org/wiki/XBEL XBEL, or the XML Bookmark Exchange Language], an open XML standard for sharing Internet URIs, also known as bookmarks (or favorites in Internet Explorer). | |||
* [http://en.wikipedia.org/wiki/OPML OPML (Outline Processor Markup Language)], an XML format for outlines. | |||
=== Related Reading === | |||
* [http://patricklogan.blogspot.com/2005/08/lists-really-can-we-expect-better.html Patrick Logan on why OPML and a Microsoft Lists extension are both unnecessary]. | |||
=== Unrelated Reading === | |||
* [http://www.questionablecontent.net/view.php?comic=493 Questionable Content comic #493] - apparently the Faye character is a fan of XOXO. | |||
=== Promotional Materials / Schwag === | |||
* There is an entire XOXO clothing and accessories line. [http://www.xoxo.com/ Buy XOXO stuff online]. | |||
== Discussions == | |||
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 XOXO: | |||
* See [[xoxo-brainstorming]] for additional thoughts on how to use XOXO for specific uses. | |||
=== Q&A === | |||
* If you have any questions about XOXO, check the [[xoxo-faq]], and if you don't find answers, add your questions! | |||
=== Issues === | |||
* Please add any issues with the specification to the separate [[xoxo-issues]] document. | |||
[[Category:Specifications]] | |||
[[Category:XOXO]] |
Latest revision as of 23:18, 16 February 2023
XOXO is a simple, open outline format written in standard XHTML and suitable for embedding in (X)HTML, Atom, RSS, and arbitrary XML. XOXO is one of several microformat open standards.
Draft Specification 2004-10-01
Editor
Authors
- Kevin Marks
- Tantek Çelik
- Mark Pilgrim
- Morten W. Petersen
Copyright
This specification is (C) 2003-2024 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.
- Tantek: I release all my contributions to this specification into the public domain and I encourage the other authors to do so as well.
- When all authors/editors have done so, we can remove the MicroFormatCopyrightStatement template reference and replace it with the MicroFormatPublicDomainContributionStatement.
Patents
This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy, and IETF RFC3667 & RFC3668.
Preamble
When we were discussing Attention.xml, Tantek pointed out that XHTML has everything necessary for semantically expressing outlines and blogroll-like subscriptions in an XML format that is both interactively renderable by browsers and parsable by strict XML engines. This page is here to discuss this idea.
Name
XOXO stands for eXtensible Open XHTML Outlines, and is pronounced variously as 'ecks oh ecks oh', 'zho-zho', or 'sho-sho'.
Abstract
XOXO is one of several microformats. This specification defines a new XHTML document type that is based upon the module framework and modules defined in Modularization of XHTML (XHTMLMOD). The purpose of the XOXO document type is to serve as the basis for XHTML friendly outlines for processing by XML engines and for easy interactive rendering by browsers.
The XOXO Document Type
The XOXO document type is made up of the following XHTML modules. The elements, attributes, and minimal content models associated with these modules are defined in "Modularization of XHTML" (XHTMLMOD). The elements are listed here for information purposes, but the definitions in "Modularization of XHTML" should be considered definitive. In the on-line version of this document, the module names in the list below link into the definitions of the modules within the current version of "Modularization of XHTML".
body, head, html, title
a
dl, dt, dd, ol, ul, li
meta
style element
style attribute
link
Attribute compact on ol and ul
The XOXO Profile
See xoxo-profile for the XMDP profile of XOXO which defines the XOXO values for the class attribute.
Simple XOXO Fragment
Markup
<ol class='xoxo'> <li>Subject 1 <ol> <li>subpoint a</li> <li>subpoint b</li> </ol> </li> <li>Subject 2 <ol compact="compact"> <li>subpoint c</li> <li>subpoint d</li> </ol> </li> <li>Subject 3 <ol> <li>subpoint e</li> </ol> </li> </ol>
Sample Rendering
1. Subject 1 a. subpoint a b. subpoint b 2. Subject 2 3. Subject 3 a. subpoint e
Usage of 'compact' attribute
Note the use of the 'compact' attribute to indicate that the subpoints of the headline "Subject 2" are not in an expanded state. The absence of the 'compact' attribute elsewhere indicates that the other headlines are in an expanded state.
Possible Default Style Rules for Sample Rendering
ol.xoxo { list-style:decimal; } ol.xoxo ol { list-style:lower-latin; } ol[compact="compact"] { display:none; }
More Simple Examples
MarkP has a set of examples that demonstrates both the simplicity of the markup and the presentational richness that is possible:
- simple XO file that can be embedded directly into an XHTML page
- XO with nested groups, also directly embeddedable in XHTML
- XO as a standalone XHTML page (valid XHTML)
- XO as a standalone XHTML page, styled with CSS (also valid XHTML)
- Chris Holland Outline Helper: tweaked one of above samples, yanked CSS for simplicity, added reference to outlines.css and outlines.js, pasted a few different combinations of ul/ol/li with the compact attribute.
- in trying to comply with semantic principles the "compact" attribute to ol and ul elements is what drives the display state. Via scripting, i'm setting classes on containing li element for added styling flexibility, though CSS Gurus might be able to replace "li.expanded" in outlines.css with some other CSS selector that says "select an li node that contains an ol node with a 'compact' attribute set".
- The CSS selector for "an li node that contains an ol node with a 'compact' attribute set" would be 'li ol[compact="compact"]'.
- in trying to comply with semantic principles the "compact" attribute to ol and ul elements is what drives the display state. Via scripting, i'm setting classes on containing li element for added styling flexibility, though CSS Gurus might be able to replace "li.expanded" in outlines.css with some other CSS selector that says "select an li node that contains an ol node with a 'compact' attribute set".
Properties of Outline Items
Outlines typically consist of a hierarchy of points and subpoints. Each of those points (outline items) itself may have some properties (AKA attributes or metadata) that need to be represented. Perhaps the most common additional property on outline items in practice is the URL as demonstrated in Mark Pilgrim's examples above. Even the text label/title of an outline item could be considered a common property. A few such common properties:
- text
- description
- url (often called xmlurl or htmlurl; sometimes called permalink)
- title
- type (hint of the MIME type of the resource indicated by the URL)
In general, properties on an outline item <li>
are represented by a nested definition list <dl>
. Strictly speaking, it is the first <dl>
inside the <li>
and before any following <ol>
, <ul>
, or <li>
, e.g. here is an item "item 1" with a description property (the subpoints are there purely as a point of reference to an earlier example).
<ol class='xoxo'> <li>item 1 <dl> <dt>description</dt> <dd>This item represents the main point we're trying to make.</dd> </dl> <ol> <li>subpoint a</li> <li>subpoint b</li> </ol> </li>
Special Properties
There are a handful of special properties which we are able to represent more directly and conveniently with the semantic XHTML building blocks that we have included, instead of terms in a definition list. Mostly taken from the above list of common properties, these are:
- text, url, title, type, and rel (short for relationship)
If we were to represent them simply as definition terms (including the "description" property from the previous example), they might look something like this:
Example for the sake of discussion only / not a canonical XOXO example:
<ol class='xoxo'> <li> <dl> <dt>text</dt> <dd>item 1</dd> <dt>description</dt> <dd> This item represents the main point we're trying to make.</dd> <dt>url</dt> <dd>http://example.com/more.xoxo</dd> <dt>title</dt> <dd>title of item 1</dd> <dt>type</dt> <dd>text/xml</dd> <dt>rel</dt> <dd>help</dd> </dl> </li>
However, by taking advantage of the semantic <a href>
element, we are able to dramatically simplify the common cases that utilize these properties. From a parser's perspective, this applies to the first <a href>
element directly inside the <li>
.
Actual XOXO Example:
<ol class='xoxo'> <li><a href="http://example.com/more.xoxo" title="title of item 1" type="text/xml" rel="help">item 1</a> <!-- note how the "text" property is simply the contents of the <a> element --> <dl> <dt>description</dt> <dd>This item represents the main point we're trying to make.</dd> </dl> </li>
Any other properties are simply added to the definition list in the same way as the "description" property.
Multi-value Properties
Properties that have multiple values are added using a list, nested inside of the corresponding dl
element:
<ol class='xoxo'> <li>item 1 <dl> <dt>multivalproperty1</dt> <dd><ul> <li>value-a</li> <li>value-b</li> </ul></dd> </dl> </li> </ol>
Publishing XOXO
XOXO may be published in two forms, valid XHTML, and simple well-formed XML.
Valid XHTML XOXO
A valid XHTML XOXO page is a complete XHTML document.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>XOXO page</title> </head> <body> <ol class="xoxo"> <li><a href="URL-one">TEXT-one</a></li> <li><a href="URL-two">TEXT-two</a></li> ... </ol> </body> </html>
Simple well-formed XML XOXO
The root element of a simple well-formed XML XOXO page is either an ol
or ul
with class name of "xoxo". This variant is ideal for syndication and transclusion into (X)HTML pages with AHAH.
<ol class="xoxo"> <li><a href="URL-one">TEXT-one</a></li> <li><a href="URL-two">TEXT-two</a></li> ... </ol>
Content-Type
Valid or well-formed XHTML XOXO SHOULD be served with this Content-Type header for maximum browser compatibility.
Content-Type: text/html; charset=utf-8
It MUST be served with one of these Content-Type headers:
Content-Type: text/html; charset=utf-8 Content-Type: application/xhtml+xml Content-Type: application/xml
Examples in the Wild
This section is informative.
There are many wild examples. Nearly every blogroll on the Web can be parsed as XOXO, since they are typically an unordered list of list items of hyperlinks, which is within the XOXO profile. List examples here, when the list becomes too long we can move to a dedicated page.
Implementations
This section is informative.
- CVarious S5 tools
- Christian Neukirchen has written a xoxo.rb, a XOXO parser and generator for Ruby
- Odeo publishes users' subscription lists in XOXO. See Ryan King's list here.
- Les Orchard has written a nice XOXO outline editor in javascript.
- http://homepage.mac.com/ctholland/thelab/outlines/ is a great demonstration of dynamic interactive XOXO with use of "compact" and DHTML to collapse/expand.
- http://tool-man.org/examples/sorting.html is a great demonstration of drag and drop sortable XOXO lists with javascript and CSS.
- http://www.opendarwin.org/~drernie/xoxo-datatypes.html Mapping XOXO to Mac OS X property lists
- single line of rails to convert XOXO to HTML
Sample Code
- See the xoxo-sample-code page for open source sample code to read and write XOXO files.
- See also the xoxo-compact-sample page with source for CSS and JS that alters the look and feel of some very plain XOXO to have twiddlable triangles for nested lists that respect the compact attribute as well.
XOXO Schemas
This section is informative.
Note: these may be out of date and require updating to reflect the use of <dl> for annotating XOXO items with arbitrary properties.
References
Normative References
Informative References
This section is informative.
- Attention.xml
- VoteLinks
- XHTML 1.1
- OPML 1.0
- Contributed from http://developers.technorati.com/wiki/XOXO (2005-03-30 Internet Archive version)
- and previously http://developers.technorati.com/wiki/xhtmloutlines (2004-02-29 Internet Archive version)
Similar Work
- XHTML Outlines - DannyAyers independently came up with idea in 2003 October (just a month or two before Kevin and Tantek independently came up with XOXO) to use a simple profile of XHTML to semantically represent outlines using existing building blocks from XHTML.
- XOW - making them editable, producing RDF and bookmark lists from them (DannyAyers)
- XBEL, or the XML Bookmark Exchange Language, an open XML standard for sharing Internet URIs, also known as bookmarks (or favorites in Internet Explorer).
- OPML (Outline Processor Markup Language), an XML format for outlines.
Related Reading
- Questionable Content comic #493 - apparently the Faye character is a fan of XOXO.
Promotional Materials / Schwag
- There is an entire XOXO clothing and accessories line. Buy XOXO stuff online.
Discussions
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 XOXO:
- See xoxo-brainstorming for additional thoughts on how to use XOXO for specific uses.
Q&A
- If you have any questions about XOXO, check the xoxo-faq, and if you don't find answers, add your questions!
Issues
- Please add any issues with the specification to the separate xoxo-issues document.