This page documents questions and answers regarding the XOXO 1.0: Extensible Open XHTML Outlines (Extensible Open XHTML Outlines) format.
Q: what's XOXO for?
A: XOXO is a microformat for marking up collections, lists, and outlines in (X)HTML. XOXO 1.0: Extensible Open XHTML Outlines is based on posh. XOXO 1.0: Extensible Open XHTML Outlines can often be used as a building block with other microformats to construct specific structures and formats. E.g. XOXO 1.0: Extensible Open XHTML Outlines+XFN - The XHTML Friends Network produces a portable XFN friends list. See hCard+XFN supporting friends lists for more on portable XFN friends lists.
the 'compact' attribute
Q: why is compact/expanded expressed via a new attribute and not by a style class? Wouldn't it be more compatible to simply use a style class?
A: The 'compact' attribute is not a new attribute. It is defined in XHTML Modularization, and has been in HTML (4, 3.2, 2) since HTML Plus. Whenever possible it is better to reuse an existing HTML attribute for semantics, instead of a style class. The essay A Touch of Class discusses such semantic nuances in more detail.
Q: Follow-up: wouldn't a style class applied to the sub-outline's parent
<li> element allow control over the rendering of the outline and its subject (e.g. adding an expand/collapse widget as a bullet-point)?
A:See previous A: it is better to reuse an existing HTML attribute for semantics, rather than a style class. A style rule can be written to utilize the "compact" attribute just as easily as the "class" attribute, and then allow control over rendering of the outline and its subject.
Q: Follow-up: Is 'compact' supposed to remove borders and spacing around a list? A: No. Please RTFM. HTML 4.01 on the 'compact' attribute: "When set, this boolean attribute gives a hint to visual user agents to render the list in a more compact way." And rendering the list in a more compact way (in particular, fully compacted) is exactly what XOXO 1.0: Extensible Open XHTML Outlines specifies for the 'compact' attribute.
Q: Why isn't the XForms "appearance" attribute used instead of "compact"?
A: Why should the XForms "appearance" attribute be used? There is no need for it, nor is there any need for a second namespace to make simple things more complicated than they need to be.
Q: Why is the 'compact' attribute, which was deprecated in the HTML4 specification, used in the XOXO format? Isn't it better not to use any deprecated elements or attributes?
A: The 'compact' attribute as specified in HTML4 is purely presentational and as such was deprecated. Since this attribute has been little used, we have repurposed it as a semantic attribute in XOXO that actually preserves the state of whether or not the user has twiddled an outline item and all its children in the open state vs. the closed state. We recycled the 'compact' attribute instead of making a new attribute to minimize reinvention, and to make an otherwise useless attribute useful again.
Q: Why don't MarkP's examples use
<ol class="xoxo"> ?
A: The use of
class="xoxo" is optional for XOXO authors and user agents.
other markup in xoxo
Q: MarkP uses
<p> in some of his examples. Is that allowed? If yes, shouldn't
<p> then be added to the description of XOXO's "document type" (see above)?
A: Yes, additional elements and/or attributes are allowed per XHTML Modularization, and no, all such possible additions (e.g.
<p>) don't need to be added to the XOXO document type since XOXO user agents may simply treat them according to the XHTML Modularization user agent conformance requirements (4-6):
1. ... 2. ... 3. ... 4. If a user agent encounters an element it does not recognize, it must continue to process the children of that element. If the content is text, the text must be presented to the user. 5. If a user agent encounters an attribute it does not recognize, it must ignore the entire attribute specification (i.e., the attribute and its value). 6. If a user agent encounters an attribute value it doesn't recognize, it must use the default attribute value.
xoxo properties and values
Q: Can an XOXO item have a multi-valued property, or a property with multiple values?
A: Yes. Here is how you would do that:
<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>
Q: Is there a way to specify a title or name for the outline as a whole?
Q: Are any wikis using XOXO or anything similar to create collapsing outlines? If so, which ones?