Singpolyma

XOXO (A Semantic Weblog)

How Can XOXO Be Used?

Posted on

XOXO is the most abstract and extensible of all the microformats. While what it can be used for certainly is not infinite, and there are some things it should not be used for, it can certainly be used for a great many varying applications. This post intends to be a discussion of some examples of such use cases.

No Available Microformat
If you want to mark up a part of a webpage in a structured way, either because you feel that a reason for someone wanting to write code to parse the data is probable, or because you wish to write such code yourself, you should first check the microformats list for an existing microformat dealing with your data type. If no suitable microformat exists, XOXO may be the answer. Be careful however, if your particular usage can be generalised into something common across the web that would benefit from standardised markup you may have a candidate for suggesting a new microformat.

XOXO can usually easily be styled using CSS to look the same as a non-XOXO page. This combined with the ease of parsing the format makes it very useful in most cases where data needs to be parseable but there is no existing microformat available. It is reccomended to use ‘standard’ fields (fields not included in the optional DL-list element) wherever possible, however whether or not to use anchor tags when there is no HREF is debateable.

Extending Existing Microformats
XOXO can also be easily used to extend existing microformats. For example, the XOXO Blog Format complies fully with the hAtom microformat, but also adds options for more data to be encapsulated. XOXO is very useful for this because its markup can easily be made to comply with most other microformats, meaning that parsers of the microformat in question will be able to handle it just fine, while XOXO parsers will be able to extract the extra data as well. In addition to this, if the extra data provided by the XOXO extension is stored in ‘Alternate-A fields’, and not in ‘DL-fields’, most microformat parsers can be easily modified to support the extra fields without strict XOXO compliance.

When not to use XOXO
There are a couple reasons not to use XOXO to mark up your data.

  1. If there is an existing microformat that will serve your purpose as it is (check the microformats list)
  2. If your use case qualifies for the creation of a new microformat

Leave a Response