xoxo: Difference between revisions
No edit summary |
|||
Line 108: | Line 108: | ||
* [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-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-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 | * [http://diveintomark.org/public/2004/01/xo-standalone.xo XO as a standalone XHTML page] ([http://validator.w3.org/check?uri=http://diveintomark.org/public/2004/01/xo-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 | * [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://diveintomark.org/public/2004/01/xo-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. | * [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". | ** 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". | ||
Line 122: | Line 122: | ||
* type (hint of the MIME type of the resource indicated by the URL) | * 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> | 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> | ||
Revision as of 21:50, 22 April 2007
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 microformat open standards.
Draft Specification 2004-10-01
Editor
Authors
- Kevin Marks, Technorati, Inc
- Tantek Çelik, Technorati, Inc (formerly of Microsoft Corporation)
- Mark Pilgrim, IBM
- 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.
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>
,